query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
33ea2ed23a84e359e632b276f2b392bd
The original name of the model.
[ { "docid": "ed14eee39283bce678a925fe505729c2", "score": "0.0", "text": "public function getModelName()\n {\n return self::$swaggerModelName;\n }", "title": "" } ]
[ { "docid": "dfb124bdcf6a52293205375885ded54b", "score": "0.81750536", "text": "public function getOriginalName()\n {\n return $this -> name;\n }", "title": "" }, { "docid": "65707f3edb771eb4a04be9390831c83a", "score": "0.8089734", "text": "public function getOriginalName() {\n\t\treturn $this->getName();\n\t}", "title": "" }, { "docid": "88601dd4975cce53fd1c2cf27ad89c6d", "score": "0.8087518", "text": "public function getOriginalName()\n {\n return $this->originalName;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.78806794", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.78806794", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.78806794", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.78806794", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "fabc1cc43ac0e74f63353bcb7c166e2d", "score": "0.78806794", "text": "public function modelName() {\n return self::$_name;\n }", "title": "" }, { "docid": "afc1cd2bb67948f857796093d76160a8", "score": "0.7876079", "text": "function name() {\n return str_replace('Model', '', get_class($this));\n }", "title": "" }, { "docid": "a7051263996ee3ad3ea29e3edc47f768", "score": "0.78401834", "text": "public function getName()\n {\n\n $logger = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get('\\Akhil\\Customlog\\Logger\\Customlogger');\n $logger->info('Model Rewrite Test');\n\n return $this->_getData(self::NAME);\n }", "title": "" }, { "docid": "8d5c0b3dcad7862e9e88122f4fad17e8", "score": "0.77297616", "text": "public function getName() {\n return $this->model->name;\n }", "title": "" }, { "docid": "ac444a4daa01713c69de8026a775b316", "score": "0.7692115", "text": "private function getModelName()\n {\n $model = new \\ReflectionClass($this);\n $this->model = $model;\n\n return $this->model->getName();\n }", "title": "" }, { "docid": "1ef5e033b3888490fb59df8215ed907e", "score": "0.76030576", "text": "public function getModelName()\n {\n return ucfirst($this->getCamelCase());\n }", "title": "" }, { "docid": "3aa301a664c5a0c054211a7af7a5f5f8", "score": "0.7573876", "text": "function __getModelName()\n {\n return Str::lower($this->getRepository()->getModelName());\n }", "title": "" }, { "docid": "f30fbfd3e6fe8ad90cbac862ddbddf1f", "score": "0.7514891", "text": "public function model_name()\n\t{\n\t\treturn $this->_model_name;\n\t}", "title": "" }, { "docid": "fbd0f6b913fe818425bc92191d70eb31", "score": "0.7502106", "text": "public static function getModelName() {\r\n\t\t$name = str_replace(static::getClassPrefix(), '', get_called_class());\r\n\t\treturn $name;\r\n\t}", "title": "" }, { "docid": "b01bcb6a8160437d323cab8d9857a996", "score": "0.7476831", "text": "protected function getOriginalName()\n {\n return AbstractElement::getName();\n }", "title": "" }, { "docid": "42bdf2a1121eb4163f5300060e83cf8a", "score": "0.7466508", "text": "public function getModelNameAttribute()\n {\n return Str::lower(class_basename(static::class));\n }", "title": "" }, { "docid": "7794fafa939055e7921ae6bc5b9a5868", "score": "0.7384415", "text": "public function getModelName()\n\t{\n\t\tif ( $this->isVirtual() )\n\t\t\treturn '_virtual_model_on_' . $this->set;\n\n\t\treturn $this->reflection->getName();\n\t}", "title": "" }, { "docid": "b808501ab129397970a12f90c791a25e", "score": "0.73527044", "text": "public function getModelName()\n {\n return (new \\ReflectionClass($this))->getShortName();\n }", "title": "" }, { "docid": "8b60632f50578b24f03e960299ee12f5", "score": "0.7272249", "text": "public function getName() {\n return $this->getRawName();\n }", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "926018f383e6e4f8684b04602d62abf9", "score": "0.7268473", "text": "public function getModelName();", "title": "" }, { "docid": "6ca4af71d2201ac2ed426c47e95fdb44", "score": "0.7227277", "text": "public function getModelName() {\n\t\treturn $this->definition->getName();\n\t}", "title": "" }, { "docid": "3a3656ff231664848bcbdb2d09205d67", "score": "0.72072154", "text": "function getNormalizedName() {\n return $this->normalizedName;\n }", "title": "" }, { "docid": "da5feb5b2a3c3142611ecc228283d6c1", "score": "0.7204127", "text": "public function getModelFileName() {\n\t\treturn $this->getMixtureFilesPath().$this->getSpeaker().$this->conf['extensions']['mixture'];\n\t}", "title": "" }, { "docid": "cf207270847e045bebef01c5cf041d6b", "score": "0.7198661", "text": "final protected function get_name(){\n\n return str_replace('Admin', '', $this->model_name ) . '[' . $this->element . ']';\n\n }", "title": "" }, { "docid": "9912b4501849ee9f6533057f6ed7d371", "score": "0.7176854", "text": "public function getName()\n\t{\n\t\tif (empty($this->name))\n\t\t{\n\t\t\t$r = null;\n\n\t\t\tif (!preg_match('/(.*)\\\\\\\\Model\\\\\\\\(.*)/i', get_class($this), $r))\n\t\t\t{\n\t\t\t\tthrow new CannotGetName;\n\t\t\t}\n\n\t\t\t$this->name = $r[2];\n\t\t}\n\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "e63f619840d89cc17100a27fad701624", "score": "0.714292", "text": "public function getNameAttribute()\n {\n return $this->name();\n }", "title": "" }, { "docid": "9a049aff795b39a09bee1a3c3fe89108", "score": "0.7132029", "text": "public static function getModelName();", "title": "" }, { "docid": "92a751339a8abf2f2d30a4b77f6dc52b", "score": "0.70886576", "text": "public function getModelName()\n {\n if($this->option('model'))\n return $this->option('model');\n\n return str_replace('Repository', '', $this->argument('name'));\n }", "title": "" }, { "docid": "5e409d18beda81e616d1747822a44e87", "score": "0.7081416", "text": "public function getOriginalFieldName(): string\n {\n return substr($this->FIELD_NAME, self::CRM_USERFIELD_PREFIX_LENGTH);\n }", "title": "" }, { "docid": "0311e5797dc8c4720084b482bbc31d21", "score": "0.70450634", "text": "public function getModelClassName()\n {\n return str_replace(' ', '', ucwords(str_replace('_', ' ', $this->tableName)));\n }", "title": "" }, { "docid": "06d0a4bb01075fa7369c4d68fbfa5561", "score": "0.70447934", "text": "public function getOriginalLabel()\n {\n return $this->originalLabel;\n }", "title": "" }, { "docid": "065485d571c1b5443610e17adbbfcd45", "score": "0.70203114", "text": "public function getModelName()\n\t{\n\t\t// print \"Hello from JoomooBaseController::getModelName()<br />\\n\";\n\t\t// print \"returning this->_modelName = \\\"$this->_modelName\\\" <br />\\n\";\n\n\t\treturn $this->_modelName;\n\t}", "title": "" }, { "docid": "92ddd6e42f780921a3f8019c5803bd55", "score": "0.7018977", "text": "public function getModelName()\n {\n return self::$fastlyModelName;\n }", "title": "" }, { "docid": "92ddd6e42f780921a3f8019c5803bd55", "score": "0.7018977", "text": "public function getModelName()\n {\n return self::$fastlyModelName;\n }", "title": "" }, { "docid": "92ddd6e42f780921a3f8019c5803bd55", "score": "0.7018977", "text": "public function getModelName()\n {\n return self::$fastlyModelName;\n }", "title": "" }, { "docid": "b53f0eed0d845a341dfaa32dfa86fe47", "score": "0.6991947", "text": "public function getModelDisplayName()\n {\n return $this->model_display_name;\n }", "title": "" }, { "docid": "4be70b1ec0a2679efbf2380e8f171930", "score": "0.6984572", "text": "public function getModelName()\n {\n return $this->modelName;\n }", "title": "" }, { "docid": "13246a671e187956539f4a32b8eae5b2", "score": "0.6961849", "text": "public function getNameAttribute()\n {\n $path = explode('\\\\', __CLASS__);\n $default = array_pop($path) . '_' . $this->attributes['id'];\n return $this->attributes['name'] ?: $default;\n }", "title": "" }, { "docid": "5fef6d9a66ac548f9179b80e27afc448", "score": "0.6923419", "text": "protected function getModelName()\n {\n $service = get_called_class();\n if (preg_match('/DklCreations/', $service)) {\n $model = str_replace('DklCreations\\SHCommon\\Services\\\\', '', $service);\n $model_name = 'DklCreations\\SHCommon\\Models\\\\' . str_replace('Service', '', $model);\n } else {\n $model = str_replace('App\\Services\\\\', '', $service);\n $model_name = 'App\\Models\\\\' . str_replace('Service', '', $model);\n }\n return $model_name;\n }", "title": "" }, { "docid": "3c48ebe7848b8a5edb4aed2d50fbc9dc", "score": "0.6897375", "text": "public function getRealName()\n {\n // TODO: Implement getRealName() method.\n }", "title": "" }, { "docid": "205384a401b8b39bb175996e4db42d26", "score": "0.68930864", "text": "public function getInputName()\n {\n if (!isset($this->_inputName)) {\n $nameModel = $this->model->formName();\n\n $this->_inputName = \"{$nameModel}[{$this->field}]\";\n }\n return $this->_inputName;\n }", "title": "" }, { "docid": "7248b1ee76b18761eb3c792e5e3c5463", "score": "0.68776536", "text": "public function getOriginalName() {\r\n\t\treturn $_FILES[$this->name]['name'];\r\n\t}", "title": "" }, { "docid": "9aaf82531725b119f0d4b613203a4527", "score": "0.68683785", "text": "public function getName(){\n\t\treturn $this->name();\n\t}", "title": "" }, { "docid": "0d0f28de99592ee3cf63ea0055c02230", "score": "0.6860958", "text": "public function getSavedName()\n {\n return $this->savedName;\n }", "title": "" }, { "docid": "6fc8ff7a0ce01f5133c2c4bde0163473", "score": "0.68596965", "text": "public function modelName(): string\n {\n $resolver = static::$modelNameResolver ?: static function (self $factory) {\n $name = Str::replaceLast('Factory', '', Str::classBasename($factory));\n\n return $name.'Model';\n };\n\n return $this->model ?: $resolver($this);\n }", "title": "" }, { "docid": "abe28a6049171668b559ad27af217c0a", "score": "0.6856537", "text": "abstract protected function _getModelName();", "title": "" }, { "docid": "e15472021a6af13bee1829bf4a3a5b60", "score": "0.6850181", "text": "public function getRawName() {\n return $this->src->getAttribute('name');\n }", "title": "" }, { "docid": "640dcafe41afc077e894ecb49ecec350", "score": "0.68399495", "text": "protected function tryInferName()\n\t{\n\t\treturn class_basename(get_class($this->model));\n\t}", "title": "" }, { "docid": "6bb36941036858c72e4ee36ba1de5fe8", "score": "0.68386006", "text": "protected function getInputNamePrefix()\n {\n $model = $this->context->model;\n if ($model instanceof Model) {\n if (empty($this->renderer->columns) || ($this->isRendererHasOneColumn() && $this->hasModelAttribute($this->name))) {\n return $model->formName();\n }\n\n return Html::getInputName($this->context->model, $this->context->attribute);\n }\n\n return $this->context->name;\n }", "title": "" }, { "docid": "7cc11f244d4a0bc321ae086df6f3f92b", "score": "0.68155134", "text": "public function getName()\r\n {\r\n return $this->name();\r\n }", "title": "" }, { "docid": "992f70d309dab59784d072ebd49af633", "score": "0.68144363", "text": "protected function getName()\r\n {\r\n \treturn (string) $this->_name;\r\n }", "title": "" }, { "docid": "1e22026883da7f22df0e3877260bbfad", "score": "0.68045515", "text": "public static function _nameSingular()\n {\n return _('BaseModel');\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "d89afbbaedac38ee6bc45fc84569f1ab", "score": "0.68043435", "text": "public function getModelName() : string\n {\n return self::$openAPIModelName;\n }", "title": "" }, { "docid": "07cc5be7c91195be8fd84b853a441d8c", "score": "0.6787615", "text": "function name( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n return $this->Name;\n }", "title": "" }, { "docid": "04206162fdb8aaadb154184c831cef02", "score": "0.67773086", "text": "public function getModelName()\n {\n return self::$mxModelName;\n }", "title": "" }, { "docid": "cabd01a5df3506f895885274347a3499", "score": "0.67729855", "text": "public function renderName()\n {\n if($this->model->name)\n return strtoupper($this->model->name);\n\n return $this->renderDraftedName();\n }", "title": "" }, { "docid": "d762415e6ea1048ec4b6fc981da24089", "score": "0.6763626", "text": "public function name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "d762415e6ea1048ec4b6fc981da24089", "score": "0.6763626", "text": "public function name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "8d56b8c8c913b9f2cf97653bf2ed845c", "score": "0.6762842", "text": "public function getParentModelDisplayName()\n {\n return $this->parent_model_display_name;\n }", "title": "" }, { "docid": "63b76408d1c24eda6bace60264102410", "score": "0.67618877", "text": "public function get_name() {\n return $this->name;\n }", "title": "" }, { "docid": "63b76408d1c24eda6bace60264102410", "score": "0.67618877", "text": "public function get_name() {\n return $this->name;\n }", "title": "" }, { "docid": "404198862b675051c37d49be36cef2a5", "score": "0.67597026", "text": "final public function name()\n {\n return $this->doName();\n }", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6756782", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6756782", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "a9f5c63b86ee424b909ddfb549392d33", "score": "0.6756782", "text": "public function get_name() {\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "b896a7329af4ca2c6814299b401cfee2", "score": "0.6752876", "text": "public function getName()\n {\n return $this->__get('name');\n }", "title": "" }, { "docid": "506a70be8a1d8492090a456f5adb818f", "score": "0.6748694", "text": "public function name() {\r\n\t\treturn $this->name;\r\n\t}", "title": "" }, { "docid": "c24bb3ead80d9dcd79c0db29a40e5412", "score": "0.67463446", "text": "public function getName()\n\t{\n\t\t$className = get_class($this);\n\t\t$start = strrpos($className, '\\\\') + 1;\n\t\t$name = substr($className, $start, -15);\n\t\treturn strtolower($name);\n\t}", "title": "" }, { "docid": "4146b1f70b764f21b4a2cfe4167922f1", "score": "0.67437685", "text": "public function get_name() {\n\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "bc093d482b98cb862dfa838ea75fabb4", "score": "0.67429155", "text": "public static function _nameEntity()\n {\n $str = \\lib\\MyFunctions::camelCaseToUnderscored(get_called_class());\n return str_replace('\\\\','_',$str);\n }", "title": "" }, { "docid": "03cf4f2d068e24f0e81a813daaa0be2f", "score": "0.67359", "text": "public function get_name()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "93c60fd08e1fde7b7ca5342f0d835e11", "score": "0.6719022", "text": "protected function getNameInput()\n {\n return trim(\"Models\\\\\" . $this->argument('name'));\n }", "title": "" }, { "docid": "389227495585ec8c953ec60126ee1536", "score": "0.6718381", "text": "public function get_model_nombre()\n\t{\n\t\treturn $this->model_nombre;\n\t}", "title": "" }, { "docid": "0888a4fcbe97db2c53121959344922cb", "score": "0.6716123", "text": "public function getNameAttribute() {\n return $this->attributes['name'] ? $this->attributes['name'] : '';\n }", "title": "" }, { "docid": "4e343d445cdb72a627d065f45f50e7e1", "score": "0.67063487", "text": "public function getName()\n {\n return $this->base->name;\n }", "title": "" }, { "docid": "5673eacaf7b6f4c8743c34f763f9a9a9", "score": "0.67013144", "text": "public function getNameAttribute()\n\t{\n\t\treturn preg_replace('/\\s+/', '', $this->attributes['key']);\n\t}", "title": "" }, { "docid": "40967f18361a980850a8e9fde9f47d22", "score": "0.66914713", "text": "public function name() {\n\t\t\treturn $this->_name;\n\t\t}", "title": "" }, { "docid": "65114c2641972e6f209e85ad92fb95cf", "score": "0.66899174", "text": "public function get_name()\n {\n return $this->name;\n }", "title": "" }, { "docid": "65114c2641972e6f209e85ad92fb95cf", "score": "0.66899174", "text": "public function get_name()\n {\n return $this->name;\n }", "title": "" }, { "docid": "3b2b67f98ec623952d062433914d9287", "score": "0.6687969", "text": "function __modelName($name) {\r\n\t\treturn Inflector::camelize(Inflector::singularize($name));\r\n\t}", "title": "" }, { "docid": "19597444ebaeac3c050b6d20d6a8665d", "score": "0.66873014", "text": "protected function guessName()\n {\n return substr(get_class($this), 0, -13);\n }", "title": "" }, { "docid": "ce7519fc2a2bbeed3e8ad498ba5606a4", "score": "0.66869444", "text": "public function get_name(): string {\n return $this->name;\n }", "title": "" }, { "docid": "c059900294e06342e441eb3f7dcfc591", "score": "0.6670357", "text": "public function name()\n {\n return \"normal\";\n }", "title": "" }, { "docid": "8aa12f75e4e0151d12c5f90277a2202d", "score": "0.66700023", "text": "public function getName() {\n return $this->__name;\n }", "title": "" }, { "docid": "d7f58c91d0b19c666a0e271813e58356", "score": "0.6667183", "text": "public function getName()\n\t{\n\t\treturn $this->getData()->name;\n\t}", "title": "" }, { "docid": "b403b2ae854b5b420f7e87330d19737a", "score": "0.6665287", "text": "public function getObjectName()\n {\n return $this->getAttr('object_name');\n }", "title": "" }, { "docid": "2dc46440561c93a69546d4faff036494", "score": "0.66632277", "text": "public function getName()\n {\n return '';//need override\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "1a5a3f26c87a6b11a2f7701d125bf7a0", "score": "0.0", "text": "public function index()\n {\n $data = array();\n $Actor = Auth::user()->actor;\n $data['Actor'] = $Actor;\n // CARGAR NOTIFICACIONES\n $data['notificaciones'] = Notificacion::where(\"Actor_cedula\",$Actor->cedula)->where(\"descripcion\",\"<>\",\"\")->get();\n $data['periodos'] = DB::table('Comision')->select(DB::raw('extract(year_month FROM fecha) as periodo'))->distinct()->orderBy('fecha','desc')->get();\n if($Actor->jefe != null){\n \n }else{\n $data['actores'] = Actor::all();\n }\n return View('general.comision',$data);\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "1c0c0aefcfbef26445ad6c95b7c7f60c", "score": "0.6501281", "text": "public function index()\n {\n $listings = $this->listings->paginate(15);\n\n return view('backend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "9169a301a1e687b391dc420a75819c41", "score": "0.64856774", "text": "public function index()\n {\n $products = $this->allResources($this->productRepository);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" }, { "docid": "32e9a450ea4cabeba3749d02f2ef99e6", "score": "0.6473708", "text": "public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}", "title": "" } ]
8efa34130680d85a61ee50b3d3d1f680
Check if the user has the specific role.
[ { "docid": "60e8f0062a627ddb4f2cfd9fd9c8811e", "score": "0.0", "text": "public function hasRole($roles)\n {\n if (!is_array($roles)) {\n $roles = [$roles];\n }\n\n foreach ($this->roles as $role) {\n if (in_array($role->slug, $roles) !== false) {\n return true;\n }\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "f4f5dd5da694bd29076d3bd40823fa46", "score": "0.842958", "text": "public function hasRole($user, $role): bool;", "title": "" }, { "docid": "3cb31c7f8e4e0a63cb8a4b59a876e39b", "score": "0.82155895", "text": "public function hasRole(Role $role): bool;", "title": "" }, { "docid": "1eab61f6577ccc48f6553c9b06ce43eb", "score": "0.80857265", "text": "public function hasRole($user, $role = \"login\") {}", "title": "" }, { "docid": "af3c4886d9495e6eb5f187c5a61bcf0b", "score": "0.80493754", "text": "public abstract function has_role($user, $role);", "title": "" }, { "docid": "7d0d604f649c7f9cbacf3df18656550c", "score": "0.7834739", "text": "function hasRole($role) {\n global $auth;\n return $auth->hasRole($role);\n}", "title": "" }, { "docid": "55709ed9b0b7d83d3414cb6d981e573f", "score": "0.7829692", "text": "private function checkIfUserHasRole($role)\n {\n\n return (strtolower($role) == strtolower($this->role->name)) ? true: false;\n }", "title": "" }, { "docid": "3790c2e1d387a8230a07800e87bef8a7", "score": "0.7797354", "text": "function appthemes_check_user_role( $role, $user_id = null ) {\r\r\n \r\r\n if ( is_numeric( $user_id ) )\r\r\n\t$user = get_userdata( $user_id );\r\r\n else\r\r\n $user = wp_get_current_user();\r\r\n \r\r\n if ( empty( $user ) )\r\r\n\treturn false;\r\r\n \r\r\n return in_array( $role, (array) $user->roles );\r\r\n}", "title": "" }, { "docid": "147217c8f3bf23225d2c22069c6be30e", "score": "0.7793611", "text": "public function has($role);", "title": "" }, { "docid": "ed32e1c1bf8bed4b9bcd867b5dd15e90", "score": "0.7791581", "text": "function hasRole($user, $role){\n \n if($user->role == 'Root'){\n return true;\n }\n else {\n if($user->role == ucwords($role)){\n return true;\n }\n else {\n return false; \n }\n } \n }", "title": "" }, { "docid": "80e9c4ebfbba3c66cec35fb4971443d6", "score": "0.76954323", "text": "protected function frontendUserHasRole($role) {\n\t\tif (!isset($GLOBALS['TSFE']) || !$GLOBALS['TSFE']->loginUser) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (is_numeric($role)) {\n\t\t\treturn (is_array($GLOBALS['TSFE']->fe_user->groupData['uid']) && in_array($role, $GLOBALS['TSFE']->fe_user->groupData['uid']));\n\t\t} else {\n\t\t\treturn (is_array($GLOBALS['TSFE']->fe_user->groupData['title']) && in_array($role, $GLOBALS['TSFE']->fe_user->groupData['title']));\n\t\t}\n\t}", "title": "" }, { "docid": "a1fdada84f3dbd4fd2895f3be33ac75b", "score": "0.76579535", "text": "public function hasRole($value);", "title": "" }, { "docid": "420798c53d54706a1677815e98aebf66", "score": "0.7649563", "text": "static function hasRole($role)\n {\n if(auth()->user()->permissions == $role)\n {\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "109549ec2b0e736bda63d9b8f5af3d6c", "score": "0.76246834", "text": "public function hasRole($role)\n {\n // TODO: Implement hasRole() method.\n }", "title": "" }, { "docid": "2ac2a9da80a24f4167911072a5c679e2", "score": "0.75979644", "text": "public function hasrole($userrole = null){\n\n return !is_null($userrole) && $this->checkUserRole($userrole);\n\n }", "title": "" }, { "docid": "ebf54ed00768c48a4a2fc72adf8976a1", "score": "0.7547178", "text": "public function hasRole($roleName) : bool;", "title": "" }, { "docid": "70a8025f4b8656069515aaa21250254d", "score": "0.7516327", "text": "function check_user_role( $roles, $user_id = null ) {\n\n\tif ( $user_id ) {\n\t\t$user = get_userdata( $user_id );\n\t} else {\n\t\t$user = wp_get_current_user();\n\t}\n\n\tif ( empty( $user ) ) {\n\t\treturn false;\n\t}\n\n\tforeach ( $user->roles as $role ) {\n\t\tif ( in_array( $role, $roles, true ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n\n}", "title": "" }, { "docid": "8d1aabec3fa033c104d9046396a6df43", "score": "0.75148964", "text": "public function hasRole($role)\n {\n if ($this->roles()->where('name', $role)->first()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8c0e45d4d85fed01146f2e6d078b72cc", "score": "0.7504919", "text": "public function hasRole($role)\n {\n return $role == $this->role;\n }", "title": "" }, { "docid": "12db5ad9626107f5993481d5d92ab921", "score": "0.7476411", "text": "public function hasRole($id){\n\t\t$user = $this->loadUser(Yii::app()->user->id);\n\t\tif ($id !== null){\n\t\t\t$exists = Yii::app()->db->createCommand()\n\t\t\t ->select('*')\n\t\t\t ->from('{{user_role}}')\n\t\t\t ->where(array('and','role_id=:rid', 'user_id=:uid'), array(':rid'=> $id, ':uid'=>$user->id))\n\t\t\t ->queryScalar();\n\t\t\tif ($exists){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "64d7ad865f495932966c5559b60753a3", "score": "0.746636", "text": "public function hasrole($role = null){\n foreach ($this->roles()->get() as $res_role){\n if ($res_role->slug == $role){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "979a1d798120716a9520e372890f6df1", "score": "0.74660987", "text": "public function hasRole($role)\n {\n return $this->getInterfacedUser()->hasRole($role);\n }", "title": "" }, { "docid": "44bcda033fa90920b7e86849efc8c158", "score": "0.7464867", "text": "public function hasRole($role)\n {\n return $this->role->name === $role;\n }", "title": "" }, { "docid": "5903506bef30af31d44e86898e2551e7", "score": "0.74584717", "text": "public function hasRole($role)\n {\n return $this->roles->where('name', trim($role))->count() == 1 || $this->roles->where('name', 'superuser')->count() == 1;\n }", "title": "" }, { "docid": "055d52074292f624d6ede338b21919c1", "score": "0.744822", "text": "public function hasRole($role)\n {\n return null !== $this->roles()->where('slug', $role)->first();\n }", "title": "" }, { "docid": "c367ed4ed199ee8c6b8f5e28de45987a", "score": "0.7446725", "text": "public function hasRole($role) {\n\t\t$authInfo = $this->getAuthInfo();\n\t\treturn in_array($role, $authInfo['roles']);\n\t}", "title": "" }, { "docid": "e0b97e094b64192288a6851a3cb7034d", "score": "0.74400365", "text": "public function roleTest($role) {\n return is_array($this->roles) && in_array($role, $this->roles);\n }", "title": "" }, { "docid": "26e8d5b17bf011025fb6a71e67816725", "score": "0.7377268", "text": "public function is($role);", "title": "" }, { "docid": "18d5bc97330d57275a898218286f9c20", "score": "0.7361291", "text": "public function is($role)\n {\n return in_array($role, $this->roles->pluck('name')->all());\n }", "title": "" }, { "docid": "262faa8fbd7a35f75a051ea79fe6be13", "score": "0.735649", "text": "public function hasRole(string $role)\n {\n return null !== $this->roles()->where('name', $role)->first();\n }", "title": "" }, { "docid": "fe7211009566412ac92e15167dcb19c6", "score": "0.7346428", "text": "public static function user_has_role( $role, $user_id = null ) {\n\n if ( is_numeric($user_id) ) {\n $user = get_userdata( $user_id );\n } else {\n $user = wp_get_current_user();\n }\n\n if ( empty($user) ) {\n return false;\n }\n\n return in_array($role, (array)$user->roles);\n }", "title": "" }, { "docid": "fa596825063aa1cc2eb4c071485b735b", "score": "0.73311234", "text": "public function has_role( $user_id = null, $role ) {\n\n\t\tif ( is_numeric( $user_id ) ) {\n\t\t\t$user = get_userdata( $user_id );\n\t\t}\n\t\telse {\n\t\t\t$user = wp_get_current_user();\n\t\t}\n\n\t\tif ( empty( $user ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn in_array( $role, (array) $user->roles );\n\t}", "title": "" }, { "docid": "2af7db1aada8d30fa7197bd204fbf344", "score": "0.7325828", "text": "protected function userHasRole(string $id_role): bool\r\n {\r\n $user = $this->ulm->getCurrentUser();\r\n\r\n if ($user == null) {\r\n return false;\r\n }\r\n\r\n if ($user->id_role == \"admin\") {\r\n return true;\r\n }\r\n\r\n if ($user->id_role == \"reviewer\") {\r\n return $id_role == \"reviewer\" || $id_role == \"author\";\r\n }\r\n\r\n if ($user->id_role == \"author\") {\r\n return $id_role == \"author\";\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "b3cafdff553befe7f3761a2d0f634eb8", "score": "0.73042655", "text": "public function hasRole($role)\n {\n if ($this->roles()->where('name', $role)->first()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "79b29938357ec15baf1b2efff4d8352f", "score": "0.7290428", "text": "public static function userHasRole($role, $user_id = null)\n {\n\n if (is_numeric($user_id)) {\n $user = get_userdata($user_id);\n } else {\n $user = wp_get_current_user();\n }\n\n if (empty($user)) {\n return false;\n }\n\n return in_array($role, (array)$user->roles, true);\n }", "title": "" }, { "docid": "42da4fe662cc0a315e539703c4f7e66a", "score": "0.72890097", "text": "public function hasRole(string $role)\n {\n return (bool)$this->roles()->where('slug', $role)->count();\n }", "title": "" }, { "docid": "feeb1bf19b7f5fc8712117d1469d5388", "score": "0.72883147", "text": "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles());\n }", "title": "" }, { "docid": "66e57df020464871a3545422dfcb6a80", "score": "0.7267406", "text": "public function has_role($role)\n\t{\n\t\t// Check what sort of argument we have been passed\n\t\tif ($role instanceof Model_Role)\n\t\t{\n\t\t\t$key = 'id';\n\t\t\t$val = $role->id;\n\t\t}\n\t\telseif (is_string($role))\n\t\t{\n\t\t\t$key = 'name';\n\t\t\t$val = $role;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$key = 'id';\n\t\t\t$val = (int) $role;\n\t\t}\n\n\t\tforeach ($this->roles as $user_role)\n\t\t{\t\n\t\t\tif ($user_role->{$key} === $val)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b061ef7f575511f20ebd48341735827d", "score": "0.72507805", "text": "private function isValidRole(){\n if(!in_array(Auth::user()->roleID, array(1))){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "0f2ba8fd20b8763ac018d8529d9d2445", "score": "0.7238649", "text": "function check_user_role($roles,$user_id=NULL) {\r\n\t// Get user by ID, else get current user\r\n\tif ($user_id)\r\n\t\t$user = get_userdata($user_id);\r\n\telse\r\n\t\t$user = wp_get_current_user();\r\n \r\n\t// No user found, return\r\n\tif (empty($user))\r\n\t\treturn FALSE;\r\n \r\n\t// Append administrator to roles, if necessary\r\n\tif (!in_array('administrator',$roles))\r\n\t\t$roles[] = 'administrator';\r\n \r\n\t// Loop through user roles\r\n\t//echo \"<pre>\";print_r($roles);echo \"</pre>\";\r\n\tforeach ($user->roles as $role) {\r\n\t//echo $role;\r\n\t\t// Does user have role\r\n\t\tif (in_array($role,$roles)) {\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}\r\n //echo \"<br>false<br>\";\r\n\t// User not in roles\r\n\treturn FALSE;\r\n}", "title": "" }, { "docid": "73569cc9cf2cb6642f9634bf8c36a090", "score": "0.72300625", "text": "public function isGranted($role) {\n return in_array($role, $this->getRoles());\n }", "title": "" }, { "docid": "4c4fdb86b0f7ac5d900c1b2b0f9b0596", "score": "0.72293097", "text": "public function hasRoleId($roleId);", "title": "" }, { "docid": "659ca78efcc83d7a73962f97dcd3da57", "score": "0.7225582", "text": "public function hasRole(string $role) {\n // Implement cache 60 seconds to speed up\n $roleQuery = Cache::remember('ROLE_USER_'.$this->id, 60 * 5, function (){\n return $this->role;\n });\n\n return (strtolower($role) === strtolower($roleQuery->name)) ? true : false;\n }", "title": "" }, { "docid": "34d00af1cf431e6141538bb7d1272798", "score": "0.72249913", "text": "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "title": "" }, { "docid": "34d00af1cf431e6141538bb7d1272798", "score": "0.72249913", "text": "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "title": "" }, { "docid": "34d00af1cf431e6141538bb7d1272798", "score": "0.72249913", "text": "public function hasRole($role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "title": "" }, { "docid": "74e77d6787fdde5dbf2f38448af246be", "score": "0.7221549", "text": "public function hasRole($role)\n {\n return $role == $this->designation;\n }", "title": "" }, { "docid": "43452818dbd349ec4601df7dd09d0854", "score": "0.71952003", "text": "public function is($role)\n {\n if ($this->auth->check()) {\n return $this->auth->user()->is($role);\n }\n\n return false;\n }", "title": "" }, { "docid": "fe755d6a6d07ecf0a126ea59cb5c8ed6", "score": "0.7185455", "text": "public function hasRole($role) {\n if( in_array(trim($role), $this->roleSet) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2fdb67af807178f8d82a79b81fe651a9", "score": "0.7174288", "text": "function amp_user_has_role( $username, $rolename ) {\n\n\tglobal $amp_role_assignment;\n\n\t// if no role assignments are created, grant everything FIXME: Make 'admin'\n\t// so the site still works even if stuff is configured wrong\n\tif ( empty( $amp_role_assignment ) )\n\t\treturn true;\n\n\t// do this the case-insensitive way\n\t// the entire array was made lowercase in environment check\n\t$username = strtolower($username);\n\t$rolename = strtolower($rolename);\n\n\t// if the role doesn't exist, give up now.\n\tif ( !in_array( $rolename, array_keys( $amp_role_assignment ) ) )\n\t\treturn false;\n\n\t$users_in_role = $amp_role_assignment[$rolename];\n\treturn in_array( $username, $users_in_role );\t\n}", "title": "" }, { "docid": "cf9841b2c551298bcf9c16026ebb2a64", "score": "0.71594363", "text": "public function hasRole($name)\n {\n return $this->roles()->where('name', $name)->exists();\n }", "title": "" }, { "docid": "0103af580f537fc2013809fbb96032bc", "score": "0.71548545", "text": "public function hasRole($role)\n {\n return $this->roles->contains($role);\n }", "title": "" }, { "docid": "884204760e2f7ec632f2331bfd2fb985", "score": "0.7146872", "text": "public function roleCheck($roles = false, $user_role = false)\n\t{\n\t\tif(!$roles) return false;\n\t\tif(!$user_role)\n\t\t{\n\t\t\t$user_role = AuthComponent::user('role');\n\t\t\tif(!$user_role) return false;\n\t\t}\n\t\t\n\t\tif(!is_array($roles))\n\t\t{\n\t\t\t$roles = array($roles);\n\t\t}\n\t\t\n\t\tif(in_array($user_role, $roles)) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "636b4a98cbfe68f547a5165ee648da34", "score": "0.7137262", "text": "public function hasRole(Role $role)\n {\n return in_array(strtoupper($role), $this->getRoles(), true);\n }", "title": "" }, { "docid": "9090d12dc2aff28d5aaecb67f6dc8a63", "score": "0.7129668", "text": "public function hasAnyRole(...$roles): bool;", "title": "" }, { "docid": "26ec978ddabd1247225dcd3a6ff19a94", "score": "0.7118659", "text": "public function hasRole(Role|int|array|string|Collection $roles, string $guard = null): bool;", "title": "" }, { "docid": "1e1106449d55c92987633c12768a78a9", "score": "0.71155673", "text": "public function isGranted($role)\n {\n return in_array($role, $this->getRoles());\n }", "title": "" }, { "docid": "1e1106449d55c92987633c12768a78a9", "score": "0.71155673", "text": "public function isGranted($role)\n {\n return in_array($role, $this->getRoles());\n }", "title": "" }, { "docid": "1e1106449d55c92987633c12768a78a9", "score": "0.71155673", "text": "public function isGranted($role)\n {\n return in_array($role, $this->getRoles());\n }", "title": "" }, { "docid": "794873d41f7359e4e8901105779e16b3", "score": "0.71134126", "text": "public function isGranted($role) {\n return in_array($role, $this->getRoles());\n }", "title": "" }, { "docid": "8e68964cbfad0e2ad54bf0074dba6752", "score": "0.71112126", "text": "public function hasRole($role) {\n // allows for a string\n if (is_string($role)) {\n return $this->roles->contains('name', $role); // is the string found in the name column of the roles table?\n }\n //or a collection (aka check all of the users roles and see if they match up.)\n return !! $role->intersect($this->roles)->count();\n }", "title": "" }, { "docid": "fa79fe2295c248feb008535989cb08a9", "score": "0.7107945", "text": "public function isHasRole($userId, $roleCode)\r\n {\r\n $role = Role::where('role_code', $roleCode)->first();\r\n if ($role)\r\n return User::where('id', $userId)->where('role', 'LIKE', '%;' . $roleCode . ';%')->exists();\r\n }", "title": "" }, { "docid": "30a9e7dbdd9d1acdc94e31a21cfe870c", "score": "0.7103439", "text": "public function hasRole($rolename){\n\t\treturn $this->role_id == array_search($rolename, $this->getRoles());\n\t}", "title": "" }, { "docid": "f924cecbb44d9a644aceb7c53250de34", "score": "0.7103016", "text": "public function has_role($roles)\n\t{\n foreach ($roles as $role) {\n $return = array_key_exists($role, $this->_roles);\n if ($return)\n return TRUE;\n }\n return FALSE;\n\t}", "title": "" }, { "docid": "ecea1df201bb25cc2b01a6d323973066", "score": "0.709822", "text": "public function hasRole( $role )\n {\n if ( array_key_exists( $role, $this->roles ) ) {\n return $this->roles[$role];\n }\n return false;\n }", "title": "" }, { "docid": "7ea1db805fe2e7a97a0a604309e79355", "score": "0.70880324", "text": "public function hasRole( $role )\n {\n if ( $this->getRole( $role ) )\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e56af4444e7272780ef9553bcfe301ab", "score": "0.70836073", "text": "public function has_role($givenrole){\r\n\t\tif(!$this->logged_in() || !isset($_SESSION['auth_user'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$db = new Database;\r\n\t\t\r\n\t\t//yet another fine type of data selection\r\n\t\t//this is fun!\r\n\t\t$db->select('auth_roles.id as roleid');\r\n\t\t$db->from('auth_roles');\r\n\t\t$db->where(array('auth_roles_users.user_id =' => $db->escape($_SESSION['auth_user'])));\r\n\t\t$db->join('auth_roles_users', 'auth_roles_users.auth_role_id = auth_roles.id','','INNER');\r\n\t\t$data = $db->get();\r\n\t\t\r\n\t\tif(count($data) >= 1){\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "342bd02a4d27d228412111fc67d2c248", "score": "0.70626724", "text": "public function checkPerm()\n {\n $user = User::where('email', '=', '[email protected]')->first();\n\n if( $user->hasRole('admin') )\n {\n echo \"User role is admin\";\n }\n else\n {\n echo \"User Role not defined\";\n }\n }", "title": "" }, { "docid": "6f516d77093220ecbedf67dc049a43cf", "score": "0.7059583", "text": "public function hasRole($role_name)\r\n {\r\n return isset($this->roles[$role_name]);\r\n }", "title": "" }, { "docid": "885e44c08d1cdc3209228076711258d8", "score": "0.70503086", "text": "protected function userHasRole(User $user, String $role)\n {\n foreach ($user->getRoles() as $data) {\n if($role === $data) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "0545580b73b951f9f4f9a8fe27d7083f", "score": "0.7047804", "text": "public function logged_in($role = NULL)\n\t{\n\t\t// Get the user from the session\n\t\t$user = $this->get_user();\n\n\t\tif ( ! $user)\n\t\t\treturn FALSE;\n\n\t\tif ($user instanceof Kohana_Model_User AND $user->loaded())\n\t\t{\n\t\t\t// If we don't have a roll no further checking is needed\n\t\t\tif ( ! $role)\n\t\t\t\treturn TRUE;\n\n\t\t\tif (is_array($role))\n\t\t\t{\n\t\t\t\treturn ! array_diff($role, $user->roles->as_array(NULL, 'name'));\n\t\t\t}\n\t\t\telseif (is_string($role) OR $role instanceof Kohana_Model_Role)\n\t\t\t{\n\t\t\t\treturn $user->roles->exists($role);\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Kohana_Exception('Invalid Role \":role\"', array(\"role\" => (string) $role));\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "7188331e7f577feb13e27c39966d0f3a", "score": "0.7038706", "text": "public function isUserInRole($role) {\n Assert::string($role);\n\n /** @var Module $module */\n $module = $this->getAttribute(MODULE_KEY);\n if (!$module) throw new RuntimeException('Current Struts module not found');\n\n $processor = $module->getRoleProcessor();\n if (!$processor) throw new RuntimeException('No RoleProcessor configured for Struts module with prefix \"'.$module->getPrefix().'\"');\n\n return $processor->isUserInRole($this, $role);\n }", "title": "" }, { "docid": "850813639e873a7923a954bce7fac67d", "score": "0.7028948", "text": "function hasRole($sRole) {\r\n\r\n\t\t$sRole = trim($sRole);\r\n\r\n\t\tif('' == $sRole) {\r\n\t\t\treturn False;\r\n\t\t}\r\n\t\tif('*' == $sRole) {\r\n\t\t\treturn True;\r\n\t\t}\r\n\r\n\t\t// Check if the role argument (eg: 'admin') is contained in set of roles\r\n\t\t// associated with this user. Eg: does this Principal (user) have an 'admin'\r\n\t\t// priviledge item in it's GenericPrincipal::aRoles array.\r\n\t\tif( in_array($sRole, $this->aRoles, True) ) {\t// Using \"strict\" type checking\r\n\t\t\treturn True;\r\n\t\t} else {\r\n\t\t\treturn False;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "7ee66f514d69fa91a2f382a567d811d4", "score": "0.70218605", "text": "public function isuser(){\n if ($this->role) {\n # code...\n if ($this->role->name=='user') {\n # code...\n return true;\n }else{\n return false;\n }\n }\n return false;\n \n }", "title": "" }, { "docid": "2b1ac9bb1a0aab38ad642dcb5238414f", "score": "0.7009765", "text": "public function hasRole($user_id, $role_id) {\n\t\t$params = array(\n\t\t\t'conditions' => compact('user_id', 'role_id')\n\t\t);\n\t\t// investigate why when User is accessed through ClassRegistry::init('User')\n\t\t// the __get method fill not fire and thus not return RolesUser\n\t\t//return $this->RolesUser->find('count', $params);\n\t\t// workaround for now: call the magic __get method directly\n\t\t$this->__get('RolesUser');\n\t\t// ha, php __get does not work in chained context!\n\t\t// so we ping it first to init it\n\t\t// and then:\n\t\treturn $this->RolesUser->find('count', $params);\n\t}", "title": "" }, { "docid": "83d661a8281f4350b229d4e0995e2eb6", "score": "0.70060605", "text": "public function hasRoleName($name);", "title": "" }, { "docid": "e46ae1d5b0323374a21d9f381cd11c6c", "score": "0.70004475", "text": "protected function isUserGranted($role)\n {\n return $this->getSecurityContext()->isGranted($role);\n }", "title": "" }, { "docid": "37325a8705f56a34b42c2df499d118b8", "score": "0.6997167", "text": "public function hasRole($role)\n {\n foreach ($this->roles as $uRole)\n {\n if ($uRole->name === $role)\n {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "df9a5a2d19a4d2a63cebc826e7a52f36", "score": "0.6993917", "text": "public function isRol($role){\n $vocals = array('a','e','i','o','u');\n\n if(in_array($role[0], $vocals)) {\n return $this->isAn($role);\n } else {\n return $this->isA($role);\n }\n }", "title": "" }, { "docid": "bc913d9f00ca561465ce632b2cb4dd63", "score": "0.6989639", "text": "function hasRole($Role, $UserID = null)\n\t{\n\t if ($UserID === null)\n\t\t throw new \\RbacUserNotProvidedException (\"\\$UserID is a required argument.\");\n\n\t\tif (is_numeric ( $Role ))\n\t\t{\n\t\t\t$RoleID = $Role;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (substr ( $Role, 0, 1 ) == \"/\")\n\t\t\t\t$RoleID = Jf::$Rbac->Roles->pathId ( $Role );\n\t\t\telse\n\t\t\t\t$RoleID = Jf::$Rbac->Roles->titleId ( $Role );\n\t\t}\n\n\t\t$R = Jf::sql ( \"SELECT * FROM {$this->tablePrefix()}userroles AS TUR\n\t\t\tJOIN {$this->tablePrefix()}roles AS TRdirect ON (TRdirect.ID=TUR.RoleID)\n\t\t\tJOIN {$this->tablePrefix()}roles AS TR ON (TR.Lft BETWEEN TRdirect.Lft AND TRdirect.Rght)\n\n\t\t\tWHERE\n\t\t\tTUR.UserID=? AND TR.ID=?\", $UserID, $RoleID );\n\t\treturn $R !== null;\n\t}", "title": "" }, { "docid": "d5608f1085d309fcf1e2a3c3c5b7698f", "score": "0.6987807", "text": "public function hasRole ($roleOrRoles)\n\t{\n\t\treturn $this->isMemberOf($roleOrRoles);\n\t}", "title": "" }, { "docid": "2f5dba25cab646dfde6250beb50ececb", "score": "0.69809765", "text": "public function role_exists( $role ) {\n\t\tif ( ! empty( $role ) ) {\n\t\t\treturn $GLOBALS['wp_roles']->is_role( $role );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2421e25ea900be047b304429e244a9bf", "score": "0.69778985", "text": "public function authorize()\n {\n $this->id = is_null($this->route('id')) ? $this->route('user') : $this->route('id');\n if ($this->id) {\n return UserRole::where('user_id', $this->id)\n ->where('app_id', Session::get('current_app_id'))\n ->exists();\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "8f0d4ca35008a11868dc2eb985b10444", "score": "0.6974106", "text": "public function is_a($role)\n\t{\n\t\treturn in_array($role, $this->_roles);\n\t}", "title": "" }, { "docid": "24aeeae607a6a6b700c3dceb4edba6ef", "score": "0.69689393", "text": "function isRoleUsed($id_role)\n {\n $query = $this->db->get_where('tb_login', ['id_role' => $id_role]);\n $count = $query->num_rows();\n if ($count > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "652005c77d395c34a689311336891376", "score": "0.69544077", "text": "public static function isRoleHasRightToAccess($userRole,$routeName){\n try{\n $model = static::where('role',$userRole)\n ->where('route_name',$routeName)\n ->first();\n return $model ? true : false; \n }\n catch(\\Throwable $th){\n\n }\n }", "title": "" }, { "docid": "1d89018f284af0d82996d657b3edfb9c", "score": "0.69522065", "text": "public function hasRole($role, $requireAll = false)\n {\n if ($user = $this->user()) {\n return $user->hasRole($role, $requireAll);\n }\n\n return false;\n }", "title": "" }, { "docid": "e13bddb37077fa1f153c53d3d754e183", "score": "0.6936736", "text": "public function permisoRole(){\n return in_array($_SESSION[\"role\"] , $this->role);\n }", "title": "" }, { "docid": "36c0330a5e6b56230ae71c7d58078456", "score": "0.69304794", "text": "protected function checkUserRole($givenrole){\n $getrole= $this->roles->toArray();\n foreach ($getrole as $key){\n if(array_key_exists('role_slug',$key) && $key['role_slug'] == $givenrole){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "3ab35677bfe691d7fbad249b0cb7acb1", "score": "0.69277745", "text": "public function hasRole( $role )\n {\n /** @var $objRole User_Role */\n foreach ( $this->getRoles() as $objRole ) {\n \n if ( is_array( $role ) ) {\n foreach ( $role as $strRole ) {\n if ( $strRole == $objRole->getName() )\n return true;\n }\n return false;\n } else {\n $strRole = $role;\n if ( $strRole == $objRole->getName() )\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "9245c00539142b85406f058fc9e10bd7", "score": "0.69162214", "text": "public static function getCurrentUserHasRole( $role_ID ) {\n\t\treturn static::$current_auth_manager_module_instance->getCurrentUser()->getHasRole( $role_ID );\n\t}", "title": "" }, { "docid": "9eb7082c00e8575fc6a56cd8c8eaaf0c", "score": "0.6907951", "text": "public function hasRole($role)\n {\n return $this->getKeyRoles()->has($role);\n }", "title": "" }, { "docid": "0a2be835a77ec98aade5d69cbd0d1ed1", "score": "0.6905019", "text": "public function hasAnyRole($role)\n {\n return null !== $this->roles()->whereIn('slug', $role)->first();\n }", "title": "" }, { "docid": "bfe30fb24a03f55bfd78494149f9b0d8", "score": "0.6897838", "text": "protected function hasRole($providedRole, Collection $userRoles)\n {\n foreach ($userRoles as $role)\n {\n if ($role->id == $providedRole || str_is($providedRole, $role->slug))\n {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "9d650727ae6f72edb1d7d3bcd5dc7223", "score": "0.6890079", "text": "public function hasRole(Role $role) : bool\n {\n return $this->hasRelationship('users_roles', $role);\n }", "title": "" }, { "docid": "fa87f1a81a5ce7cfaaa2b0c8f2b1d7dc", "score": "0.68758667", "text": "private function check_if_valid_user_role($role)\n\t{\n\t\t//Create new instance of User model\n\t\t$um = new User_model();\n\t\t//Get if role is in db, and return true or false (true if it is in db)\n\t\treturn $um->check_if_valid_user_role($role);\n\t}", "title": "" }, { "docid": "76e6239682f80004fedd2f7d77a7c82d", "score": "0.6875342", "text": "public function inRole(string $roleSlug)\n {\n return $this->user_categories()->where('slug', $roleSlug)->count() == 1;\n }", "title": "" }, { "docid": "f0b0af8353bf11227634047296a09f26", "score": "0.686425", "text": "function authorizeMe($user_id, $roles = [], $route_check = true)\n {\n $user_role = User::find($user_id)->role;\n\n if (!$user_role) {\n return false;\n }\n\n if (!in_array($user_role->slug, $roles)) {\n return false;\n }\n\n if ($route_check) {\n if (!AuthorizationRole::where('route', request()->route()->getName())\n ->where('role_id', $user_role->id)\n ->first()) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "c8669527b986bc14d1066757f3feebb4", "score": "0.6863668", "text": "public static function isUserRole($user_role)\n {\n $res_des = Auth::user()->designation;\n\n $accept = false;\n if ($res_des == $user_role) {\n $accept = true;\n }\n return $accept;\n }", "title": "" }, { "docid": "caf847bd2a79ef1f3b7fb35fbf217a23", "score": "0.6846267", "text": "public function hasAssigned($userId, $roleName);", "title": "" }, { "docid": "b073df87994b7f9e0637e80f0cac201d", "score": "0.684338", "text": "public function hasRole($role) {\n if (is_string($role))\n return $this->roles->contains('name', $role);\n\n return !!$role->intersect($this->roles)->count();\n }", "title": "" }, { "docid": "9903a9ffac0d24b3986e22587b1327c7", "score": "0.68367875", "text": "public function hasRole($userId, $role)\n {\n if ($this->getAuthManager()) {\n $roles = array_keys($this->getAuthManager()->getRolesByUser($userId));\n\n return in_array($role, $roles, true);\n }\n\n return false;\n }", "title": "" } ]
3754fd5b8e7d441bccda060aba54b57b
Checks if a controller is private or not
[ { "docid": "a7209928db7a9d2df89f151f372f37ac", "score": "0.738988", "text": "public function isPrivate($controllerName)\n {\n return isset($this->_privateResources[$controllerName]);\n }", "title": "" } ]
[ { "docid": "6736656e57095cdcd84e442d70fde8f9", "score": "0.7354169", "text": "public function isPrivate($controllerName)\n {\n return isset($this->privateResources[$controllerName]);\n }", "title": "" }, { "docid": "1e89a2bb7ee0e6d39c919fe82ca5cb20", "score": "0.70342803", "text": "public function isPrivate();", "title": "" }, { "docid": "1a11629954890f5ea345563d0d676276", "score": "0.68661284", "text": "public function isPrivate(): bool;", "title": "" }, { "docid": "ca99bbb7bc9fc909fed2de84051fee62", "score": "0.6755658", "text": "public function isPrivate()\n {\n return $this->private === true;\n }", "title": "" }, { "docid": "79cff26cdf62f7f126d93b70c0340576", "score": "0.6746773", "text": "public function isPrivate(): bool\n {\n return !$this->public;\n }", "title": "" }, { "docid": "79cff26cdf62f7f126d93b70c0340576", "score": "0.6746773", "text": "public function isPrivate(): bool\n {\n return !$this->public;\n }", "title": "" }, { "docid": "18e8d6b72a5b9a3fd7dc92bd9aaaceab", "score": "0.6688722", "text": "private function is_controller_allowed() {\n // Gets all methods in current router class if nothing is found than all methods are disabled for current role\n $controller_arr_flipped = array_flip(array($this->router->class)); // Avoid Error @ Only variables should be passed by reference\n $controller_arr_intersected = array_intersect_key($this->role_permissions, $controller_arr_flipped); // Avoid Error @ Only variables should be passed by reference\n\n // If no controller was defined for a role than return false\n if (empty($controller_arr_intersected) || !is_array($controller_arr_intersected)) {\n return false;\n }\n // Its allowed if we found it! Note that this only checks for existence of a class/controller and not method.\n // To check both controller/method use is_controller_method_allowed()\n return true;\n }", "title": "" }, { "docid": "7aab522fb9d1309f388914ff1ed23ba2", "score": "0.6668864", "text": "public function controllerExists(string $path, bool $private = false): bool\n {\n return (bool)$this->router->route($path, $private ? 'private' : 'public', true);\n }", "title": "" }, { "docid": "5903cf23e4c606a7ecb9847565d809a0", "score": "0.6627347", "text": "public function isPrivate(): bool\n {\n return $this->publicSuffix->isPrivate();\n }", "title": "" }, { "docid": "5b101bb81e08b0a6de9e8a3aed2fe052", "score": "0.657858", "text": "public function isPrivate(){\r\n \treturn $this->modifier == 'private';\r\n }", "title": "" }, { "docid": "7cbbad4693da62d9c74129cc661f8173", "score": "0.65688956", "text": "public function _isControllerAuthorized ($controller)\n {\n $s_user = $this->Session->read('is_superuser');\n\n if ($s_user) {\n return true;\n }\n\n $allow = false;\n\n $enable = Configure::read('ACL.permissions');\n\n foreach ($this->userGroups as $gid => $g_name) {\n if (!isset($enable[$gid])) {\n // Don't know anything about this group\n // debug(\"Don't know about $gid\");\n continue;\n }\n if (in_array($controller, $enable[$gid])\n || in_array(\"*\", $enable[$gid])) {\n // Users in this group can use this controller.\n // debug(\"$controller is for $gid\");\n $allow = true;\n break;\n } else {\n // debug(\"$controller is NOT for $gid\");\n }\n }\n\n return $allow;\n }", "title": "" }, { "docid": "cd14393a04ce23761f4371b881345cdf", "score": "0.6538584", "text": "public function isPrivate()\n {\n return $this->flagsHas(self::IS_PRIVATE);\n }", "title": "" }, { "docid": "2a19ff82fe1d6aaaba37a0b6ccfec7fb", "score": "0.653027", "text": "protected function checkActionAccess()\n {\n\n $config = $this->container->getParameter('united.core.config');\n $unitedStructure = $this->get('united.core.structure');\n\n /**\n * @var UnitedStructureItem $currentItem\n */\n $currentItem = $unitedStructure->getItemFromRequest(\n $this->get('request')\n );\n\n if (!$currentItem) {\n return true;\n }\n\n $namespace = $currentItem->getNamespace();\n\n // If security is not defined or false, we can just return true\n if (!array_key_exists(\n $namespace,\n $config\n ) || !$config[$namespace]['secure']\n ) {\n return true;\n }\n\n if (false === $this->get('security.authorization_checker')\n ->isGranted('access', $currentItem)\n ) {\n throw new AccessDeniedHttpException(\n 'You are not allowed to access this page!'\n );\n }\n\n return true;\n }", "title": "" }, { "docid": "bc0d336809a635927e24c7b2b7d59840", "score": "0.64903057", "text": "public function isValidController()\n {\n return $this->modx->controller &&\n property_exists($this->modx->controller, 'resource') &&\n $this->modx->controller->resource instanceof modResource;\n }", "title": "" }, { "docid": "5cfc734920556a924bca8607884d8581", "score": "0.6407522", "text": "public function isAuthorized()\n {\n //ts('isAuthorized');\n $allow = $this->_isControllerAuthorized($this->name);\n if (!$allow) {\n $this->Session->setFlash(\"{$this->name}: toegang geweigerd\");\n }\n //ts('isAuthorized end');\n return $allow;\n }", "title": "" }, { "docid": "eee13b9e99547c84225d6e7f9159c238", "score": "0.6379042", "text": "public function isActionAccessible(){\n if (Yii::app()->user->isGuest) return false;\n\n $authItemName = $this->getRouteForAuthItem();\n return Yii::app()->user->checkAccess($authItemName);\n }", "title": "" }, { "docid": "4929cde634c44de8602cfbce2a9fbdd7", "score": "0.6335615", "text": "public function isSecured();", "title": "" }, { "docid": "d68408159f20eb07865e04e3f820e8b9", "score": "0.6313997", "text": "protected static function is_authorized()\n {\n return User::get_authorized_user() !== NULL;\n }", "title": "" }, { "docid": "456bc298f32840d73e433695f8d383e2", "score": "0.62972325", "text": "public function isPrivateOnly(): bool\n {\n return $this->private_only;\n }", "title": "" }, { "docid": "3a6fe21dcac87afb7fd632f92ace65e6", "score": "0.62796885", "text": "public function isPublicAction($controller, $action)\n {\n return $this->isAllowedAction($this->public_actions, $controller, $action);\n }", "title": "" }, { "docid": "b006e4a2647210cfc1228c7657bb967d", "score": "0.62701267", "text": "function is_public() {\n if (!is_admin())\n return TRUE;\n else\n return FALSE;\n}", "title": "" }, { "docid": "8cd3b62ff98929f035e6a409ba13ac72", "score": "0.6245048", "text": "function isAuthorized() {\r\n $unauthenticated_actions = array('login', 'register', 'logout');\r\n $current_action = $this->params['action'];\r\n if (in_array($current_action, $unauthenticated_actions)) {\r\n return true;\r\n }\r\n\r\n $this->Session->setFlash(\"You don't have permission to do that.\");\r\n return false;\r\n }", "title": "" }, { "docid": "daf54b7a6e927a560fd6aa182f4b3811", "score": "0.6237317", "text": "function isPrivate()\n {\n return $this->property->isPrivate();\n }", "title": "" }, { "docid": "c7bbbc4911230303b2d31cbd9385e2c5", "score": "0.6221412", "text": "public function isPrivate()\n\t{\n\t\treturn (bool) ($this->modifiers & InternalReflectionMethod::IS_PRIVATE);\n\t}", "title": "" }, { "docid": "edeb7c6408b923d3e557c0f0dd5e994d", "score": "0.6176619", "text": "public function canView()\n {\n return (Director::isDev() || Director::is_cli() ||\n !$this->config()->get('check_permission') ||\n Permission::check($this->config()->get('check_permission'))\n );\n }", "title": "" }, { "docid": "6e15ef7ef64c9a71215a1294a1682e42", "score": "0.6168116", "text": "public function isPublic()\n {\n return $this->resource->isPublic();\n }", "title": "" }, { "docid": "ff2a05ce5c0d2b3a0fb89e33f36f47e3", "score": "0.6157982", "text": "public function canAccess() {\n \t// default : all is OK\n return true;\n }", "title": "" }, { "docid": "6cebaa7b6e58f27213f386646c31e17b", "score": "0.61553067", "text": "public function isPrivate(): bool\n {\n return $this->property->isPrivate();\n }", "title": "" }, { "docid": "4f1bbad780f39ce586157e764063680a", "score": "0.6150405", "text": "public function isPrivate()\n\t{\n\t\tif ( $this->is_private === null ) {\n\t\t\t$this->is_private =\n\t\t\t\t$this->isIn('0.0.0.0/8') ||\n\t\t\t\t$this->isIn('10.0.0.0/8') ||\n\t\t\t\t$this->isIn('127.0.0.0/8') ||\n\t\t\t\t$this->isIn('169.254.0.0/16') ||\n\t\t\t\t$this->isIn('172.16.0.0/12') ||\n\t\t\t\t$this->isIn('192.0.0.0/29') ||\n\t\t\t\t$this->isIn('192.0.0.170/31') ||\n\t\t\t\t$this->isIn('192.0.2.0/24') ||\n\t\t\t\t$this->isIn('192.168.0.0/16') ||\n\t\t\t\t$this->isIn('198.18.0.0/15') ||\n\t\t\t\t$this->isIn('198.51.100.0/24') ||\n\t\t\t\t$this->isIn('203.0.113.0/24') ||\n\t\t\t\t$this->isIn('240.0.0.0/4') ||\n\t\t\t\t$this->isIn('255.255.255.255/32');\n\t\t}\n\t\treturn $this->is_private;\n\t}", "title": "" }, { "docid": "532c6c1036e7cfad132d50317ea265f2", "score": "0.61454594", "text": "function isAuthorized() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a6a0c2f608527827cf73f74ad4ccea4e", "score": "0.61420923", "text": "public function hasUserAccess() {\n \t//$authorizedControllers = require(__DIR__.'/../../../config/autorized_route.php');\n\n $userContainer = new Container(NAME_SESSION_USER);\n\n /* If !logged --> Go controller login */\n $router = $this->sm->get('router');\n $request = $this->sm->get('request');\n $routeMatch = $router->match($request);\n\n /* if(is_object($routeMatch)) {\n\t $controllerName = $routeMatch->getParam('controller');*/\n if($userContainer->offsetExists('logged_user')\n && ($routeMatch->getParam('action') == 'logout' || $routeMatch->getParam('action') == 'login')) {\n return true;\n } else if (!$userContainer->offsetExists('logged_user')\n && $routeMatch->getParam('action') != 'logout' && $routeMatch->getParam('action') != 'login') {\n return false;\n }\n\n\t /*if (!$userContainer->offsetExists('logged_user')) {\n\t if(!in_array($controllerName, $authorizedControllers)) {\n\n return false;\n\t }\n\t }*/\n /*} else {\n \treturn false;\n }*/\n return true;\n\t}", "title": "" }, { "docid": "f89159043d2e01869930c8afaa595ec4", "score": "0.6129001", "text": "public function authorize()\n {\n// if ((int)$this->get('kits_weighed') != $this->route('litters')->kitsCount())\n// return false;\n\n return true;\n }", "title": "" }, { "docid": "e925fb6837f948901da3e24c22b8cd3c", "score": "0.6117223", "text": "protected function ___isPublic() {\n\t\tif($this->status >= Page::statusUnpublished) return false;\t\n\t\t$template = $this->getAccessTemplate();\n\t\tif(!$template || !$template->hasRole('guest')) return false;\n\t\treturn true; \n\t}", "title": "" }, { "docid": "32975c68d56e84b6846ebe6a2ad25285", "score": "0.6114711", "text": "private function validateController(): void {\r\n if (!class_exists($this->_controllerClassName)) {\r\n http_response_code(404);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "791ae9a6a6e8ceda463f7f273448f80e", "score": "0.6093202", "text": "public function getIsPrivate()\n\t{\n\t\treturn $this->is_private;\n\t}", "title": "" }, { "docid": "09e2d0795696791c1a5bcfa0138d79cd", "score": "0.60917664", "text": "public function isInternalUser()\n {\n return $this->authService->isGranted('internal-user');\n }", "title": "" }, { "docid": "743941aa8445e26e20e05e248e525521", "score": "0.60705376", "text": "public function isViewable(): bool\n {\n if (!class_exists($this->getController())) {\n $this->logger->debug($this->getController() . ' controller does not exist.');\n return false;\n }\n if (!method_exists($this->getController(), $this->getMethod())) {\n $this->logger->debug(\n $this->getController() . ':' .\n $this->getMethod() . ' controller method does not exist.'\n );\n return false;\n }\n /*\n * For archived and deleted nodes\n */\n if ($this->node->getStatus() > Node::PUBLISHED) {\n /*\n * Not allowed to see deleted and archived nodes\n * even for Admins\n */\n return false;\n }\n\n /*\n * For unpublished nodes\n */\n if ($this->node->getStatus() < Node::PUBLISHED) {\n if (true === $this->previewResolver->isPreview()) {\n return true;\n }\n /*\n * Not allowed to see unpublished nodes\n */\n return false;\n }\n\n /*\n * Everyone can view published nodes.\n */\n return true;\n }", "title": "" }, { "docid": "208527d6f5da5e30e613c491418309a0", "score": "0.60680974", "text": "public function authorize()\n {\n return !Auth::guard('api')->check();\n }", "title": "" }, { "docid": "6ce1ee026c5547037c0a724c3e32e877", "score": "0.60657483", "text": "private function is_controller_method_allowed() {\n // Gets all methods in current router class if nothing is found than all methods are disabled for current role\n $controller_arr_flipped = array_flip(array($this->router->class)); // Avoid Error @ Only variables should be passed by reference\n $controller_arr_intersected = array_intersect_key($this->role_permissions, $controller_arr_flipped); // Avoid Error @ Only variables should be passed by reference\n $permissible_methods = array_shift($controller_arr_intersected);\n\n // If no controller/methods were defined for a role than return false\n if (empty($permissible_methods) || !is_array($permissible_methods)) {\n return false;\n }\n\n // Return TRUE or FALSE based on if a method is found in $permissible_methods array with router method\n return in_array($this->router->method, $permissible_methods);\n }", "title": "" }, { "docid": "88bb82fc37879f2a809a88d5434c8d1c", "score": "0.606463", "text": "function accessible():bool\n\t{\n\t\treturn \\Module\\Authentication::getInstance()->isLoggedIn();\n\t}", "title": "" }, { "docid": "2d7ed3a8d22f785babbf9a5ac77a7322", "score": "0.6061599", "text": "public function authorize()\n {\n return $this->manager !== null;\n }", "title": "" }, { "docid": "c798884d58cc2313d110e2e1408a2ac4", "score": "0.60521334", "text": "public function authorize()\n {\n return current_user()->isOwner();\n }", "title": "" }, { "docid": "e33d93158ff0dc5c5d49ad2bf50ba3e5", "score": "0.6045835", "text": "private function isInvokedControllerMain()\n {\n $get = $_GET;\n $url = isset($get['url']) ? $get['url'] : null;\n if (!empty($url)) {\n $currentSubsystem = Loader::getCurrentSubSystem($url);\n if (!empty($currentSubsystem))\n $url = str_replace($currentSubsystem . \"/\", \"\", $url);\n $this->subSystem = $currentSubsystem;\n }\n if (empty($url)) {\n return true;\n } else {\n $urlSegments = explode(\"/\", $url);\n if (isset($urlSegments[1])) {\n return false;\n } else {\n return true;\n }\n }\n }", "title": "" }, { "docid": "99b805925b1f99d3e7a7bba7362d976f", "score": "0.60250485", "text": "public function isPublic(): bool;", "title": "" }, { "docid": "99b805925b1f99d3e7a7bba7362d976f", "score": "0.60250485", "text": "public function isPublic(): bool;", "title": "" }, { "docid": "50810d067e7e7df95cfba25fcb108bea", "score": "0.600428", "text": "public function isAuthorized()\n {\n return isset($_SESSION['uid']);\n }", "title": "" }, { "docid": "3fc4fed6d71a2eb5710615702fccbf80", "score": "0.59928966", "text": "private function __skipCheck() {\n\n //If the user has ROOT access no further authoriztion checks will be executed.\n if ($this->__isRoot()) {\n return true;\n }\n\n $action = $this->request->params['action'];\n\n //An * was passed, no authorization is requested.\n if (in_array('*', $this->allowedActions)) {\n return true;\n }\n\n //If the action does not exist, skip the authorization check\n if (!in_array($action, $this->controller->methods)) {\n return true;\n }\n\n //If the action is in the list of allowed actions, skip the authorization check\n if (in_array($action, $this->allowedActions)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "30f8e14c82b76456a2133b39374b9443", "score": "0.5989082", "text": "public function isPublic(){\r\n \treturn $this->modifier == 'public';\r\n }", "title": "" }, { "docid": "3b7610c368797598fcf1aba629a803c9", "score": "0.5987066", "text": "public function authorize()\n {\n\t\t$business = Business::find($this->route('businessId'));\n return ($business && $this->user()->can('update', $business) && $this->user()->can('create', Service::class));\n }", "title": "" }, { "docid": "4e4d024f58ff4bfbced3d2fc57e47f8b", "score": "0.5980347", "text": "protected function isAuthorized() {\n return true;\n }", "title": "" }, { "docid": "9cb9ae07e86a9cccc2c8a0316a192178", "score": "0.59776807", "text": "final public function isAuthorized()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "e0d5f8534654920fec5aa7d87df2bf1e", "score": "0.5968807", "text": "public function authorize(): bool\n {\n /** @var Deck $collection */\n $collection = $this->route('collection');\n\n return $collection->isPublic();\n }", "title": "" }, { "docid": "621ad9797d8cfe1f2a23128e558c0034", "score": "0.5962452", "text": "public function authorize()\n {\n return !Auth::check();\n }", "title": "" }, { "docid": "195c1e73418d0860ca826a405db7d9f1", "score": "0.59617007", "text": "public function authorize()\n {\n return !($this->route('user') == config('cms.default_user_id') || $this->route('user') == auth()->user()->id);\n }", "title": "" }, { "docid": "727ce112458898100f74024b3d41b4ab", "score": "0.59565055", "text": "public function isPublic() {\n return $this->privacyState == 'public';\n }", "title": "" }, { "docid": "a3cf8c38425027a1f01a91c347cf4c33", "score": "0.59389174", "text": "public function authorize()\n {\n return !is_null($this->user()->bots()->find($this->route('bot')));\n }", "title": "" }, { "docid": "57897701274f3ce81bcb3b078142a59f", "score": "0.59332305", "text": "private static function verifyAccess(){ \n if(ACL == TRUE){\n import('core.ACLModel'); \n ACLModel::checkAccess();\n }\n }", "title": "" }, { "docid": "eb418dcc4e4556fa5549412b66ef2809", "score": "0.5911871", "text": "public function isAuthorised(): bool;", "title": "" }, { "docid": "81187090f8d15e52ab4bab9fc6a110d3", "score": "0.59098274", "text": "function accessCheck() {\n return true;\n }", "title": "" }, { "docid": "5dd27f0e4047b635f2d883853be64399", "score": "0.59090936", "text": "public function has_rights($controller, $action='')\n {\n\t\tif (empty($action)) //only controller\n\t\t{\n\t\t\treturn isset($this->group_rights[$controller]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn (isset($this->group_rights[$controller]) && in_array($action, $this->group_rights[$controller]));\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "7bf4c62b4b591b49cc1cfd3cc1cd9690", "score": "0.5907328", "text": "public function authorize()\n {\n\n return request()->is('navigator/v1/*') || request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "bd0749812ab0827f9a5abc59e26a3ea0", "score": "0.5905487", "text": "public function isPrivate()\n {\n if ( $this->reflectionSource instanceof ReflectionProperty )\n {\n return $this->reflectionSource->isPrivate();\n }\n else\n {\n return parent::isPrivate();\n }\n }", "title": "" }, { "docid": "42e6b77bfc5f1a5e341a0c4acc52b37e", "score": "0.59045666", "text": "function user_is_authorized() {\n\t\treturn $this->Praized->isAuthorized();\n\t}", "title": "" }, { "docid": "98d08ce3a035cb966bdfad8ddc581b4e", "score": "0.58998984", "text": "public function isAuthorized() {\n $role = $this->Auth->user('role'); \n $neededRole = null; \n $prefix = !empty($this->request->params['prefix']) ? $this->request->params['prefix'] : null;\n if (!empty($prefix) && in_array($prefix, Configure::read('Routing.prefixes')) ){\n $neededRole = $prefix;\n }\n return (\n empty($neededRole) || \n strcasecmp($role, 'admin') == 0 || \n strcasecmp($role, 'moderator') == 0 || \n strcasecmp($role, $neededRole) == 0\n );\n }", "title": "" }, { "docid": "22c37507ee951ad961e4e75a1986c8e1", "score": "0.589237", "text": "public function authorize(): bool\n {\n return false;\n }", "title": "" }, { "docid": "13a22e9fb3fa69c4526d698ce47c0ce6", "score": "0.5884066", "text": "protected function _isAllowed()\n {\n return Mage::helper('icoders_banner/admin')->isActionAllowed(\n $this->getRequest()->getActionName()\n );\n }", "title": "" }, { "docid": "a3ac80fcd105c55395955f61b468b527", "score": "0.58836716", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Lof_Outlet::outlet_delete');\n }", "title": "" }, { "docid": "4e1215c5354474e519d1514708ea6e27", "score": "0.5875952", "text": "private function authChecker(){\r\n $this->ownerOnly();\r\n }", "title": "" }, { "docid": "a662906d678dce3e0ee1567d053da80c", "score": "0.5875727", "text": "public function has_access($controller,$action){\n\t\t\n\t\t# GET THE DATA FROM SESSION\t\t\n\t\t$user_data = SessionHelper::read('user.data');\t\n\t\t\n\t\t# GET PRIVILAGES FROM SESSION\n\t\t$privilages = explode(',',$user_data['Privilages']);\n\t\t$user_id = $user_data['User']['user_id'];\n\t\t$role_id = $user_data['User']['role_id'];\n\t\t\n\t\t# GET ALL PRIVILAGES FROM DATABASE\n\t\t$privilage_array = $this->find('all');\n\t\t\n\t\t# CREATE ONE DYNAMIC ARRAY FOR CHECK PERMISSIONS\n\t\tfor($i=0;$i<count($privilage_array);$i++){\n\t\t\t$data[$privilage_array[$i]['Privilege']['controller']][$privilage_array[$i]['Privilege']['action']] = $privilage_array[$i]['Privilege']['id'];\n\t\t}\n\t\t\n\t\t# GET THE CURRENT ACTION AND CHECK WHEATHER USER HAS ACCESS OF THAT\t\t\t\t\t\t\t\t\t\n\t\t$current_action = isset($data[$controller][$action]) ? $data[$controller][$action] : false;\t\n\t\tif($current_action){\n\t\t\tif((!in_array($current_action,$privilages))){\n\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7be14445fd39b78c41f9cf9da7ae3170", "score": "0.5874244", "text": "public function isPublic() {\n return !$this->getDeleted() && $this->getLastEditStep() > 4;\n }", "title": "" }, { "docid": "4ca584ec21664251a3e015d2a5555eb7", "score": "0.58726615", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('kiosk'));\n }", "title": "" }, { "docid": "e6531a44687cf33b9e3d3f945ca56b23", "score": "0.5856175", "text": "public function authorize()\n {\n return $this->route('widget')->user_id == Auth::id();\n }", "title": "" }, { "docid": "863c6df1a64b6980d99e321f5f5e2d24", "score": "0.5855715", "text": "public function authorize()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "a49cf913a1640638d05521c52257cbf4", "score": "0.5854495", "text": "public function isSecured() {\n\t\t$this->checkSettings();\n\n\t\treturn $this->settings->isSecured();\n\t}", "title": "" }, { "docid": "ffcd1247b1ff3460e45767fe25c64bdd", "score": "0.58500123", "text": "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "title": "" }, { "docid": "b3643778bfcf895e5437b5c8ef5b817b", "score": "0.5841831", "text": "public function isAuthorized(){\n\t\tif($this->user_id == 0) $this->redirect(\"/user/login\");\n\t}", "title": "" }, { "docid": "529f884babd7088784b7d527b79fb9b1", "score": "0.5841568", "text": "public function can_access()\n\t{\n\t\t$restrict_ip = $this->fuel->config('restrict_to_remote_ip');\n\t\treturn ($this->fuel->config('admin_enabled') AND \n\t\t\t\t\t(empty($restrict_ip) OR (!empty($restrict_ip) AND $this->check_valid_ip($restrict_ip)))\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.58408684", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "9a3cb41ae44af66e7585e6ef9fa1a9c2", "score": "0.5834599", "text": "public function authorize()\n\t{\n $server = $this->route('server');\n return $server ? $server->user_id == Auth::id() : Auth::check();\n\t}", "title": "" }, { "docid": "0ddc9bc045015663bd2e5ade1c3c4c6f", "score": "0.5825454", "text": "public function check_controller()\n\t{\n\t\t$controller = strtolower($this->input->post('controller'));\n\n\t\tif( $this->db->get_where('acm_module', array('controller' => $controller))->num_rows() > 0)\n\t\t\techo json_encode(array('return' => true));\n\t\telse\n\t\t\techo json_encode(array('return' => false));\n\t}", "title": "" }, { "docid": "07d53fe088c8e14a4c963b21e0c69a1b", "score": "0.58250594", "text": "protected function _isAllowed()\n\t{\n\t\treturn df_mage()->admin()->session()->isAllowed('customer/manage');\n\t}", "title": "" }, { "docid": "bc7329e009a11fad1409002b215f5a54", "score": "0.58232254", "text": "public function authorize()\n {\n return $this->route('section')->user_id == Auth::id();\n }", "title": "" }, { "docid": "03a8a469a449fcd1b944061120fbedfe", "score": "0.5819069", "text": "public function isAuthorized() {\n if (in_array($this->action,$this->allowComponentsAdmin))\n {\n return true;\n } elseif (in_array($this->action,$this->allowComponentUser)) {\n return true;\n } elseif (in_array($this->action,$this->allowComponentGuest)) {\n return true;\n } else {\n return false;\n }\n return parent::isAuthorized($user);\n }", "title": "" }, { "docid": "ba54efa6dedaac5f997d473ccafa009b", "score": "0.5816186", "text": "public function authorize()\n {\n return $this->request->count() > 0;\n }", "title": "" }, { "docid": "a6a372dae69e548e25302e634f8c9911", "score": "0.5808652", "text": "public function authorize(): bool\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "02988727d69ceb6d8e7bd064659ed86a", "score": "0.5805837", "text": "public function authorize()\n {\n if (!is_null(Auth::User()->technician) and Auth::user()->technician->admin) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c0ec70c6b15cbc9698befc0bd0ce8ea4", "score": "0.58025074", "text": "public function authorize()\n {\n return Auth::user() != null;\n }", "title": "" }, { "docid": "0bd01af7fff44174f9216f77ca87e696", "score": "0.57986426", "text": "public function authorize() {\n return Auth::check() && !Auth::user()->isBanned();\n }", "title": "" }, { "docid": "4bc145a512bd4286ca91d071dddda525", "score": "0.57979965", "text": "public function authorize()\n {\n $id = $this->route('student_id');\n\n return Student::where('id', $id)->exists();\n }", "title": "" }, { "docid": "089f37a65771526abcbeeb16a1e1947e", "score": "0.5794084", "text": "public function authorize()\n {\n return !\\Auth::guest();\n }", "title": "" }, { "docid": "c101c69ebf7bb8565886634de4c6a385", "score": "0.5792807", "text": "public function authorize() {\n return !is_null($user = \\Auth::user()) && ($user->is_admin || $this->route('accounts') == $user->profile->account->id);\n }", "title": "" }, { "docid": "ee8391cf2d0abf25a01b1fa83ce7a1af", "score": "0.579204", "text": "public function isProtected()\n {\n if (isset($this->middleware['api.auth']) || \\in_array('api.auth', $this->middleware)) {\n if ($this->controller && isset($this->middleware['api.auth'])) {\n return $this->optionsApplyToControllerMethod($this->middleware['api.auth']);\n }\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "477a866123f2a6ccc8868266bdef57b4", "score": "0.57914233", "text": "public function isForbidden(): bool;", "title": "" }, { "docid": "ee667ca61309e7e5dfe8f635c9aa77c1", "score": "0.5788641", "text": "public function authorize()\n {\n return Auth::check() && !Auth::user()->isBanned();\n }", "title": "" }, { "docid": "c5abc14c719e1c63469dbde1bc2c7093", "score": "0.5783709", "text": "function validate() {\n\t\t// Activate home controller for /home and /home/*\n\t\tif (q('admin/del/files') && $this->user->isAdmin())\n\t\t\treturn 1;\t// priority 2\n\t\telse return false;\n\t}", "title": "" }, { "docid": "0084540063ca437705ea675264647fb3", "score": "0.57837003", "text": "public function isAccessApi(){\n $key = $this->getApiKey('public');\n if(isset($key)){\n if(isset($key[0])){\n if(isset($key[1])){\n $user = trim($key[0]);\n $pass = system::decrypt(trim($key[1]),system::cryptkey());\n $empresa = $this->model('Empresa')->selects(['op'=>'checkout','user'=>$user,'pass'=>$pass]);\n if($empresa != null){\n if(count($empresa) > 0){\n return true;\n } else { return false; }\n } else { return false; }\n } else { return false; }\n } else { return false; }\n } else { return false; }\n }", "title": "" }, { "docid": "c963281efae6a51ad05a34071dabbd52", "score": "0.57828736", "text": "public function authorize()\n {\n\tif ($this->path() == 'food' || 'food/add')\n {\n\t return true;\n\t} else {\n\t return false;\n\t}\n }", "title": "" }, { "docid": "ce54588fa87f302b9da4640381de52bd", "score": "0.5780977", "text": "public function __isAllowed();", "title": "" }, { "docid": "fefc5cdd2f12734a0176036cedbd3607", "score": "0.57786715", "text": "public function isAccesible() {\n return $this->accesible;\n }", "title": "" }, { "docid": "250cb76098219b99ddd24e1979395ee6", "score": "0.5777603", "text": "public function authorize()\n\t{\n\t\treturn true;\n\t\t$ext = $this->route('exts');\n\n\t\treturn Auth::user()->isAdmin() || ( $ext && Auth::user()->getKey() == $ext->getKey() );\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "03cce66815a5d62b8039fa9733e02b12", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'nama_level' => ['required'],\n 'deskripsi_level' => ['required'],\n ]);\n $level = Level::find($id);\n $dataUpdate = [\n 'nama_level' => $request->nama_level,\n 'deskripsi_level' => $request->deskripsi_level\n ];\n $level->update($dataUpdate);\n return redirect()->route('level.index')->withSuccess('BERHASIL EDIT DATA LEVEL');;\n }", "title": "" } ]
[ { "docid": "995ba0c8f03901b2d9d4e3a2b71aed6a", "score": "0.7192627", "text": "public function put($resource);", "title": "" }, { "docid": "01534868cb4f609380c1221841e980b3", "score": "0.7055208", "text": "public function testUpdateResource()\n {\n\n }", "title": "" }, { "docid": "806a502be14c3132fb31b52b5f6fc652", "score": "0.6811669", "text": "public function update(Request $request, Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $input=$request->all();\n $resource->update($input);\n return redirect('/resource/'.$resource->id);\n }", "title": "" }, { "docid": "f5a994e832253cd9f55282b676779eee", "score": "0.665668", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'title' => 'required',\n 'content' => 'required',\n 'icon_id' => 'required'\n ]);\n \n $updateEntry = $resource;\n $updateEntry->title = $request->title;\n $updateEntry->content = $request->content;\n $updateEntry->icon_id = $request->icon_id;\n $updateEntry->save();\n return redirect('resources');\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "24dae383ef96f6cd3c2ae0eb901b0e6e", "score": "0.6533836", "text": "public function update_storage()\n {\n }", "title": "" }, { "docid": "2390e2b8ee9b8954b577e83f8820c087", "score": "0.64636725", "text": "public function update(Request $request, Resource $resource)\n {\n $this->save($resource, $request);\n\n return redirect()->route('resource.show', ['resource' => $resource]);\n }", "title": "" }, { "docid": "8467ecb0dbf1d9ccb84ac63dd18c0896", "score": "0.63440365", "text": "public function update(Request $request, storage $storage)\n {\n $storage->update($request->all());\n\n return redirect()->route('storage.index')->withStatus(__('storage successfully updated.'));\n }", "title": "" }, { "docid": "cc19cd46a06e40af74215bec5d1bff6f", "score": "0.62828", "text": "public function update(Request $request, Storage $storage)\n {\n //\n $data = $request->all();\n $update = Storage::findOrFail($request->storage_id);\n $data = $request->all();\n $ok = $update->update($data);\n\n if ($ok) {\n return back()->with('success', \"Activity updated successfully\");\n } else {\n return back()->with('error', \"Something wen't wrong! Please try again\");\n }\n }", "title": "" }, { "docid": "fa2a013f8711944438e691cb6cc55e66", "score": "0.6139667", "text": "public function update_object ($obj)\n {\n $this->_commit ($obj, Storage_action_update);\n }", "title": "" }, { "docid": "8b36ffcc87dfcd18f23af856d8853acc", "score": "0.6045223", "text": "public function replace(Resource $resource)\n {\n return $this->save($resource, $replace = true);\n }", "title": "" }, { "docid": "53fb2f47835e8885a16e9805805e80d8", "score": "0.60224766", "text": "public function update($resource)\n {\n if ($resource instanceof Model) {\n return $this->form()->update($resource->id);\n }\n\n return $this->form()->update($resource);\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "7fcd166007fa0df141cb1ff80f531590", "score": "0.59964967", "text": "public function update(Resource $resource) {\n\t\t$class = get_class($resource);\n\t\t$reflector = new ReflectionClass($class);\n\n\t\t$table = strtolower(substr($class, strrpos($class, \"\\\\\") + 1));\n\t\t$criteria = $resource->getRequiredEqualities();\n\t\t$populateCriteria = $criteria == null;\n\n\t\t$parameters = array();\n\t\tforeach($reflector->getProperties() as $parameter) {\n\t\t\tif($resource->isDirty($parameter->name)) {\n\t\t\t\t$parameters[$parameter->name] = $resource->{'get' . ucfirst(\\framework\\camelCase($parameter->name))}();\n\t\t\t} else if($populateCriteria) {\n\t\t\t\t$criteria[$parameter->name] = $resource->{'get' . ucfirst(\\framework\\camelCase($parameter->name))}();\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t$this->driver->update($parameters, $table, $criteria);\n\t\t} catch (InvalidQueryException $exception) {\n\t\t\tthrow $exception; # Move it up the line.\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c578eae6b6dfa4e69347194aa71e0c56", "score": "0.5987175", "text": "public function update($object)\r\n\t{\r\n\t\tif(file_exists($this->conf->paths['storage'].\"/\".$object->get_id()))\r\n\t\t\t$fp = fopen($this->conf->paths['storage'].\"/\".$object->get_id(), \"w\");\r\n\t\tif(!$fp)\r\n\t\t\tthrow new Exception(\"Failed to open file: '\".$this->conf->paths['storage'].\"/\".$object->get_id().\"'\");\r\n\t\tfwrite($fp, serialize($object));\r\n\t\tfclose($fp);\r\n\t\t$this->update_stat();\r\n\t}", "title": "" }, { "docid": "fb6d6d2f47c01b40c3ee6f90a7b30eaa", "score": "0.59581053", "text": "public function update(Request $request, $id)\n {\n //\n $product=Shirts::find($id);\n // validation\n $this->validate($request,[\n 'name'=>'required',\n 'size'=>'required',\n 'price'=>'required',\n 'description'=>'required'\n ]);\n\n $oldImage=Input::get('image');\n\n $product->description =$request->input('description');\n $product->name = $request->input('name');\n $product->price = $request->input('price');\n $product->size = $request->input('size');\n\n $Image = $request->file('image');\n\n if($Image)\n {\n $filenameToStore= Products::updatePhoto('image','shirts',$request);\n\n $product->image = $filenameToStore;\n\n Storage::delete('public/photos/shirts/'.$oldImage);\n }\n\n $product->save();\n return redirect()->route('shirts.index');\n }", "title": "" }, { "docid": "0491a14749073a0385a7050311d8f458", "score": "0.595499", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n try {\n $resource = $this->resourceService->updateResource($request->all(), $resource);\n return $this->respondWithSuccess('Resource Updated.', ['resource' => new ResourceResource($resource)], Response::HTTP_ACCEPTED);\n } catch (Exception $e) {\n return $this->respondWithError($e->getMessage());\n }\n }", "title": "" }, { "docid": "98b58f9ade13a98b810ff57532876c2b", "score": "0.5909375", "text": "public function update(Request $request, $id)\n {\n $item = StoragePhoto::findOrFail($id);\n\n if ($request->hasFile('file')) {\n $oldFile = $item->file;\n\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n\n $path = $image->storeAs('public/storage_photos', $filename);\n\n $item->file = $filename;\n\n /* TODO - удалить старую пикчу */\n Storage::disk('public')->delete('storage_photos/' . $oldFile);\n }\n\n $item->save();\n\n return redirect()->route('admin.banners.index');\n }", "title": "" }, { "docid": "c505a7676741f8b0f0d5b54e66cdf22a", "score": "0.58993477", "text": "public static function register_or_update_storage_resource($storageResourceDesc, $update = false)\n {\n if ($update) {\n $storageResourceId = $storageResourceDesc->storageResourceId;\n \n if (Airavata::updateStorageResource(Session::get('authz-token'), $storageResourceId, $storageResourceDesc)) {\n $storageResource = Airavata::getStorageResource(Session::get('authz-token'), $storageResourceId);\n return $storageResource;\n } else\n print_r(\"Something went wrong while updating!\");\n exit;\n } else {\n $sr = new StorageResourceDescription( $storageResourceDesc);\n $storageResourceId = Airavata::registerStorageResource(Session::get('authz-token'), $sr);\n }\n $storageResource = Airavata::getStorageResource(Session::get('authz-token'), $storageResourceId);\n return $storageResource;\n\n }", "title": "" }, { "docid": "24392ed55179d91794136a7abc353e0b", "score": "0.5845655", "text": "function handle_put_pic($resource)\n{\n\t$owner = get_owner_of_pic_resource($resource);\n\tif(!authenticate_user($owner))\n\t{\n\t\theader(\"HTTP/1.1 403 Forbidden\");\n\t\tdie(\"You can only update your own resources!\");\n\t}\n\n\t$data = json_decode(file_get_contents(\"php://input\"));\n\n\t$owner = isset($data->owner) ? $data->owner : null;\n\t$info = isset($data->info) ? $data->info : null;\n\t$image_data = isset($data->image) ? $data->image : null;\n\n\t// All fields must be supplied\n\tif(is_null($owner) || is_null($info) || is_null($image_data))\n\t{\n\t\theader('HTTP/1.1 422 Unprocessable Entity');\n\t\tdie(\"owner, info and image fields must be supplied\");\n\t}\n\n\tupdate_pic_resource($resource, $owner, $info, $image_data);\n}", "title": "" }, { "docid": "996f4a8678aca25bf47aeb5352fb1d2d", "score": "0.5841891", "text": "public function update(Request $request, $resource)\n { \n $resource = RequiredDocument::find($resource);\n try {\n $resource->update($request->all()); \n } catch (\\Exception $th) {\n return responseJson(0, $th->getMessage());\n }\n return responseJson(1, __('done'));\n }", "title": "" }, { "docid": "96e56ee021bd9ebb23ab79ce64045619", "score": "0.57721734", "text": "public function update(Request $request, $id)\n {\n // return $request;\n /**\n * melakukan validasi\n */\n $this->validate($request, [\n 'title',\n 'type',\n 'creator',\n 'format',\n 'file' => '',\n 'image' => ''\n ]);\n\n DB::beginTransaction();\n try {\n $resource = Resource::find($id);\n // simpan tanpa gambar dan file\n $resource->update([\n 'title' => $request->title,\n 'subject_id' => $request->subject_id,\n 'description' => $request->description,\n 'creator' => $request->creator,\n 'source' => $request->source,\n 'publisher' => $request->publisher,\n 'date' => Carbon::now(),\n 'contributor_id' => Auth::user()->id,\n 'rights' => $request->rights,\n 'format' => $request->format,\n 'language' => $request->language,\n 'type_id' => $request->type_id,\n 'collection_id' => $request->collection_id,\n 'citation' => null\n ]);\n $resource->save();\n\n // olah gambar dan file\n $file = $request->file('file');\n if($file != NULL){\n $fileExt = $file->getClientOriginalExtension();\n $fileName = 'resource_' . $id . '.' . $fileExt;\n $tujuan_file = $this->path_resource_file;\n $file->move($tujuan_file,$fileName);\n \n $image = $request->file('image');\n $imageExt = $image->getClientOriginalExtension();\n $imageName = 'image_' . $id . '.' . $imageExt;\n $tujuan_image = $this->path_resource_image;\n $image->move($tujuan_image,$imageName);\n \n $resource->update([\n 'file' => $fileName,\n 'image' => $imageName\n ]);\n $resource->save();\n }\n DB::commit();\n return redirect()->route('admin.oer.resource.index')->with('status','Resource berhasil diupdate');\n } catch (\\Throwable $th) {\n DB::rollBack();\n return redirect()->route('admin.oer.resource.index')->with('status','Resource gagal diupdate');\n }\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "79170e0c428aa8840550d2f009bc0bd5", "score": "0.57258964", "text": "public function edit($id)\n\t{\n\t\t// the specified resource from storage.\n\t \n\t}", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "eaa9290a68686ebc6d5bfe4b4d4da3ed", "score": "0.57221985", "text": "public function update(ResourceUpdateRequest $request, int $id)\n {\n if (auth()->user()->user_type_id == 0){\n return redirect('/admin/resources')->with(['error' => 'Unauthorized!']);\n }\n $subjects = $this->Subject->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $courses = $this->Course->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n\n // Validated Request\n $data = $request->validated();\n\n //Handle File Upload\n if ($request->hasFile('pdf_path')) {\n $ext = $request->file('pdf_path')->getClientOriginalExtension();\n $pdf_path = 'CI_' . time() . '.' . $ext;\n $PDFPath = $request->file('pdf_path')->storeAs('public/cover_images', $pdf_path);\n }\n\n // if ($request->hasFile('video_path')) {\n // $ext = $request->file('video_path')->getClientOriginalExtension();\n // $video_path = 'CI_' . time() . '.' . $ext;\n // $VideoPath = $request->file('video_path')->storeAs('public/cover_images', $video_path);\n // }\n\n if ($request->hasFile('audio_path')) {\n $ext = $request->file('audio_path')->getClientOriginalExtension();\n $audio_path = 'CI_' . time() . '.' . $ext;\n $AudioPath = $request->file('audio_path')->storeAs('public/cover_images', $audio_path);\n }\n\n $entity = $this->Resource->UpdateResource(\n $data['name'],\n $data['description'],\n $data['subject_id'],\n $pdf_path,\n $audio_path,\n $data['video_path'],\n $id\n );\n\n if ($entity == null) {\n return redirect()->back()->withInput()->with(['error' => 'Error encountered while updating user, Please try again!', 'subjects'=>$subjects, 'courses'=>$courses]);\n }\n\n return redirect(\"/admin/resources\")->with(['success' => $entity->name.' Resource Updated!']);\n }", "title": "" }, { "docid": "069b4ac7f6c57fe9a04373680c642655", "score": "0.5707731", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'social_name'=>'required',\n 'link'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('icon')){\n if($path!=null){\n unlink('storage/',$path);\n }\n $path=$request->file('icon')->store('Icon');\n }\n $social=Social::where('id',$id)->first();\n $social->name=$request->social_name;\n $social->icon=$path;\n $social->link=$request->link;\n $social->save();\n return redirect()->route('listSocial');\n }", "title": "" }, { "docid": "f47b9d570ea05e0c010d421e6ee2956d", "score": "0.570513", "text": "public function update(Request $request, $id)\n {\n \n $product= Product::find($id);\n\n $product->fill($request->all())->save();\n\n if($request->file('file')){\n\n $photo =Storage::disk('public')->put('files', $request->file('file'));\n $product->fill(['file'=>asset($photo)])->save();\n //$product->fill($request->all())->save();\n\n }\n return redirect()->route('products.index')->with('info','Actualizacion exitosa.');\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "aa791f30f13ec2f303130ddbd0ce5da7", "score": "0.56709456", "text": "public function update ($object);", "title": "" }, { "docid": "d1cbfd525b1daec79739ff0e6ccf1268", "score": "0.56673855", "text": "public function testUpdateById()\n {\n $server = $this->server->getByAssetId('78453');\n $rams = $this->ram->getByServerId($server->getId(), 1, 100, true);\n $this->assertTrue($this->ram->updateById($rams[0]['id'], ['size' => '6']));\n }", "title": "" }, { "docid": "1473bff93d350e39f21ce4988672250e", "score": "0.56635326", "text": "public function setResource(?Resource $resource)\n {\n if($this->exists) {\n $this->rewriteResource = true;\n }\n\n $this->resource = $resource;\n }", "title": "" }, { "docid": "0b3db3a626ff99124139d26b53736d7f", "score": "0.56604844", "text": "public function setResource(?string $resource): void;", "title": "" }, { "docid": "069d6ef83ac999fe8c81dd1c3b87e822", "score": "0.565091", "text": "function update_pic_resource($resource, $owner, $info, $image_data)\n{\n\t$pics_table = TABLE_PICS;\n\n\t// Check whether resource exists\n\t$db = connect_database();\n\t$res = $db->prepare(\"SELECT * FROM $pics_table WHERE id=?\");\n\t$input = array($resource);\n\t$res->execute($input);\n\n\tif(!($res))\n\t{\n\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\tdie(\"Database error\");\n\t}\n\n\n\t// Resource does not exist?\n\tif($res->rowCount() != 1)\n\t{\n\t\theader('HTTP/1.1 404 Not Found');\n\t\tdie();\n\t}\n\n\t// Update owner\n\tif(!is_null($owner))\n\t{\n\t\t$res = $db->prepare(\"UPDATE $pics_table SET owner=? WHERE id=?\");\n\t\t$input = array($owner, $resource);\n\t\t$res->execute($input);\n\n\t\tif(!($res))\n\t\t{\n\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\tdie(\"Database error\");\n\t\t}\n\t}\n\n\t// Update image info\n\tif(!is_null($info))\n\t{\n\t\t$res = $db->prepare(\"UPDATE $pics_table SET info=? WHERE id=?\");\n\t\t$input = array($info, $resource);\n\t\t$res->execute($input);\n\n\t\tif(!($res))\n\t\t{\n\t\t\theader('HTTP/1.1 500 Internal Server Error');\n\t\t\tdie(\"Database error\");\n\t\t}\n\t}\n\n\t// Update actual image\n\tif(!is_null($image_data))\n\t{\n\t\t// Get filename from database\n\t\t$res = $db->prepare(\"SELECT filename FROM $pics_table WHERE id=?\");\n\t\t$input = array($resource);\n\t\t$res->execute($input);\n\t\t$row = $res->fetch(PDO::FETCH_ASSOC);\n\t\t$filename = $row['filename'];\n\n\t\t// Save data to file\n\t\t$res = file_put_contents(BASE_IMAGE_DIR.$filename, base64_decode($image_data));\n\t\t// FIXME: Check result\n\t}\n}", "title": "" }, { "docid": "8eaf334df7b5605dd932f3d2e8a41f85", "score": "0.5650028", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n if ($request->file('file')) {\n $path = $request->file('file')->store('app/public/img');\n $item->path = $path = 'storage'.substr($path, 10);\n }\n $item->name = $request->input('name');\n\n $item->sizes()->detach();\n if($request->input('sizes')) {\n foreach ($request->input('sizes') as $size) {\n $item->sizes()->attach($size);\n }\n }\n $item->save();\n return redirect()->route('index');\n }", "title": "" }, { "docid": "5291290bcd969edf6f73d602449094f5", "score": "0.5647362", "text": "public function update(StoreRequest $request, $id)\n {\n if ($request->file('image')){\n $path = $request->file('image')->store('images','public');\n $request->validated();\n $data = [\n 'image' => $path,\n 'title' => $request->title,\n 'text' => $request->text,\n ];\n Slider::whereId($id)->update($data);\n return redirect()->route('admin.sliders.index')->with('succsess', 'Данные были обновленны успешно');\n }\n else {\n $request->validated();\n $data = [\n 'image' => $request->hiddenImage,\n 'title' => $request->title,\n 'text' => $request->text,\n ];\n Slider::whereId($id)->update($data);\n return redirect()->route('admin.sliders.index')->with('succsess', 'Данные были обновлены успешно');\n }\n }", "title": "" }, { "docid": "c0f5addccae14c8f29d848399d71595d", "score": "0.5644971", "text": "public function update(Request $request, $id)\n {\n //\n \n $user = User::find($id);\n if($request->has('name'))\n {\n $user->name=$request->get('name');\n }\n\n // TODO: Handle 404 error\n if($request->hasFile('avatar'))\n {\n $featuredImage = $request->file('avatar');\n $filename = time().$featuredImage->getClientOriginalName();\n // Storage::disk('images')->putFileAs($filename, $featuredImage,$filename);\n \n //Storage::putFile('public/images', $featuredImage,'public');\n\n $path= Storage::put('public/images/', $featuredImage, 'public');\n\n // Storage::putFile('photos', new File('/path/to/photo'), 'public');\n\n }\n\n $user->avatar = url($path);\n\n $user->save();\n\n return new UserResource($user);\n }", "title": "" }, { "docid": "3225745ceb37b1c7e09aa4ce56382df1", "score": "0.563803", "text": "public function update(Request $request, $id)\n {\n\n // AIzaSyBT7FGQguFSd8ajZiuAt1zk4LCaM9LAbWo\n try\n {\n $this->validate($request, [\n 'address' => 'required',\n 'latitude' => 'required',\n 'longitude' => 'required',\n ]);\n\n $storage = Storage::findOrFail($id);\n\n $storage->address = $request->input('address');\n $storage->latitude = $request->input('latitude');\n $storage->longitude = $request->input('longitude');\n\n $storage->save();\n\n return redirect()->route('storages.index')->with('success', \"The storage <strong>$storage->address</strong> has successfully been updated.\");\n }\n catch (ModelNotFoundException $ex) \n {\n if ($ex instanceof ModelNotFoundException)\n {\n return response()->view('errors.'.'404');\n }\n }\n }", "title": "" }, { "docid": "c8f367908b757c81a8edc82408118665", "score": "0.5618928", "text": "public function update(StoreProductRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $path = $product->photo;\n $file = '/public/'.$path;\n\n if ($request->file('photo')) {\n $path = $request->file('photo')->store('photos', 'public');\n }\n\n $product->update([\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'photo' => $path\n ]);\n\n if (Storage::exists($file) AND $path != self::DEFAULT_IMAGE_STORAGE_URL) {\n Storage::delete($file);\n }\n\n return redirect()->route('admin.products.index')->with('success', 'Product has been updated successfully!');\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "859149ae859a2b4652938544f4f690ac", "score": "0.55987424", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'price' => 'required|numeric|min:0',\n 'url' => 'nullable|max:255',\n 'manufacturer' => 'exists:manufacturers,id'\n ]);\n \n //$image_store = request()->file('image')->store('/Users/kieranmurphy/Documents/Uni/webAppDev/assignment2/prod/public/products_images');\n $image_store = request()->file('image')->store('', 'public');\n $product = Product::find($id);\n $product->name = $request->name;\n $product->price = $request->price;\n $product->url = $request->url;\n $product->image = $image_store;\n $product->manufacturer_id = $request->manufacturer;\n $product->save();\n return redirect(url(\"product/$product->id\"));\n }", "title": "" }, { "docid": "cf289fdccd02b9207ca528e586bf8602", "score": "0.55945903", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->input('product_name');\n $product->product_desc = $request->input('product_desc');\n $product->product_condition = $request->input('product_condition');\n $product->product_price = $request->input('product_price');\n $product->brand_id = $request->input('brand_id');\n $product->state_id = $request->input('state_id');\n $product->area_id = $request->input('area_id');\n $product->subcategory_id = $request->input('subcategory_id');\n $product->user_id = auth()->id();\n\n if ($request->hasFile('product_image')) {\n # code...\n $path = $request->product_image->store('public/uploads');\n $product->product_image = $request->product_image->hashName();\n }\n\n $product->save();\n\n // flash('Product successfully updated')->overlay();\n alert()->success('Successfully updated.', 'Good Work!')->autoclose(3000);\n\n return redirect() ->route('products.index');\n }", "title": "" }, { "docid": "08bd864d1d979d05f0f5badd1d9c880d", "score": "0.5584394", "text": "public function update(Request $request,$id)\n {\n\n\n\n\n if ($request->hasFile('file')){\n $todo = Todo::find($id);\n $nam = class_basename($todo->photo);\n Storage::delete('images/'.$nam);\n $path = $request->file('file')->store('images');\n\n\n }else {\n $todo = Todo::find($id);\n $path = $todo->photo;\n }\n $item = Todo::find($id);\n $item->photo = $path;\n $item->text = $request->text;\n $item->update();\n return redirect()->route('slide.index')\n ->with('success','Slider updated successfully');\n }", "title": "" }, { "docid": "5fed529c5b080f27dd2e01ca8fc4ac47", "score": "0.557354", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n $product->fill($request->all());\n if (!$request->hasFile('inputFile')) {\n\n } else {\n $imageName = time().'.'.$request->inputFile->extension();\n $request->inputFile->move(public_path('uploads'), $imageName);\n $product->image = 'uploads/'.$imageName;\n }\n $product->save();\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "5d4b1ffc9d0784b5904148d809883df2", "score": "0.55700654", "text": "public function update(Request $request,$id): \\Illuminate\\Http\\RedirectResponse\n {\n $product = Product::find($id);\n $product->name =$request->name;\n $product->price =$request->price;\n $path = $request->file('image')->store('/image', 'public');\n $product->image = $path;\n $product->save();\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $file->storeAs('public/image', 'anh_' . $product->id);\n }\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "af33e60c955c4d563496960443215622", "score": "0.55682975", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n $product -> ProductName = $request->name;\n $product -> ProductPrice = $request->price;\n $product -> ProductCount = $request->count;\n $product -> ProductName = $request->name;\n $product -> Size = $request->size;\n $product -> Type = $request->type;\n $product -> Brand = $request->brand;\n $product -> Sale = $request->sale;\n $product -> Note = $request->note;\n\n if($request['ImageUpload']){\n\n $ProductImage = $request['ImageUpload'];\n $ext = $ProductImage->getClientOriginalExtension();\n $name = time().'_'.$ProductImage->getClientOriginalName();\n Storage::disk('public')->put($name,File::get($ProductImage));\n $product->ProductImage = $name;\n \n }\n\n $product->save();\n \n return redirect()->back();\n }", "title": "" }, { "docid": "8906f32f155d40c8f8a49be55b1f4a18", "score": "0.55671555", "text": "public function update(Request $request, $id)\n {\n $request_data = $request->all();\n $item = Products::find($id);\n\n // 判斷是否有更新圖片\n if($request->hasFile('img')){\n // 刪除原有圖片\n Storage::disk('public')->delete($item->img);\n // 上傳新的圖片\n $file_name = $request->file('img')->store('','public');\n $request_data['img'] = $file_name;\n }\n // 更新資料\n $item->update($request_data);\n return redirect('/home/product');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "2727357bb406596eb8dfe8891f67ccfc", "score": "0.55604166", "text": "public function update(Request $request, EventResource $eventResource): JsonResponse\n {\n if ($request->has('type')) {\n $eventResource->type = $request->type;\n }\n\n if ($request->hasFile('url')) {\n Storage::disk('event')->delete($eventResource->url);\n $eventResource->url = $request->url->store('/', 'event');\n }\n\n if (!$eventResource->isDirty()) {\n return $this->errorResponse(\n 'Se debe especificar al menos un valor diferente para actualizar',\n );\n }\n $eventResource->saveOrFail();\n return $this->api_success([\n 'data' => new EventResourceResource($eventResource),\n 'message' => __('pages.responses.updated'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "2cfa3f035d49122191c6037f7c1b1ce1", "score": "0.55438745", "text": "public function update(Request $request, $id)\n {\n\n\n $data = $request->all();\n $data['Photo'] = $request->file('Photo')->store(\n 'assets/wisata', 'public'\n );\n\n $item = Gallery::findOrFail($id);\n\n $item->update($data);\n\n return redirect()->route('gallery.index');\n }", "title": "" }, { "docid": "b6ff7a39be0c5754d44a62a820354b5a", "score": "0.55404127", "text": "public function update(Request $request, $id)\n {\n $product = ProductService::update($id,$request);\n return new ProductResource($product);\n }", "title": "" }, { "docid": "abb88a7c05d8fee17d4ac3a6820978dd", "score": "0.5531798", "text": "public function setResource(Resource $resource);", "title": "" }, { "docid": "0cd1468122b5df0652960de9beec7153", "score": "0.5530294", "text": "protected function _update() {\n $name = $this->name;\n $identifier = $this->getIdentifier($name);\n $this->identifier = $identifier;\n }", "title": "" }, { "docid": "e4e5746029a652a8af6357dfd0ecfb0a", "score": "0.55277145", "text": "public function updateRecord($record, ResourceObjectInterface $resource, EncodingParametersInterface $params);", "title": "" }, { "docid": "7475c4693bb0f704a1fb08bd9326903b", "score": "0.55227137", "text": "public function onUpdate(ResourceEvent $e)\n {\n return $this->onPatch($e);\n }", "title": "" }, { "docid": "659edc6c8bc72bf94adc8569c8ce32c9", "score": "0.55171585", "text": "public function put($id, $data);", "title": "" }, { "docid": "a1a5da45e646cd439edfe58999c79c91", "score": "0.5516766", "text": "public function update(Request $request, Product $product)\n {\n \n \n $product->name = $request->name;\n $product->description = $request->description;\n $product->cost = $request->cost;\n $product->acquired_at = $request->dateAcq;\n $product->condition = $request->condition;\n $product->serial_no = $request->serial_no;\n $product->category_id = $request->category;\n $product->quantity = $request->quantity;\n $product->acquired_at = $request->acquired_at;\n $product->manufacturer_id = $request->manufacturer;\n $product->supplier_id = $request->supplier;\n \n if($request->file(\"image\") != null){\n $image = $request->file(\"image\");\n $image_name = time().\".\".$image->getClientOriginalExtension();\n $destination = \"images/\";\n $image->move($destination, $image_name);\n $product->img_path = $destination.$image_name;\n }\n\n $product->save();\n //hint 3: where to go back after editing the product\n return redirect(\"/products/\".$product->id);\n\n }", "title": "" }, { "docid": "f009b4c5e467cb86d91dd277d8f582d8", "score": "0.5515574", "text": "public function update(Request $request, $id)\n {\n $image = $request->newphoto;\n if ($image) {\n $img = Supplier::findOrFail($id);\n $old_imgPath = $img->photo;\n unlink($old_imgPath);\n\n $position = strpos($request->newphoto,';');\n $sub = substr($request->newphoto, 0 ,$position);\n $ext = explode('/', $sub)[1];\n $img_name = time().'.'.$ext;\n Image::make($request->newphoto)->resize(240,240)->save('backend/supplier/'.$img_name);\n $img_url = 'backend/supplier/'.$img_name;\n Supplier::findOrFail($id)->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'shopname' => $request->shopname,\n 'photo' => $img_url,\n 'created_at' => Carbon::now(),\n ]);\n \n }else{\n $old_img = $request->photo;\n Supplier::findOrFail($id)->update([\n 'name' => $request->name,\n 'email' => $request->email,\n 'phone' => $request->phone,\n 'address' => $request->address,\n 'shopname' => $request->shopname,\n 'photo' => $old_img,\n 'created_at' => Carbon::now(),\n \n ]);\n }\n }", "title": "" }, { "docid": "53ffba08b9cf71fb87cb5e0af2376524", "score": "0.551535", "text": "public function update(Request $request, $id)\n {\n $rules = array(\n 'name' => 'required',\n 'category' => 'required',\n 'photo' => 'image|mimes:jpeg,png,jpg,gif,svg|max:1024',\n );\n $validator = Validator::make($request->all(), $rules);\n\n // process the login\n if ($validator->fails()) {\n\n return Redirect::back()->withErrors($validator);\n\n\n } else {\n\n $product = Product::find($id);\n $file = $request->file('photo');\n if ($file){\n\n $path = $file->hashName();\n $image = Image::make($file);\n Storage::put($path, (string)$image->encode());\n $image->resize(100, 100, function ($constraint) {\n $constraint->aspectRatio();\n });\n Storage::put('thumb_' . $path, (string)$image->encode());\n $product->photos = $path;\n $product->save();\n }\n DB::beginTransaction();\n\n try {\n\n\n $product->attributesValues()->sync($request->get('attributes'));\n $product->name = $request->name;\n $product->category_id = $request->category;\n $product->save();\n\n DB::commit();\n } catch (\\Throwable $err) {\n DB::rollBack();\n return Redirect::back()->withErrors($err->getMessage());\n }\n\n\n return Redirect::to('product')->with('status', 'product successfully changed');\n }\n }", "title": "" }, { "docid": "59a46299e3ae479658e854c41ed9b55c", "score": "0.551217", "text": "public function update(Request $request, $client, $resource)\n\t{\n\t\t$resource = Resource::findBySlug($client, $resource);\n\n\t\tif (!$resource) {\n\t\t\treturn response(view('resources.404'), 404);\n\t\t}\n\n\t\t$resource->load('client');\n\t\t$client = $resource->client;\n\n\t\t$this->authorize('manage', $resource);\n\n\t\t$this->validate($request, [\n\t\t\t'name' => ['required', 'max:255'],\n\t\t\t'slug' => [\n\t\t\t\t'required',\n\t\t\t\t'max:255',\n\t\t\t\t'alpha_dash',\n\t\t\t\t'unique:resources,slug,'.$request->input('slug', $resource->slug).',slug,client_id,'.$resource->client->id,\n\t\t\t\t'not_in:create,destroy,edit,prune'\n\t\t\t],\n\n\t\t\t'metadata.*' => ['array'],\n\t\t\t'metadata.keys.*' => ['distinct', 'required_with:metadata.values.*'],\n\n\t\t\t'attachments' => ['array'],\n\t\t\t'uploads' => ['array'],\n\n\t\t\t'type' => ['required'],\n\n\t\t\t'client' => ['required', 'exists:clients,id'],\n\n\t\t\t'tags' => ['array'],\n\t\t\t'tags.*' => ['exists:tags,id'],\n\t\t]);\n\n\t\tif (($newClient = $request->input('client', $resource->client->id)) != $resource->client->id) {\n\t\t\t$client = Client::find($newClient);\n\t\t\t$resource->client()->associate($client);\n\t\t}\n\n\t\t$resource->name = $request->input('name');\n\t\t$resource->slug = $request->input('slug');\n\t\t$resource->description = $request->input('description');\n\n\t\t$metadata = static::parseMetadataFromForm($request->input('metadata', []));\n\t\t$resource->metadata = Crypt::encrypt($metadata);\n\n\t\t$attachments = $request->input('attachments', []);\n\n\t\tif ($request->hasFile('uploads')) {\n\t\t\t$uploads = $request->file('uploads');\n\t\t\t$attachments = array_merge($attachments, $uploads);\n\t\t}\n\n\t\t$resource->attachments = $attachments;\n\n\t\t// set type\n\t\tif (!($type = ResourceType::findBySlug($request->input('type')))) {\n\t\t\t$type = ResourceType::create([\n\t\t\t\t'name' => $request->input('type'),\n\t\t\t\t'slug' => str_slug($request->input('type')),\n\t\t\t]);\n\t\t}\n\n\t\t$resource->type()->associate($type);\n\n\t\t$resource->save();\n\n\t\t$resource->tags()->sync($request->input('tags', []));\n\n\t\treturn redirect()->route('clients.resources.show', ['client' => $resource->client->url, 'resource' => $resource->url])\n\t\t\t->with('alert-success', 'Resource updated!');\n\t}", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "4f9a7eefe9ee310c77dd90bb772d0268", "score": "0.550326", "text": "protected function save($resource = array()) {\n if (isset($resource['public_id']) && !empty($resource['mode'])) {\n $data = array(\n 'public_id' => $resource['public_id'],\n 'mode' => $resource['mode'],\n 'metadata' => serialize($resource),\n );\n\n db_merge('cloudinary_storage')\n ->key(array('public_id' => $data['public_id']))\n ->fields($data)\n ->execute();\n }\n }", "title": "" }, { "docid": "de666400bd564055ceae68366a410cf6", "score": "0.5495869", "text": "function updateProduct(ProductInterface $product, $andPersist = true);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "2e6523045766c061920aeea9222af1fe", "score": "0.54858494", "text": "public function edit(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "915de74b592076343102ef830bad4760", "score": "0.5483238", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n\n if($request->image !=null)\n {\n $path= $request->images->store('products');\n $product->image =$path;\n }\n $product->name = $request->name;\n $product->title = $request->title;\n $product->subtitle = $request->subtitle;\n $product->price = $request->price;\n $product->description = $request->description;\n\n $product->save();\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "cd9002163bfb014aae433fe03ba6f3c6", "score": "0.5481594", "text": "public function update(Request $request, Product $product)\n {\n try{\n// $product = Product::findOrFail($id);\n $data = $request->all();\n if ($request->hasFile('image')) {\n $this->unlink($product->image);\n $data['image'] = $this->uploadImage($request->image, $request->title);\n }\n $product->update($data);\n $sizes = $request->size;\n $colors = $request->color;\n $tags = $request->tag;\n $product->sizes()->sync($sizes);\n $product->colors()->sync($colors);\n $product->tags()->sync($tags);\n\n return redirect()->route('products.index')->withStatus('Updated Successfully !');\n }catch (QueryException $e){\n return redirect()->back()->withInput()->withErrors($e->getMessage());\n }\n }", "title": "" }, { "docid": "4cfc56539ed021bab827429f46aed628", "score": "0.5481018", "text": "protected function updateResources()\n {\n // Get user model\n $user = $this->buildingQueue->city->nation->user;\n $update = new UpdateResources();\n $update->handle($user);\n }", "title": "" }, { "docid": "345df4adf8928070e91a2554a8379eef", "score": "0.54775786", "text": "public function update(Request $request, $id)\n {\n // dd($request->title);\n $image = $request->image;\n if ($image) {\n //一意のファイル名を自動生成しつつ保存し、かつファイルパス($productImagePath)を生成\n //ここでstore()メソッドを使っているが、これは画像データをstorageに保存している\n $image_path = $image->store('public/uploads'); //storage/app/public/uploadsに保存される\n } else {\n $image_path = \"\";\n }\n \n $update = [\n 'title' => $request->title,\n 'contents' => $request->contents,\n 'image' => $image_path\n ];\n Book::find($id)->update($update);\n return redirect('/');\n }", "title": "" }, { "docid": "c9b0a501066581b7e74c2cd60e16e729", "score": "0.5477371", "text": "public function update($id, Request $request)\n {\n $data = $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'barcode' => 'required | digits_between:1,10',\n 'quantity' => 'required | numeric',\n 'cost_price' => 'required | between:0,99.99',\n 'sell_price' => 'required | between:0,99.99',\n 'image' => 'image',\n ]);\n\n\n if ( $request->hasFile('image') )\n {\n $imagePath = $request->file('image')->store('products', 'public');\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1000, 1000);\n $image->save();\n\n $imageArray = ['image' => $imagePath];\n }\n $data = array_merge($data , $imageArray ?? []);\n\n $product = Product::findOrFail($id);\n\n $product->update($data);\n// dd($product);\n\n return redirect()->route('product.show', ['id' => $product->id]);\n }", "title": "" }, { "docid": "3131a9734c737496b73d9b7f02ce130a", "score": "0.5475807", "text": "public function update(Request $request, ReferenceStorage $referenceStorage)\n {\n //\n }", "title": "" }, { "docid": "a6807e80417b5a587e2afd3bf245f13e", "score": "0.54740566", "text": "public function update(Request $request, $id)\n {\n $v = Volumes::find($id);\n $path = $request->file('capa')->store('capas');\n $v->imagem = $path;\n $v->update($request->all());\n return redirect()->action('VolumeController@index', ['id' => $v->id_colecao]);\n }", "title": "" }, { "docid": "c0e7f9346f3ee0689ec8d7ff708a7de2", "score": "0.5470321", "text": "public function update(Request $request, $id)\n {\n $fullPathName=\"\";\n if($request->has('img')){ \n $fullPathName = $request->file('img')->getClientOriginalName();\n $imagename = $request->file('img');\n $path = public_path(('front/images/sliders/').$imagename->getClientOriginalName());\n $image = Image::make($request->file('img'))->resize(300, 200)->save($path);\n }\n Slider::find($id)->update(\n [\n 'img'=>$fullPathName\n ]);\n \n return redirect()->route('sliders.index')->with('message', 'Data Updated');\n }", "title": "" }, { "docid": "480b6359dcc805593929864642755b60", "score": "0.5468656", "text": "public function update($id)\n\t{\n\t\t$rules = array(\n\t\t\t'name' \t=> \t'required',\n\t\t\t'route' =>\t'required'\n\t\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::to('resource/'. $id. '/edit')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$resource = Resource::find($id);\n\t\t\t$resource->name \t= \tInput::get('name');\n\t\t\t$resource->route \t= \tInput::get('route');\n\t\t\t$resource->save();\n\n\t\t\tSession::flash('message', 'Successfully edited');\n\t\t\treturn Redirect::to('resource');\n\t\t}\n\t}", "title": "" }, { "docid": "ad38428475befeaa7bd22cc27d29dd43", "score": "0.5467444", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n\n $resource = Resource::findOrFail($id);\n $resource->update($requestData);\n\n return redirect('resources')->with('flash_message', ' updated!');\n }", "title": "" }, { "docid": "18835ea7fdc7fdae900ff435256e6132", "score": "0.5461308", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n if(!$product = Product::find($id))\n return redirect()->back();\n\n $data = $request->all();\n\n if($request->hasFile('image') && $request->image->isValid()) {\n\n if($product->image && Storage::exists($product->image)) {\n Storage::delete($product->image);\n //dd(Storage::exists($product->image));\n }\n\n $imagePath = $request->image->store('products');\n\n $data['image'] = $imagePath;\n }\n\n $product->update($data); //$request->all() -> pega todos os dados do formulário.\n\n return redirect()->route('teste.index');\n }", "title": "" }, { "docid": "888eacb2684deea060d74401ec576361", "score": "0.5459631", "text": "public function update($id, Request $request)\n {\n try {\n \n $data = $this->getData($request);\n \n $asset = Asset::findOrFail($id);\n $asset->update($data);\n\n return redirect()->route('assets.asset.index')\n ->with('success_message', 'Asset was successfully updated.');\n } catch (Exception $exception) {\n\n return back()->withInput()\n ->withErrors(['unexpected_error' => 'Unexpected error occurred while trying to process your request.']);\n } \n }", "title": "" }, { "docid": "c2ba1266c1f288e006d63595b8c95475", "score": "0.54551506", "text": "public function updateProductImage(Request $request,$id){\n \n // making sure that an image is uploaded, validating the incoming request\n Validator::make($request->all(),['image' => \"required|file|image|mimes:jpg,png,jpeg|max:5000000\"])->validate();\n\n //Checking if the file exists in the public storage folder\n if($request->hasFile('image')){\n $product = Product::find($id);\n $exists = Storage::disk('local')->exists(\"public/products_images/\".$product->image);\n\n //deleting the old image\n if($exists){\n Storage::delete('public/product_images/'.$product->image);\n }\n\n //uploading a new image\n $ext = $request->file('image')->getClientOriginalExtension(); //getting the image extensions\n\n $request->image->storeAs(\"public/product_images/\",$product->image); //storing the new image in the product_image folder\n\n $arrayToUpdate = array(\"image\" => $product->image);\n DB::table('products')->where('id',$id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayProducts\"); \n\n }else {\n \n $error = \"No image was selected\";\n return $error;\n \n }\n\n }", "title": "" }, { "docid": "36282285831dc6d68f5e70b518199798", "score": "0.54545444", "text": "public function indexResource(Resource $resource)\n {\n $this->addResource($resource);\n $this->commit();\n }", "title": "" }, { "docid": "a0e8039ee0fc1bca4aff88fac58bcb5d", "score": "0.5451169", "text": "public function update(Request $request, Product $product)\n {\n Storage::disk('public')->delete($product->image->path);\n $product->name = $request->name;\n $product->value = $request->value;\n $product->save();\n Image::where('id', $product->image->id)->update(['path' => $request->file('image')->store('product')]);\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "1cf069cc7d44d8c46dceb5aa2f934b84", "score": "0.5448955", "text": "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 }", "title": "" }, { "docid": "d7171e526ed9dfefe282174959b684f8", "score": "0.5434525", "text": "public function replace($id, $uploaded_file, $disk ='public'){\n $file = \\App\\File::findOrFail($id);\n //Replace on disk\n \\Illuminate\\Support\\Facades\\Storage::disk($disk)->delete($file->filename);\n\n $pathinfo = pathinfo($file->filename);\n $filename = $this->putAs(\n $uploaded_file ,\n $pathinfo['dirname'], \n $pathinfo['filename'], \n $disk,\n false);\n\n //Update on DB\n $this->updateOndb($file,$uploaded_file, $filename);\n }", "title": "" }, { "docid": "4d4572c7b46a11dd63d3345d70b2c678", "score": "0.54325026", "text": "public function update($id)\n {\n $rules = [\n 'name' => 'required|string|max:100'\n ,'description' => 'required|string'\n ,'price' => 'required|numeric|min:0|max:9999999.99'\n ,'image' => 'image|max:1024'\n ,'stock_number' => 'required|alpha_num|size:10'\n ,'available' => 'in:1'\n ];\n\n $validator = Validator::make(Input::all(), $rules);\n\n if($validator->passes())\n {\n $product = Product::find($id);\n\n if(!isset($product)){\n return Redirect::route('admin.home');\n }\n\n if(Input::hasFile('image'))\n {\n $file = public_path().$product->image;\n \n if(File::exists($file)) {\n File::delete($file);\n }\n\n $image = Input::file('image');\n $fileLocation = public_path().'/images/';\n $fileName = uniqid().'.'.$image->getClientOriginalExtension();\n $image->move($fileLocation, $fileName);\n\n $product->image = '/images/'.$fileName;\n }\n\n $product->name = Input::get('name');\n $product->description = Input::get('description');\n $product->price = Input::get('price');\n $product->stock_number = Input::get('stock_number');\n $product->available = Input::get('available', false);\n\n $product->save();\n\n return Redirect::route('admin.product.edit', $id)\n ->with('data', ['alert'=>'Product saved', 'alertType'=>'success']);\n }\n\n return Redirect::route('admin.product.edit', [$id])->withInput()->withErrors($validator);\n }", "title": "" }, { "docid": "ea8973d39e59e8f1c11bb3b1309f8968", "score": "0.54281324", "text": "public function update(RecordInterface $entity);", "title": "" }, { "docid": "f240996101fd1f576310adca24306421", "score": "0.5427304", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->airport_id = $request->airport;\n $product->service_id = $request->service;\n $product->product_code = $request->code;\n $product->sell_as_agent = $request->sell_as_agent == 'on' ? 1 : 0;\n $product->is_amendable = $request->is_amendable == 'on' ? 1 : 0;\n $product->is_refundable = $request->is_refundable == 'on' ? 1 : 0;\n\n if($request->file('photo')){\n $path = $this->save_image($request->file('photo'));\n $product->image = $path; \n }else{\n $path = $product->image;\n }\n\n $product->save();\n return response()->json(['message' => 'Product Saved', 'image_url' => $path, 'product_id' => $product->id]);\n }", "title": "" }, { "docid": "5487655f93ce1538067ec32ea1bba609", "score": "0.54081273", "text": "public function update(MetaResource $meta): bool\n {\n $this->checkReadOnly($meta->getKind());\n $response = $this->connector->put($this->getZonePath('/metadata/'.$meta->getKind()), new MetaTransformer($meta));\n\n // If the response is empty, everything is fine.\n return empty($response);\n }", "title": "" }, { "docid": "7b0a591f560c7cc51ca21361b8ff2d2f", "score": "0.54073846", "text": "public function update(Request $request, $id)\n {\n $data = Product::findOrFail($id);\n $data->id_jenis_product = $request->jenis;\n $data->name = $request->name;\n $data->low_name = strtolower($request->name);\n $data->unit = $request->unit;\n $data->price = $request->price;\n $data->stock = $request->stock;\n $data->status = $request->status;\n $data->promo = $request->promo;\n $data->size = $request->size;\n $data->detail = $request->detail;\n\n if ($request->hasFile('picture')) {\n $uploadedFile = $request->file('picture');\n $file_up = $uploadedFile->store('public/product');\n $data->picture = \\Storage::url($file_up);\n\n $picture = ProductPicture::where('id_product', $id)->where('status', 1)->first();\n if (!empty($picture)) {\n $picture->status = 1;\n $picture->id_product = $data->id;\n $picture->picture = \\Storage::url($file_up);\n $product->save();\n }\n }\n\n $data->save();\n\n Session::flash('success', 'Product berhasil di Update');\n return redirect()->back();\n }", "title": "" }, { "docid": "1a6a6b40dbea5cb9d0dbea3f140da229", "score": "0.5407359", "text": "public function update(Request $request, $id)\n {\n $validate=$request->validate([\n 'name'=>'required',\n 'description'=>'required'\n\n ]);\n $food=Food::find($id);\n $photo=$food->photo;\n if($request->file('photo')){\n $photo=$request->file('photo')->store('public/food');\n \\Storage::delete($food->photo);\n \n \n }\n $food->name=$request->name;\n $food->description=$request->description;\n $food->photo=$photo;\n $food->price=$request->price;\n $food->update();\n notify()->success('food Update Successfully!');\n return redirect('/food');\n }", "title": "" }, { "docid": "191adb1d2c401c83f13bd2f62285fdb5", "score": "0.5405329", "text": "public function Update($entity);", "title": "" }, { "docid": "b59a7203e329b5f41bb8bd3bec985c97", "score": "0.5403812", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $this->validate($request,[\n 'name' => 'required',\n 'quantity' => 'required',\n 'rate' => 'required',\n 'brands' => 'required',\n 'categories' => 'required',\n 'status' => 'required',\n 'image' => 'mimes:jpeg,jpg,bmp,png'\n ]);\n\n $image = $request->file('image');\n $slug = str_slug($request->name);\n\n\n if (isset($image)) {\n $currentDate = Carbon::now()->toDateString();\n $imagename = $slug .'-'. $currentDate .'-'. uniqid() .'.'. $image->getClientOriginalExtension();\n \n if (!file_exists('public/product')) {\n mkdir('public/product', 0777, true);\n }\n if (file_exists('public/product/'.$product->image)) {\n unlink('public/product/'.$product->image);\n }\n \n $image->move('public/product',$imagename);\n }else{\n $imagename = $product->image;\n }\n \n $product->name = $request->name;\n $product->quantity = $request->quantity;\n $product->rate = $request->rate;\n $product->status = $request->status;\n $product->image = $imagename;\n\n $product->save();\n\n $product->brands()->sync($request->brands);\n $product->categories()->sync($request->categories);\n\n Toastr::success('Product Successfully Saved :)' ,'Success');\n return redirect()->route('products.index');\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
e0e173e3386f4ff42d70d5722843fb9d
Display a listing of Abuse.
[ { "docid": "4b3db47de7fd1eb0f0c0f5c8005e5cf5", "score": "0.75842494", "text": "public function index()\n {\n if (! Gate::allows('abus_access')) {\n return abort(401);\n }\n $abuses = Abuse::all();\n\n return view('abuses.index', compact('abuses'));\n }", "title": "" } ]
[ { "docid": "0489bfbbc7660661cac769a848fa06eb", "score": "0.6989255", "text": "public function index()\n {\n $this->Amer->hasAccessOrFail('list');\n\n $this->data['Amer'] = $this->Amer;\n $this->data['title'] = $this->Amer->getTitle() ?? mb_ucfirst($this->Amer->entity_name_plural);\n return view($this->Amer->getListView(),['load'=>'list','data'=> $this->data],$this->data);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.68491083", "text": "public function show_list();", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.6824152", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "f2d2e2ad3b2bb9d2a444e31f91622295", "score": "0.6802895", "text": "public function showAction()\n\t{\n\t\t$purp = new Purpose();\n\t\t$per_page = Config::get('nhc/site.perpage') ;\n\t\t$purpose = $purp->getAllPurpose($per_page);\n return View::make('purpose.purpose')->with('paginator',$purpose);\n\t}", "title": "" }, { "docid": "6e8bbcfb3559ccd59296357a1d6391d0", "score": "0.6747781", "text": "public function index()\n {\n // if (! Gate::allows('users_manage')) {\n // return abort(401);\n // }\n // echo '<pre>';\n $abilities = Ability::with('group')->orderBy('id','asc')->get();\n // print_r($abilities->toArray());\n // exit;\n activity('List')->causedBy(Auth::user())->log('Pulled abilities list');\n return view('admin.abilities.index', compact('abilities'));\n }", "title": "" }, { "docid": "4564cbab03cc8cb63dba6ccd797e13f1", "score": "0.6700845", "text": "public function index()\n {\n return view('admin.abilities.index', [\n 'abilities' => Ability::all()\n ]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.6691769", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "155909c5b6b349b38a3af5183831a2fe", "score": "0.6636849", "text": "public static function listaa(){\n $astiat = Astiat::all();\n View::make('astia/astiat_listaus.html', array('astiat' => $astiat));\n }", "title": "" }, { "docid": "345d9371188376e19bd8c892788a3cbe", "score": "0.66357046", "text": "public function accessoriesList()\n {\n return view('products.accessories');\n }", "title": "" }, { "docid": "b46448ab6a5f106d4e8ebc29a8cca043", "score": "0.6631277", "text": "public function index()\n {\n $this->authorize(AbilitiesPolicy::ability('index'));\n\n $abilities = $this->getAbilities();\n\n return $this->view('system.abilities.index', compact('abilities'));\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.6611161", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "36b6ea533437776e2d0ccf6a1e24fb43", "score": "0.65609556", "text": "public function index()\n\t{\n\t\t$this->theme->asset()->container('inline-script')->writeScript('EditableTable', '\n\t \tjQuery(document).ready(function() {\n\t \t\tEditableTable.init();\n\t \t});\n\t\t');\n\n\t\t$facilities = Facility::all();\n\n\t\t$view = array(\n\t\t\t'facilities' => $facilities\n\t\t\t);\n\n\t\treturn $this->theme->scope('facilities.index', $view)->render();\n\t}", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.64849186", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6480493", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.647811", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "7ee1ca8ee314152705e538aca16dcba1", "score": "0.6461073", "text": "public function index()\n {\n return view('manage.bedtype.index', [\n 'bedtypes' => Bedtype::orderBy('name')->paginate(16),\n ]);\n }", "title": "" }, { "docid": "a84a12cbac452458e632bc2b6a82d63d", "score": "0.644124", "text": "public function index()\n {\n $families = Family::paginate(8);\n $apartments = Apartment::doesntHave('families')->get();\n\n return view('familia.read')->withFamilies($families)->withApartments($apartments);\n }", "title": "" }, { "docid": "9b6003d5d1aa8263de4d6e5b0e3d1649", "score": "0.6414127", "text": "public function index()\n {\n $dados['alunos'] = (new AlunosModel())->getAlunos();\n $dados['titulo'] = 'Alunos cadastrados';\n $dados['isAlunoDeletadoComSucesso'] = null;\n\n View::render('alunos/lista', $dados);\n }", "title": "" }, { "docid": "c4ed77fc38c43793cf81a0f202e600b7", "score": "0.64109766", "text": "public function listPage()\n {\n $items = Auth::user()->items;\n return view('item.index', array('items' => $items));\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.6405697", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "4c304d8ffba10a22df2ab734d99e94b1", "score": "0.6404224", "text": "public function index()\n {\n $data = Award::latest()->get();\n return view('admin.award.list', compact('data'));\n }", "title": "" }, { "docid": "914181134c33fa0540524b90d7b61747", "score": "0.6402988", "text": "public function index()\n {\n //\n $afiche=afiches::orderBy('id','DESC')->paginate(5);\n return view('biblio.afiches', compact('afiche'));\n }", "title": "" }, { "docid": "5ad1e7dd13c5a3439b6925c2a0e476b1", "score": "0.63984746", "text": "public function index()\n\t{\n\t\t$listings = Listing::with('user')->get();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "849a56e2cd291443e6bf685d6e3aae28", "score": "0.63927", "text": "public function index() {\n $list = $this->item->list_with_paging();\n $listArr = $list->toArray();\n $currentPage = $listArr['current_page'];\n $perPage = $listArr['per_page'];\n $total = $listArr['total'];\n $thisPage = ($currentPage - 1) * $perPage + 1;\n $thisPageEnd = $currentPage * $perPage;\n if ($thisPageEnd >= $total) {\n $thisPageEnd = $total;\n }\n\n return view('admin.item.show', compact('list', 'thisPage', 'thisPageEnd', 'total'));\n }", "title": "" }, { "docid": "bafcc065fb0585945ac267165c9944c5", "score": "0.63922185", "text": "public function index()\n {\n $assistances = Assistance::orderBy('id', 'ASC')->paginate(5);\n return view('admin.assistances.index')->with('assistances', $assistances);\n }", "title": "" }, { "docid": "5de8d62d6c2e488d5c81c412ba02ebf1", "score": "0.6375915", "text": "public function index()\n {\n $query = Eduzz::all();\n $data[]=array(null,null, null);\n if (isset($query)) {\n $data=array();\n foreach ($query as $row) {\n $buttons = Functions::buttons($row->id,10,$this->configs['location'],true);\n $data[]=array(\n $row->title,\n Functions::status($row->active),\n $buttons,\n );\n }\n }\n\n return view('marketing.eduzz.listAll',[\n 'title_postfix' => 'Afiliações Eduzz',\n 'navigation' => $this->new_navigation,\n 'data' => $data,\n 'accesslevel' => 100,\n ]);\n }", "title": "" }, { "docid": "adfabbe5790c7e790df785d81120de35", "score": "0.6374875", "text": "public function index()\n\t{\n\t\t$usages = Usage::all();\n\n\t\treturn View::make('usages.index', compact('usages'));\n\t}", "title": "" }, { "docid": "9e7d9838c9bbfa89555e033480bff0b5", "score": "0.63697726", "text": "public function listings(){\n return view('frontend.site.listings');\n }", "title": "" }, { "docid": "32e9a450ea4cabeba3749d02f2ef99e6", "score": "0.6365947", "text": "public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.63645416", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "8693596ac910040f13963e853e2e638b", "score": "0.63641423", "text": "public function index(){\n\t\t$categoryService = $this->container->get('category.service');\n\t\t$annonceService = $this->container->get('annonce.service');\n\t\t$more = false;\n\t\t$listCategories = $categoryService->listAll($more);\n\t\t$listAnnonces = $annonceService->listAllAnonce($more);\n \t\treturn $this->render('fo/fo-main.html.twig', [\n\t\t\t\t\t\t\t 'listCategories' => $listCategories,\n\t\t\t\t\t\t\t 'listAnnonces' => $listAnnonces,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ]);\n\t\t \n\t }", "title": "" }, { "docid": "7c52089edf8ec591f7994dcd31440415", "score": "0.635357", "text": "public function index()\n {\n $listings = Listing::where('user_id', Auth()->id)->get()->paginate(12);\n return view('listing.index');\n }", "title": "" }, { "docid": "df15d8c0c735d5b5b0e9471490e5af50", "score": "0.63514596", "text": "public function index()\n {\n $vendors = Vendor::all();\n return view('admin.accessories.index', compact('vendors'));\n }", "title": "" }, { "docid": "331feee3a737fc1bcb3500cd97599af5", "score": "0.6334298", "text": "public function index()\n {\n //\n $data['datas'] = BankList::paginate(10);\n return view('admin.banklists.index', $data);\n }", "title": "" }, { "docid": "a0b1358c7426354253235eb85f11a186", "score": "0.6325502", "text": "public function echoAbacus()\r\n {\r\n foreach ($this->abacus as $row) {\r\n echo \"$row<br/>\";\r\n }\r\n }", "title": "" }, { "docid": "5ea6d5c34e1531723a365addb92dac41", "score": "0.63219726", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $bargains = $em->getRepository('AppBundle:Bargain')->findAll();\n\n return $this->render('bargain/index.html.twig', array(\n 'bargains' => $bargains,\n ));\n }", "title": "" }, { "docid": "e75255503fcedb4ff9f2e6ce0e04f4e0", "score": "0.6317086", "text": "public function indexAction($acronym = null) {\n $this->theme->setTitle(\"Basmodell och användare\");\n \n // sort by acronym or default\n switch ($acronym) {\n case 'asc':\n $all = $this->users->findAllByAcroym('asc');\n break;\n case 'desc':\n $all = $this->users->findAllByAcroym('desc');\n break;\n default:\n $all = $this->users->findAll();\n break;\n }\n \n // normal find all\n //$all = $this->users->findAll();\n \n \n \n $this->views->add('users/overview', [\n 'title' => \"Basmodell och användare\",\n 'users' => $all,\n //'content' => \"Länkar för demonstration av databasdriven basmodell och användarhantering\",\n 'content' => null,\n 'links' => [\n [\n 'href' => $this->url->create('users/setup'),\n 'text' => \"Initiera tabell user\",\n ],\n [\n 'href' => $this->url->create('users/add'),\n 'text' => \"Lägg till användare\",\n ],\n [\n 'href' => $this->url->create('users/list'),\n 'text' => \"Lista alla användare\",\n ],\n [\n 'href' => $this->url->create('users/active'),\n 'text' => \"Visa aktiva användare\",\n ],\n [\n 'href' => $this->url->create('users/inactive'),\n 'text' => \"Visa inaktiva användare\",\n ],\n [\n 'href' => $this->url->create('users/deleted'),\n 'text' => \"Visa användare i papperskorgen\",\n ],\n [\n 'href' => $this->url->create('users/index/asc'),\n 'text' => \"Sortera användare efter akronym - stigande ordning\",\n ],\n [\n 'href' => $this->url->create('users/index/desc'),\n 'text' => \"Sortera användare efter akronym - fallande ordning\",\n ],\n ],\n ]);\n }", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.6306974", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "84137e8b0b1ef84b81a13846ba04c3eb", "score": "0.63016164", "text": "public function showFacilitiesList()\n {\n return view('pages.client.clientFacilitiesList');\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.6300439", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "d5f5f217790ab3c53b59e501253d6415", "score": "0.6299354", "text": "public function listing(){\n \n $tab = array(\n 'username' => $this->session->userdata('username'),\n 'agence' => $this->session->userdata('agence'),\n 'id' => $this->session->userdata('id'),\n 'records' => $this->AgentManager->get_all_agents()\n );\n \n $this->load->view('listeragent_view',$tab);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6299088", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "0e8efa3d8a6ee8c777bc0be5ea1619b9", "score": "0.6298947", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => MealItem::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "ba9786a21adf2bf39633d441c7435ec0", "score": "0.6296092", "text": "public function actionList()\n {\n $module = \"Assets\";\n $model = new Assets;\n $this->LoginCheck();\n // Get all accounts list\n $accounts = $model->findAllAccounts('Accounts');\n foreach ($accounts['result'] as $accounsData) {\n $resultAccounts[$accounsData['id']] = $accounsData['accountname'];\n }\n // Get products list\n $products = $model->findAllProducts('Products');\n foreach ($products['result'] as $productsData) {\n $resultProducts[$productsData['id']] = $productsData['productname'];\n }\n // Get all assets list\n $records = $model->findAll($module, $actionType = NULL, $filter = NULL);\n $this->render('list', array('model' => $model,\n 'result' => $records,\n 'resultAccounts' => $resultAccounts,\n 'resultProducts' => $resultProducts,\n 'session' => Yii::app()->session)\n );\n }", "title": "" }, { "docid": "9b8a465429c7269f6d48d8c70304614b", "score": "0.62851304", "text": "public function index()\n {\n $model = D('Goods');\n $list = $model->search(I());\n $cates = D('Category')->getOptions();\n $brand = D('Brand')->getOptions();\n // render\n $this->assign(array(\n 'list' => $list,\n 'page' => $model->getPage(),\n 'cates' => $cates,\n 'brand' => $brand\n ));\n $this->display();\n }", "title": "" }, { "docid": "d091452315d40b61eab5e27b791471c2", "score": "0.62768835", "text": "public function index()\n {\n // Getting Listing List\n if( auth()->check() && auth()->user()->is_admin ){\n $listings = Listing::where('user_id', '!=', 1)->paginate(20);\n $cats = Category::all();\n $count = Listing::count();\n return view('admin.listings.index')->with('listings', $listings)\n ->with('categories', $cats)\n ->with('listing_count', $count);\n }\n\n }", "title": "" }, { "docid": "66ff1ef2075e0e2a41ab8d0df562108c", "score": "0.6274797", "text": "public function index()\n\t{\n\t\t//List all facilities\n\t\t$facilities = UNHLSFacility::orderBy('name', 'asc')->get();\n\t\t//Load the view and pass the facilities\n\t\treturn View::make('facility.index')->with('facilities',$facilities);\n\t}", "title": "" }, { "docid": "f79edac63a4572c6bb6709bd33b29dd1", "score": "0.6272197", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $aufgabes = $em->getRepository('AppBundle:Aufgabe')->findAll();\n\n return $this->render('aufgabe/index.html.twig', array(\n 'aufgabes' => $aufgabes,\n ));\n }", "title": "" }, { "docid": "9be57b7f808e63ddc2b3ed4b6cedb6aa", "score": "0.627184", "text": "function listberita()\n\t{\n\t\tcek_session_akses('listberita', $this->session->id_session);\n\t\t$data['record'] = $this->Model_berita->list_berita();\n\t\t$data['title'] = \"List Berita\";\n\t\t$data['identitas_web'] = $this->Model_main->identitas()->row_array();\n\t\t$this->template->load('administrator/template', 'administrator/mod_berita/view_berita', $data);\n\t}", "title": "" }, { "docid": "d1d2759c45088bfc373f75a07e55bb34", "score": "0.6271656", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $affiliates = $em->getRepository('BusinessBundle:Affiliate')->findAll();\n\n return $this->render('affiliate/index.html.twig', array(\n 'affiliates' => $affiliates,\n ));\n }", "title": "" }, { "docid": "8f63e0f20f9b8d140ed7112bb5a2055a", "score": "0.6271369", "text": "public function index()\n {\n $athletes = Athlete::all();\n\n return view(\"admin.athletes.index\",compact('athletes'));\n }", "title": "" }, { "docid": "9407bce4030bb5c373ae9fd3dcc0387c", "score": "0.6266637", "text": "public function index()\n {\n $accounts= Accounts::orderBy('Ac_Name','asc')->with(['accountsgroups','subgroup'])->get();\n return view('accounts.list',compact('accounts'));\n\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.62631655", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "39de33427d46bd68986ebee587199a89", "score": "0.625866", "text": "public function index()\n\t{\n\t\t$gambar_model = new \\App\\Models\\GambarModel();\n\t\t$gambar = $gambar_model->findAll();\n\t\t\n\t\t\n\n\t\treturn view('admin/listing',['gambar'=> $gambar]);\n\t}", "title": "" }, { "docid": "e64477b55590e2dfb36296baf9a69708", "score": "0.625354", "text": "public function index()\n\t{\t\t\t\t\n\t \t$this->data[ 'aDeals' ] = Deal::withTrashed()->with ( [ 'Listingcategory','Purchases' ] )->where ( 'user_id' , '=' , $this->data[ 'oUser' ]->id )->get ();;\n\t \treturn $this->renderView ( 'providers.deals.index' );\n\t}", "title": "" }, { "docid": "f42b6821cf64226f11377a0bb4b9c59a", "score": "0.6253372", "text": "public function index()\n {\n $facilities= Facility::all();\n return view('admin.facilities.index', compact('facilities'));\n }", "title": "" }, { "docid": "4e09a32f9bd73f116bb0958b53c56851", "score": "0.62475353", "text": "public function index()\n {\n return $this->accessoryRepository->fetchAll();\n }", "title": "" }, { "docid": "f8ea43ce08aa2cc4ba3fe07721835552", "score": "0.6240858", "text": "function listing($tablename=\"\"){\n\t\t/* get all data of selected table */\n\t\t$fieldarr\t=\t$tablename.\"_id as id, \".$tablename.\"_name as name, \".$tablename.\"_status as status\";\n\t\t$this->outputdata[\"alldata\"]\t= \t$this->Common_model->selTableData(PREFIX.\"\".$tablename,$fieldarr,\"\",$tablename.\"_name asc\");\n\t\t$this->outputdata[\"tablename\"]\t= \t$tablename;\n\t\t$this->load->viewD(\"areas/listing\",$this->outputdata);\n\t\n\t}", "title": "" }, { "docid": "d9d58e38ab26365b49a69622459d3483", "score": "0.6237206", "text": "public function index()\n {\n $beverages = Beverage::all();\n $beverages->each(function($beverages){\n $beverages->imag;\n });\n\n return view('admin.beverages.index')\n ->with('beverages', $beverages);\n }", "title": "" }, { "docid": "3b66fadc4ca82db7e675f775ca6e65b3", "score": "0.62335587", "text": "public function index()\n {\n\n $apartments = Apartment::orderBy('created_at', 'desc')->paginate(25);\n $user = Auth::user();\n $userId = Auth::id();\n\n\n return view('admin.apartments.index', compact('apartments', 'user', 'userId'));\n }", "title": "" }, { "docid": "267df3fdaf24706cfbab72dbbb8f595b", "score": "0.6232264", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $ambassadors = $em->getRepository('AdminBundle:Ambassador')->findAll();\n\n return $this->render('ambassador/index.html.twig', array(\n 'ambassadors' => $ambassadors,\n ));\n }", "title": "" }, { "docid": "f344a2a7de903741bc148841b23c485a", "score": "0.6227108", "text": "public function index()\n {\n $data = acara::where('status', '1')->orderBy('created_at', 'desc')->paginate(30);\n return view('berita.listBerita', compact('data'));\n }", "title": "" }, { "docid": "3acbdd95fef7f50c3c7649f9e7576932", "score": "0.6223216", "text": "public function index()\n {\n $items = Item::all();\n return view('list', ['items' => $items]);\n }", "title": "" }, { "docid": "5140b183107d09c7594e323d649a51a2", "score": "0.6214043", "text": "public function index()\n {\n $atornies = Atornies ::all();\n\t\t\n\t\treturn view('admin.Atornies.index')->with('atornies',$atornies);\n }", "title": "" }, { "docid": "6875cf2a4803557ac1dc0a867f09419f", "score": "0.6212041", "text": "public function index()\n {\n $absences = Absence::get();\n return AbsenceResource::collection($absences);\n }", "title": "" }, { "docid": "d33d816849fa334c560677fdebfe7830", "score": "0.62107456", "text": "public function index() {\r\n if ($this->isAdmin() == TRUE) {\r\n $this->loadThis();\r\n }\r\n \r\n $this->typeList();\r\n }", "title": "" }, { "docid": "b30603bee5b5fe39c6844ee6be971b15", "score": "0.6210319", "text": "public function index()\n {\n $absensi = Absensi::leftjoin('biodatas','absensis.id_peserta', '=', 'biodatas.id_peserta')\n ->leftjoin('instansis','biodatas.id_instansi','=','instansis.id_instansi')\n ->get();\n return view('absensi.absensi',compact('absensi'));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.62033844", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.62033844", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.62033844", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.62026197", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.6200948", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "fcf8e1ec2337ead272bb2226d43eacb7", "score": "0.619421", "text": "public function index()\n {\n $results=$this->allresults;\n $diseases=$this->alldiseases;\n return view('crm.sf-list',compact('results','diseases'));\n }", "title": "" }, { "docid": "411fe946a642ac9b1d9fb7d0656fb971", "score": "0.61894315", "text": "function kodkumpulan_listing(){\n $data['title'] = \"Senarai Kod Kumpulan Perkhidmatan\";\n $this->authentication->check();\n $this->_render_page($data);\n }", "title": "" }, { "docid": "3ea9e7791a31ed0d59a7644f395c6400", "score": "0.6186925", "text": "public function listDisplay() {\n $sculptors = Sculptor::orderBy('created_at','desc')->get();\n\n return view('home.sculptorList')\n ->with('sculptors',$sculptors);\n }", "title": "" }, { "docid": "883609607fd5d0b86ea1b0da402a2876", "score": "0.61836916", "text": "public function actionBookList() {\n $query = Bookmeker::find();\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n \n ]);\n \n return $this->render('book-list', ['listDataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "aea69041d1bf8a0c104af1c7bdb4beff", "score": "0.6177535", "text": "function penempatan_listing(){\n $data['title'] = \"Senarai Penempatan\";\n $this->authentication->check();\n $this->_render_page($data);\n }", "title": "" }, { "docid": "b75511efda3d7612e979bd72f373984d", "score": "0.6175257", "text": "public function index()\n {\n $assurances = Assurance::all();\n return view('Affichages/assurance',compact('assurances'));\n }", "title": "" }, { "docid": "1cef7421a0a0f937ff9e24629a91c625", "score": "0.61701584", "text": "public function index()\n {\n\n return view('backoffice.facilities.index');\n }", "title": "" }, { "docid": "910eed5ccc92e6a4a750a08e1c603434", "score": "0.6169417", "text": "public function printlist() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"Land list\";\n return $this->renderWith(array('Land_printresults', 'Print'));\n }", "title": "" }, { "docid": "f4bc3f077ef44ae2aa48b9b216224938", "score": "0.6168527", "text": "public function index()\n\t{\n\t\tif ( ! \\Util::getAccess('Acciones')) return $this->accessFail();\n\t\t\n\t \t$acciones_list = $this->accionRepo->getAll();\n\t\t$title = $this->title;\t\t\n\t\t\n\t\treturn View::make('acciones/list', compact('acciones_list', 'title'));\n\t}", "title": "" }, { "docid": "5cfa8d670f156a61aa2effb42fdf1706", "score": "0.6168474", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $biddings = $em->getRepository('AppBundle:bidding')->findAll();\n\n return $this->render('bidding/index.html.twig', array(\n 'biddings' => $biddings,\n ));\n }", "title": "" }, { "docid": "1e11b165b98f78d8a3bbfc8419199363", "score": "0.6166522", "text": "public function index()\n {\n\n Return View::make(\"facilities.index\");\n }", "title": "" }, { "docid": "c2e8d396c5b1d3bb94e9109ce6541fba", "score": "0.61617696", "text": "public function index()\n {\n\t\t$facilities = Facility::ignoreDeleted()->paginate(10);\n\t\t$facilities->load('classrooms');\n\t\t$facilities->load('students');\n\t\t$facilities->load('timecards');\n return FacilityResource::collection($facilities);\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.61562586", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.61544776", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "05e49784883491d9a51b2b5d5318c184", "score": "0.6149629", "text": "public function index()\n {\n $fats = Fat::all();\n return view('fat.index',compact('fats'));\n }", "title": "" }, { "docid": "3a5a486422de8c449bc32a0840d6f397", "score": "0.6146982", "text": "public function index()\n {\n $facilities = Facility::all();\n return view('admin.fasilitas.fasilitas', compact('facilities'));\n }", "title": "" }, { "docid": "3bede2c18d349780afaa421d0b9404a7", "score": "0.6146936", "text": "public function index(){\n \n $this->name_arr = $this->get_names();\n $this->display();\n }", "title": "" }, { "docid": "48e33fa792dffa4f033f50c78eeb5604", "score": "0.6146793", "text": "public function index() {\n\t\t\n\t\t// get the sort entry\n\t\t$sortentry = \"id\";\n\t\tif ($this->request->isParameterNotEmpty(\"actionid\")) {\n\t\t\t$sortentry = $this->request->getParameter ( \"actionid\" );\n\t\t}\n\t\t\n\t\t// get bill list\n\t\t$modelBillManager = new SuBill();\n\t\t$billsList = $modelBillManager->getBills($sortentry);\n\t\t\n\t\t$navBar = $this->navBar ();\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar,\n\t\t\t\t'billsList' => $billsList\n\t\t) );\n\t}", "title": "" }, { "docid": "2648a3e69a5199a974c16f62d678d4c6", "score": "0.61467063", "text": "public function listeAliment(){\n\n $authentificationModel = new AuthentificationModel();\n\n if (!$authentificationModel->getLoggedUser()) {\n $this->redirectToRoute('login');\n }\n\n\n\t\t$modelPedago = new PedagoModel();\n\t\t$this->show('back/listeAliment', [\n\t\t\t'aliments'=>$modelPedago->getAliments()\n\t\t\t]);\n\t}", "title": "" }, { "docid": "5c69cba4694a409fc7ffab8c60dc1414", "score": "0.614627", "text": "public function index()\n {\n //\n $borrows = $this->borrowService->getAll();\n\n return view('borrows.list', compact('borrows'));\n }", "title": "" }, { "docid": "b2114aed312be6d8ff5811305ff7bc93", "score": "0.61453277", "text": "public function index()\n {\n $allProviders = FoodProvider::all();\n return view('foodList', ['allProviders' => $allProviders]);\n }", "title": "" }, { "docid": "099e5b8bb5f9448bcbd4495f05b28b2f", "score": "0.6135708", "text": "public function index()\n {\n $repository = $this->getDoctrine()->getRepository(Adherent::class);\n $adherents = $repository->findAll();\n return $this->render('administration/adherents/adherents.html.twig', array(\n 'adherents' => $adherents,\n )\n );\n }", "title": "" }, { "docid": "57693c0bedd53d1111cc24817c1eedc4", "score": "0.6133769", "text": "public function index()\n {\n $result = $this->aposta->all();\n if ($result) {\n return view(\n 'admin/apostas/lista',\n [\n \"script\" => \"\",\n 'results' => $result\n ]\n );\n }\n }", "title": "" }, { "docid": "8daa42477b2bdc18be84bee5f43a7d55", "score": "0.61321676", "text": "public function index()\n\t{\n\t\t$loanaccounts = Loanaccount::all();\n\n\t\treturn View::make('loanaccounts.index', compact('loanaccounts'));\n\t}", "title": "" }, { "docid": "00a79d07aa25d76721e9b46d8e54c23a", "score": "0.6130164", "text": "public function listAction()\n {\n $albums = $this->repositoryService->get('album')->findByUser($this->requestedUser);\n $this->view->assign('albums', $albums);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.612973", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "42a4a1b436fee60a49f033569d401932", "score": "0.6128702", "text": "public function renderList()\n {\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.61206806", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" } ]
5b63fe9575ea776b2e17b6fd80d32e56
Combine this Validation Result with the ValidationResult given in other. It will be valid if both this and the other result are valid. This object will be modified to contain the new validation information.
[ { "docid": "54160aff1abcbf35513365f7d6836428", "score": "0.7273464", "text": "function combineAnd(ValidationResult $other) {\n\t\t$this->isValid = $this->isValid && $other->valid();\n\t\t$this->errorList = array_merge($this->errorList, $other->messageList());\n\t}", "title": "" } ]
[ { "docid": "9f988eaf6ba20f056c6db0624899b00b", "score": "0.6555362", "text": "public function testCombineResults()\n {\n $result = new ValidationResult();\n $anotherresult = new ValidationResult();\n $yetanotherresult = new ValidationResult();\n $anotherresult->addError(\"Eat with your mouth closed\", 'bad', \"EATING101\");\n $yetanotherresult->addError(\"You didn't wash your hands\", 'bad', \"BECLEAN\", false);\n\n $this->assertTrue($result->isValid());\n $this->assertFalse($anotherresult->isValid());\n $this->assertFalse($yetanotherresult->isValid());\n\n $result->combineAnd($anotherresult)\n ->combineAnd($yetanotherresult);\n $this->assertFalse($result->isValid());\n $this->assertEquals(\n [\n 'EATING101' => [\n 'message' => 'Eat with your mouth closed',\n 'messageType' => 'bad',\n 'messageCast' => ValidationResult::CAST_TEXT,\n 'fieldName' => null,\n ],\n 'BECLEAN' => [\n 'message' => 'You didn\\'t wash your hands',\n 'messageType' => 'bad',\n 'messageCast' => ValidationResult::CAST_HTML,\n 'fieldName' => null,\n ],\n ],\n $result->getMessages()\n );\n }", "title": "" }, { "docid": "7c8fbf47463c0fc17a608d2aeda40003", "score": "0.6210062", "text": "protected function processValidationResult(): ValidationResultVO\n {\n $validationResult = new ValidationResultVO();\n $validationResult->setValidable(true);\n\n $violatedFieldsWithMessages = [];\n\n if( empty($this->constraintViolationsLists) ){\n $validationResult->setValid(true);\n return $validationResult;\n }\n\n foreach($this->constraintViolationsLists as $fieldName => $constraintViolationList ){\n\n /**\n * @var ConstraintViolation $violation\n */\n foreach( $constraintViolationList as $constraintViolation ){\n $violationMessage = $constraintViolation->getMessage();\n $violatedFieldsWithMessages[$fieldName] = $violationMessage;\n }\n }\n\n $validationResult->setInvalidFieldsMessages($violatedFieldsWithMessages);\n\n if( empty($violatedFieldsWithMessages) ){\n $validationResult->setValid(true);\n }\n\n return $validationResult;\n }", "title": "" }, { "docid": "9075cddaf3803356249d9f460b16266e", "score": "0.5636792", "text": "public function addResult(SFValidationResult\\Result $Result) {\n if ($Result->passedCheck()) {\n $this->addSuccessfulResult($Result);\n } else {\n $this->addFailedResult($Result);\n }\n }", "title": "" }, { "docid": "985b5ce7d3ee86c5f3ccd80a48d61ffe", "score": "0.54869795", "text": "public function setIsValidForAddress($address, $validationResult)\n {\n $addressId = $this->_getAddressId($address);\n $this->_validatedAddresses[$addressId] = $validationResult;\n return $this;\n }", "title": "" }, { "docid": "3929f672f95a504d948f8681519ffa89", "score": "0.53601736", "text": "public function merge(?Call $other): self\n {\n if ($other === null) {\n return $this;\n }\n\n // the pid is important so the parent can track what process answered a call\n $this->pid = $other->pid ?: $this->pid;\n $this->time = array_replace($this->time, $other->time);\n $this->result = $other->result ?: $this->result;\n return $this;\n }", "title": "" }, { "docid": "bdbdeddf95d4dbd676e8abc4944257f3", "score": "0.5230386", "text": "private function withErrors(): self\n {\n $validation = Services::validation();\n\n if ($validation->getErrors()) {\n $session = Services::session();\n $session->setFlashdata('_ci_validation_errors', $validation->getErrors());\n }\n\n return $this;\n }", "title": "" }, { "docid": "2560b316437887cfd447f2155565ec58", "score": "0.50975573", "text": "public function validate()\n {\n parent::validate();\n $info = $this->getInfoInstance();\n\n return $this;\n }", "title": "" }, { "docid": "637bbfcaaf9abbb3d51183d4d71522dd", "score": "0.50298405", "text": "public function & validate() {\n\t\t# Validate fields\n\t\t$this->getForm()->validate();\n\t\t# Chain\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "380c6623812506e53a964a3f692f7fa5", "score": "0.4986944", "text": "public static function combine(CheckResult $old, CheckResult $fresh) {\n return new CheckResult($old->check, $old->result, $fresh->findings, $old->visible, $old->time);\n }", "title": "" }, { "docid": "adab44058670e043df45978cd830f5c5", "score": "0.49772546", "text": "private function validate()\n {\n $result = new DResult($this->displayName, 'saved');\n // Check indexes.\n foreach ($this->definition->getIndexes() as $index) {\n /* @var $index DIndex */\n $result->merge($index->validate($this));\n }\n // Check updated fields.\n foreach ($this->getFields() as $fieldName => $field) {\n /* @var $field DField */\n if (array_key_exists($fieldName, $this->fieldValues)) {\n $result->merge($field->checkValue($this->fieldValues[ $fieldName ], $this));\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "4dd1acd28722aed17f965c339ee84f50", "score": "0.49441665", "text": "public function processAdditionalValidation(\\Magento\\Framework\\DataObject $request)\n {\n return $this;\n }", "title": "" }, { "docid": "4367bd59e6668540b7723bbfcd8dd40b", "score": "0.49363676", "text": "public function processAdditionalValidation(\\Magento\\Framework\\DataObject $request)\n {\n /** Validate destination postcode */\n if (!$this->postcodeValidator->validate($request->getDestPostcode())) {\n $this->errors[] = __('Please inform a valid postcode');\n }\n\n /** Validate request items data */\n if (empty($request->getAllItems())) {\n $this->errors[] = __('There is no items in this order');\n }\n\n if (!empty($this->errors)) {\n /** @var \\Magento\\Quote\\Model\\Quote\\Address\\RateResult\\Error $error */\n $error = $this->_rateErrorFactory->create([\n 'carrier' => $this->_code,\n 'carrier_title' => $this->config->getCarrierConfig('title'),\n 'error_message' => implode(', ', $this->errors)\n ]);\n\n $this->debugErrors($error);\n\n return $error;\n }\n\n return $this;\n }", "title": "" }, { "docid": "52128db2a7696dd95caee59855f2a09b", "score": "0.49295044", "text": "public function testCreateFromValidationResult()\n {\n $result = new ValidationResult();\n $result->addError('Not a valid result');\n\n $exception = new ValidationException($result);\n\n $this->assertEquals(0, $exception->getCode());\n $this->assertEquals('Not a valid result', $exception->getMessage());\n $this->assertFalse($exception->getResult()->isValid());\n $b = $this->arrayContainsArray([\n 'message' => 'Not a valid result',\n 'messageCast' => ValidationResult::CAST_TEXT,\n 'messageType' => ValidationResult::TYPE_ERROR,\n 'fieldName' => null,\n ], $exception->getResult()->getMessages());\n $this->assertTrue($b, 'Messages array should contain expected messaged');\n }", "title": "" }, { "docid": "158de3b312bd452ca2f27cfbc30ffb3b", "score": "0.487931", "text": "public function validateAndUpdate()\n {\n // check rules\n $this->validate();\n\n // return result\n if(empty($this->errors)) {\n return $this->update();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6256e7c5d6496a78a9b9120f6fa555cb", "score": "0.4871621", "text": "public function merge(Call $other = null)\n {\n if ($other === null) {\n return $this;\n }\n\n // the pid is important so the parent can track what process answered a call\n $this->pid = $other->pid ?: $this->pid;\n $this->time = array_replace($this->time, $other->time);\n $this->result = $other->result ?: $this->result;\n return $this;\n }", "title": "" }, { "docid": "76cd354a687fcbfd17d2f15ae097f982", "score": "0.48477522", "text": "public function testValidationResultAddMethods()\n {\n $result = new ValidationResult();\n $result->addMessage('A spork is not a knife', 'bad');\n $result->addError('A knife is not a back scratcher');\n $result->addFieldMessage('Title', 'Title is good', 'good');\n $result->addFieldError('Content', 'Content is bad', 'bad');\n\n\n $this->assertEquals(\n [\n [\n 'fieldName' => null,\n 'message' => 'A spork is not a knife',\n 'messageType' => 'bad',\n 'messageCast' => ValidationResult::CAST_TEXT,\n ],\n [\n 'fieldName' => null,\n 'message' => 'A knife is not a back scratcher',\n 'messageType' => 'error',\n 'messageCast' => ValidationResult::CAST_TEXT,\n ],\n [\n 'fieldName' => 'Title',\n 'message' => 'Title is good',\n 'messageType' => 'good',\n 'messageCast' => ValidationResult::CAST_TEXT,\n ],\n [\n 'fieldName' => 'Content',\n 'message' => 'Content is bad',\n 'messageType' => 'bad',\n 'messageCast' => ValidationResult::CAST_TEXT,\n ]\n ],\n $result->getMessages()\n );\n }", "title": "" }, { "docid": "8b258043df3575715bcffbc56af807ba", "score": "0.48428872", "text": "public function removeErrors()\n {\n $this->errors = [];\n return $this;\n }", "title": "" }, { "docid": "f0a5ace4da21ab150ce374c1c417c5fd", "score": "0.48179337", "text": "public function validate(): self\n {\n $this->error = '';\n $this->validated = true;\n\n if (\n !isset($this->input[$this->field])\n && !$this->required\n ) {\n $this->valid = true;\n\n return $this;\n }\n\n $this->value = $this->input[$this->field] ?? null;\n $this->valid = $this->isValueValid();\n\n if (!$this->valid) {\n $this->error = str_replace(\n ['@rule', '@field', '@value'],\n [$this->getRuleName(), $this->field, $this->stringifyValue($this->value)],\n $this->errMsgTpl\n );\n }\n\n return $this;\n }", "title": "" }, { "docid": "cd6ccbba544164c6c4700ac27feabaee", "score": "0.48137096", "text": "public function result() {\n\t\treturn $this->validation_results;\n\t}", "title": "" }, { "docid": "6dd9d631eafd5f61ded1d86533458173", "score": "0.47915187", "text": "public function setResult(Result $result)\n {\n if ($this->_parentService !== null) {\n $this->_parentService->setResult($result);\n\n return $this;\n }\n $this->_result = $result;\n\n return $this;\n }", "title": "" }, { "docid": "e1217ad356d6b3ff1ae8b2dca9659958", "score": "0.47791645", "text": "public function finishValidating(RefData $ebsrSubmissionStatus, $ebsrSubmissionResult)\n {\n $this->ebsrSubmissionStatus = $ebsrSubmissionStatus;\n $this->ebsrSubmissionResult = LaminasJson::encode($ebsrSubmissionResult);\n $this->validationEnd = new \\DateTime();\n\n //if the submission hasn't failed (so far - this isn't yet a success) then also populate processStart timestamp\n if (!$this->isFailure()) {\n $this->processStart = $this->validationEnd;\n }\n }", "title": "" }, { "docid": "9b9f4b78a2640bf188b00907d7b57acd", "score": "0.47690305", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'start_time' => $this->start_date . ' ' . $this->from,\n 'end_time' => $this->start_date . ' ' . $this->to,\n 'date' => $this->start_date\n ]);\n }", "title": "" }, { "docid": "385ac703465e37881b6369810d55c56e", "score": "0.4755884", "text": "public function validateResolved()\n {\n\n $this->prepareForValidation();\n\n if (!$this->passesAuthorization()) {\n $this->failedAuthorization();\n }\n\n $instance = $this->getValidatorInstance();\n\n if ($instance->fails()) {\n $this->failedValidation($instance);\n }\n\n $this->passedValidation();\n }", "title": "" }, { "docid": "431a02876b0eec6967464ea56165235a", "score": "0.47488803", "text": "public function validate()\n {\n $this->resetResult();\n if ($this->getEnabled()) {\n $this->php($this->form->getData());\n }\n return $this->result;\n }", "title": "" }, { "docid": "5c5f897afea37db7cfb88a36a034e380", "score": "0.4729099", "text": "public function __clone() {\n $this->validators = \\Sphp\\Stdlib\\Arrays::copy($this->validators);\n parent::__clone();\n }", "title": "" }, { "docid": "345a2bce8cac50d22f053e7289f3d689", "score": "0.47126245", "text": "protected function buildResults($res)\n {\n if (!$res instanceof \\Services_W3C_CSSValidator_Response) {\n return false;\n }\n\n $messages = array();\n foreach ($res->errors as $row) {\n $msg = new ValidationMessage($row->line, 0, $row->message, '', 'error');\n $messages[] = $msg;\n }\n foreach ($res->warnings as $row) {\n $msg = new ValidationMessage($row->line, 0, $row->message, '', 'warning');\n $messages[] = $msg;\n }\n\n $result = new ValidationResult(false, $messages);\n $this->filterResults($result);\n $result->setIsValid($res->isValid() || count($result->getMessages()) === 0);\n return $result;\n }", "title": "" }, { "docid": "e2554eb0f8c9f16d439f5cd5c3f325fb", "score": "0.47104782", "text": "public function setResult($result)\n {\n $this->result = $result;\n return $this;\n }", "title": "" }, { "docid": "0319434922d0cdda2bc91d28bdabd66b", "score": "0.4705274", "text": "protected function clearErrors()\n\t{\n\t\t$this->errors = [];\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "94a883dae685661c321e14e82d2311ec", "score": "0.46949336", "text": "public function setResult($result)\n {\n $this->result = $result;\n\n return $this;\n }", "title": "" }, { "docid": "59ea3b0c2ca0818937d02d5becd0a8bd", "score": "0.46935025", "text": "private function cleanupValidationResults()\n {\n $this->validationOk = \"\";\n $this->validationBrief = array();\n }", "title": "" }, { "docid": "8c974b8c1ee6da71f03c32521d2c30a0", "score": "0.46761748", "text": "public function setResult($result)\n\t{\n\t\t$this->result = $result;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "62f9d799145270316f92fcfc95fa4f69", "score": "0.46479765", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'phone_number' => str_replace(' ', '', $this->phone_number),\n 'formatted_phone_number' => LaravelPhoneNumber::make(\"{$this->country_code}{$this->phone_number}\"),\n 'role' => strtolower($this->role),\n ]);\n }", "title": "" }, { "docid": "5c013d4d43e15656522d9be681bf8e2b", "score": "0.46407944", "text": "function setResult(&$data) {\n\t\t$this->dataResult = &$data;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7770db41617faf0c41d42cddcaab800e", "score": "0.46277303", "text": "public function requiringASingleResult() {\n\t\t\n\t\t$this->_single_result = true;\n\t\t\n\t\treturn $this;\n\t\t\n\t}", "title": "" }, { "docid": "99311dfcda178a85b1159dbea55c1406", "score": "0.4614821", "text": "public function merge()\n {\n $this->arguments[] = '--merge';\n return $this;\n }", "title": "" }, { "docid": "325a6f03bfe9f72e28573186285bf5dc", "score": "0.4595597", "text": "public function mergeResult(array $resultArray)\n {\n $this->doSaveFieldName = $resultArray['doSaveFieldName'];\n foreach ($resultArray['additionalJavaScriptPost'] as $element) {\n $this->additionalJavaScriptPost[] = $element;\n }\n foreach ($resultArray['additionalJavaScriptSubmit'] as $element) {\n $this->additionalJavaScriptSubmit[] = $element;\n }\n if (!empty($resultArray['requireJsModules'])) {\n foreach ($resultArray['requireJsModules'] as $module) {\n $moduleName = null;\n $callback = null;\n if (is_string($module)) {\n // if $module is a string, no callback\n $moduleName = $module;\n $callback = null;\n } elseif (is_array($module)) {\n // if $module is an array, callback is possible\n foreach ($module as $key => $value) {\n $moduleName = $key;\n $callback = $value;\n break;\n }\n }\n if ($moduleName !== null) {\n if (!empty($this->requireJsModules[$moduleName]) && $callback !== null) {\n $existingValue = $this->requireJsModules[$moduleName];\n if (!is_array($existingValue)) {\n $existingValue = [$existingValue];\n }\n $existingValue[] = $callback;\n $this->requireJsModules[$moduleName] = $existingValue;\n } else {\n $this->requireJsModules[$moduleName] = $callback;\n }\n }\n }\n }\n\n foreach ($resultArray['additionalHiddenFields'] as $element) {\n $this->hiddenFieldAccum[] = $element;\n }\n foreach ($resultArray['stylesheetFiles'] as $stylesheetFile) {\n if (!in_array($stylesheetFile, $this->stylesheetFiles)) {\n $this->stylesheetFiles[] = $stylesheetFile;\n }\n }\n\n if (!empty($resultArray['inlineData'])) {\n $resultArrayInlineData = $this->inlineData;\n $resultInlineData = $resultArray['inlineData'];\n ArrayUtility::mergeRecursiveWithOverrule($resultArrayInlineData, $resultInlineData);\n $this->inlineData = $resultArrayInlineData;\n }\n\n if (!empty($resultArray['additionalInlineLanguageLabelFiles'])) {\n foreach ($resultArray['additionalInlineLanguageLabelFiles'] as $additionalInlineLanguageLabelFile) {\n $this->additionalInlineLanguageLabelFiles[] = $additionalInlineLanguageLabelFile;\n }\n }\n }", "title": "" }, { "docid": "13a6b027a40da5ae344ac7d52aecb17e", "score": "0.45765692", "text": "public function setResult( array $result )\n\t{\n\t\t$this->values['job.result'] = $result;\n\t\t$this->setModified();\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d4d19ba6cabf4fa2a1927cbf95f345c1", "score": "0.45605224", "text": "protected function copyErrors()\n {\n foreach ($this->attributes as $attribute) {\n if ($error = $this->user->getFirstError($attribute)) {\n $this->addError($attribute, $error);\n }\n }\n }", "title": "" }, { "docid": "933f5ba2e4778a89b2031aa0c4d382ae", "score": "0.45539838", "text": "public function clearResult ()\n {\n // clear existing arguments\n $this->result = array();\n\n // return object to allow chaining\n return $this;\n\n }", "title": "" }, { "docid": "8b170b7575e1115d3dc89e55541ada0f", "score": "0.45471868", "text": "public function validate(ValidationResult $validationResult)\n {\n // The object is new, won't be looping.\n /** @var DataObject|Hierarchy $owner */\n $owner = $this->owner;\n if (!$owner->ID) {\n return;\n }\n // The object has no parent, won't be looping.\n if (!$owner->ParentID) {\n return;\n }\n // The parent has not changed, skip the check for performance reasons.\n if (!$owner->isChanged('ParentID')) {\n return;\n }\n\n // Walk the hierarchy upwards until we reach the top, or until we reach the originating node again.\n $node = $owner;\n while ($node && $node->ParentID) {\n if ((int)$node->ParentID === (int)$owner->ID) {\n // Hierarchy is looping.\n $validationResult->addError(\n _t(\n __CLASS__ . '.InfiniteLoopNotAllowed',\n 'Infinite loop found within the \"{type}\" hierarchy. Please change the parent to resolve this',\n 'First argument is the class that makes up the hierarchy.',\n ['type' => get_class($owner)]\n ),\n 'bad',\n 'INFINITE_LOOP'\n );\n break;\n }\n $node = $node->Parent();\n }\n }", "title": "" }, { "docid": "d6e98369ffb38c32718adc6416d598e2", "score": "0.4535526", "text": "public function validate()\n {\n if (!Mage::helper('avatax')->fullStopOnError()) {\n return true;\n }\n\n $result = parent::validate();\n\n //if base validation fails, don't bother with additional validation\n if ($result !== true) {\n return $result;\n }\n\n //if ship-to address, do AvaTax validation\n $data = Mage::app()->getRequest()->getPost('billing', array());\n $useForShipping = isset($data['use_for_shipping']) ? (int)$data['use_for_shipping'] : 0;\n\n if ($this->getAddressType() == self::TYPE_SHIPPING\n || $this->getUseForShipping()/* <1.9 */ || $useForShipping/* >=1.9 */) {\n if (!isset(self::$_validationResult[$this->getAddressId()])) {\n if (!$this->getAvataxValidator()) {\n $validator = Mage::getModel('avatax/avatax_address')->setAddress($this);\n $this->setAvataxValidator($validator);\n }\n\n self::$_validationResult[$this->getAddressId()] = $this->getAvataxValidator()->validate();\n }\n\n return self::$_validationResult[$this->getAddressId()];\n }\n\n return $result;\n }", "title": "" }, { "docid": "0ea6e0964bacf07ac89abf7e9d79c0d8", "score": "0.45251435", "text": "public function bufferResult() {\n $this->bufferResult = true;\n return $this;\n }", "title": "" }, { "docid": "3904296e4c31539e6030799ccb073a3a", "score": "0.45001587", "text": "public function testCreateFromComplexValidationResult()\n {\n $result = new ValidationResult();\n $result\n ->addError('Invalid type')\n ->addError('Out of kiwis');\n $exception = new ValidationException($result);\n\n $this->assertEquals(0, $exception->getCode());\n $this->assertEquals('Invalid type', $exception->getMessage());\n $this->assertEquals(false, $exception->getResult()->isValid());\n\n $b = $this->arrayContainsArray([\n 'message' => 'Invalid type',\n 'messageCast' => ValidationResult::CAST_TEXT,\n 'messageType' => ValidationResult::TYPE_ERROR,\n 'fieldName' => null,\n ], $exception->getResult()->getMessages());\n $this->assertTrue($b, 'Messages array should contain expected messaged');\n\n $b = $this->arrayContainsArray([\n 'message' => 'Out of kiwis',\n 'messageCast' => ValidationResult::CAST_TEXT,\n 'messageType' => ValidationResult::TYPE_ERROR,\n 'fieldName' => null,\n ], $exception->getResult()->getMessages());\n $this->assertTrue($b, 'Messages array should contain expected messaged');\n }", "title": "" }, { "docid": "bcb2a8dd359628be607f5653109cfb7c", "score": "0.44899705", "text": "public function toException() {\n // Reduce the array of arrays to a simple array of messages\n $messages = array_reduce(array_values($this->_errors), 'array_merge', array());\n\n // Throw into an exception\n $ex = new ValidationException(implode(PHP_EOL, $messages), 400);\n\n // Append the raw data\n $ex->errors = $this->_errors;\n\n return $ex;\n }", "title": "" }, { "docid": "fe696a9dcf8fb2ba9b1d4bbd24343bcd", "score": "0.44884422", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAbatementAge())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_AGE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAbatementBoolean())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_BOOLEAN] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAbatementDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAbatementPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAbatementRange())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_RANGE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAbatementString())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ABATEMENT_STRING] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAssertedDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ASSERTED_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAsserter())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ASSERTER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getBodySite())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_BODY_SITE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCategory())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CATEGORY, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getClinicalStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CLINICAL_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getContext())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CONTEXT] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getEvidence())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EVIDENCE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOnsetAge())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ONSET_AGE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOnsetDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ONSET_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOnsetPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ONSET_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOnsetRange())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ONSET_RANGE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOnsetString())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ONSET_STRING] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSeverity())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SEVERITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStage())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STAGE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getVerificationStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_VERIFICATION_STATUS] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_AGE])) {\n $v = $this->getAbatementAge();\n foreach($validationRules[self::FIELD_ABATEMENT_AGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_AGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_AGE])) {\n $errs[self::FIELD_ABATEMENT_AGE] = [];\n }\n $errs[self::FIELD_ABATEMENT_AGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_BOOLEAN])) {\n $v = $this->getAbatementBoolean();\n foreach($validationRules[self::FIELD_ABATEMENT_BOOLEAN] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_BOOLEAN, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_BOOLEAN])) {\n $errs[self::FIELD_ABATEMENT_BOOLEAN] = [];\n }\n $errs[self::FIELD_ABATEMENT_BOOLEAN][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_DATE_TIME])) {\n $v = $this->getAbatementDateTime();\n foreach($validationRules[self::FIELD_ABATEMENT_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_DATE_TIME])) {\n $errs[self::FIELD_ABATEMENT_DATE_TIME] = [];\n }\n $errs[self::FIELD_ABATEMENT_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_PERIOD])) {\n $v = $this->getAbatementPeriod();\n foreach($validationRules[self::FIELD_ABATEMENT_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_PERIOD])) {\n $errs[self::FIELD_ABATEMENT_PERIOD] = [];\n }\n $errs[self::FIELD_ABATEMENT_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_RANGE])) {\n $v = $this->getAbatementRange();\n foreach($validationRules[self::FIELD_ABATEMENT_RANGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_RANGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_RANGE])) {\n $errs[self::FIELD_ABATEMENT_RANGE] = [];\n }\n $errs[self::FIELD_ABATEMENT_RANGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ABATEMENT_STRING])) {\n $v = $this->getAbatementString();\n foreach($validationRules[self::FIELD_ABATEMENT_STRING] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ABATEMENT_STRING, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ABATEMENT_STRING])) {\n $errs[self::FIELD_ABATEMENT_STRING] = [];\n }\n $errs[self::FIELD_ABATEMENT_STRING][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ASSERTED_DATE])) {\n $v = $this->getAssertedDate();\n foreach($validationRules[self::FIELD_ASSERTED_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTED_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ASSERTED_DATE])) {\n $errs[self::FIELD_ASSERTED_DATE] = [];\n }\n $errs[self::FIELD_ASSERTED_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ASSERTER])) {\n $v = $this->getAsserter();\n foreach($validationRules[self::FIELD_ASSERTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ASSERTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ASSERTER])) {\n $errs[self::FIELD_ASSERTER] = [];\n }\n $errs[self::FIELD_ASSERTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_BODY_SITE])) {\n $v = $this->getBodySite();\n foreach($validationRules[self::FIELD_BODY_SITE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_BODY_SITE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_BODY_SITE])) {\n $errs[self::FIELD_BODY_SITE] = [];\n }\n $errs[self::FIELD_BODY_SITE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CATEGORY])) {\n $v = $this->getCategory();\n foreach($validationRules[self::FIELD_CATEGORY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CATEGORY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CATEGORY])) {\n $errs[self::FIELD_CATEGORY] = [];\n }\n $errs[self::FIELD_CATEGORY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CLINICAL_STATUS])) {\n $v = $this->getClinicalStatus();\n foreach($validationRules[self::FIELD_CLINICAL_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CLINICAL_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CLINICAL_STATUS])) {\n $errs[self::FIELD_CLINICAL_STATUS] = [];\n }\n $errs[self::FIELD_CLINICAL_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CODE])) {\n $v = $this->getCode();\n foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CODE])) {\n $errs[self::FIELD_CODE] = [];\n }\n $errs[self::FIELD_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTEXT])) {\n $v = $this->getContext();\n foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_CONTEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTEXT])) {\n $errs[self::FIELD_CONTEXT] = [];\n }\n $errs[self::FIELD_CONTEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EVIDENCE])) {\n $v = $this->getEvidence();\n foreach($validationRules[self::FIELD_EVIDENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_EVIDENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EVIDENCE])) {\n $errs[self::FIELD_EVIDENCE] = [];\n }\n $errs[self::FIELD_EVIDENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ONSET_AGE])) {\n $v = $this->getOnsetAge();\n foreach($validationRules[self::FIELD_ONSET_AGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_AGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ONSET_AGE])) {\n $errs[self::FIELD_ONSET_AGE] = [];\n }\n $errs[self::FIELD_ONSET_AGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ONSET_DATE_TIME])) {\n $v = $this->getOnsetDateTime();\n foreach($validationRules[self::FIELD_ONSET_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ONSET_DATE_TIME])) {\n $errs[self::FIELD_ONSET_DATE_TIME] = [];\n }\n $errs[self::FIELD_ONSET_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ONSET_PERIOD])) {\n $v = $this->getOnsetPeriod();\n foreach($validationRules[self::FIELD_ONSET_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ONSET_PERIOD])) {\n $errs[self::FIELD_ONSET_PERIOD] = [];\n }\n $errs[self::FIELD_ONSET_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ONSET_RANGE])) {\n $v = $this->getOnsetRange();\n foreach($validationRules[self::FIELD_ONSET_RANGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_RANGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ONSET_RANGE])) {\n $errs[self::FIELD_ONSET_RANGE] = [];\n }\n $errs[self::FIELD_ONSET_RANGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ONSET_STRING])) {\n $v = $this->getOnsetString();\n foreach($validationRules[self::FIELD_ONSET_STRING] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_ONSET_STRING, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ONSET_STRING])) {\n $errs[self::FIELD_ONSET_STRING] = [];\n }\n $errs[self::FIELD_ONSET_STRING][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SEVERITY])) {\n $v = $this->getSeverity();\n foreach($validationRules[self::FIELD_SEVERITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SEVERITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SEVERITY])) {\n $errs[self::FIELD_SEVERITY] = [];\n }\n $errs[self::FIELD_SEVERITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STAGE])) {\n $v = $this->getStage();\n foreach($validationRules[self::FIELD_STAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_STAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STAGE])) {\n $errs[self::FIELD_STAGE] = [];\n }\n $errs[self::FIELD_STAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_VERIFICATION_STATUS])) {\n $v = $this->getVerificationStatus();\n foreach($validationRules[self::FIELD_VERIFICATION_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CONDITION, self::FIELD_VERIFICATION_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_VERIFICATION_STATUS])) {\n $errs[self::FIELD_VERIFICATION_STATUS] = [];\n }\n $errs[self::FIELD_VERIFICATION_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "fa8f24a2cb995a6a09845a70f35043fd", "score": "0.44726792", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getAction())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ACTION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getAssessor())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ASSESSOR] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getContext())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CONTEXT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getEffectiveDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_EFFECTIVE_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getEffectivePeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_EFFECTIVE_PERIOD] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getFinding())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_FINDING, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInvestigation())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INVESTIGATION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getPrevious())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PREVIOUS] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getProblem())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PROBLEM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getPrognosisCodeableConcept())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getPrognosisReference())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PROGNOSIS_REFERENCE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getProtocol())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PROTOCOL, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSummary())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUMMARY] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ACTION])) {\n $v = $this->getAction();\n foreach($validationRules[self::FIELD_ACTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ACTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACTION])) {\n $errs[self::FIELD_ACTION] = [];\n }\n $errs[self::FIELD_ACTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ASSESSOR])) {\n $v = $this->getAssessor();\n foreach($validationRules[self::FIELD_ASSESSOR] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_ASSESSOR, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ASSESSOR])) {\n $errs[self::FIELD_ASSESSOR] = [];\n }\n $errs[self::FIELD_ASSESSOR][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CODE])) {\n $v = $this->getCode();\n foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CODE])) {\n $errs[self::FIELD_CODE] = [];\n }\n $errs[self::FIELD_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTEXT])) {\n $v = $this->getContext();\n foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_CONTEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTEXT])) {\n $errs[self::FIELD_CONTEXT] = [];\n }\n $errs[self::FIELD_CONTEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DATE])) {\n $v = $this->getDate();\n foreach($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATE])) {\n $errs[self::FIELD_DATE] = [];\n }\n $errs[self::FIELD_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DESCRIPTION])) {\n $v = $this->getDescription();\n foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_DESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DESCRIPTION])) {\n $errs[self::FIELD_DESCRIPTION] = [];\n }\n $errs[self::FIELD_DESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EFFECTIVE_DATE_TIME])) {\n $v = $this->getEffectiveDateTime();\n foreach($validationRules[self::FIELD_EFFECTIVE_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EFFECTIVE_DATE_TIME])) {\n $errs[self::FIELD_EFFECTIVE_DATE_TIME] = [];\n }\n $errs[self::FIELD_EFFECTIVE_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EFFECTIVE_PERIOD])) {\n $v = $this->getEffectivePeriod();\n foreach($validationRules[self::FIELD_EFFECTIVE_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_EFFECTIVE_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EFFECTIVE_PERIOD])) {\n $errs[self::FIELD_EFFECTIVE_PERIOD] = [];\n }\n $errs[self::FIELD_EFFECTIVE_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FINDING])) {\n $v = $this->getFinding();\n foreach($validationRules[self::FIELD_FINDING] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_FINDING, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FINDING])) {\n $errs[self::FIELD_FINDING] = [];\n }\n $errs[self::FIELD_FINDING][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INVESTIGATION])) {\n $v = $this->getInvestigation();\n foreach($validationRules[self::FIELD_INVESTIGATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_INVESTIGATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INVESTIGATION])) {\n $errs[self::FIELD_INVESTIGATION] = [];\n }\n $errs[self::FIELD_INVESTIGATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PREVIOUS])) {\n $v = $this->getPrevious();\n foreach($validationRules[self::FIELD_PREVIOUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PREVIOUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PREVIOUS])) {\n $errs[self::FIELD_PREVIOUS] = [];\n }\n $errs[self::FIELD_PREVIOUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROBLEM])) {\n $v = $this->getProblem();\n foreach($validationRules[self::FIELD_PROBLEM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROBLEM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROBLEM])) {\n $errs[self::FIELD_PROBLEM] = [];\n }\n $errs[self::FIELD_PROBLEM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) {\n $v = $this->getPrognosisCodeableConcept();\n foreach($validationRules[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_CODEABLE_CONCEPT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT])) {\n $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT] = [];\n }\n $errs[self::FIELD_PROGNOSIS_CODEABLE_CONCEPT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROGNOSIS_REFERENCE])) {\n $v = $this->getPrognosisReference();\n foreach($validationRules[self::FIELD_PROGNOSIS_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROGNOSIS_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROGNOSIS_REFERENCE])) {\n $errs[self::FIELD_PROGNOSIS_REFERENCE] = [];\n }\n $errs[self::FIELD_PROGNOSIS_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROTOCOL])) {\n $v = $this->getProtocol();\n foreach($validationRules[self::FIELD_PROTOCOL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_PROTOCOL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROTOCOL])) {\n $errs[self::FIELD_PROTOCOL] = [];\n }\n $errs[self::FIELD_PROTOCOL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUMMARY])) {\n $v = $this->getSummary();\n foreach($validationRules[self::FIELD_SUMMARY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLINICAL_IMPRESSION, self::FIELD_SUMMARY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUMMARY])) {\n $errs[self::FIELD_SUMMARY] = [];\n }\n $errs[self::FIELD_SUMMARY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "035024103ce73d3df511534b8507d094", "score": "0.44719356", "text": "public function setVerificationResult(string $verificationResult): self\n {\n $this->verificationResult = $verificationResult;\n\n return $this;\n }", "title": "" }, { "docid": "f7d798f49f86a8be4a17688cbe26e937", "score": "0.44552216", "text": "public function __clone()\n {\n if ($this->result)\n $this->result = clone $this->result;\n if ($this->incident)\n $this->incident = clone $this->incident;\n }", "title": "" }, { "docid": "4f85c7e03aa07953c1e61879caabc74a", "score": "0.4454161", "text": "public function testThatOneMassCanBeAddedToAnother(){\n\t\t$firstValue = 10;\n\t\t$secondValue = 5;\n\t\t$expectedResult = 15;\n\t\t$firstMass = Mass::createFromGrams($firstValue);\n\t\t$secondMass = Mass::createFromGrams($secondValue);\n\t\t$result = $firstMass->add($secondMass);\n\t\t$this->assertEquals($expectedResult, $result->toGrams(), \"Add operation failed expected value {$expectedResult} was not equal to result {$result->toGrams()}\");\n\t}", "title": "" }, { "docid": "cff514f2b50420667139120727d90892", "score": "0.44510716", "text": "public function validation()\n {\n $validator = new Validation();\n $validator->add('email', new Email([\n 'required' => true,\n 'message' => $this->getDI()->get('t')->_('Email address is not valid')\n ]));\n $validator->add('email', new Uniqueness([\n 'message' => $this->getDI()->get('t')->_('Email already exists')\n ]));\n $validator->add('username', new Uniqueness([\n 'message' => $this->getDI()->get('t')->_('Username already exists')\n ]));\n return $this->validate($validator);\n }", "title": "" }, { "docid": "82f19d072fe0c76fd2ca2a73329fadbc", "score": "0.44425356", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'user_id' => Auth::user()->id\n ]);\n }", "title": "" }, { "docid": "e9896d6952e4bf8ae36e8200d692db8a", "score": "0.44383395", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'matrix_id' => $this->matrix->id,\n 'status' => $this->status ?? true,\n 'publish_at' => (isset($this->publish_at) and !empty($this->publish_at)) ? $this->publish_at : now(),\n 'expire_at' => (isset($this->expire_at) and !empty($this->expire_at)) ? $this->expire_at : null,\n ]);\n }", "title": "" }, { "docid": "7b4da3a796bdf9031fac441ecc7cabae", "score": "0.44306117", "text": "function setResult($result) {\r\n // flush the error, we don't need it any more\r\n $this->_error = null;\r\n \r\n // define the result\r\n $this->_result = $result;\r\n }", "title": "" }, { "docid": "2b91e91f7e4f35b5d0ad5c62a5880cce", "score": "0.44159228", "text": "protected function failedValidation(Validator $val){\n $this->val = $val;\n }", "title": "" }, { "docid": "6cdd047ce4cf725693200aa628d39556", "score": "0.44152835", "text": "public function seeBackendValidationHasFailed()\n {\n $this->see(trans('presto::backend.common.validation_failed'));\n \n return $this;\n }", "title": "" }, { "docid": "b233b458adc61667793c3414e15e3c4a", "score": "0.44142744", "text": "private function validate()\n {\n // new validator object\n $validator = new Validator($this->getAttributes());\n\n // pass rules\n $validator->rules($this->rules);\n\n // add labels (we dont want to show internal names to the user)\n $validator->labels($this->labels);\n\n // check rules\n if(!$validator->validate()) {\n $this->errors = $validator->errors();\n }\n }", "title": "" }, { "docid": "d42ccdb006726df44e02dddc447a5076", "score": "0.44120437", "text": "function validate($object = '', $related_field = '')\n\t{\n\t\t// Return if validation has already been run\n\t\tif ($this->validated)\n\t\t{\n\t\t\t// For method chaining\n\t\t\treturn $this;\n\t\t}\n\n\t\t// Set validated as having been run\n\t\t$this->validated = TRUE;\n\n\t\t// Clear errors\n\t\t$this->error = new stdClass();\n\t\t$this->error->all = array();\n\t\t$this->error->string = '';\n\n\t\tforeach ($this->fields as $field)\n\t\t{\n\t\t\t$this->error->{$field} = '';\n\t\t}\n\n\t\t// Loop through each property to be validated\n\t\tforeach ($this->validation as $field => $validation)\n\t\t{\n\t\t\tif(empty($validation['rules']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Get validation settings\n\t\t\t$rules = $validation['rules'];\n\n\t\t\t// Will validate differently if this is for a related item\n\t\t\t$related = (array_key_exists($field, $this->has_many) OR array_key_exists($field, $this->has_one));\n\n\t\t\t// Check if property has changed since validate last ran\n\t\t\tif ($related OR ! isset($this->stored->{$field}) OR $this->{$field} !== $this->stored->{$field})\n\t\t\t{\n\t\t\t\t// Only validate if field is related or required or has a value\n\t\t\t\tif ( ! $related && ! in_array('required', $rules) && ! in_array('always_validate', $rules))\n\t\t\t\t{\n\t\t\t\t\tif ( ! isset($this->{$field}) OR $this->{$field} === '')\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$label = ( ! empty($validation['label'])) ? $validation['label'] : $field;\n\n\t\t\t\t// Loop through each rule to validate this property against\n\t\t\t\tforeach ($rules as $rule => $param)\n\t\t\t\t{\n\t\t\t\t\t// Check for parameter\n\t\t\t\t\tif (is_numeric($rule))\n\t\t\t\t\t{\n\t\t\t\t\t\t$rule = $param;\n\t\t\t\t\t\t$param = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Clear result\n\t\t\t\t\t$result = '';\n\n\t\t\t\t\t// Check rule exists\n\t\t\t\t\tif ($related)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Prepare rule to use different language file lines\n\t\t\t\t\t\t$rule = 'related_' . $rule;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$arg = $object;\n\t\t\t\t\t\tif( ! empty($related_field)) {\n\t\t\t\t\t\t\t$arg = array($related_field => $object);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (method_exists($this, '_' . $rule))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Run related rule from DataMapper or the class extending DataMapper\n\t\t\t\t\t\t\t$result = $this->{'_' . $rule}($arg, $field, $param);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($this->_extension_method_exists('rule_' . $rule))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result = $this->{'rule_' . $rule}($arg, $field, $param);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (method_exists($this, '_' . $rule))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Run rule from DataMapper or the class extending DataMapper\n\t\t\t\t\t\t$result = $this->{'_' . $rule}($field, $param);\n\t\t\t\t\t}\n\t\t\t\t\telse if($this->_extension_method_exists('rule_' . $rule))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Run an extension-based rule.\n\t\t\t\t\t\t$result = $this->{'rule_' . $rule}($field, $param);\n\t\t\t\t\t}\n\t\t\t\t\telse if (method_exists($this->form_validation, $rule))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Run rule from CI Form Validation\n\t\t\t\t\t\t$result = $this->form_validation->{$rule}($this->{$field}, $param);\n\t\t\t\t\t}\n\t\t\t\t\telse if (function_exists($rule))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Run rule from PHP\n\t\t\t\t\t\t$this->{$field} = $rule($this->{$field});\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add an error message if the rule returned FALSE\n\t\t\t\t\tif ($result === FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(is_string($result))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$line = $result;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (FALSE === ($line = $this->lang->line($rule)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get corresponding error from language file\n\t\t\t\t\t\t\t$line = 'Unable to access an error message corresponding to your rule name: '.$rule.'.';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Check if param is an array\n\t\t\t\t\t\tif (is_array($param))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Convert into a string so it can be used in the error message\n\t\t\t\t\t\t\t$param = implode(', ', $param);\n\n\t\t\t\t\t\t\t// Replace last \", \" with \" or \"\n\t\t\t\t\t\t\tif (FALSE !== ($pos = strrpos($param, ', ')))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$param = substr_replace($param, ' or ', $pos, 2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Check if param is a validation field\n\t\t\t\t\t\tif (array_key_exists($param, $this->validation))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Change it to the label value\n\t\t\t\t\t\t\t$param = $this->validation[$param]['label'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add error message\n\t\t\t\t\t\t$this->error_message($field, sprintf($line, $label, $param));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Escape to prevent further error checks\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\n\t\t// Set whether validation passed\n\t\t$this->valid = empty($this->error->all);\n\n\t\t// For method chaining\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7e5099045fb9205aed0aa7a2deb70e65", "score": "0.44054544", "text": "public function setResult(array $result)\n {\n $this->result = $result;\n return $this;\n }", "title": "" }, { "docid": "041a3e7ed45a44484786339c5fa048aa", "score": "0.43956193", "text": "public function hydrate()\n {\n $validateData = [\n 'email' => 'email'\n ];\n\n // Just add validation if there are any changes in the fields\n if ($this->name !== $this->prevName) {\n if (empty($this->name)) {\n $validateData = array_merge($validateData, [\n 'name' => 'required'\n ]);\n }\n }\n\n if ($this->email !== $this->prevEmail) {\n if (empty($this->email)) {\n $validateData = array_merge($validateData, [\n 'email' => 'required|email'\n ]);\n }\n\n $validateData = array_merge($validateData, [\n 'current_password_for_email' => ['required', 'customPassCheckHashed:'.$this->current_hashed_password]\n ]);\n }\n\n if (!empty($this->password)) {\n $validateData = array_merge($validateData, [\n 'current_password_for_password' => ['required', 'customPassCheckHashed:'.$this->current_hashed_password] ,\n 'password' => 'confirmed|min:6',\n 'password_confirmation' => 'required'\n ]);\n }\n\n $this->validate($validateData);\n }", "title": "" }, { "docid": "ba8fbe89c1f0eba45c33b2be4450350a", "score": "0.43939042", "text": "public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'email',\n new EmailValidator(\n [\n 'model' => $this,\n 'message' => 'Please enter a correct email address',\n ]\n )\n );\n\n return $this->validate($validator);\n }", "title": "" }, { "docid": "25d9026562dee621048bb4d019f97647", "score": "0.4393904", "text": "public function validation()\r\n {\r\n $validator = new Validation();\r\n\r\n $validator->add(\r\n 'email',\r\n new EmailValidator(\r\n [\r\n 'model' => $this,\r\n 'message' => 'Please enter a correct email address',\r\n ]\r\n )\r\n );\r\n\r\n return $this->validate($validator);\r\n }", "title": "" }, { "docid": "ab9ace1f8349f1777048a118df07b892", "score": "0.43800855", "text": "public function validation()\n {\n $validator = new Validation();\n//\n// $validator->add(\n// 'email',\n// new EmailValidator(\n// [\n// 'model' => $this,\n// 'message' => 'メールアドレスの形式が不正です',\n// ]\n// )\n// );\n//\n// // Uniquenessだと論理削除がきかないため、callbackを採用\n// $validator->add(\n// 'email',\n// new Callback(\n// [\n// 'model' => $this,\n// 'message' => 'このメールアドレスはすでに登録されています',\n// 'callback' => function ($model) {\n// return !CustomerService::g()->isDuplicatedEmail($model->email, $model);\n// }\n// ]\n// )\n// );\n//\n//\n// $validator->add(\n// 'role',\n// new InclusionIn(\n// [\n// 'domain' => [\n// 'USER',\n// 'FRANCHISE',\n// 'CORPORATION',\n// 'ADMIN'\n// ],\n// 'message' => '権限が設定されていません',\n// ]\n// )\n// );\n\n return $this->validate($validator);\n }", "title": "" }, { "docid": "c36e5d3baa7508909fbb43d084ac3db5", "score": "0.43752348", "text": "protected function validateMinMax ($result) {\n\t\tif (\n\t\t\t$this->min !== NULL && $this->max !== NULL &&\n\t\t\t$this->min > 0 && $this->max > 0 &&\n\t\t\t($result < $this->min || $result > $this->max)\n\t\t) {\n\t\t\t$this->field->AddValidationError(\n\t\t\t\tstatic::GetErrorMessage(self::ERROR_RANGE), [$this->min, $this->max]\n\t\t\t);\n\t\t} else if ($this->min !== NULL && $this->min > 0 && $result < $this->min) {\n\t\t\t$this->field->AddValidationError(\n\t\t\t\tstatic::GetErrorMessage(self::ERROR_GREATER), [$this->min]\n\t\t\t);\n\t\t} else if ($this->max !== NULL && $this->max > 0 && $result > $this->max) {\n\t\t\t$this->field->AddValidationError(\n\t\t\t\tstatic::GetErrorMessage(self::ERROR_LOWER), [$this->max]\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "64d85b8987bbe26d169114fabecab266", "score": "0.43728882", "text": "public function markAsError()\n {\n $this->_errorsExist = true;\n $this->_errorsForced = true;\n return $this;\n }", "title": "" }, { "docid": "46d945ee34753310b5a60cae7689ed80", "score": "0.43609837", "text": "private function validate(): void\n {\n if ($this->resultMapping->nestedQueryId !== null && $this->resultMapping->nestedResultMapId !== null) {\n throw new \\Exception(\"Cannot define both nestedQueryId and nestedResultMapId in property \" . $this->resultMapping->property);\n }\n // Issue #5: there should be no mappings without typehandler\n if ($this->resultMapping->nestedQueryId === null && $this->resultMapping->nestedResultMapId === null && $this->resultMapping->typeHandler === null) {\n throw new \\Exception(\"No typehandler found for property \" . $this->resultMapping->property);\n }\n // Issue #4 and GH #39: column is optional only in nested resultmaps but not in the rest\n if ($this->resultMapping->nestedResultMapId === null && $this->resultMapping->column === null && empty($this->resultMapping->composites)) {\n throw new \\Exception(\"Mapping is missing column attribute for property \" . $this->resultMapping->property);\n }\n if ($this->resultMapping->getResultSet() !== null) {\n $numColumns = 0;\n if ($this->resultMapping->column !== null) {\n $numColumns = count(explode(',', $this->resultMapping->column));\n }\n $numForeignColumns = 0;\n if ($this->resultMapping->foreignColumn !== null) {\n $numForeignColumns = count(explode(',', $this->resultMapping->foreignColumn));\n }\n if ($numColumns != $numForeignColumns) {\n throw new \\Exception(\"There should be the same number of columns and foreignColumns in property \" . $this->resultMapping->property);\n }\n }\n }", "title": "" }, { "docid": "964defcb13b1d2c4ee5fc441ef46ef80", "score": "0.43607447", "text": "public function applyValidation(ValidationException $validationException);", "title": "" }, { "docid": "4549d55d79d6235ded239925ec292002", "score": "0.4356782", "text": "public function validation()\n {\n /* $validator = new Validation();\n\n $validator->add(\n 'email',\n new EmailValidator(\n [\n 'model' => $this,\n 'message' => 'Please enter a correct email address',\n ]\n )\n );\n\n return $this->validate($validator);*/\n }", "title": "" }, { "docid": "d4b9d2250f55d6f5a1df44b9931cee82", "score": "0.43557164", "text": "protected function validate()\n {\n\n if (!empty($this->fields))\n {\n foreach ($this->fields as $fieldKey => $fieldDetails)\n {\n $fieldDetails = explode('|', $fieldDetails);\n\n $this->checkForRequiredFields($fieldKey, $fieldDetails)\n ->checkTypes($fieldKey, $fieldDetails);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "3fa7a38c633aaa2b57f1b6822782c2b9", "score": "0.43480304", "text": "private function _move_validators() {\n\n $this->_validators = $this->_properties;\n $this->_properties = array();\n }", "title": "" }, { "docid": "055da653e202bfc5979de24532922f04", "score": "0.43405104", "text": "public function merge(Result $result, bool $recursive = false)\n {\n $this->ids = $recursive\n ? array_merge_recursive($this->ids, $result->getIds())\n : array_merge($this->ids, $result->getIds());\n $this->messages = array_merge($this->messages, $result->getMessages());\n $resultFlags = $result->getFlags();\n // not ideal but it saves a time to fix 800+ unit tests\n if (!empty($resultFlags)) {\n $this->flags = array_merge($this->flags, $resultFlags);\n }\n }", "title": "" }, { "docid": "48fd9297c6082969c2fb90cb0f708908", "score": "0.43359384", "text": "function validator(){\n $this->errors=array();\n $this->validate();\n }", "title": "" }, { "docid": "4df9fe11f82f2dba79da96dbb8d77432", "score": "0.43338808", "text": "public function processAdditionalValidation(DataObject $request)\n {\n $errors = array();\n //Skip by item validation if there is no items in request\n if (empty($this->getAllItems($request))) {\n $errors[] = __('There is no items in this order');\n }\n\n $shippingCountry = $request->getDestCountryId();\n\n if ('AR' != $shippingCountry) { // This shipping method is only available for Argentina\n $errors[] = __('This shipping method is only available in Argentina');\n }\n\n if (!empty($errors)) {\n $this->debugErrors($errors);\n\n return false;\n }\n\n return $this;\n }", "title": "" }, { "docid": "fb0e5cb98bed5f61f5415a0a232c0668", "score": "0.43323132", "text": "public function new_result($result = [])\n {\n return new yf_model_result($result, $this);\n }", "title": "" }, { "docid": "d948149bd9eb5fa4db494049a8b72593", "score": "0.43143064", "text": "public function setIsValidValue( bool $isValidValue ): ValidationResult\n {\n\n $this->isValidValue = $isValidValue;\n\n return $this;\n\n }", "title": "" }, { "docid": "2b0e68c5698435c8fb42926f4b56af93", "score": "0.43119484", "text": "public function appendValidator(Validator $v, bool $break = false) {\n $data = [\n 'validator' => $v,\n 'break' => (bool) $break,\n ];\n $this->validators[] = $data;\n return $this;\n }", "title": "" }, { "docid": "5cc628f480bcba4e3c4c041c55e24f10", "score": "0.43114325", "text": "public function validateResolved()\n {\n $validator = $this->getValidatorInstance();\n\n if ($validator->fails()) {\n $this->failedValidation($validator);\n }\n\n if (!$this->passesAuthorization()) {\n $this->failedAuthorization();\n }\n }", "title": "" }, { "docid": "5bcec14f1792b0fea8f22c058b6af852", "score": "0.4310639", "text": "function merge(&$other){\n\t\t\tforeach($other->contexts as $con){\n\t\t\t\t$this->addContextBinary($con);\n\t\t\t}\n\t\t\t$this->setSize();\n\t\t\t$this->totalSize += $other->totalSize;\n\t\t\t$other=NULL;\n\t\t}", "title": "" }, { "docid": "9db107acf84bf5d3d6f067d1af29b8a1", "score": "0.43096521", "text": "protected function prepareForValidation() {\n parent::prepareForValidation();\n $this->merge(['quali_contents' => json_decode($this->get('quali_contents'), true)]);\n }", "title": "" }, { "docid": "7718de21fce8ae44c87699e2c6945b57", "score": "0.4307868", "text": "public function dontSeeBackendValidationHasFailed()\n {\n $this->dontSee(trans('presto::backend.common.validation_failed'));\n\n return $this;\n }", "title": "" }, { "docid": "d0d89b352179aaab6aba0c278919843d", "score": "0.4300429", "text": "function cleanRes()\n {\n $this->resOrg = '%';\n $this->resRole = '%';\n $this->resType = '%';\n $this->resId = '%';\n\n return $this;\n }", "title": "" }, { "docid": "fbca2ff8f53a627effbcf2ce07f14bed", "score": "0.42983446", "text": "public function getResult()\n {\n return $this->result instanceof OrderEditPreviewFailureBuilder ? $this->result->build() : $this->result;\n }", "title": "" }, { "docid": "71059e2dccb6da32c355ee1b65c2b28d", "score": "0.4280879", "text": "protected function prepareForValidation()\n {\n if ($this->method() === 'POST') {\n $this->merge(['status' => 0]);\n }\n }", "title": "" }, { "docid": "f15630e61560b368389a5803136b715c", "score": "0.42802405", "text": "public function setResult($val)\n {\n $this->_propDict[\"result\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "576adcdbb2d506f9e1042180a44a55ea", "score": "0.42753205", "text": "public function cleanPasswordsValidationData()\n {\n $this->setData('password', null);\n $this->setData('password_confirmation', null);\n return $this;\n }", "title": "" }, { "docid": "7f291cc713eb81021f53b568e8730373", "score": "0.4274944", "text": "protected function validate(){\r\n\t\t$errors = parent::validate();\r\n\t\t$valFirst = $this->newPass->getValue();\r\n\t\t$valSecond = $this->newPassSecond->getValue();\r\n\t\t\r\n\t\tif($valFirst !== $valSecond){\r\n\t\t\t$errors[$this->newPassSecond->getName()] = __('The two passwords must be the same');\r\n\t\t}\r\n\t\treturn $errors;\r\n\t}", "title": "" }, { "docid": "e8d9754a46fa0e0151fa232fc0ffbdbf", "score": "0.4270161", "text": "public function testGetErrorMessagesAfterValidationFailure()\n {\n $validator = new Equals(2);\n $validator->isValid(1);\n $this->assertCount(1, $validator->errors());\n }", "title": "" }, { "docid": "de74f3e41b225c44ea8aeb8e9da028f3", "score": "0.42625564", "text": "protected function validationData()\n {\n return $this->merge([\n 'attributes' => $this->filter($this->get('attributes') ?? []),\n ])->all();\n }", "title": "" }, { "docid": "ec10d540b0c253e8d3131704b8805877", "score": "0.42596453", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'directory_id' => (int) $this->directory_id,\n ]);\n }", "title": "" }, { "docid": "2aaf499e685398fc70efb7d0f82f198d", "score": "0.42493618", "text": "protected function prepareForValidation()\n {\n if ($this->filled('status')) {\n $this->merge(['is_enabled' => true]);\n } else {\n $this->merge(['is_enabled' => false]);\n }\n\n $this->offsetUnset('status');\n }", "title": "" }, { "docid": "3d8e071c4f482f41ea86cf576a4856a9", "score": "0.42358318", "text": "protected function failedValidation(Validator $validator)\n {\n $this->transform($validator);\n }", "title": "" }, { "docid": "4de142fab80c6c6e24dc77188251422d", "score": "0.42335048", "text": "protected function getValidation()\n {\n if (!isset($this->validation)) {\n $this->validation = new Validation();\n }\n\n return $this->validation;\n }", "title": "" }, { "docid": "41ae63170cf3850af32d0e5da29b29d1", "score": "0.42331013", "text": "public function merge(self $other): Node\n {\n $this->packageContext->merge($other->packageContext);\n $this->plugin->merge($other->plugin);\n foreach ($other->requiredBy as $that) {\n $that->require($this);\n $that->requires->detach($other);\n }\n foreach ($other->extendedBy as $that) {\n $that->extend($this);\n $that->extends->detach($other);\n }\n return $this;\n }", "title": "" }, { "docid": "00196c853fc42aed3bd2edc0efca66fe", "score": "0.42320955", "text": "public function validation()\n {\n $validator = new Validation();\n $validator->add(\n \"username\",\n new Uniqueness(\n [\n \"field\" => \"username\",\n \"message\" => \"This username is already in use.\"\n ]\n )\n );\n $validator->add(\n \"email\",\n new Uniqueness(\n [\n \"field\" => \"email\",\n \"message\" => \"There is already an account with this e-mail address.\"\n ]\n )\n );\n $validator->add(\n \"username\",\n new PresenceOf(\n [\n \"field\" => \"username\",\n \"message\" => \"Enter a username.\"\n ]\n )\n );\n $validator->add(\n \"password\",\n new PresenceOf(\n [\n \"field\" => \"password\",\n \"message\" => \"Enter a password.\"\n ]\n )\n );\n $validator->add(\n \"first_name\",\n new PresenceOf(\n [\n \"field\" => \"first_name\",\n \"message\" => \"Enter your first name.\"\n ]\n )\n );\n $validator->add(\n \"last_name\",\n new PresenceOf(\n [\n \"field\" => \"last_name\",\n \"message\" => \"Enter your last name.\"\n ]\n )\n );\n $validator->add(\n \"email\",\n new PresenceOf(\n [\n \"field\" => \"email\",\n \"message\" => \"Enter your e-mail address.\"\n ]\n )\n );\n\n return($this->validate($validator));\n }", "title": "" }, { "docid": "ab2649faae16e29d9716a8c7991d308d", "score": "0.42310366", "text": "public function applyValidation(ValidationException $validationException) {\n $prototype = $this->getOption(self::OPTION_PROTOTYPE, self::VALUE_PROTOTYPE);\n\n // apply validation on inner rows\n $type = $this->getOption(self::OPTION_TYPE);\n if ($type !== ComponentRow::TYPE) {\n parent::applyValidation($validationException);\n } else {\n foreach ($this->rows as $key => $row) {\n if ($key === $prototype) {\n continue;\n }\n\n $row->applyValidation($validationException);\n }\n }\n\n // update the data\n $this->data = $this->getData();\n\n // apply validation on collection\n foreach ($this->filters as $filter) {\n $this->data = $filter->filter($this->data);\n }\n\n if (isset($this->widget)) {\n $this->widget->setValue($this->data);\n\n $name = $this->widget->getName();\n } else {\n $name = $this->name;\n }\n\n if (!is_array($this->data)) {\n $this->data = (array) $this->data;\n }\n\n foreach ($this->validators as $validator) {\n if (!$validator->isValid($this->data)) {\n $validationException->addErrors($name, $validator->getErrors());\n }\n }\n\n if ($this->validationConstraint) {\n $this->validationConstraint->constrain($this->data, $validationException);\n }\n\n if (!$this->validationErrors) {\n return;\n }\n\n foreach ($this->validationErrors as $fieldName => $fieldErrorContainers) {\n foreach ($fieldErrorContainers as $fieldErrors) {\n $validationException->addErrors($fieldName, $fieldErrors);\n }\n }\n }", "title": "" }, { "docid": "a8122dd12110519758efa966bfdf90fa", "score": "0.4221987", "text": "public function validation()\n {\n $validator = new Validation();\n\n $validator->add(\n 'serviceid',\n new Callback(\n [\n \"message\" => \"Такая услуга не существует\",\n \"callback\" => function ($request) {\n $service = Services::findFirstByServiceid($request->getServiceId());\n\n if ($service)\n return true;\n return false;\n }\n ]\n )\n );\n\n $validator->add(\n 'status',\n new Callback([\n \"message\" => \"Поле статус имеет неверное значение.\",\n 'callback' => function ($request) {\n $status = Statuses::findFirstByStatusid($request->getStatus());\n if (!$status)\n return false;\n return true;\n }\n ])\n );\n\n if($this->getDateEnd()!= null)\n $validator->add(\n 'dateend',\n new Callback([\n \"message\" => \"Крайняя дата на получение услуги должна быть позже текущего времени\",\n 'callback' => function ($request) {\n if (strtotime($request->getDateEnd()) > strtotime(date('Y-m-d H:i:s')))\n return true;\n return false;\n }\n ])\n );\n\n return $this->validate($validator) && parent::validation();\n }", "title": "" }, { "docid": "7f5e07dad0af45e104682628f531bf3b", "score": "0.4221628", "text": "public function add($result)\n {\n $this->sets[] = $result;\n\n if ($result->count()) {\n $this->append_result($result);\n }\n else if ($result->incomplete) {\n $this->incomplete = true;\n }\n }", "title": "" }, { "docid": "b6380bd403d889053ef0d6442f404cb1", "score": "0.42209494", "text": "public function extend($validator);", "title": "" }, { "docid": "2ff0cafe6338eb372bfe19885c4bdb3e", "score": "0.42170262", "text": "public function proccessAdditionalValidation(\\Magento\\Framework\\DataObject $request)\n {\n return $this->processAdditionalValidation($request);\n }", "title": "" }, { "docid": "98283af355fbef1d072366c76292d687", "score": "0.4207924", "text": "public function validatePayment()\n {\n if (!$this->cart()->paymentRequired())\n {\n return $this;\n }\n \n $paymentMethod = $this->paymentMethod();\n \n $order = $this->order();\n $cart = $this->cart();\n \n $this->__validatePaymentResult = $paymentMethod->addCheckout( $this )->addOrder( $order )->addCart( $cart )->addPaymentData( $this->paymentData() )->getClass()->validatePayment();\n \n return $this;\n }", "title": "" }, { "docid": "fadd2f10aac971285b0f3e9ee9b96fba", "score": "0.4205914", "text": "private function updateValidator()\n {\n $this->validator = Validator::make($this->getAttributes(), $this->rules);\n }", "title": "" } ]
bfcfc76d45a2ad59c7b1ca42b42ab21c
Build array from get url. TODO: it's probably faster to use PHP buildin function (array_merge...)
[ { "docid": "c49e1d2f774747fa7b9a28ed95c6311f", "score": "0.57152367", "text": "function PU_BuildGETArray(array $myGET, $includeInGet = null, $excludeFromGet = null)\n{\n\tif (!is_null($includeInGet)) {\n\t\tif (!is_array($includeInGet))\n\t\t\t$includeInGet = array($includeInGet);\n\t\tforeach ($includeInGet as $index => $value)\n\t\t\t$myGET[$index] = $value;\n\t}\n\tif (!is_null($excludeFromGet)) {\n\t\tif (!is_array($excludeFromGet))\n\t\t\t$excludeFromGet = array($excludeFromGet);\n\t\tforeach ($excludeFromGet as $param)\n\t\t\tunset($myGET[$param]);\n\t}\n\treturn $myGET;\n}", "title": "" } ]
[ { "docid": "127077b4b8d7f1cfd5416b178dfb6215", "score": "0.67832327", "text": "private function get_array() {\n\t\t$resultArray = array(\n\t\t\t\"URL\" => \"$this->queryURL\"\n\t\t);\n\n\t\tif ($this->queryData == \"all\" || $this->queryData == \"webserver\") {\n\t\t\t$resultArray[\"Web server\"] = $this->pull_webserver();\n\t\t}\n\t\tif ($this->queryData == \"all\" || $this->queryData == \"ipaddress\") {\n\t\t\t$resultArray[\"IP address\"] = $this->pull_ip_address();\n\t\t}\n\t\tif ($this->queryData == \"all\" || $this->queryData == \"setscookie\") {\n\t\t\t$resultArray[\"Sets cookie\"] = $this->pull_sets_cookie();\n\t\t}\n\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "5c47f2abe0a5520a283d328a5e44fc32", "score": "0.660936", "text": "function urlToArray($url) {\n\tif (strpos($url, '?') != false) {\n\t\t$url = substr($url, 0, (strpos($url, '?')));\n\t}\n\n\t$url = str_replace('#', '', $url);\n\n\t// first lets get the location of /app/ and slice it\n\t$start = strpos($url, '/app/') + 5;\n\t$fin = substr($url, $start, strlen($url) - $start);\n\t$finarr = explode('/', $fin);\n\tforeach ($finarr as $fkey => $fval) {\n\t\tif ($fval == '') {\n\t\t\tunset($finarr[$fkey]);\n\t\t}\n\t}\n\t$finarr = array_values($finarr);\n\treturn $finarr;\n\t\n}", "title": "" }, { "docid": "d2b9eea304778e771bb10b7121108ae9", "score": "0.65153277", "text": "static function UrlToArray(string $url): array {\n if(empty($url)) return [];\n $arr = explode('?',$url);\n $url = count($arr)>1?$arr[1]:$arr[0];\n // 参数\n $data = [];\n $arr = explode('&',$url);\n foreach($arr as $v1){\n $tmp = explode('=',$v1);\n $data[$tmp[0]] = trim($tmp[1]);\n }\n return $data;\n }", "title": "" }, { "docid": "66e9fb38ec6e37072034efedb7be7c48", "score": "0.65038306", "text": "public function parseUrlIntoArray() {\r\n\t\t$url_params = rtrim(ltrim($this -> getUrlParams(), '/'), '/') . '/';\r\n\t\treturn explode('/', $url_params);\r\n\t}", "title": "" }, { "docid": "e90eaf7dd2da07650e8af1bc1f59e34c", "score": "0.64640373", "text": "function urlArray($url){\r\n\t\tif ($url==null)$url='/home';\r\n\t\t$parts=explode('/',$url);\r\n\t\tunset($parts[0]);\r\n\t\treturn $parts;\r\n\t}", "title": "" }, { "docid": "c400b533472ff2cf3b08fb5ab1d0c935", "score": "0.62340534", "text": "public function parseUrl(){\r\n if (isset($_GET[\"url\"])) {\r\n return explode(\"/\", filter_var(rtrim($_GET[\"url\"], \"/\"), FILTER_SANITIZE_URL)); \r\n }\r\n }", "title": "" }, { "docid": "f6e735e24504ed978aeae9281f13abc7", "score": "0.61342204", "text": "protected function buildLinks()\r\n {\r\n $currentUri = \"\";\r\n $result = [];\r\n\r\n foreach($this->origin as $uri){\r\n if($uri == \"\") continue;\r\n if($uri != \"/\"){\r\n $currentUri .= \"/\" . $uri;\r\n }else{\r\n $currentUri .= ($uri . \"/\");\r\n }\r\n $result[] = $currentUri;\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "072e6229375af8ee6c99f0ff0d22294f", "score": "0.60882163", "text": "public function parseUrl(){\n # explode() transforma em array\n # rtrim() retira os espaços vazios\n # a 'url' é a mesma delimitada no .htaccess\n\n return explode(\"/\", rtrim($_GET['url']), FILTER_SANITIZE_URL);\n }", "title": "" }, { "docid": "2b8420352c8e28ad8d83edc9b341bd5d", "score": "0.60340834", "text": "public function parseUrl(){\n\t\tif(isset($_GET['url'])) {\n\t\t\treturn $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n\t\t}\n\t}", "title": "" }, { "docid": "33096c9f9ef29bcacf0f37d3c5c93b58", "score": "0.6018293", "text": "public function getUrls(): array;", "title": "" }, { "docid": "0199b2644cc318e9d37caa928120f917", "score": "0.6014018", "text": "public function parseUrl()\n\t{\n\t\tif (isset($_GET['url']))\n\t\t{\n\t\t\t// returns the url into arrays\n\t\t\treturn $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n\t\t}\n\t}", "title": "" }, { "docid": "4be685e79e8a9df1c02469789edd386c", "score": "0.6010342", "text": "public function parseUrl() {\n if (isset($_GET['url'])) {\n //crea array con valori trimmando /\n return $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));\n }\n return null;\n }", "title": "" }, { "docid": "f56b5cbff07ad2ca12edbc2e0db37e60", "score": "0.59515154", "text": "public function getURLData()\n {\n $urldata = ( isset( $_GET['page'] ) ) ? $_GET['page'] : '' ;\n $this->urlPath = $urldata;\n if( $urldata == '' )\n {\n $this->urlBits[] = '';\n $this->urlPath = '';\n }\n else\n {\n $data = explode( '/', $urldata );\n while ( !empty( $data ) && strlen( reset( $data ) ) === 0 )\n {\n array_shift( $data );\n }\n while ( !empty( $data ) && strlen( end( $data ) ) === 0)\n {\n array_pop($data);\n }\n $this->urlBits = $this->array_trim( $data );\n }\n }", "title": "" }, { "docid": "347a42a8f8b670c9936cd9281e400276", "score": "0.59182656", "text": "static public function getGeneralDataFromUrl($url) {\n $linkParsed = parse_url($url);\n\n $arrayLinkParsed = explode(\"/\", $linkParsed['path']);\n\n array_shift($arrayLinkParsed);\n\n $arraResulted = [\n \"tipo_anuncio\" => $arrayLinkParsed[0],\n \"marca\" => $arrayLinkParsed[1],\n \"modelo\" => $arrayLinkParsed[2],\n \"ano\" => $arrayLinkParsed[3],\n \"id_veiculo\" => $arrayLinkParsed[4]\n ];\n\n return $arraResulted;\n }", "title": "" }, { "docid": "6419813f90d0aa8beed0469960bebe69", "score": "0.5915743", "text": "private static function parseURL($url) {\n\t\t$routage = array();\n\t\t\n\t\t// Cleaning\n\t\t$url = trim($url, '/');\n\t\t$url = str_replace(array('index.php', '.html', '.htm'), '', $url);\n\t\t$url = preg_replace('#\\?.*$#', '', $url); // Nettoyage des query string\n\t\t\n\t\t$array = explode('/', $url);\n\t\t// Given application name\n\t\tif (!empty($array[0])) {\n\t\t\t$routage[] = strtolower(array_shift($array));\n\t\t\tif (sizeof($array) > 0) {\n\t\t\t\t// Storing arguments\n\t\t\t\t$routage[] = $array;\n\t\t\t} else {\n\t\t\t\t$routage[] = array();\n\t\t\t}\n\t\t}\n\t\treturn $routage;\n\t}", "title": "" }, { "docid": "25c889c95ecd7cd4985cf24a9e732ddf", "score": "0.5895804", "text": "function parseFile() {\n\n $urlarray = array();\n\n $fd = file(\"list.txt\");\n foreach($fd as $row) {\n array_push($urlarray,$row);\n }\n return $urlarray;\n\n}", "title": "" }, { "docid": "ddca7076aca1e397421bf2503584595c", "score": "0.5889041", "text": "function toUrlArray($blogs) {\n\t\t$ret = array();\n\t\tfor ($i = 0; $i < count($blogs); $i = $i + 1) {\n\t\t\tarray_push($ret, $blogs[$i]->url);\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "3a94aa93a363875fa1836cdfa9a01a25", "score": "0.5884707", "text": "private static function getUrlParts($url) {\n\t\t$host=parse_url($url,PHP_URL_HOST);\n\t\t$path=parse_url($url,PHP_URL_PATH);\n\t\t$query=parse_url($url,PHP_URL_QUERY);\n\t\tif($query) {\n\t\t\t$path.='?'.$query;\n\t\t}\n\t\t$ip = gethostbyname($host);\n\t\treturn array($ip,$host,$path);\n\t}", "title": "" }, { "docid": "e374d33b27ef6ff3603c3c28783483c2", "score": "0.5883348", "text": "public function getURLData()\n\t{\n\t $urldata = ( isset( $_GET['page'] ) ) ? $_GET['page'] : '' ;\n\t $this->urlPath = $urldata;\n\t if( $urldata == '' )\n\t {\n\t $this->urlBits[] = '';\n\t $this->urlPath = '';\n\t }\n\t else\n\t {\n\t $data = explode( '/', $urldata );\n\t while ( !empty( $data ) && strlen( reset( $data ) ) === 0 )\n\t {\n\t array_shift( $data );\n\t }\n\t while ( !empty( $data ) && strlen( end( $data ) ) === 0)\n\t {\n\t array_pop($data);\n\t }\n\t $this->urlBits = $this->array_trim( $data );\n\t }\n\t}", "title": "" }, { "docid": "fa33bc134a7f73dda1b387df587ed4b5", "score": "0.58678544", "text": "public function getParams($url) {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "4e8b2801e8b862ddd98fb369163cb9bd", "score": "0.585845", "text": "public function getUrlComponents()\n {\n return [\n ['https://', 'foo.com', '/bar', null, null, true, 'https://foo.com/bar/'],\n ['http', 'foo.com', '/bar', null, 'baz', true, 'http://foo.com/bar/#baz'],\n ['http', 'https://bar.com', null, ['baz' => 'foo'], null, false, 'http://bar.com?baz=foo'],\n ['https', '//baz.com', 'foo/bar', ['foo' => 'bar'], null, true, 'https://baz.com/foo/bar/?foo=bar'],\n ['http:', 'url.com', '/baz/', ['foo' => 'bar', 'query' => 'value foo'], null, true, 'http://url.com/baz/?foo=bar&query=value%20foo'],\n ['http://', null, '/foo', null, null, true, 'http://homestead.test/foo/'],\n ['http', 'foo.com', '/bar', ['foo' => 'bar'], '#baz', false, 'http://foo.com/bar?foo=bar#baz'],\n ['http', 'foo.com', '/bar/bar baz', null, null, false, 'http://foo.com/bar/bar%20baz'],\n [null, 'foo.com', '//bar//bar baz/file 1.txt', null, null, false, 'http://foo.com/bar/bar%20baz/file%201.txt'],\n ['https:', 'foo.com', '/bar/file.txt', null, null, true, 'https://foo.com/bar/file.txt'],\n [null, 'foo.com', [ 'bar', '/baz' ], null, null, true, 'http://foo.com/bar/baz/'],\n ];\n }", "title": "" }, { "docid": "dc028b11a07988dc64aed611edace26d", "score": "0.5835653", "text": "public static function parse($url)\n {\n $data = parse_url($url);\n return Arrays::toObject($data);\n }", "title": "" }, { "docid": "8477686c397986e454a55dc6d240f3fb", "score": "0.58329123", "text": "public function get4($query){\r\n //creating array with urls\r\n $urls = array();\r\n $urls[0] = 'http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=';\r\n $urls[0] .= urlencode($query).'&start=0';\r\n //performing multiple requests\r\n $images = $this->multi_curl($urls);\r\n return array($images[0]['tbUrl'],$images[1]['tbUrl'],$images[2]['tbUrl'],$images[3]['tbUrl']);\r\n }", "title": "" }, { "docid": "500b46c29a8de03b84db5a293b12c640", "score": "0.58318686", "text": "function build_params( $params )\n{\n\t$counter = 0;\n\t$array = array();\n\t$keys = array();\n\t$values = array();\n\n\t//make sure we have even url parts\n\tif( count( $params ) % 2 != 0 )\n\t{\n\t\t$params[] = 0;\n\t}\n\n\t//build multi-dimensional array\n\tforeach( $params as $v )\n\t{\n\t\tif( $counter == 0)\n\t\t{\n\t\t\t$keys[] = $v;\n\t\t\t$counter++;\n\t\t}\n\t\telse {\n\t\t\t$values[] = $v;\n\t\t\t$counter = 0;\n\t\t}\n\t}\n\n\tif( ! empty($keys) )\n\t{\n\t\t$array = array_combine($keys, $values);\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "aa4ac14b367d482d3b7f1a187d1a3139", "score": "0.5792542", "text": "public function parseUrl()\n {\n if (isset($_GET['url'])) {\n // echo $_GET['url'];\n return $url = explode('/', filter_var(rtrim($_GET['url'],'/'), FILTER_SANITIZE_URL));\n\n }\n\n }", "title": "" }, { "docid": "95f31c246fd255cc60cd2ad6e73e7b30", "score": "0.5780157", "text": "private function _parsePickPath($url)\n {\n $info = parse_url($url);\n\n $array = array(\n 'host' => $info['host']\n );\n\n if (isset($info['port']) && $info['port']) {\n $array['port'] = $info['port'];\n } else {\n $array['port'] = Bear_Pick::DEFAULT_PORT;\n }\n\n preg_match('/^\\/(.*?)\\/(.*)$/', $info['path'], $matches);\n\n $array['account'] = $matches[1];\n $array['program'] = $matches[2];\n\n if (isset($info['query'])) {\n $array['query'] = $info['query'];\n } else {\n $array['query'] = '';\n }\n\n return $array;\n }", "title": "" }, { "docid": "b1629e57e9affc7fb319ae32ceab9e06", "score": "0.5778975", "text": "private function _getUrl(){\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n \n $this->_url = explode(\"/\", $url);\n }", "title": "" }, { "docid": "4492e34dc073ac2f24b7bfebf97889af", "score": "0.5773929", "text": "private function parse_url()\n {\n $varStr = explode('/', rtrim($_REQUEST['__uri'], '/'));\n\n // Cut the url in 3 parts, the baseUrl: your domain, the pagename: the page you're searching for and the pageVars, the subpage of the metioned pagename.\n $urlArr['baseUrl'] = rtrim(str_replace($_REQUEST['__uri'], '', $_SERVER['REQUEST_URI']), '/');\n $urlArr['pagename'] = array_shift($varStr);\n $urlArr['pageVars'] = $varStr;\n\n // Set the urlArr\n $this->set_urlArr($urlArr);\n }", "title": "" }, { "docid": "c7009380bbde61e88c3f20cb9e27a364", "score": "0.5765465", "text": "public function urlCombineDataProvider()\n {\n return [\n // Specific test cases\n ['http://www.example.com/', 'http://www.example.com/', 'http://www.example.com/'],\n ['http://www.example.com/path', '/absolute', 'http://www.example.com/absolute'],\n ['http://www.example.com/path', '/absolute?q=2', 'http://www.example.com/absolute?q=2'],\n ['http://www.example.com/', '?q=1', 'http://www.example.com/?q=1'],\n ['http://www.example.com/path', 'http://test.com', 'http://test.com'],\n ['http://www.example.com:8080/path', 'http://test.com', 'http://test.com'],\n ['http://www.example.com:8080/path', '?q=2#abc', 'http://www.example.com:8080/path?q=2#abc'],\n ['http://www.example.com/path', 'http://u:[email protected]/', 'http://u:[email protected]/'],\n ['/path?q=2', 'http://www.test.com/', 'http://www.test.com/path?q=2'],\n ['http://api.flickr.com/services/', 'http://www.flickr.com/services/oauth/access_token', 'http://www.flickr.com/services/oauth/access_token'],\n ['https://www.example.com/path', '//foo.com/abc', 'https://foo.com/abc'],\n ['https://www.example.com/0/', 'relative/foo', 'https://www.example.com/0/relative/foo'],\n ['', '0', '0'],\n // RFC 3986 test cases\n [self::RFC3986_BASE, 'g:h', 'g:h'],\n [self::RFC3986_BASE, 'g', 'http://a/b/c/g'],\n [self::RFC3986_BASE, './g', 'http://a/b/c/g'],\n [self::RFC3986_BASE, 'g/', 'http://a/b/c/g/'],\n [self::RFC3986_BASE, '/g', 'http://a/g'],\n [self::RFC3986_BASE, '//g', 'http://g'],\n [self::RFC3986_BASE, '?y', 'http://a/b/c/d;p?y'],\n [self::RFC3986_BASE, 'g?y', 'http://a/b/c/g?y'],\n [self::RFC3986_BASE, '#s', 'http://a/b/c/d;p?q#s'],\n [self::RFC3986_BASE, 'g#s', 'http://a/b/c/g#s'],\n [self::RFC3986_BASE, 'g?y#s', 'http://a/b/c/g?y#s'],\n [self::RFC3986_BASE, ';x', 'http://a/b/c/;x'],\n [self::RFC3986_BASE, 'g;x', 'http://a/b/c/g;x'],\n [self::RFC3986_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s'],\n [self::RFC3986_BASE, '', self::RFC3986_BASE],\n [self::RFC3986_BASE, '.', 'http://a/b/c/'],\n [self::RFC3986_BASE, './', 'http://a/b/c/'],\n [self::RFC3986_BASE, '..', 'http://a/b/'],\n [self::RFC3986_BASE, '../', 'http://a/b/'],\n [self::RFC3986_BASE, '../g', 'http://a/b/g'],\n [self::RFC3986_BASE, '../..', 'http://a/'],\n [self::RFC3986_BASE, '../../', 'http://a/'],\n [self::RFC3986_BASE, '../../g', 'http://a/g'],\n [self::RFC3986_BASE, '../../../g', 'http://a/g'],\n [self::RFC3986_BASE, '../../../../g', 'http://a/g'],\n [self::RFC3986_BASE, '/./g', 'http://a/g'],\n [self::RFC3986_BASE, '/../g', 'http://a/g'],\n [self::RFC3986_BASE, 'g.', 'http://a/b/c/g.'],\n [self::RFC3986_BASE, '.g', 'http://a/b/c/.g'],\n [self::RFC3986_BASE, 'g..', 'http://a/b/c/g..'],\n [self::RFC3986_BASE, '..g', 'http://a/b/c/..g'],\n [self::RFC3986_BASE, './../g', 'http://a/b/g'],\n [self::RFC3986_BASE, 'foo////g', 'http://a/b/c/foo////g'],\n [self::RFC3986_BASE, './g/.', 'http://a/b/c/g/'],\n [self::RFC3986_BASE, 'g/./h', 'http://a/b/c/g/h'],\n [self::RFC3986_BASE, 'g/../h', 'http://a/b/c/h'],\n [self::RFC3986_BASE, 'g;x=1/./y', 'http://a/b/c/g;x=1/y'],\n [self::RFC3986_BASE, 'g;x=1/../y', 'http://a/b/c/y'],\n [self::RFC3986_BASE, 'http:g', 'http:g'],\n ];\n }", "title": "" }, { "docid": "071f4457c0a0fdc8dca9a2753e4500e4", "score": "0.5763949", "text": "public function explodeUrl2ArrayDataProvider() {}", "title": "" }, { "docid": "c3ae9319a00381a9099338d5a869531a", "score": "0.5760403", "text": "public function get(string $urlPath): array;", "title": "" }, { "docid": "6650e304ab49d72a44319b5c710b1bbc", "score": "0.57498497", "text": "function getKeywordUrls($keyword,$type,$site){\n $typeMap = array('news'=> '&tbm=nws','video'=>'&tbm=vid','google'=>'','social'=>'');\n $urlsR = array();\n\n\n try {\n\n $keywordSr = $keyword .($site?'+'.$site:'');\n $keywordSr = str_replace(' ','+',$keywordSr);\n for($j=0;$j<=0;$j++){\n $URL = \"https://www.google.co.in/search?q=\".$keywordSr.\"&ie=utf-8&oe=utf-8&gws_rd=cr\".$typeMap[$type].\"&start=\".(10*$j);\n //echo $URL;\n $homepage = file_get_contents($URL);\n\n $urls = explode('/url?q=',$homepage);\n for($i = 1; $i<count($urls);$i++) {\n $urlsR[] = explode('&amp;', $urls[$i])[0];\n //echo explode('&amp;', $urls[$i])[0] . \"\\n\";\n\n }\n }\n //var_dump($urlsR);die('page');\n return $urlsR;\n\n\n\n }catch(Exception $e){\n var_dump($e);\n return $urlsR;\n\n }\n}", "title": "" }, { "docid": "9f5b9b48b5c8452534b44142427349fb", "score": "0.57458806", "text": "public function explodeUrl2ArrayDataProvider()\n {\n return [\n 'Empty string' => ['', []],\n 'Simple parameter string' => ['&one=%E2%88%9A&two=2', ['one' => '√', 'two' => 2]],\n 'Nested parameter string' => ['&foo[one]=%E2%88%9A&two=2', ['foo[one]' => '√', 'two' => 2]]\n ];\n }", "title": "" }, { "docid": "0cc35c9ad5206511b079705c90aa22c1", "score": "0.57216275", "text": "protected function parseUrl(string $url): array {\n\t\treturn parse_url($url);\n\t}", "title": "" }, { "docid": "d55597a7ae122d5c8c9b5a968525b2ee", "score": "0.571979", "text": "protected function get_request_uri_array() {\n\t\t$base_url = $this->get_request_uri();\n\t\t$request_uri_array = array();\n\t\t$array = explode('/', $base_url);\n\t\tforeach( $array as $route ) {\n\t\t\tif(trim($route) != '')\n\t\t\t\tarray_push($request_uri_array, $route);\n\t\t}\n\t\treturn $request_uri_array;\n\t}", "title": "" }, { "docid": "68e28a34defa54660b44d06f3cbde792", "score": "0.5717507", "text": "private function splitUrl()\n {\n\t\t// Checar se url está isset\n if (isset($_GET['url'])) {\n\n // Separando a URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Colocando as partes da URL em suas proppriedades\n $this->urlController = isset($url[0]) ? $url[0] : null;\n $this->urlAction = isset($url[1]) ? $url[1] : 'index';// era null\n\n // Remover o controller e o action das partes da URL\n unset($url[0], $url[1]);\n\n // Rebase as chaves do array e armazenar no parâmetro da URL\n $this->urlParams = array_values($url);\n\n // Para DEBUG da Router. Descomente as linhas abaixo caso tenha problemas com a URL\n // echo 'Controller: ' . ucfirst($this->urlController) . '<br>';\n // echo 'Action: ' . $this->urlAction . '<br>';\n // echo 'Parameters: ' . print_r($this->urlParams, true) . '<br>';\n }\n }", "title": "" }, { "docid": "7c75fe4705bbf713ffca326d81185442", "score": "0.5713941", "text": "protected function breakApartUrl() : array {\n $currentUrl = 'http://' . $_SERVER['SERVER_NAME'] . wp_unslash($_SERVER['REQUEST_URI']);\n \n // i = 0: raw match\n // i = 1: subdomain, domain, categories, pages\n // i = 2: query string\n $regexOutput = [];\n preg_match('/(^http:\\/\\/[^\\?\\s]+)(\\?[^\\s]+)?/', $currentUrl, $regexOutput);\n \n $brokenUpUrl = [\n 'rawUrl' => isset($regexOutput[0]) ? $regexOutput[0] : ''\n , 'urlRoot' => isset($regexOutput[1]) ? $regexOutput[1] : ''\n , 'queryString' => isset($regexOutput[2]) ? $regexOutput[2] : ''\n ];\n \n return $brokenUpUrl;\n }", "title": "" }, { "docid": "d2dbd65f8221d3d7da83aab93e6230ea", "score": "0.5709908", "text": "function _extract_vars( string $url ): array {\n\tlist( $path ) = explode( '?', $url );\n\n\t$ps = explode( '/', trim( str_replace( \\home_url(), '', $path ), '/' ) );\n\t$vars = array();\n\t$sps = array();\n\t$p = array_shift( $ps );\n\n\tforeach ( _get_instance()->structures as $st ) {\n\t\tif ( in_array( $p, $st['slugs'], true ) ) {\n\t\t\t$vars[ $st['var'] ] = $p;\n\t\t\t$sps[] = $p;\n\n\t\t\t$p = array_shift( $ps );\n\t\t} else {\n\t\t\t$vars[ $st['var'] ] = $st['omittable'] ? $st['default_slug'] : null;\n\t\t}\n\t}\n\treturn array( $vars, implode( '/', $sps ) );\n}", "title": "" }, { "docid": "3a37ccdf95fc321dd5b9948fd9fecad3", "score": "0.5708155", "text": "public function get_url() {\n # pass the array to the url.\n $u = $_SERVER[\"REQUEST_URI\"];\n $this->url = explode('/', $u);\n }", "title": "" }, { "docid": "3db4ef363f2424fd4d9553a3a0121aa9", "score": "0.5698278", "text": "private static function parseUrl() {\n return explode( '/', filter_var( trim( $_SERVER['REQUEST_URI'], '/') ) );\n }", "title": "" }, { "docid": "b301853e803f6db8650f1658d8f6a53e", "score": "0.56962985", "text": "public function parseUrl()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n } else {\n return array(\"index\");\n }\n }", "title": "" }, { "docid": "c71737d7d96411784c36b54eb6b4065a", "score": "0.56823826", "text": "public static function urlParser($url)\n {\n\n $parseUrl = self::autoCorrectParseUrl($url);\n\n // malformed URL, parse_url() returns false. Returns urls \"as is\".\n if ($parseUrl === false) {\n return array(\"url\" => $url, \"url_display\" => $url);\n }\n\n $urlArray = array(\"url\" => \"\", \"url_display\" => \"\");\n\n // Check if scheme is correct\n if (!in_array($parseUrl[\"scheme\"], array(\"http\", \"https\", \"gopher\"))) {\n $urlArray[\"url\"] .= 'http'.'://';\n } else {\n $urlArray[\"url\"] .= $parseUrl[\"scheme\"].'://';\n }\n\n // Check if the right amount of \"www\" is set.\n $explodeHost = explode(\".\", $parseUrl[\"host\"]);\n\n // Remove empty entries\n $explodeHost = array_filter($explodeHost);\n // And reassign indexes\n $explodeHost = array_values($explodeHost);\n\n // Contains subdomain\n if (count($explodeHost) > 2) {\n // Check if subdomain only contains the letter w(then not any other subdomain).\n if (substr_count($explodeHost[0], 'w') == strlen($explodeHost[0])) {\n // Replace with \"www\" to avoid \"ww\" or \"wwww\", etc.\n $explodeHost[0] = \"www\";\n\n }\n }\n\n $urlArray[\"url\"] .= implode(\".\", $explodeHost);\n $urlArray[\"url_display\"] = trim(implode(\".\", $explodeHost), '\\/'); // Removes trailing slash\n\n if (!empty($parseUrl[\"port\"])) {\n $urlArray[\"url\"] .= \":\".$parseUrl[\"port\"];\n }\n if (!empty($parseUrl[\"path\"])) {\n $urlArray[\"url\"] .= $parseUrl[\"path\"];\n }\n if (!empty($parseUrl[\"query\"])) {\n $urlArray[\"url\"] .= '?'.$parseUrl[\"query\"];\n }\n if (!empty($parseUrl[\"fragment\"])) {\n $urlArray[\"url\"] .= '#'.$parseUrl[\"fragment\"];\n }\n\n return $urlArray;\n }", "title": "" }, { "docid": "084abbf6facbadc5d42ac30cb7292d5f", "score": "0.56816775", "text": "function getVariables($url) {\n //quitamos la barra del final\n $url = preg_replace('/\\/$/', '', $url);\n\n //separamos las partes de la url y las contamos\n $partes = explode('/', $url);\n $cantPartes = count($partes);\n\n $variables = array();\n for ($c = 0; $c < $cantPartes; $c = $c + 2) {\n //Acumulamos los pares de valores(para nosotros variables) en el arreglo\n $nombre = limpiar($partes[$c]);\n $valor = (isset($partes[$c + 1])) ? limpiar($partes[$c + 1]) : 0;\n $variables[$nombre] = $valor;\n }\n\n return $variables;\n}", "title": "" }, { "docid": "5207840df56d7935c2d6e2a7f5fd7a20", "score": "0.5669349", "text": "function get_url_data($url){\n\t$get_content = file_get_html($url);\n\t\t/*echo \"<pre>\";\n\t\tvar_dump($get_content);*/\n\n\t\tif($get_content)\n\t\t{\n\t\t\t/*Get Page Title */\n\t\t\tforeach($get_content->find('title') as $element) \n\t\t\t{\n\t\t\t\t$page_title = $element->plaintext;\n\t\t\t}\t\t\n\t\t\t/*\tGet Body Text*/\n\t\t\tforeach($get_content->find('body') as $element) \n\t\t\t{\n\t\t\t\t$page_body = trim($element->plaintext);\n\t\t\t$pos=strpos($page_body, ' ', 200); //Find the numeric position to substract\n\t\t\t$page_body = substr($page_body,0,$pos ); //shorten text to 200 chars\n\t\t}\t\n\t\t$image_urls = array();\n\n\t\t//get all images URLs in the content\n\t\tforeach($get_content->find('img') as $element) \n\t\t{\n\t\t\t\t/* check image URL is valid and name isn't blank.gif/blank.png etc..\n\t\t\t\tyou can also use other methods to check if image really exist */\n\t\t\t\tif(!preg_match('/blank.(.*)/i', $element->src) && filter_var($element->src, FILTER_VALIDATE_URL))\n\t\t\t\t{\n\t\t\t\t\t$image_urls[] = $element->src;\n\t\t\t\t}\n\t\t\t}\n\n\t\t//prepare for JSON \n\t\t\t$output = array('title'=>$page_title, 'images'=>$image_urls, 'content'=> $page_body);\n\t\t}\n\t\telse{\n\t\t\t$output = array('status'=>'fail','msg'=>'No results found.');\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "e520f893d846e8f6c4ec19604848b284", "score": "0.5662529", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n // Remove controller and action from the split URL\n unset($url[0], $url[1]);\n\n // Rebase array keys and store the URL params\n $this->url_params = array_values($url);\n\n // for debugging. uncomment this if you have problems with the URL\n //echo 'Controller: ' . $this->url_controller . '<br>';\n //echo 'Action: ' . $this->url_action . '<br>';\n //echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n }\n }", "title": "" }, { "docid": "d24c22863da53a933d66a6698b5c0c3d", "score": "0.56072867", "text": "public function getUrlElements($url)\n\t{\n\t\t// get file and query\n\t\t// (\\w+\\.\\w+)([^.]*)$\n\t\t\n\t\t// old - problem: get confused with dots in paths. e.g. http://www.yiiframework.com/doc/guide/1.1/en\n\t\t//%^(?:(https?|ftp|file)://)?([a-z0-9-]+(?:\\.[a-z0-9-]+)+)?(.*?)?(?:(\\w+\\.\\w+)([^.]*))?$%i\n\t\t\n\t\t// new version\n\t\t//^(?:(https?|ftp|file)://)?([a-z0-9-]+(?:\\.[a-z0-9-]+)+)?(.*?)?(?:(\\w+\\.\\w+)((?:#|\\?|$)(?:[^.]*)))?$\n\t\t\n\t\t$arr = $this->regex('%^(?:(https?|ftp|file)://)?([a-z0-9-]+(?:\\.[a-z0-9-]+)+)?(.*?)?(?:(\\w+\\.\\w+)((?:#|\\?|$)(?:[^.]*)))?$%i', $url);\n\t\treturn array('link' => $arr[0], 'schema'=>$arr[1], 'domain'=>$arr[2], 'path'=>$arr[3], 'file'=>$arr[4], 'query'=>$arr[5]);\n\t}", "title": "" }, { "docid": "7ac5046159b0764ec4da819eb90a4379", "score": "0.5605182", "text": "public static function getUrlAndArgs($url)\n {\n $ret = array('url' => null, 'args' => []);\n $parts = parse_url($url);\n\n // PHP does not properly parse a straight hostname e.g. 'www.foo.com' as a URL.\n if ((count(array_keys($parts)) == 1) && (array_key_exists('path', $parts)))\n {\n $parts = parse_url('http://'.$url);\n }\n\n $ret['url'] = $parts['scheme'].'://'.$parts['host'];\n $ret['url'] .= array_key_exists('port', $parts) ? ':'.$parts['port'] : '';\n $ret['url'] .= array_key_exists('path', $parts) ? $parts['path'] : '';\n\n if (array_key_exists('query', $parts))\n {\n foreach (preg_split('/&/', html_entity_decode($parts['query']), -1, PREG_SPLIT_NO_EMPTY) as $kv)\n {\n $lkv = explode('=', $kv, 2);\n $k = self::fullDecode(array_shift($lkv));\n $v = '';\n if (count($lkv))\n {\n $v = self::fullDecode(array_shift($lkv));\n }\n $ret['args'][$k] = $v;\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "633d194f3b56ce74951fcf932f94e52c", "score": "0.5581384", "text": "private function _getParams()\n\t{\n\t\t$param = null;\n\t\t$params = array();\n\t\tif (array_key_exists('url', $_GET)) {\n\t\t\t$param = $_GET['url'];\n\t\t} else if (array_key_exists('url', $_REQUEST)) {\n\t\t\t$param = $_REQUEST['url'];\n\t\t}\n\t\tif ($param) {\n\t\t\t$param = rtrim($param, '/');\n\t\t\t$params = explode('/', $param);\n\t\t} else {\n\t\t\t$params[] = self::DEFAULT_CONTROLLER;\n\t\t\t$params[] = self::DEFAULT_METHOD;\n\t\t\t//PrintUtil::close(\"No Class to run this application because URL provided is wrong. The right URL should be 'index/run/123'.\");\n\t\t}\n\t\t//PrintUtil::display(\">> End \". __METHOD__);\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "e32862c17cc7c071f3f5ab72483b0f9a", "score": "0.55634576", "text": "function curl_get_array($url, $timeout) {\n\tglobal $debug;\n\t$url = add_token($url);\n\tif ($debug) {echo \"Calling: $url \\n\";}\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,$timeout); \n\tcurl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //timeout in seconds\n\t$result=curl_exec($ch);\n\tif(curl_errno($ch)) {\n\t\tif ($debug) {echo 'error:' . curl_error($ch) . \"\\n\";}\n\t} else {\n\t\tif (curl_status_200(curl_getinfo($ch))) {\n\t\t\treturn json_decode($result, true);\n\t\t} \t\t\n\t}\n\treturn array();\n}", "title": "" }, { "docid": "6e1ca9b1eb0e7fc8c3e39d986c66b96a", "score": "0.5561007", "text": "function parseURL($request, $response): array\n{\n\treturn [\n\t\t$request => is_array($response) ? array_map(function ($res) {\n\t\t\treturn $res;\n\t\t}, $response) : $response\n\t];\n}", "title": "" }, { "docid": "24797b8b2ee3c6840b10aed236baeb47", "score": "0.55556256", "text": "private function getParameters(&$url)\n {\n $this->parameters = $url ? array_values($url) : [];\n }", "title": "" }, { "docid": "834bafdaf10bc8a231fd6fcf8f79109f", "score": "0.55477756", "text": "protected function getUrls()\n {\n $inputFile = @fopen($this->inputFileName, 'r');\n if ($inputFile) {\n while (($domain = fgets($inputFile, 4096)) !== false) {\n $this->urls[] = $this->castUrl($domain);\n }\n if (!feof($inputFile)) {\n echo \"Error occurred during reading a file\\n\";\n die();\n }\n fclose($inputFile);\n } else {\n echo \"Input file not found\\n\";\n die();\n }\n }", "title": "" }, { "docid": "7d414a60557ee4480521af52cae31492", "score": "0.5546515", "text": "public function parseUrl(){\n\t\t\tif(isset($_GET['url'])){\n\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\tuse rtrim to trim this to protect against errors formed from additional trailing forward slashes,\n\t\t\t\t\twe need to sanitize by using filter_var, and option -Filter_sanitize_url (removes illegal characters from the string)\n\t\t\t\t\talso need to explode the passed URL to seperate each string by a particular variable in this case \"/\"\n\t\t\t\t */\n\t\t\t\treturn $url =explode('/',filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "aedbae843eedabd68ddd8dba35b84c23", "score": "0.55359995", "text": "public static function parseUrl(): ?array\n {\n $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https' : 'http';\n $url = parse_url(\"{$protocol}://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\", PHP_URL_PATH);\n \n if ($url) {\n $url = explode('/', filter_var(ltrim(rtrim($url, '/'), '/'), FILTER_SANITIZE_URL));\n }\n\n return $url;\n }", "title": "" }, { "docid": "42fe559398a84e8eb507b802206be4fa", "score": "0.5535719", "text": "public function getUrlFromText(){\n $result = array();\n if (preg_match_all($this->regEx['url'], $this->content, $data)) {\n foreach ($data[0] as $key => $val) {\n $result[] = $val;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "46beff74da1527ed826ef843b8c54daf", "score": "0.55151427", "text": "private function _get_url(){\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t \t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t \t$this->_url = explode('/', $url);\n\t\t\n\t}", "title": "" }, { "docid": "c6563021cac54e1b3738347b46cc7b7e", "score": "0.55108935", "text": "private function splitUrl() {\n\t\t\tif ( isset( $_GET[ 'url' ] ) ) {\n\t\t\t\t$url = rtrim($_GET[ 'url' ], '/');\n\t\t\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t\t\t$url = explode('/', $url);\n\t\t\t\t$this->url_controller = ( isset( $url[ 0 ] ) ? $url[ 0 ] : NULL );\n\t\t\t\t$this->url_action = ( isset( $url[ 1 ] ) ? $url[ 1 ] : NULL );\n\t\t\t\t$this->url_parameter_1 = ( isset( $url[ 2 ] ) ? $url[ 2 ] : NULL );\n\t\t\t\t$this->url_parameter_2 = ( isset( $url[ 3 ] ) ? $url[ 3 ] : NULL );\n\t\t\t\t$this->url_parameter_3 = ( isset( $url[ 4 ] ) ? $url[ 4 ] : NULL );\n\n\t\t\t\t/*\techo 'Controller: ' . $this->url_controller . '<br />';\n\t\t\t\t\techo 'Action: ' . $this->url_action . '<br />';\n\t\t\t\t\techo 'Parameter 1: ' . $this->url_parameter_1 . '<br />';\n\t\t\t\t\techo 'Parameter 2: ' . $this->url_parameter_2 . '<br />';\n\t\t\t\t\techo 'Parameter 3: ' . $this->url_parameter_3 . '<br />'; \n\t\t\t\texit;*/\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f731ebb44ff44109c5b8e4696ff88144", "score": "0.5509302", "text": "public function getUrls()\n {\n $urls = trim($this->helper->getConfigValueByPath(self::CONFIG_PATH_ADVANCED_URLS));\n\n $urls = $urls ? $this->helper->stringValidationAndConvertToArray($urls) : [];\n\n return array_merge($urls, $this->additionalURLs);\n }", "title": "" }, { "docid": "3e2b082a694de6d4af834372b11cee47", "score": "0.54916614", "text": "private function toParts(string $url): array {\n\t\treturn explode(self::DELIMITER, $url);\n\t}", "title": "" }, { "docid": "e69d33d040a382b3fb03891ff3a3d0d5", "score": "0.5488959", "text": "private function queryParams() {\n\t\tif (array_key_exists('query', $this->parsedUrl())) {\n\t\t\tparse_str($this->parsedUrl()['query'], $output);\n\t\t\treturn $output;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "e00c2524ce358f8e4ee258348f31d11d", "score": "0.54877865", "text": "function getUrlFromGet( ){\n global $a;\n if( isset( $_GET ) && is_array( $_GET ) ){\n foreach( $_GET as $mKey => $mValue ){\n if( strstr( $mKey, ',' ) ){\n $mKey = htmlspecialchars( $mKey );\n $aExp = explode( ',', $mKey );\n\n if( empty( $aExp[2] ) )\n $aExp[2] = 'pages';\n\n for( $i = 2; $i < count( $aExp ); $i++ ){\n $aActions['o'.( $i )] = $aExp[$i];\n if( $aActions['o'.( $i )] == 'pages' )\n $aActions['o'.( $i )] = null;\n } // end for\n\n if( is_numeric( $aExp[2] ) )\n $aExp[2] = 'pages';\n\n if( is_numeric( $aExp[0] ) && !is_numeric( $aExp[1] ) ){\n $iProduct = $aExp[0];\n $aExp[0] = $aExp[1];\n $aExp[1] = $iProduct;\n $aExp[2] = 'products';\n }\n\n $aActions['o1'] = $aExp[0];\n $aActions['f'] = $aExp[2];\n $aActions['a'] = $aExp[1];\n $aActions['sLink']= $mKey;\n $a = $aActions['a'];\n \n return $aActions;\n }\n }\n $a = null;\n return Array( 'f' => 'pages', 'a' => null, 'sLink' => 'pages' );\n }\n}", "title": "" }, { "docid": "2fd53f9a006934a4dbf35481bad4f722", "score": "0.5479491", "text": "function get_site_array(){\r\n\t$query = \"SELECT id, url FROM siteTable ORDER BY url ASC\";\r\n\tif($result = mysql_query($query)){\r\n\t\r\n\t\t$siteArray = array();\r\n\t\twhile($record = mysql_fetch_assoc($result)){\r\n\t\t\t$a = $record['id'];\r\n\t\t\t$b = $record['url'];\r\n\t\t\t$siteArray[$a] = $b;\r\n\t\t}\r\n\t\treturn $siteArray;\r\n\t}else{\r\n\t\treturn mysql_error();\r\n\t}\r\n}", "title": "" }, { "docid": "9ff6d34b3c7fd747bc4a071503784b67", "score": "0.546287", "text": "public function parseUrl()\n {\n if (isset($_GET[\"route\"])) {\n return explode(\"/\", filter_var(rtrim($_GET[\"route\"], \"/\"), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "73b03a93df6166029eef7c83c366b181", "score": "0.54627234", "text": "public function getUrlComponents(): array\n {\n $server = parse_url($_SERVER[\"REQUEST_URI\"]);\n $path = trim($server['path'], \"/\");\n\n return \"\" !== $path\n ? explode('/', $path)\n : [];\n }", "title": "" }, { "docid": "5e521c88688cc768d366de641f09201b", "score": "0.54603434", "text": "function getUrl($html)\n {\n $html_input = $html->find(\"input\");\n $array_url = array();\n\n foreach ($html_input as $as) {\n $array_url[$as->attr[\"name\"]] = $as->attr[\"value\"];\n // if($as->attr[\"name\"] == \"scid\" || $as->attr[\"name\"] == \"dv:res\" || $as->attr[\"name\"] == \"dv:msgid\" || $as->attr[\"name\"] == \"dv:svr\"|| $as->attr[\"name\"] == \"dv:svrmgr\" || $as->attr[\"name\"] == \"dv:queue\" || $as->attr[\"name\"] == \"dv:count\"){\n //\n // if($as->attr[\"name\"] == \"scid\"){\n // $array_url[] = $as->attr[\"name\"] .\"=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:res\"){\n // $array_url[] = \"r=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:msgid\"){\n // $array_url[] = \"i=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:svr\"){\n // $array_url[] = \"s=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:svrmgr\"){\n // $array_url[] = \"m=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:queue\"){\n // $array_url[] = \"q=\".$as->attr[\"value\"];\n // }\n // if($as->attr[\"name\"] == \"dv:count\"){\n // $array_url[] = \"c=\".$as->attr[\"value\"];\n // }\n // }\n }\n // $str_Url = \"http://\" . $this->config->item(\"challenge_host\").\"/b/btcq1_9_1_1?\";\n // $str_Url .= implode(\"&\" , $array_url);\n return $array_url;\n }", "title": "" }, { "docid": "d739bb86c41215b6e08a9444ffff42e3", "score": "0.54551", "text": "private function getRelativeURLS()\n {\n $dataArray = array(\n 'source' => array('url' => $this->source_url, 'metadata' => $this->getFilesFromMetadata($this->source_metadata) ),\n 'target' => array('url' => $this->target_url, 'metadata' => $this->getFilesFromMetadata($this->target_metadata) ),\n );\n\n // Log::addDebug('Source Metadata', $this->source_metadata);\n // Log::addDebug('Target Metadata', $this->target_metadata);\n\n $result = array();\n\n foreach($dataArray as $index => $item)\n {\n $result[$index] = array();\n $metadata = $item['metadata'];\n\n $baseurl = parse_url($item['url'], PHP_URL_PATH);\n $result[$index]['base'] = $baseurl; // this is the relpath of the mainfile.\n $baseurl = trailingslashit(str_replace( wp_basename($item['url']), '', $baseurl)); // get the relpath of main file.\n\n foreach($metadata as $name => $filename)\n {\n $result[$index][$name] = $baseurl . wp_basename($filename); // filename can have a path like 19/08 etc.\n }\n\n }\n // Log::addDebug('Relative URLS', $result);\n return $result;\n }", "title": "" }, { "docid": "a07af6d32e298c80b69b03a741e543a8", "score": "0.5454396", "text": "function get_url_segments(string $url = null): array|null\n{\n $path = func_num_args() ? get_url_path($url) : get_url_path();\n if (!$path) {\n return null;\n }\n\n $ret = [];\n $tmp = preg_split('~/+~', $path, -1, 1);\n\n foreach ($tmp as $i => $cur) {\n // Push index next (skip 0), so provide a (1,2,3) like array.\n $ret[$i + 1] = $cur;\n }\n\n return $ret;\n}", "title": "" }, { "docid": "5e0de91e48ddac1fa645e4ab2093c3cd", "score": "0.5444115", "text": "public function toArray()\n {\n return array_merge(\n parent::toArray(),\n array(\n 'uri' => $this->getUri()\n )); \n }", "title": "" }, { "docid": "1f6f4c88987862b520678792e6cd066d", "score": "0.54426265", "text": "private function _getUrl() {\n $url = isset($_GET['url']) ? $_GET['url'] : null; //getting paramiters from url via htaccess\n $url = trim($url, '/'); //removing additional '/ ' from url\n $url = filter_var($url, FILTER_SANITIZE_URL); //removing unnecessory entries in url(like \\%/) \n $this->_url = explode(\"/\", $url); //deviding url into parts with '/'\n }", "title": "" }, { "docid": "5bc168f531b0afccf72c15192428e835", "score": "0.54393893", "text": "private function splitUrl($url)\n {\n $grav = Grav::instance();\n $config = $grav['config'];\n\n // basic url parsing\n $pieces = parse_url($url);\n\n // split query-string if present\n if(isset($pieces['query']) && is_string($pieces['query']))\n {\n $query = [];\n parse_str($pieces['query'], $query);\n $pieces['query'] = $query;\n }\n\n // shave of Grav-Uri Params if present\n list($path, $params) = $this->splitParams($pieces['path'], $config->get('system.param_sep'));\n if(count($params) > 0)\n {\n $pieces['path'] = $path;\n $pieces['params'] = $params;\n }\n\n return $pieces;\n }", "title": "" }, { "docid": "32ebef1d8310a0957817619292eda768", "score": "0.5429443", "text": "protected function _getUrlsetList($url)\n\t{\n\t\t$simple_xml = $this->_getSimpleXmlElement($url);\n\t\t$urls = array($url);\n\t\t\n\t\tif (\\SitemapParser\\Rule\\Sitemapindex::check($simple_xml))\n\t\t\t$urls = $this->_getUrlOfSitemapindex($simple_xml);\n\t\t\n\t\treturn $urls;\n\t}", "title": "" }, { "docid": "32dc70914e3d4a2f4d8edc3abf3ce8ff", "score": "0.5423862", "text": "public function get() {\nif(isset($_GET['url'])) {\n\n$url = rtrim($_GET['url'], '/');\n$url = filter_var($url, FILTER_SANITIZE_URL);\n$url = explode('/', $url);\nreturn $url;\n}\n}", "title": "" }, { "docid": "9031e814972917da9cdbbb8bc9dedcaf", "score": "0.54113954", "text": "public static function getQueryStrings( $url ){\n $params = explode( '?', $url );\n\n if( count( $params ) > 1 ){\n $params = end( $params );\n $relations = explode( '&', $params );\n\n $queries = array();\n\n foreach( $relations as $relation ){\n $camps = explode( '=', $relation );\n $queries[ $camps[0] ] = $camps[1];\n }\n }else{\n $queries = array();\n }\n\n return $queries;\n }", "title": "" }, { "docid": "c59ef26ea38b2ab0c0f0ccc890eaec60", "score": "0.540666", "text": "public function getRedirects() : array {}", "title": "" }, { "docid": "38ab222fa1cc7499ea4d50319135af52", "score": "0.53995174", "text": "function load_items ()\n{\n\t\n\t$myArray = array();\n\t$mypages = $_GET[\"pages\"];\n\tif ( $mypages == NULL || $mypages == \"\")\n\t\t{ \n\t\t\treturn $myArray;\n\t\t}\n\t\n\n\ttry {\n\t\tif (is_file(const_path.'pages/'.$mypages.'/masteritem.json'))\n\t\t{\n\t\t\t$myFile = file_get_contents(const_path.'pages/'.config_pages.'/masteritem.json');\n\t\t\t$Items1 = str_replace('[','',$myFile);\n\t\t\t$Items1 = str_replace(']','',$Items1);\n\t\t\t$Items1 = str_replace(\"\\\"\",'',$Items1);\n\t\t\t$Items2=explode(\",\",$Items1);\n\t\t\t\n\t\t\tforeach ($Items2 as $key) { \n\t\t\t\t$myArray[trim(explode('|',$key)[0])] = trim(explode('|',$key)[1]);\n\t\t\t\t}\n\t\t}\n\t\t\n\t}\n\tcatch (Exception $e) {\n\t\t$myArray = NULL;\n\t}\n\t\n return $myArray;\n}", "title": "" }, { "docid": "13149577bd9de573d6aac5cb4226e192", "score": "0.5398455", "text": "public static function splitParams(){\n $temp = array();\n if(isset($_GET)){\n foreach ($_GET as $key => $value) {\n $temp[] = $key;\n $temp[] = $value;\n }\n }\n return $temp;\n }", "title": "" }, { "docid": "bb5f97d3545916b72d863408914c5e39", "score": "0.539809", "text": "static function extractUrlParts($url) {\n $params = array();\n $parts = parse_url($url);\n if (isset($parts['query'])) {\n parse_str($parts['query'], $params);\n }\n $parts['queryparams'] = $params;\n return $parts;\n }", "title": "" }, { "docid": "bb5f97d3545916b72d863408914c5e39", "score": "0.539809", "text": "static function extractUrlParts($url) {\n $params = array();\n $parts = parse_url($url);\n if (isset($parts['query'])) {\n parse_str($parts['query'], $params);\n }\n $parts['queryparams'] = $params;\n return $parts;\n }", "title": "" }, { "docid": "8db9ebc14ff1e6bdc6788bdf54d39b40", "score": "0.53859776", "text": "function getAllData() {\n\t\tglobal $allData;\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tarray_push($allData, $key);\n\t\t\t}\n\t}", "title": "" }, { "docid": "14a60dc6781bd689a3944ed388ec4c86", "score": "0.5380269", "text": "private static function parseGoogleBookQuery(string $url): array\n {\n $queryData = parse_url($url, PHP_URL_QUERY); // after ?\n $fragmentData = parse_url($url, PHP_URL_FRAGMENT); // after #\n // queryData precedence over fragmentData\n parse_str(implode('&', [$fragmentData, $queryData]), $val);\n\n return $val;\n }", "title": "" }, { "docid": "966d05a9654da0779bbb6bb52a17e156", "score": "0.5374367", "text": "public function getParams($url, $vars){\n\t\t$params = array();\n\t\t\n\t\tparse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );\n\t\tif(isset($vars)){\n\t\t\tforeach($vars as $var){\n\t\t\t\tif(isset($my_array_of_vars[$var])){\n\t\t\t\t\t$params[$var] = $my_array_of_vars[$var];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $params;\t\n\t}", "title": "" }, { "docid": "3f6943f812c47446713c54ec03391bff", "score": "0.53691274", "text": "public function dataCreatingAUrl()\n {\n return array(\n array('getScheme', 'http'),\n array('getUsername', 'john'),\n array('getPassword', 'secret'),\n array('getPath', '/over/there/index.dtb'),\n array('getPort', '8042'),\n array('getQueryString', 'type=animal&name=narwhal'),\n array('getParameters', array( 'type' => 'animal', 'name' => 'narwhal')),\n array('getParamString', 'type=animal&name=narwhal'),\n array('getQuery', array( 'type' => 'animal', 'name' => 'narwhal')),\n array('getFragment', 'nose'),\n array('__toString', 'http://john:[email protected]:8042' .\n '/over/there/index.dtb?' .\n 'type=animal&name=narwhal#nose')\n );\n }", "title": "" }, { "docid": "feaf72abd7498470e97a353164e6e32c", "score": "0.53688437", "text": "protected function getUrls() {\n\t\t$client = new Client();\n\t\t$crawler = $client->request('GET', $this->url);\n\t\t//get nodes with a requested category\n\t\t$category = $crawler->filter('.category')->reduce(function($node) {\n\t\t\tif (strpos($node->text(), $this->category) !== false) return true;\n\t\t\telse return false;\n\t\t});\n\n\t\t//get a links from this category, we have to go up to parents and down to post\n\t\t$urls = array();\n\t\t$category->each(function($node) use (&$urls) {\n\t\t\t$article = $node->parents()->filter('article');// {\n\t\t\t$entry = $article->children()->filter('.entry-summary a');\n\t\t\t$entry->each(function($node, $i) use (&$urls) {\n\t\t\t\t$urls[] = array('url' => $node->attr('href'),\n\t\t\t\t\t\t\t\t'link' => $node->text()\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t\treturn $urls;\n\t}", "title": "" }, { "docid": "7f3d3fd5e8e5f0ca41204b72e71cc09b", "score": "0.5356056", "text": "public function multi($urlArr)\n {\n $multiCurl = [];\n $result = [];\n $mhandle = curl_multi_init(); // multiple handle\n foreach ($urlArr as $i => $url) {\n $multiCurl[$i] = curl_init();\n curl_setopt($multiCurl[$i], CURLOPT_URL, $url);\n curl_setopt($multiCurl[$i], CURLOPT_HEADER, 0);\n curl_setopt($multiCurl[$i], CURLOPT_RETURNTRANSFER, 1);\n curl_multi_add_handle($mhandle, $multiCurl[$i]);\n }\n\n $index = null;\n do {\n curl_multi_exec($mhandle, $index);\n } while ($index > 0);\n\n // Get content and remove handles\n foreach ($multiCurl as $k => $ch) {\n $result[$k] = json_decode(curl_multi_getcontent($ch), true);\n curl_multi_remove_handle($mhandle, $ch);\n }\n // close\n curl_multi_close($mhandle);\n\n return $result;\n }", "title": "" }, { "docid": "915b2287c360cd7434ca4f882d6c949d", "score": "0.5351238", "text": "function convertUrlQuery($query)\n{ \n $queryParts = explode('&', $query); \n \n $params = array(); \n foreach ($queryParts as $param) \n { \n $item = explode('=', $param); \n $params[$item[0]] = $item[1]; \n } \n \n return $params; \n}", "title": "" }, { "docid": "e166c95f61e1d46546a489c7c31d5b8c", "score": "0.53307456", "text": "public function getURLs()\n {\n // Not loaded? You get nothing.\n if (!$this->loaded) return array();\n\n $urls = array();\n foreach (self::$opensearch_ns as $ns) {\n\n // Look for URLs under a namespace\n $c = $this->doc->children($ns);\n if (count($c->Url) == 0) continue;\n\n // Try collection URLs as a plain name/value array.\n foreach ($c->Url as $idx => $c_url) {\n $url = array();\n $attrs = $c_url->attributes();\n foreach (array('type', 'method', 'template') as $name) {\n $url[$name] = (string)$attrs->{$name};\n }\n $urls[] = $url;\n }\n\n }\n return $urls;\n }", "title": "" }, { "docid": "0b901476c1ef394a80e6d2744a5c31c6", "score": "0.5326003", "text": "public function generateDataForTest()\n {\n return array(\n array(\n array(\n 'http://example.com/',\n 'http://example.com/?ref=somewhere',\n 'http://example.com/?uid=12345',\n 'http://test.net/',\n 'http://test.net/?ref=somewhere',\n 'http://test.net/?uid=12345',\n 'http://somewhere.tld/?param=unknown'\n )\n )\n );\n }", "title": "" }, { "docid": "c1012e6a51c6ee6ec363c788918610b2", "score": "0.5322946", "text": "public function implodeArrayForUrlDataProvider() {}", "title": "" }, { "docid": "a1eb2f91f8781a99e9307c669e5f4cf8", "score": "0.53136414", "text": "public static function GOTURL(){\r\r\t\tif(isset($_GET['r'])){\r\r\t\t\t$url_str = str_replace('%1yt', '=', $_GET['r']);\r\r\t\t\t$urls = base64_decode($url_str);\r\r\t\t\treturn explode('/', ucwords($urls));\r\r\t\t}else{\r\r\t\t\treturn ['Site','index'];\r\r\t\t}\r\r\t}", "title": "" }, { "docid": "e8861cdf3e171615b6156dfd1af3fd33", "score": "0.5309973", "text": "function GetAllLinks()\n {\n $referer;\n $linkarray=array();\n\n for($a=0;$a<count($this->gLinkExtractor_linkRecipient);$a++)\n { \n $referer=parse_url($this->gLinkExtractor_linkRecipient[$a]);\n \n if(empty($referer['scheme']))\n {\n \n if(!empty($referer['path']))\n {\n $linkarray[$a]=\"http://\";\n if(empty($referer['host']))\n {\n $linkarray[$a].=$this->mHostName;\n }\n else\n {\n if(!empty($referer['path']))\n {\n $linkarray[$a].=$referer['host'];\n }\n }\n if(!empty($referer['path']))\n {\n $linkarray[$a].='/'.str_replace(\"./\",\"\",$referer['path'].$referer['query']);\n }\n }\n }else\n {\n \n if(empty($referer['path']))\n {\n $linkarray[$a].=\"http://\".$referer['host'];\n }\n else\n {\n $linkarray[$a].=\"http://\".$referer['host'].$referer['path'];\n }\n \n }\n } \n $this->gLinkExtractor_linkRecipient=$linkarray;\n return $this->gLinkExtractor_linkRecipient;\n }", "title": "" }, { "docid": "fd6d290d13937db7b295e28efe7ebd3d", "score": "0.5306844", "text": "static protected function __get_items($url){\n\t\tif (!array_key_exists($url, self::$feeds)){\n\t\t\tself::$feeds[$url] = self::__new_feed($url);\n\t\t}\n\t\tif (!self::$feeds[$url]['failed']){\n\t\t\treturn self::$feeds[$url]['simplepie']->get_items();\n\t\t}else{\n\t\t\treturn array();\n\t\t}\n\n\t}", "title": "" }, { "docid": "46245cc33cc74e43e0cc8355d65033b6", "score": "0.5305016", "text": "function urlArray(string $path, array $params = []): array\n{\n $url = Router::parseRoutePath($path);\n $url += [\n 'plugin' => false,\n 'prefix' => false,\n ];\n\n return $url + $params;\n}", "title": "" }, { "docid": "ad0c88cab7690b698b8e252f2d051883", "score": "0.52901137", "text": "public function constructProvider()\n {\n return [\n ['http://www.foo.bar', 'http://www.foo.bar/'],\n ['https://www.foo.bar/path/to/target', 'https://www.foo.bar/path/to/target/'],\n ['http://www.foo.bar/path/', 'http://www.foo.bar/path/']\n ];\n }", "title": "" }, { "docid": "6a32cea373e0ce52d1f50278d516c921", "score": "0.5278276", "text": "private static function init() {\n\t\treturn self::parseUrl();\n\t}", "title": "" }, { "docid": "2fa6a5af08210cc2d02ce3f295642248", "score": "0.52772343", "text": "public function url( string $url ): array {\n $headers = [];\n $headers[ 'Accept' ] = 'application/json';\n if ( !$this->accessToken ):\n throw new \\Exception( \"You need to login and get an access token before you can fire off this function.\" );\n endif;\n $headers[ 'Authorization' ] = 'Bearer ' . $this->accessToken;\n $options = [\n 'headers' => $headers,\n ];\n $guzzleClient = new Client( $options );\n $response = $guzzleClient->request( 'GET', $url );\n $body = $response->getBody();\n $robinhoodResponse = \\GuzzleHttp\\json_decode( $body->getContents(), TRUE );\n return $robinhoodResponse;\n }", "title": "" }, { "docid": "b5b1010de19e7cbc644fe60766683632", "score": "0.5276791", "text": "function get_links($url) {\n $xml = new DOMDocument();\n\n // Load the url's contents into the DOM\n $xml->loadHTMLFile($url);\n\n // Empty array to hold all links to return\n $links = array();\n\n //Loop through each <a> tag in the dom and add it to the link array\n foreach($xml->getElementsByTagName('a') as $link) {\n $links[] = array('url' => $link->getAttribute('href'), 'text' => $link->nodeValue);\n }\n\n //Return the links\n return $links;\n}", "title": "" }, { "docid": "9faf5c81f658f5189a05a27c4c35fb47", "score": "0.5272422", "text": "public function getURL(\n string $url,\n $ch\n ) : array {\n curl_setopt( $ch, CURLOPT_URL, $url );\n\n // $this->applyDefaultOptions( $ch );\n\n $response = [\n 'body' => curl_exec( $ch ),\n 'ch' => $ch,\n 'code' => curl_getinfo( $ch, CURLINFO_RESPONSE_CODE ),\n 'effective_url' => curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL ),\n ];\n\n return $response;\n }", "title": "" }, { "docid": "56b7248f0c246a363ff82865e34be16a", "score": "0.5269122", "text": "function getDataNewRelic($url) {\n $json = @file_get_contents($url);\n return json_encode($json);\n}", "title": "" }, { "docid": "7a7dbb179148432fd99b1dc238c2b723", "score": "0.52682763", "text": "function _extract_urls($input) {\n $input = strip_tags($input, '<a>');\n if (preg_match_all('/<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>/siU', $input, $matches, PREG_SET_ORDER)) {\n return $matches;\n }\n\n return [];\n}", "title": "" }, { "docid": "c647091e4085f1e5e7d9733bd79c7cb4", "score": "0.5265238", "text": "private function getLinkTypes()\n {\n $uri = $this->request->getUri();\n $url_parts = parse_url($uri);\n\n if(empty($url_parts['query'])){\n $url_data_array = array();\n } else {\n parse_str($url_parts['query'], $url_data_array);\n }\n\n $urls = array();\n for ($i=0; $i < 10; $i++) {\n $url_data_array['type'] = $i;\n $url_query_new = http_build_query($url_data_array);\n if( ! empty($url_query_new)){\n $url_query_new = '?' . $url_query_new;\n }\n\n $url_new = $url_parts['scheme'] . '://' . $url_parts['host'] . $url_parts['path'] . $url_query_new;\n\n $urls[] = array(\n 'name' => $i,\n 'url' => $url_new\n );\n }\n\n return $urls;\n }", "title": "" } ]
b635910a26740ef5d8e689b61d3b1a0b
Retrieves a list of models based on the current search/filter conditions.
[ { "docid": "5b76e919c6bcb7ac922620b35509a401", "score": "0.0", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('author',$this->author,true);\n\t\t$criteria->compare('authorid',$this->authorid);\n\t\t$criteria->compare('cid',$this->cid);\n\t\t$criteria->compare('flag',$this->flag);\n\t\t$criteria->compare('imgurl',$this->imgurl,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\t\t$criteria->compare('summary',$this->summary,true);\n\t\t$criteria->compare('pinyin',$this->pinyin,true);\n\t\t$criteria->compare('initial',$this->initial,true);\n\t\t$criteria->compare('recommendlevel',$this->recommendlevel);\n\t\t$criteria->compare('favoritenum',$this->favoritenum);\n\t\t$criteria->compare('chaptercount',$this->chaptercount);\n\t\t$criteria->compare('wordcount',$this->wordcount);\n\t\t$criteria->compare('lastchapterid',$this->lastchapterid);\n\t\t$criteria->compare('lastchaptertitle',$this->lastchaptertitle,true);\n\t\t$criteria->compare('lastchaptertime',$this->lastchaptertime);\n\t\t$criteria->compare('alllikenum',$this->alllikenum);\n\t\t$criteria->compare('monthlikenum',$this->monthlikenum);\n\t\t$criteria->compare('weeklikenum',$this->weeklikenum);\n\t\t$criteria->compare('daylikenum',$this->daylikenum);\n\t\t$criteria->compare('lastliketime',$this->lastliketime);\n\t\t$criteria->compare('allclicks',$this->allclicks);\n\t\t$criteria->compare('monthclicks',$this->monthclicks);\n\t\t$criteria->compare('weekclicks',$this->weekclicks);\n\t\t$criteria->compare('dayclicks',$this->dayclicks);\n\t\t$criteria->compare('lastclicktime',$this->lastclicktime);\n\t\t$criteria->compare('hascover',$this->hascover);\n\t\t$criteria->compare('createtime',$this->createtime);\n\t\t$criteria->compare('updatetime',$this->updatetime);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" } ]
[ { "docid": "ff5e87c8f9141be857ec5fd136de381a", "score": "0.6968434", "text": "function _getFilteredListOfModels() {\n\t\t\n\t\t// If we have a whitelist then we will use that. If there is no whitelist,\n\t\t// then we will start with the complete list of models in the application.\n\t\tif (Configure::read('AdHocReporting.modelWhitelist') == false) {\n\t\t\t$models = App::objects('Model');\n\t\t} else {\n\t\t\t$models = Configure::read('AdHocReporting.modelWhitelist');\n\t\t\t// Note, some of the whitelist entries might not be string values,\n\t\t\t// but instead array values of whitelisted associated models. In these\n\t\t\t// cases, the actual model name is the *index* not the *value*. Let's\n\t\t\t// get rid of the 2nd level arrays, and simply include the model name.\n\t\t\tforeach ($models as $index => $value) {\n\t\t\t\tif (!is_numeric($index)) {\n\t\t\t\t\tunset($models[$index]);\n\t\t\t\t\t$models[] = $index;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// remove any models that are not in the explicit list.\n\t\t$explicitList = Configure::read('AdHocReporting.modelFieldExplicitList');\n\t\tif (!empty($explicitList)){ // only do this if the list is defined.\n\t\t\tforeach ($models as $index => $model) {\n\t\t\t\tif (!isset($explicitList[$model])) {\n\t\t\t\t\tunset($models[$index]);\n\t\t\t\t}\n\t\t\t}\t\t\t\t \n\t\t}\n\t\t\n\t\t\n\t\t// Now remove any models from the list that also exist on the blacklist\n\t\t$modelBlacklist = Configure::read('AdHocReporting.modelBlacklist');\n\t\tif ($modelBlacklist !== false) {\n\t\t\tforeach ($models as $index => $model) {\n\t\t\t\tif (in_array($model, $modelBlacklist)) {\n\t\t\t\t\tunset($models[$index]);\n\t\t\t\t}\n\t\t\t}\t\t\t\t \n\t\t}\n\n\t\t// Let's alphabetize the list for consistency, then return\n\t\t// an array with the indexes and the values the model names.\n\t\t// TODO: Replace the values with more human-friendly values\n\t\tsort($models);\n\t\t\n\t\treturn array_combine($models, $models);\n\t}", "title": "" }, { "docid": "62787935225734ac47f2b6936ad56864", "score": "0.6884382", "text": "function get($model_conditions);", "title": "" }, { "docid": "0a86c13e7614afa22264dc1bbc9773c5", "score": "0.6418356", "text": "protected function fetchCollection() {\n\t\t$finder = $this->getModelFinder();\n\t\t$models = $finder->findAll($this->composeSearchCriteria());\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "2c6c1101ff3f8d3ecdc9baedf810caf2", "score": "0.63896346", "text": "public function getModelsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "f94dd60012bd28393ba9d53264ec9733", "score": "0.6384042", "text": "public function getAll()\n {\n return $this->models;\n }", "title": "" }, { "docid": "2604afd23a3450168653ca8c3eb36af8", "score": "0.6290847", "text": "public static function all() {\n self::__constructStatic();\n $models = [];\n $rows = self::$database->read(self::$query);\n foreach($rows as $row) {\n $models[] = self::return($row);\n }\n return $models;\n }", "title": "" }, { "docid": "e934c065e0be3a52c52af5642f67a9c2", "score": "0.62837434", "text": "public function all()\n\t{\n\t\t$this->runRelations();\n\t\t$this->delete();\n\t\t$this->filtering();\n\n\t\t$this->model = $this->joins();\n\n\t\t$this->sorting();\n\t\t$this->paging();\n\t\t$this->fields();\n\n\t\treturn $this->model;\n\t}", "title": "" }, { "docid": "a00eba843476a646d4a747df8570150e", "score": "0.6264111", "text": "public function get() {\n\t\tif (! $this->hasModel) {\n\t\t\treturn $this->get_results ();\n\t\t}\n\t\t\n\t\t$modelClass = $this->model;\n\t\t$results = static::wpdb ()->get_results ( $this->sql (), ARRAY_A );\n\t\t$models = [ ];\n\t\tforeach ( $results as $result ) {\n\t\t\t$models [] = new $modelClass ( $result );\n\t\t}\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "905fb41c0bfb6476c955da1b1a70274f", "score": "0.62427187", "text": "protected function getItems($model)\n {\n // get filters from query string\n $queryData = $this->qs->getQueryData();\n\n $model = $model->orderBy($queryData['sort'], $queryData['order']);\n\n if (isset($queryData['query'])) {\n // TODO: use $model = $model->setQuery($queryData['query']);\n $model = $model->where('name', $queryData['query']);\n }\n if (isset($queryData['filters']) && !empty($queryData['filters'])) {\n foreach ($queryData['filters'] as $key => $value) {\n $model = $model->where($key, $value);\n }\n }\n\n // Create limits based on current page and items per page\n $this->paging->setNumResults($model->count());\n\n $model = $model->offset(($this->paging->getCurrentPage() - 1) * $this->paging->getLimit());\n $model = $model->limit($this->paging->getLimit());\n\n return $model->get();\n }", "title": "" }, { "docid": "aff6b90e14b229db57586253a29926fc", "score": "0.62052214", "text": "public function getList($filter = null)\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "cbc9977ae08af4e7189a7be7bbe2cfb7", "score": "0.6167166", "text": "protected function getSearchResults()\n {\n $client = new ServiceApiClient();\n\n return $client->search(new SearchParameters($this->getParam(self::PARAM_FILTER_CONDITIONS)));\n }", "title": "" }, { "docid": "f381aa6aee72428a4ab51b1cb97a7fe1", "score": "0.61407083", "text": "public function getModelListQuery()\n {\n $query = parent::getModelListQuery();\n\n if (! is_null($type = $this->getEntryType())) {\n $query->type($type);\n }\n\n return $query;\n }", "title": "" }, { "docid": "4c5679b9f9b1fd388b8f8304cedfba79", "score": "0.6104025", "text": "public function actionIndex()\n {\n $searchModel = new search();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $dataProvider->getModels();\n }", "title": "" }, { "docid": "54121bea34f4145dd08e85495c1067b6", "score": "0.6051881", "text": "private function responsableSearch()\n {\n return [\n 'id',\n 'company',\n 'first_name',\n 'last_name',\n 'email'\n ];\n }", "title": "" }, { "docid": "293f6aa3c6d2d9354fa8adf22df79b4a", "score": "0.602999", "text": "public function listmodels() {\n if(is_array($this->models)) return array_keys($this->models);\n else return [];\n }", "title": "" }, { "docid": "53438dd83b6e8c123978fd85b117385f", "score": "0.6017067", "text": "public function getModels(){ }", "title": "" }, { "docid": "61b6dc0315b300d4bca8ac8beb5461ef", "score": "0.60072285", "text": "protected function get_search_results($condition = NULL) {\n return $this->get_all($condition);\n }", "title": "" }, { "docid": "e6acd4f8112ce3d64d2a99b9f487c4ca", "score": "0.5971537", "text": "public function getAll(){\n\t\treturn $this->filter();\n\t}", "title": "" }, { "docid": "457a1b728a5d8bc88d8c9154bc90f2b9", "score": "0.596549", "text": "public function search()\n {\n $search = new Search;\n return array_merge(\n $search->makeSoftDeletesCondition($this),\n $this->search ?: []\n );\n }", "title": "" }, { "docid": "782d0cfce306c2653d0cb745cde43e76", "score": "0.59630024", "text": "public static function getAll(){\n return Model::factory(__CLASS__)\n ->order_by_asc('ordering')\n ->order_by_asc('conference_name')\n ->find_many();\n }", "title": "" }, { "docid": "3ae9aaf0dd39e0f1f045a286b61ac99b", "score": "0.59608746", "text": "public function listAction()\n {\n $limit = $this->params('limit', 10);\n $offset = $this->params('offset', 0);\n $order = $this->params('order');\n $query = $this->params('query');\n $field = $this->params('field');\n\n $order = $this->splitString($order);\n $fields = $this->splitString($field);\n $query = $this->canonizeQuery($query);\n\n $where = $this->canonizeCondition($query);\n $model = $this->model($this->modelName);\n $select = $model->select();\n $select->where($where);\n $select->limit($limit);\n if ($fields) {\n $select->columns($fields);\n }\n if ($offset) {\n $select->offset($offset);\n }\n if ($order) {\n $select->order($order);\n }\n $rowset = $model->selectWith($select);\n $result = [];\n foreach ($rowset as $row) {\n $result[] = $row->toArray();\n }\n\n return $result;\n }", "title": "" }, { "docid": "fc1e3e81809d54c346f5f0ca38e6636c", "score": "0.59543914", "text": "public function getSearchFilter();", "title": "" }, { "docid": "b89156c080ded80122ad0a1dfa5040e2", "score": "0.59543717", "text": "public function getAllFilter() {\r\n\t\t\r\n\t\t$criteria = $this->generateFilterCriteria();\r\n\t\treturn $this->getAll($criteria);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8e784cf47c5838efe6b8ed7cbacf8204", "score": "0.5929273", "text": "public function search()\n {\n $per_page = request()->has('per_page') ? request()->input('per_page') : 20;\n\n $sort = request()->get('sort') ? request()->get('sort') : \"created_at-desc\";\n $sort = explode(\"-\", $sort);\n\n $products = $this->joined($sort);\n\n if (request()->has('brands') && request()->input('brands') != \"\")\n $products->whereIn('brand_id', explode(\",\", request()->input('brands')));\n\n\n if (request()->has('categories') && request()->input('categories') != \"\")\n $products->whereIn('category_id', explode(\",\", request()->input('categories')));\n\n\n if (request()->has('search_term')) {\n $products->where('product_name', 'LIKE', '%' . request()->input('search_term') . '%');\n }\n return $products->paginate($per_page);\n }", "title": "" }, { "docid": "dac9ea010c4f717156aaab8514a67d96", "score": "0.5917677", "text": "protected function getFiltered() {\n $model = $this->getModel();\n\n $model = new $model();\n\n if ($this->isSoftDeletable() && $this->showTrashed) {\n $model = $model->withTrashed();\n }\n\n return $model;\n }", "title": "" }, { "docid": "ad6a07db9d54325c517aa09677713dc6", "score": "0.5916246", "text": "protected function _getFiltered($params = []){\n $sql = $this->database->buildQuery($this->model, $params);\n\n return $this->database->fetch($sql, $this->model);\n }", "title": "" }, { "docid": "d025e31bfdd1e8d38c3124f404a827f1", "score": "0.5911459", "text": "public function allFiltered();", "title": "" }, { "docid": "4920d7fa01b8b1443da1e208a85af164", "score": "0.5910022", "text": "function filterConditions(&$Model, $search) {\n\t\t$searchType = $this->settings[$Model->alias]['searchType'];\n\t\t$searchFields = $this->settings[$Model->alias]['searchFields'];\n\t\t\n\t\tforeach ($searchFields as $fieldName) {\n\t\t\tif (!strstr($fieldName, '.')) {\n\t\t\t\t$fieldName = $Model->alias . '.' . $fieldName;\n\t\t\t}\n\t\t\tif ($searchType == 'partial') {\n\t\t\t\t$conditions[$fieldName . ' LIKE'] = '%' . $search . '%';\n\t\t\t} elseif ($searchType == 'phrase') {\n\t\t\t\t$conditions['AND'] = array(\n\t\t\t\t\t$fieldName . ' LIKE' => '%' . $search . '%',\n\t\t\t\t\t$fieldName . ' REGEXP' => '[[:<:]]' . $search . '[[:>:]]',\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$conditions[$fieldName] = $search;\n\t\t\t}\n\t\t}\n\t\treturn array('OR' => $conditions);\n\t}", "title": "" }, { "docid": "7f4d295337335181539f4a6eb13372e2", "score": "0.5900959", "text": "public function getWhere($conditions)\n {\n return $this->model->where($conditions)->latest()->limit(10)->get();\n }", "title": "" }, { "docid": "1c0d1d61d5c25ff2e568efe33520697a", "score": "0.5900803", "text": "private function findCachedModels()\n {\n if (!$this->shouldUseCache()) {\n return false;\n }\n\n $this->uniqueKeys = $this->sourceModel->getUniqueKeys();\n\n // fail immediately on unsupported query types\n if ($this->isUnsupportedQuery()) {\n return false;\n }\n\n $query = new SquirrelQuery($this->wheres, $this->sourceObjectDeletedAtColumnName());\n\n $searchingKey = $query->uniqueKeyString();\n $modelKeys = SquirrelCache::uniqueKeys($this->sourceModel);\n $cacheKeyPrefix = SquirrelCache::getCacheKeyPrefix(get_class($this->sourceModel));\n\n if (array_key_exists($searchingKey, $modelKeys)) {\n $cacheKeys = $query->cacheKeys($cacheKeyPrefix);\n\n if (empty($cacheKeys)) {\n return;\n }\n\n $models = [];\n foreach ($cacheKeys as $key) {\n $model = SquirrelCache::get($key);\n\n if ($model) {\n if ($deletedAt = $query->deletedAtObject()) {\n if (array_key_exists($deletedAt->column, $model)) {\n if ($deletedAt->value == SquirrelQueryWhere::WHERE_CLAUSE_TYPE_NULL\n && !empty($model[$deletedAt->column])) {\n // the query requires the deleted at column be empty\n return;\n }\n if ($deletedAt->value == SquirrelQueryWhere::WHERE_CLAUSE_TYPE_NOT_NULL\n && empty($model[$deletedAt->column])) {\n // the query requires the deleted at column have a value\n return;\n }\n } else {\n // the deleted at column could not be found, so we are not going to return anything\n return;\n }\n }\n\n $models[] = (object)$model;\n continue;\n }\n\n return;\n }\n\n return $models;\n }\n }", "title": "" }, { "docid": "5f8ed925e2b2bc99170c6d9bbdfa0126", "score": "0.58905786", "text": "private function beforeSearch() {\n\n\t\t$query = [];\n\t\t$model = $this->modelClass;\n\t\t$haystack = $this->request->query['haystack'];\n\n\t\tif (empty($this->searchArgs)) {\n\t\t\t$this->searchArgs = [$this->{$model}->displayField];\n\t\t} else {\n\t\t\t$fields = $this->searchArgs;\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$query['OR'][0][\"$field LIKE\"] = \"%$haystack%\";\n\t\t\t}\n\t\t}\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "f1c18d204a57689c44141d598be8755b", "score": "0.58724236", "text": "public function getAllModelsByMake($make);", "title": "" }, { "docid": "3ce5297c1f905ce5706f935774f5c44d", "score": "0.5860602", "text": "public function findAll($condition);", "title": "" }, { "docid": "b850baef3cd433b5bae835beef1b02b1", "score": "0.5852426", "text": "static function getDashboardModelList(){\n $all_model = app_class_with_interface(Model1ActionInterface::class, [AuthModel1::class, Model1::class]);\n return array_diff($all_model, self::$exclude_models);\n }", "title": "" }, { "docid": "405016c7b5687399b1adcda8c09fb7f6", "score": "0.58423656", "text": "public function getFilterQuery(array $options = array())\n {\n $default_options = ['check_referer' => true,\n 'keep_filter_actions' => ['index', 'add', 'copy', 'edit', 'view', 'delete'],\n 'auto_wildcard_string' => true];\n\n $options = array_merge($default_options, $options);\n\n $options['modelClass'] = isset($options['modelClass']) ? $options['modelClass'] : $this->controller->modelClass;\n\n list(, $alias) = pluginSplit($options['modelClass'], true);\n $options['alias'] = $alias;\n\n /*\n * Prepare Entity used to display search filters in the view\n */\n $this->prepareSearchEntity($options);\n\n /******/\n\n $filter_data = null;\n\n if($this->controller->request->is('post') || $this->controller->request->is('put'))\n {\n $filter_data = $this->controller->request->getData('Filter');\n }\n elseif($this->controller->request->is('get'))\n {\n $current_path = $this->getComparisonPath($this->controller->request);\n\n if($options['check_referer'])\n {\n if($this->filterMustBeCleared($options))\n {\n $this->clearStoredQuery($current_path);\n }\n else\n {\n $filter_data = $this->getStoredQuery($current_path, $options);\n }\n }\n else\n {\n $filter_data = $this->getStoredQuery($current_path, $options);\n }\n }\n\n /******/\n\n /**\n * @var Cake\\Database\\Query $query\n */\n $query = $this->controller->{$alias}->find();\n\n if(isset($options['contain']))\n {\n $query->contain($options['contain']);\n }\n\n /******/\n\n if(!empty($filter_data))\n {\n /*\n * Normalize $filter_data to get a flat array, even if some filters concern linked models\n */\n $flat_filter_data = [];\n foreach($filter_data as $fieldName => $value)\n {\n if(!is_array($value) || isset($value['__start__']) || isset($value['__end__']))\n {\n /*\n * Conditions on main model\n */\n\n $flat_filter_data[$alias] = isset($flat_filter_data[$alias]) ? $flat_filter_data[$alias] : array();\n\n $flat_filter_data[$alias][$fieldName] = $value;\n }\n else\n {\n /*\n * Conditions on linked model\n */\n $flat_filter_data[$alias . '.' . $fieldName] = isset($flat_filter_data[$alias . '.' . $fieldName]) ? $flat_filter_data[$alias . '.' . $fieldName] : array();\n\n foreach($value as $linked_model_fieldname => $linked_value)\n {\n if(!is_array($linked_value) || isset($linked_value['__start__']) || isset($linked_value['__end__']))\n {\n /*\n * Case of LinkedModels.title\n */\n $flat_filter_data[$alias . '.' . $fieldName][$linked_model_fieldname] = $linked_value;\n }\n else\n {\n $flat_filter_data[$alias . '.' . $fieldName . '.' . $linked_model_fieldname] = isset($flat_filter_data[$alias . '.' . $fieldName . '.' . $linked_model_fieldname]) ? $flat_filter_data[$alias . '.' . $fieldName . '.' . $linked_model_fieldname] : array();\n\n foreach($linked_value as $linked_model_2_fieldname => $linked_value_2)\n {\n if(!is_array($linked_value_2) || isset($linked_value_2['__start__']) || isset($linked_value_2['__end__']))\n {\n /*\n * Case of LinkedModels.LinkedModels.title\n */\n $flat_filter_data[$alias . '.' . $fieldName . '.' . $linked_model_fieldname][$linked_model_2_fieldname] = $linked_value_2;\n }\n else\n {\n throw new NotImplementedException(___('filtering on 3rd level related model is not implemented'));\n }\n }\n }\n }\n }\n }\n\n /******/\n\n foreach($flat_filter_data as $modelName => $conditions)\n {\n foreach($conditions as $fieldName => $value)\n {\n $has_value = false;\n\n if(!is_array($value))\n {\n if(!empty($value) || $value === '0')\n {\n $has_value = true;\n }\n }\n else\n {\n /*\n * Case of From - To\n */\n if(isset($value['__start__']) && (!empty($value['__start__']) || $value['__start__'] === '0'))\n {\n $has_value = true;\n }\n\n if(isset($value['__end__']) && (!empty($value['__end__']) || $value['__end__'] === '0'))\n {\n $has_value = true;\n }\n }\n\n if($has_value)\n {\n $schema = null;\n\n if(stripos($modelName, '.') !== false)\n {\n /*\n * Case of linked models\n */\n $modelNames = explode('.', $modelName);\n\n /**\n * @var Table $table\n */\n $table = null;\n\n for($i = 0; $i < count($modelNames); $i++)\n {\n $modName = $modelNames[$i];\n $nextModelName = isset($modelNames[$i + 1]) ? $modelNames[$i + 1] : null;\n\n $condition_fieldname = $modName . '.' . $fieldName;\n\n if(!isset($table))\n {\n $table = $this->controller->{$modName};\n }\n else\n {\n $table = $table->{$modName};\n }\n\n $schema = $table->getSchema();\n\n if(isset($nextModelName))\n {\n $association = $table->getAssociation($modelNames[$i + 1]);\n\n $this->addJoin($query, $association);\n }\n }\n }\n else\n {\n /*\n * Main model\n */\n\n $schema = $this->controller->{$alias}->getSchema();\n $condition_fieldname = $alias . '.' . $fieldName;\n }\n\n /******/\n\n $aliases = $this->getConfig('aliases');\n if(is_array($aliases) && array_key_exists($condition_fieldname, $aliases))\n {\n $condition_expression = $aliases[$condition_fieldname]['expression'];\n $columnType = isset($aliases[$condition_fieldname]['columnType']) ? $aliases[$condition_fieldname]['columnType'] : 'string';\n\n $condition_fieldname = $condition_expression;\n }\n else\n {\n $columnType = $schema->getColumnType($fieldName);\n }\n\n /******/\n\n switch($columnType)\n {\n case 'integer':\n case 'tinyinteger':\n case 'smallinteger':\n case 'biginteger':\n case 'float':\n case 'decimal':\n $this->_addNumericCondition($query, $condition_fieldname, $value, $options);\n break;\n\n case 'datetime':\n case 'date':\n $this->_addDatetimeCondition($query, $condition_fieldname, $value, $options);\n break;\n\n case 'string':\n case 'text':\n $this->_addStringCondition($query, $condition_fieldname, $value, $options);\n break;\n\n case 'boolean':\n $this->_addBooleanCondition($query, $condition_fieldname, $value, $options);\n break;\n }\n }\n }\n }\n\n /*\n * Store Query in session in order to be able to navigate to other list pages\n * without loosing the filters\n */\n $path = $this->getComparisonPath($this->controller->request);\n $this->storeQuery($path, $filter_data);\n\n /*\n * Set request data if no already filled\n * (this is the case when navigating from page to page with pagination)\n */\n if($this->controller->request->getData('Filter') === null)\n {\n $this->controller->request = $this->controller->request->withData('Filter', $filter_data);\n }\n }\n\n /******/\n\n return $query;\n }", "title": "" }, { "docid": "7f1a45dcd4a2e87f9f58457f2493ad61", "score": "0.5837419", "text": "public function loadAll($conditions = array()) {\n\t\treturn $this->controller->loadAll($this->model_name, $conditions);\n\t}", "title": "" }, { "docid": "f2b9d006d42909aef10632f8807c0173", "score": "0.5836924", "text": "public function getWhere();", "title": "" }, { "docid": "f2b9d006d42909aef10632f8807c0173", "score": "0.5836924", "text": "public function getWhere();", "title": "" }, { "docid": "c46d7b4777d721be4e65b5a602085296", "score": "0.5831799", "text": "public function find()\n {\n if (! $this->dbCommand) {\n return $this->criteria->find();\n }\n\n $result = $this->dbCommand->queryAll();\n\n return BuildQueryModel::populateModels($result);\n }", "title": "" }, { "docid": "d3d5227e50940948690bed448895e208", "score": "0.5822563", "text": "public static function get() {\n self::__constructStatic();\n $models = [];\n $rows = self::$database->read(self::$query, self::$values);\n foreach($rows as $row) {\n $models[] = self::return($row);\n }\n self::reset();\n return $models;\n }", "title": "" }, { "docid": "a0df9a7f61ca59f997950f6aae66d687", "score": "0.5814745", "text": "public static function findAll($condition = '1=1', $params = array())\n {\n /* @var $condition \\mpf\\datasources\\sql\\ModelCondition */\n if (!is_a($condition, '\\\\mpf\\\\datasources\\\\sql\\\\ModelCondition')) {\n $condition = ModelCondition::getFrom($condition, get_called_class());\n } else {\n $condition->model = $condition->model ? $condition->model : get_called_class();\n }\n $condition->setParams($params);\n $searchedRelations = [];\n if (is_array($condition->with)) {\n foreach ($condition->with as $k) {\n $searchedRelations[$k] = $k;\n }\n }\n $models = static::getDb()->queryClass($condition, get_called_class(), $condition->getParams(), [\n [\n '_columns' => static::getDb()->getTableColumns(static::getTableName()),\n '_pk' => static::getDb()->getTablePk(static::getTableName()),\n '_isNewRecord' => false,\n '_action' => 'update',\n '_tableName' => static::getTableName(),\n '_db' => static::getDb(),\n '_searchedRelations' => $searchedRelations\n ]\n ]);\n if (!$models) {\n return [];\n }\n $condition->getExtraRelations($models);\n return $models;\n }", "title": "" }, { "docid": "be8838f0ba2b2a80970967bf3c390aff", "score": "0.5811855", "text": "public static function GetAll()\n {\n return self::Instance()->FindBy(array());\n }", "title": "" }, { "docid": "aef7f3e3fcfccaf881522d52bfd8ff60", "score": "0.58051616", "text": "final protected function filtering()\n\t{\n\t\t$filter = $this->request->except(['timestamps','filter','delete','fields', 'sort']);\n\n\t\tforeach ($filter as $key => $value) {\n\t\t\t$method = 'fil'.ucwords($key).'Attribute';\n\n\t\t\tif (in_array($key, $this->attributes)) {\n\t\t\t\t$this->model = $this->model->where($key,'=',$value);\n\t\t\t} else if (method_exists($this, $method)) {\n\t\t\t\t$this->model = $this->{$method}($value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "29b167d254463bcef73aad27828c002b", "score": "0.5770621", "text": "public function indexAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $form = $this->createForm('CoreBundle\\Form\\SearchType', null);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $data = $form->getData();\n if (!null == $data)\n {\n $models = $em\n ->getRepository('A2ModelBundle:Model')\n ->findByKeyword($data['searchString'])\n ;\n\n return $this->render('A2ModelBundle:Model:index.html.twig', array(\n 'models' => $models,\n 'form' => $form->createView()\n ));\n }\n }\n\n $models = $em\n ->getRepository('A2ModelBundle:Model')\n ->findBy(\n array('isActive' => true),\n array('dateAdd' => 'DESC')\n )\n ;\n\n return $this->render('A2ModelBundle:Model:index.html.twig', array(\n 'models' => $models,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "87c7a20c7d8066c137bd9b25ee942676", "score": "0.576147", "text": "public function getModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "87c7a20c7d8066c137bd9b25ee942676", "score": "0.576147", "text": "public function getModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57522315", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57522315", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57522315", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "07ef9caf051663bc16a62f1b490ad470", "score": "0.574826", "text": "function get_search_set()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "588abd2d2293a5b361df3cc256d6c7e1", "score": "0.57370347", "text": "public function findAll()\n {\n try {\n $models = TenderItem::all();\n return $models;\n } catch (Exception $e) {\n Log::error($this->logName . '::findAll error : ' . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "6d61c50f3f5b469cd11169975c60e122", "score": "0.57294935", "text": "public function all()\n {\n $query = $this->model;\n\n if (Schema::hasColumn(str_plural($this->modelName), 'is_published')) {\n $query = $query->where('is_published', true);\n }\n\n if (Schema::hasColumn(str_plural($this->modelName), 'published_at')) {\n $query = $query->where('published_at', '<=', Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s'));\n }\n\n if (Schema::hasColumn(str_plural($this->modelName), 'finished_at')) {\n $query = $query->where('finished_at', '>=', Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s'));\n }\n\n return $query\n ->orderBy('created_at', 'desc')\n ->paginate(Config::get('cms.pagination', 24));\n }", "title": "" }, { "docid": "5676d0345a49222bba1294234bf8b437", "score": "0.5720989", "text": "public function getAllModels(){\n if($this->getRequestType() !== \"GET\") {\n $this->requestError(405);\n }\n $autoModel = AutoModels::model()->findAll();\n\n $this->sendResponse([\"success\" => 1, \"data\" => $autoModel]);\n exit();\n }", "title": "" }, { "docid": "e8b8b991e397066027248a77b9eedcd2", "score": "0.5718952", "text": "public function getFilterQueries();", "title": "" }, { "docid": "4324e95dbb3f946a4413db7416710119", "score": "0.5712863", "text": "public function prepareDataProvider()\n {\n $modelName = (new \\ReflectionClass($this->searchModel))->getShortName();\n\n $searchModel = new $this->searchModel;\n\n return $searchModel->search([$modelName => \\Yii::$app->request->queryParams]);\n }", "title": "" }, { "docid": "5628f379b3d2ee2b304cfe028aa56012", "score": "0.5712534", "text": "public function viewAll($conditions)\n\t{\n\t\t$listings = new Listing();\n\t\t# **************************************************\n\t\t# **********SEARCH BY SELECTING A CATEGORY**********\n\t\t# **************************************************\n\t\tif(isset($conditions->category))\n\t\t{\n\t\t\t$listings = $listings->where('Category_Id', $conditions->category);\n\t\t}\n\t\t# *************************************************\n\t\t# **********SEARCH THROUGH THE SEARCH BAR**********\n\t\t# *************************************************\n\t\tif(isset($conditions->search))\n\t\t{\n\t\t\t$listings = $listings->where(\n\t\t\t\tfunction($query) use ($conditions) {\n\t\t\t\t\t$query->whereRaw('LOWER(Title) LIKE LOWER(?)', [\"%$conditions->search%\"])\n\t\t\t\t\t\t ->orwhereRaw('LOWER(Description) LIKE LOWER(?)', [\"%$conditions->search%\"]);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\t# *****************************************\n\t\t# **********FILTER SEARCH RESULTS**********\n\t\t# *****************************************\n\t\tif(isset($conditions->seller))\n\t\t{\n\t\t\t$account = Account::whereRaw('LOWER(Username) = LOWER(?)', [$conditions->seller])->first();\n\t\t\t$accountID = is_null($account) ? 0 : $account->Account_Id;\n\t\t\t$listings = $listings->where('Seller', $accountID);\n\t\t}\n\t\tif(isset($conditions->priceLow))\n\t\t{\n\t\t\t$listings = $listings->where('Price', '>=', $conditions->priceLow);\n\t\t}\n\t\tif(isset($conditions->priceHigh))\n\t\t{\n\t\t\t$listings = $listings->where('Price', '<=', $conditions->priceHigh);\n\t\t}\n\t\tif(isset($conditions->stock))\n\t\t{\n\t\t\t$listings = $listings->where('Stock', '>=', $conditions->stock);\n\t\t}\n\t\tif(isset($conditions->rating))\n\t\t{\n\t\t\t$listings = $listings->where('Rating', '>=', $conditions->rating);\n\t\t}\n\t\t# *************************************************\n\t\t# **********SORT SEARCH RESULTS********************\n\t\t# *************************************************\n\t\tif(isset($conditions->sort))\n\t\t{\n\t\t\t$orderbycol = split(' ',$conditions->sort)[0];\n\t\t\t$order = split(' ', $conditions->sort)[1];\n\t\t\t$listings = $listings->orderby($orderbycol, $order);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$listings = $listings->orderby('Date', 'DESC');\n\t\t}\n\t\tself::view('listing/listingPreviews', ['listings' => $listings->get()]);\n\t}", "title": "" }, { "docid": "5f9d6b2b0d96821a6c4819ae0d61ab4f", "score": "0.57061225", "text": "public function getAll()\n {\n $_modelClass = $this->_dataAccessInterface;\n\n return Cache::remember(sprintf('%s::%s', static::class, __FUNCTION__), 2, function() use ($_modelClass) {\n return $_modelClass::orderBy('id', 'ASC')->get(array('*'));\n });\n }", "title": "" }, { "docid": "7bb3a7acc36698a3b5a8be1a72c415b4", "score": "0.56871974", "text": "public function getAllServices($model){\n return $model->get(['id','title','mark']);\n\n }", "title": "" }, { "docid": "6fb8d29d4ffcecab7c5337f458432f1a", "score": "0.567877", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('model_class',$this->model_class,true);\n\t\t$criteria->compare('model_id',$this->model_id);\n\t\t$criteria->compare('model_attributes',$this->model_attributes,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('user_create',$this->user_create,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2dc1c11fb1485cbe256eae859317a9fd", "score": "0.5673614", "text": "protected function _getAll(){\n $sql = $this->database->buildQuery($this->model);\n\n return $this->database->fetch($sql, $this->model);\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.56703377", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.56703377", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "fdd91d26f5015c2d51030af922b907e2", "score": "0.5659872", "text": "public function searchBy()\n {\n return [$this->name(), $this->label()];\n }", "title": "" }, { "docid": "9bb432a2f399c712a64190c82f90c4ec", "score": "0.5659504", "text": "public function all()\n {\n return self::search([]);\n }", "title": "" }, { "docid": "085ead8997efe6453217b431d75efb33", "score": "0.5657592", "text": "public function findAction():void{\n $params = [];\n $conditions = [];\n foreach(Rest::$params['conditions'] as &$condition){\n $conditions[] = [\n $condition['name'].' '.(isset($condition['type']) ? $condition['type'] : '=').' :'.$condition['name'].':',\n [$condition['name'] => $condition['value']]\n ];\n }\n $model = $this->models[0];\n $params = [\n 'models' => $model,\n 'conditions' => $conditions\n ];\n if(isset(Rest::$params['fields'])){\n $params['columns'] = Rest::$params['fields'];\n }\n if(isset(Rest::$params['order'])){\n $params['order'] = Rest::$params['order'];\n }\n if(isset(Rest::$params['limit'])){\n $params['limit'] = Rest::$params['limit'];\n }\n if(isset(Rest::$params['offset'])){\n $params['offset'] = Rest::$params['offset'];\n }\n $primaryKey = $model::getMapped($model::getPrimaryKey());\n $builder = new Builder($params);\n for($i=1; $i<count($this->models); $i++){\n $name = $this->models[$i];\n $builder->leftJoin($name, $model::getReferencedField($name).\" = $primaryKey\");\n }\n try{\n Rest::renderSuccess($builder->getQuery()->execute()->toArray());\n } catch(PDOException $e){\n Rest::renderError($e->getMessage());\n }\n }", "title": "" }, { "docid": "88328c5ed47812349f88a1ff14b2cb98", "score": "0.5652697", "text": "public function search($model) {\n\n $criteria = $model->getDbCriteria();\n $criteria->compare('id', $model->id);\n $criteria->compare('name', $model->name, true);\n $criteria->compare('tp_user_id', $model->tp_user_id);\n $criteria->compare('date', $model->date);\n $criteria->compare('text', $model->text, true);\n $criteria->compare('allocation_id', $model->allocation_id);\n $criteria->compare('trash', $model->trash);\n $criteria->compare('lang', $model->lang);\n return new CActiveDataProvider($model, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "9f76941409db530bedf23dddb6c88ee3", "score": "0.5634813", "text": "public function search() {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('model_name', $this->model_name, true);\n\t\t$criteria->compare('model_id', $this->model_id, true);\n\t\t$criteria->compare('count_uniq', $this->count_uniq, true);\n\t\t$criteria->compare('count_non_uniq', $this->count_non_uniq, true);\n\t\t$criteria->compare('created_on', $this->created_on, true);\n\t\t$criteria->compare('updated_on', $this->updated_on, true);\n\t\t$criteria->compare('lock_version', $this->lock_version);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "c44e674b31be73be8579a03af63bed0c", "score": "0.5634142", "text": "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->select = $this->_select;\n $id = Yii::app()->request->getParam('id');\n if (!empty($id)) {\n $criteria->compare('id', $id);\n }\n $gather = Yii::app()->request->getParam('gather');\n if (!empty($gather)) {\n $criteria->compare('gather_id', $gather);\n }\n $criteria->compare('admin_id', $this->admin_id);\n $criteria->compare('public_id', $this->public_id);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('status', $this->status);\n\n $criteria->compare('isdelete', 0);\n $criteria->compare('time_created', $this->time_created);\n $criteria->compare('time_updated', $this->time_updated);\n $criteria->order = 'sort DESC';\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "f743b81a4db0270c8abefd9b63b983b8", "score": "0.5628903", "text": "public function getList()\n\t{\n\t $data = $this->model->getList();\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.56282246", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.56282246", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "2efea7415c35448718f605b58dcaa6f0", "score": "0.5625353", "text": "private function _getSelectedModels(){\n//\t\tthrow new \\Exception();\n\t\tif(!isset($this->_models))\n\t\t{\t\t\t\n\t\t\t$this->_models=array();\n\t\t\tforeach ($this->selectedIds as $modelId) {\n\t\t\t\ttry{\n\t\t\t\t\t$model = \\GO::getModel($this->_modelName)->findByPk($modelId);\t\t\t\t\n\t\t\t\t\tif($model)\n\t\t\t\t\t\t$this->_models[]=$model;\n\n\t\t\t\t}\n\t\t\t\tcatch(\\Exception $e){\n\t\t\t\t\t//might happen when a user no longer has access to a selected model\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($this->_extraPks as $pk) {\n\t\t\t\tif(in_array($pk, $this->selectedIds)) {\n\t\t\t\t\t$model = \\GO::getModel($this->_modelName);\n\t\t\t\t\t$model->pk = $pk;\n\t\t\t\t\t$this->_models[] = $model;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_models;\n\t}", "title": "" }, { "docid": "2caf56b58e1ece5c776924aaef646f14", "score": "0.56224346", "text": "private function ListOfAllModelAdmins(){\n\t\t$models = array();\n\t\t$modelAdmins = CMSMenu::get_cms_classes(\"ModelAdmin\");\n\t\tif($modelAdmins && count($modelAdmins)) {\n\t\t\tforeach($modelAdmins as $modelAdmin) {\n\t\t\t\tif($modelAdmin != \"ModelAdminEcommerceBaseClass\") {\n\t\t\t\t\t$obj = singleton($modelAdmin);\n\t\t\t\t\t$modelAdminLink = $obj->Link();\n\t\t\t\t\t$models[] = $modelAdminLink;\n\t\t\t\t\t$modelsToAdd = $obj->getManagedModels();\n\t\t\t\t\tif($modelsToAdd && count($modelsToAdd)) {\n\t\t\t\t\t\tforeach($modelsToAdd as $key => $model) {\n\t\t\t\t\t\t\tif(is_array($model) || !is_subclass_of($model, \"DataObject\")) {\n\t\t\t\t\t\t\t\t$model = $key;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!is_subclass_of($model, \"DataObject\")) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$modelLink = $modelAdminLink.$model.\"/\";\n\t\t\t\t\t\t\t$models[] = $modelLink;\n\t\t\t\t\t\t\t$models[] = $modelLink.\"EditForm/field/\".$model.\"/item/new/\";\n\t\t\t\t\t\t\tif($item = $model::get()->First()) {\n\t\t\t\t\t\t\t\t$models[] = $modelLink.\"EditForm/field/\".$model.\"/item/\".$item->ID.\"/edit\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "3dc4854e7d414002629ea8845024e458", "score": "0.56159127", "text": "public static function all(array $criteria): array\n {\n global $storage;\n\n // TODO: Create query string from criteria once storage has been implemented\n $query = $criteria;\n\n $result = $storage->query($query);\n\n // TODO: Create new Models and set their properties based on $result or return array if not found\n $models = array();\n\n return $models;\n }", "title": "" }, { "docid": "c8e414278b109888b884255262cb670f", "score": "0.5614068", "text": "public static function findAll()\n {\n $query = array(\n 'TableName' => static::model()->tableName(),\n 'ScanFilter' => array(\n static::getPkKeys()[self::HASHKEY] => array(\n 'ComparisonOperator' => 'NOT_NULL',\n )\n ),\n );\n\n return static::sendQuery('scan', $query); \n }", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.560956", "text": "public function getCriteria();", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.560956", "text": "public function getCriteria();", "title": "" }, { "docid": "7dfefd23ce0b656c96072b043185ea31", "score": "0.55983055", "text": "public function search($q)\n {\n return $this->model->where('name', 'LIKE', \"%$q%\")->get()->toArray();\n }", "title": "" }, { "docid": "f1f2a37cda3661b1457f79157544ea50", "score": "0.55978954", "text": "public function getModels()\n {\n return $this->hasMany(Model::className(), ['id_brand' => 'id_brand']);\n }", "title": "" }, { "docid": "0a0826e5f5f7cda6dada163cf13601b8", "score": "0.5597632", "text": "public function search(array $criteria): \\Illuminate\\Support\\Collection;", "title": "" }, { "docid": "57fc5b660fd4bc969562d4e2ed2618c8", "score": "0.5595046", "text": "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "title": "" }, { "docid": "ab9f37df671d7d52a1201f63d310375d", "score": "0.5594673", "text": "public function index()\n {\n // Get the filters from request\n $filters = Request::only([\n 'ids',\n 'keywords',\n 'max',\n 'order',\n 'relationships',\n 'sort',\n 'trashed',\n ]);\n\n // Get paginated, filtered results from the repository\n return $this->getRepository()->index($filters);\n }", "title": "" }, { "docid": "70c50c7f41f3686df2ebd3a6f01b5705", "score": "0.55738723", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM criteria';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "d9ab24f6828ce02d4efd5894a57163f3", "score": "0.557362", "text": "public function search()\n {\n $results = array();\n\n $keyword = request('keyword');\n\n $accounts = Account::enabled()->search($keyword)->get();\n\n if ($accounts->count()) {\n foreach ($accounts as $account) {\n $results[] = (object)[\n 'id' => $account->id,\n 'name' => $account->name,\n 'type' => trans_choice('general.accounts', 1),\n 'color' => '#337ab7',\n 'href' => url('banking/accounts/' . $account->id . '/edit'),\n ];\n }\n }\n\n $items = Item::enabled()->search($keyword)->get();\n\n if ($items->count()) {\n foreach ($items as $item) {\n $results[] = (object)[\n 'id' => $item->id,\n 'name' => $item->name,\n 'type' => trans_choice('general.items', 1),\n 'color' => '#f5bd65',\n 'href' => url('common/items/' . $item->id . '/edit'),\n ];\n }\n }\n\n $invoices = Invoice::search($keyword)->get();\n\n if ($invoices->count()) {\n foreach ($invoices as $invoice) {\n $results[] = (object)[\n 'id' => $invoice->id,\n 'name' => $invoice->invoice_number . ' - ' . $invoice->customer_name,\n 'type' => trans_choice('general.invoices', 1),\n 'color' => '#00c0ef',\n 'href' => url('incomes/invoices/' . $invoice->id),\n ];\n }\n }\n\n //$revenues = Revenue::search($keyword)->get();\n\n $customers = Customer::enabled()->search($keyword)->get();\n\n if ($customers->count()) {\n foreach ($customers as $customer) {\n $results[] = (object)[\n 'id' => $customer->id,\n 'name' => $customer->name,\n 'type' => trans_choice('general.customers', 1),\n 'color' => '#03d876',\n 'href' => url('incomes/customers/' . $customer->id),\n ];\n }\n }\n\n $bills = Bill::search($keyword)->get();\n\n if ($bills->count()) {\n foreach ($bills as $bill) {\n $results[] = (object)[\n 'id' => $bill->id,\n 'name' => $bill->bill_number . ' - ' . $bill->vendor_name,\n 'type' => trans_choice('general.bills', 1),\n 'color' => '#dd4b39',\n 'href' => url('expenses/bills/' . $bill->id),\n ];\n }\n }\n\n //$payments = Payment::search($keyword)->get();\n\n $vendors = Vendor::enabled()->search($keyword)->get();\n\n if ($vendors->count()) {\n foreach ($vendors as $vendor) {\n $results[] = (object)[\n 'id' => $vendor->id,\n 'name' => $vendor->name,\n 'type' => trans_choice('general.vendors', 1),\n 'color' => '#ff8373',\n 'href' => url('expenses/vendors/' . $vendor->id),\n ];\n }\n }\n\n return response()->json((object) $results);\n }", "title": "" }, { "docid": "a8f2bda68d6bba795cc8cdf85259aec1", "score": "0.55725265", "text": "public function actionSearch()\n\t{\n\t\treturn parent::actionSearch([\n\t\t\t'queryOptions' => [\n\t\t\t\t'with' => [\n\t\t\t\t\t'author', 'type', 'requestFor', \n\t\t\t\t\t'completedBy', 'closedBy', 'replyModel', \n\t\t\t\t\t'issueModel', 'revisionModel', 'voteModel'\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t}", "title": "" }, { "docid": "079de31b8e4d54fea162f2d4edf4196d", "score": "0.55705726", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t\n\t\tif(Yii::app()->request->isAjaxRequest) {\n\t\t\tif($model = Yii::app()->request->getParam('Characteristic', false)){\n\t\t\t\t\n\t\t\t\t$a = CHtml::listData( Modification::model()->findAll('title like :title', array(':title'=>'%'.$model['modificationTitle'].'%')), 'id', 'id');\n\t\t\t\tif(count($a)>0)\n\t\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\telseif($modification['modificationTitle'])\n\t\t\t\t\t$criteria->compare('modification_id', 0);\n\t\t\t\telse\n\t\t\t\t\t$criteria->compare('modification_id', array());\n\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\t$this->modificationTitle = $model['modificationTitle'];\n\n\t\t\t\t$a = Car::model()->findAll('title like :title', array(':title'=>'%'.$model['modelTitle'].'%'));\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach($a as $m)\n\t\t\t\t\tif(count($m->modifications) > 0)\n\t\t\t\t\t\tforeach($m->modifications as $t)\n\t\t\t\t\t\t\t$tmp[$t->id] = $t->id;\n\t\t\t\t$a = $tmp;\n\t\t\t\tif(count($a)>0)\n\t\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\telseif($modification['modelTitle'])\n\t\t\t\t\t$criteria->compare('modification_id', 0);\n\t\t\t\telse\n\t\t\t\t\t$criteria->compare('modification_id', array());\n\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\t$this->modelTitle = $model['modelTitle'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$a = Brand::model()->findAll('title like :title', array(':title'=>'%'.$model['brandTitle'].'%'));\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach($a as $b)\n\t\t\t\t\tif(count($b->models) > 0)\n\t\t\t\t\t\tforeach($b->models as $m)\n\t\t\t\t\t\t\tif(count($m->modifications) > 0)\n\t\t\t\t\t\t\t\tforeach($m->modifications as $t)\n\t\t\t\t\t\t\t\t\t$tmp[$t->id] = $t->id;\n\t\t\t\t$a = $tmp;\n\t\t\t\tif(count($a)>0)\n\t\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\telseif($modification['brandTitle'])\n\t\t\t\t\t$criteria->compare('modification_id', 0);\n\t\t\t\telse\n\t\t\t\t\t$criteria->compare('modification_id', array());\n\t\t\t\t$criteria->compare('modification_id', $a);\n\t\t\t\t$this->brandTitle = $model['brandTitle'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$criteria->compare('fuel_capacity',$this->fuel_capacity);\n\n\t\t$criteria->compare('body',$this->body,true);\n\n\t\t$criteria->compare('doors',$this->doors);\n\n\t\t$criteria->compare('seats',$this->seats,true);\n\n\t\t$criteria->compare('weight',$this->weight);\n\n\t\t$criteria->compare('weight_loaded',$this->weight_loaded);\n\n\t\t$criteria->compare('top_speed_at',$this->top_speed_at);\n\n\t\t$criteria->compare('acceleration_at',$this->acceleration_at);\n\n\t\t$criteria->compare('top_speed_mt',$this->top_speed_mt);\n\n\t\t$criteria->compare('acceleration_mt',$this->acceleration_mt);\n\t\t\n\t\t$criteria->compare('turn_radius',$this->turn_radius);\n\n\t\t$criteria->compare('trunk_capacity',$this->trunk_capacity,true);\n\n\t\t$criteria->compare('length',$this->length);\n\n\t\t$criteria->compare('width',$this->width);\n\n\t\t$criteria->compare('height',$this->height);\n\n\t\t$criteria->compare('track_front',$this->tyres_front);\n\n\t\t$criteria->compare('track_rear',$this->tyres_front);\n\t\t\n\t\t$criteria->compare('track_front',$this->disks_front);\n\n\t\t$criteria->compare('track_rear',$this->disks_front);\n\n\t\t$criteria->compare('wheelbase',$this->wheelbase);\n\n\t\t$criteria->compare('engine_type',$this->engine_type,true);\n\n\t\t$criteria->compare('volume',$this->volume);\n\n\t\t$criteria->compare('displacement',$this->displacement,true);\n\n\t\t$criteria->compare('cylinders',$this->cylinders,true);\n\n\t\t$criteria->compare('valves',$this->valves);\n\n\t\t$criteria->compare('max_power',$this->max_power);\n\n\t\t$criteria->compare('max_power_rpm',$this->max_power_rpm,true);\n\n\t\t$criteria->compare('max_torque',$this->max_torque);\n\n\t\t$criteria->compare('max_torque_rpm',$this->max_torque_rpm,true);\n\n\t\t$criteria->compare('transmission_at',$this->transmission_at,true);\n\n\t\t$criteria->compare('gears_at',$this->gears_at,true);\n\t\t\n\t\t$criteria->compare('transmission_mt',$this->transmission_mt,true);\n\n\t\t$criteria->compare('gears_mt',$this->gears_mt,true);\n\t\t\n\t\t$criteria->compare('drive',$this->drive,true);\n\t\t\n\t\t$criteria->compare('suspension_front',$this->suspension_front,true);\n\n\t\t$criteria->compare('suspension_rear',$this->suspension_rear,true);\n\n\t\t$criteria->compare('tyres_front',$this->tyres_front,true);\n\n\t\t$criteria->compare('tyres_rear',$this->tyres_rear,true);\n\n\t\t$criteria->compare('brakes_front',$this->brakes_front,true);\n\n\t\t$criteria->compare('brakes_rear',$this->brakes_rear,true);\n\n\t\t$criteria->compare('fuel_consumption_urban_at',$this->fuel_consumption_urban_at);\n\n\t\t$criteria->compare('fuel_consumption_country_at',$this->fuel_consumption_country_at);\n\n\t\t$criteria->compare('fuel_consumption_combined_at',$this->fuel_consumption_combined_at);\n\n\t\t$criteria->compare('fuel_consumption_urban_mt',$this->fuel_consumption_urban_mt);\n\n\t\t$criteria->compare('fuel_consumption_country_mt',$this->fuel_consumption_country_mt);\n\n\t\t$criteria->compare('fuel_consumption_combined_mt',$this->fuel_consumption_combined_mt);\n\t\t\n\t\t$criteria->compare('fuel_type',$this->fuel_type,true);\n\n\t\treturn new CActiveDataProvider('Characteristic', array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t'pageSize'=>Yii::app()->params['linesPerPage'],\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "c3ae74011ec4c8156caaa8115b0a3f4d", "score": "0.55684036", "text": "public function get_search_set()\n {\n return $this->filter;\n }", "title": "" }, { "docid": "bc511f32678cc08ebf1b558199453cf3", "score": "0.5568133", "text": "public static function search() {\n //get the search option\n $searchBy = Input::post(\"searchBy\");\n $resultDTO = null;\n switch ($searchBy) {\n case 'category':\n //search by category\n $category = Input::post(\"category\");\n $resultDTO = BookModel::searchByCategory($category);\n break;\n\n case 'author':\n //search by author\n $author = Input::post(\"author\");\n $resultDTO = BookModel::searchByAuthor($author);\n break;\n\n case 'name':\n //search by name\n $name = Input::post(\"name\");\n $resultDTO = BookModel::searchByName($name);\n break;\n\n case 'price':\n //search by price\n $priceL = Input::post(\"priceL\");\n $priceU = Input::post(\"priceU\");\n $resultDTO = BookModel::searchByPrice($priceL, $priceU);\n break;\n\n default:\n //fail\n return false;\n break;\n }\n\n return self::toBooksArray($resultDTO);\n }", "title": "" }, { "docid": "81aa9fbe646b328999a206723c789935", "score": "0.5567217", "text": "public function getListAll()\n {\n return $this->model->where('category','=','news')->where('status','=','Show')->orderBy('order','ASC')->orderBy('id','DESC')->get();\n }", "title": "" }, { "docid": "743511fc6e2dd1ab59a41bc84f91b65c", "score": "0.5567124", "text": "public static function getModels(): array\n {\n return static::$models;\n }", "title": "" }, { "docid": "9b8cc6e8372a28a72056999d1896108b", "score": "0.5566944", "text": "public function buildModelCriteria()\n {\n $search = MeedlecontactQuery::create();\n $id = $this->getId();\n if ($id) {\n $search->filterById($id, Criteria::IN);\n }\n\t\t$search->orderByCreatedAt(Criteria::DESC);\n\t\treturn $search;\n }", "title": "" }, { "docid": "e0cf149c1f3a543322a5ac55d746420d", "score": "0.5556209", "text": "abstract public function getFieldsSearchable();", "title": "" }, { "docid": "4f6b4f39e736483144a64cf736bb37ee", "score": "0.5552838", "text": "public function search(Request $request)\n {\n $providers = Provider::where($request->all());\n if ($providers->count() == 0) {\n throw new ModelNotFoundException();\n }\n return $providers->get();\n }", "title": "" }, { "docid": "865942d547a1ca54abae44f30a549503", "score": "0.5552406", "text": "public static function getFilterData() {\n\n $users = Users::find()->all();\n $companyList = Company::find()->all();\n $clientList = Client::find()->all();\n\n $res = new \\stdClass();\n $res->company = array();\n $res->client = array();\n $res->acm = array();\n\n foreach($companyList as $comp) {\n $company = new \\stdClass();\n $company->id = $comp->id;\n $company->name = $comp->name;\n $res->company[] = $company;\n }\n\n foreach($users as $user) {\n \n if($user->userType == \"acm\") {\n $acm = new \\stdClass();\n $acm->id = $user->id;\n $acm->name = $user->name;\n $res->acm[] = $acm;\n }\n }\n\n foreach($clientList as $client) {\n $cli = new \\stdClass();\n $cli->id = $client->id;\n $cli->name = $client->user->name;\n $res->client[] = $cli;\n }\n\n return $res;\n }", "title": "" }, { "docid": "e4dffd0dc9fb8895757e8e86983b96c5", "score": "0.5540541", "text": "public function getModelListList(){\r\n return $this->_get(2);\r\n }", "title": "" }, { "docid": "8a49e83fdbb822f899771fcc0e007195", "score": "0.55279833", "text": "public function actionIndex()\n {\n $searchModel = Yii::createObject($this->module->searchModelClass);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $searchModel->find(),\n 'pagination' => ['pageSize' => 10]\n ]);\n\n $searchModel->load(Yii::$app->request->queryParams);\n if ($searchModel->validate()) {\n foreach ($searchModel->attributes as $key => $value) {\n $dataProvider->query->andFilterWhere(['like', $key, $value]);\n }\n }\n\n return $this->render($this->module->indexView, [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "2a71829161b63cb17fbf063fa8488e3a", "score": "0.55245894", "text": "public function getQuery()\n {\n $model = 'Serenity\\\\' . $this->model . 'Model';\n\n if($this->orderDir == 0)\n $orderDir = 'ASC';\n else\n $orderDir = 'DESC';\n\n $orderByB = explode(',', $this->orderBy);\n $orderBy = '';\n foreach($orderByB as $orderPart)\n {\n if($orderBy != '')\n $orderBy .= ', ';\n\n $orderBy .= $orderPart . ' ' . $orderDir;\n }\n\n return $model::query()->orderBy($orderBy)->\n limit($this->pageNumber * $this->resultsPerPage . ', ' . $this->resultsPerPage);\n }", "title": "" } ]
dca7d72b1e795fd8b0f98f92b8b4490e
Returns value of 'consumed' property
[ { "docid": "693d68200fb6a3c37c0a72774b53edc6", "score": "0.79053587", "text": "public function getConsumed()\n {\n return $this->get(self::CONSUMED);\n }", "title": "" } ]
[ { "docid": "47af0f108d844e8a53296f445bf8111e", "score": "0.70599234", "text": "public function IsConsumed() {\n\t\t\treturn $this->_IsConsumed;\n\t\t}", "title": "" }, { "docid": "fcf615411f8ff437ba934d62fcc0e10c", "score": "0.64329547", "text": "public function getConsumption() {\n\n\t}", "title": "" }, { "docid": "eeaedaf0d6d0b107af0261f82f573bb5", "score": "0.6367813", "text": "public function getUsed()\n {\n return $this->used;\n }", "title": "" }, { "docid": "4f57b6c9a3cb9882b69fd85ad946726e", "score": "0.636696", "text": "public function isConsumed(): bool;", "title": "" }, { "docid": "62b2b0cfafc38bcac137594176e29f95", "score": "0.6116065", "text": "public function Consume() {\n\t\t\tif ($this->_IsConsumable && !$this->_IsConsumed) {\n\t\t\t\t$this->_IsConsumed = true;\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "854d5c3d7c19a6ca23dfd3ef49a253eb", "score": "0.60911804", "text": "public function getUsesRemaining()\n {\n return $this->uses_remaining;\n }", "title": "" }, { "docid": "164eed110693cf5b9776f913f6b0e70e", "score": "0.58465534", "text": "public function getRemaining() {\n return $this->remaining;\n }", "title": "" }, { "docid": "0b4acc82050c43d7929db71337d0ec4e", "score": "0.58462936", "text": "public function getBUsed()\n\t{\n\t\treturn $this->b_used;\n\t}", "title": "" }, { "docid": "f58b337642c21ad37c8a2b50a1b2aa27", "score": "0.58015907", "text": "public function getAvailable_quantity()\n {\n return $this->available_quantity;\n }", "title": "" }, { "docid": "8f846e9054af04f1b81c6fa87c86d3eb", "score": "0.5731721", "text": "public function quantity()\n {\n return $this->volume;\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "91d68978e46471a4a2bd31f45d47e76c", "score": "0.56923497", "text": "public function setConsumed(Ots_ConsumedCapacity $value)\n {\n return $this->set(self::CONSUMED, $value);\n }", "title": "" }, { "docid": "d4d951f974ddb1aa4b9bb471de01c10a", "score": "0.5668845", "text": "public function quantity()\n {\n return $this->_quantity;\n }", "title": "" }, { "docid": "eb4495e9319c90093c0655d342bd4c5d", "score": "0.56467897", "text": "public function getProcessed()\n {\n return $this->processed;\n }", "title": "" }, { "docid": "b55ccc658e4246fa39d5bf062bc28e37", "score": "0.5627799", "text": "public function getCapacity()\n {\n return $this->capacity;\n }", "title": "" }, { "docid": "82ff451b1f0aae493b89209a900dde11", "score": "0.56271887", "text": "public function getRequestedQuantity()\n {\n return $this->requestedQuantity;\n }", "title": "" }, { "docid": "82ff451b1f0aae493b89209a900dde11", "score": "0.56271887", "text": "public function getRequestedQuantity()\n {\n return $this->requestedQuantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5583951", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "060491a9332b4ef62fd858f606683964", "score": "0.55774486", "text": "public function getValue()\n {\n return $this->count();\n }", "title": "" }, { "docid": "8609194aa91450983354ecf5ef115b1e", "score": "0.5564053", "text": "public function getAvailable() {\n\t\t$size=$this->getSize();\n\t\t$used=$this->getUsed();\n\t\treturn $size - $used;\n\t}", "title": "" }, { "docid": "756faa60923519984a5e6c8fb0fd0030", "score": "0.55625445", "text": "public function getRead()\n {\n return $this->read;\n }", "title": "" }, { "docid": "ee1bd63385da6b714f23c78f70ce9e8a", "score": "0.55561614", "text": "public function getFree()\n {\n return $this->free;\n }", "title": "" }, { "docid": "8b6de45286b59181260f31840c1223cc", "score": "0.55416024", "text": "public function getCapacity() {\n\t\treturn $this->capacity;\n\t}", "title": "" }, { "docid": "e0a73696e71d7b62d34e89fd0aac4b0e", "score": "0.55052", "text": "public function getUsed(): ?bool\n {\n return $this->used;\n }", "title": "" }, { "docid": "fa55cba10bd365a79b840d407a6c501f", "score": "0.54690665", "text": "function getQOS() {\n\t\treturn $this->qos;\n\t}", "title": "" }, { "docid": "75c1879efb9ee8984fe0aaeafb0bff88", "score": "0.54462695", "text": "public function getQuantityInStock() {\n return $this->quantityInStock;\n }", "title": "" }, { "docid": "f60e28d628a8c1b1fb54cb063c558fe4", "score": "0.54199606", "text": "public function getSupply(){\n $command = new Command($this->host, self::BLOCKS_GET_SUPPLY,\"GET\", $this->enableCache, $this->cacheLifetime, $this->cacheFolder);\n $command->execute();\n return $this->convertAmountToFloat($command->getData(\"supply\"));\n }", "title": "" }, { "docid": "6e41536fef837888f68f662ef9da40b9", "score": "0.5413506", "text": "function AddedCharge() {\n\t\treturn $this->IsExclusive() ? $this->Charge() : 0;\n\t}", "title": "" }, { "docid": "79d973edbd736fa9d125a314d90da55e", "score": "0.54130816", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "b77d01bb4e6c85562e7a8aac84509ba4", "score": "0.5400091", "text": "public function get()\n {\n return $this->value;\n }", "title": "" }, { "docid": "b77d01bb4e6c85562e7a8aac84509ba4", "score": "0.5400091", "text": "public function get()\n {\n return $this->value;\n }", "title": "" }, { "docid": "cf15d65f14f7c3340f77cf9ee2cf3c17", "score": "0.5398372", "text": "public function getReadCount()\n {\n return $this->readCount;\n }", "title": "" }, { "docid": "24cade4d95a7a9c4117b9fa31ea67a64", "score": "0.53930265", "text": "public function read()\n\t{\n\t\treturn $this->get($this->_key++);\n\t}", "title": "" }, { "docid": "83ac751e4d42a1065b07e9d80b10fc3c", "score": "0.5375653", "text": "public function getUsedPrice() {\n return $this->used_price;\n }", "title": "" }, { "docid": "65393b234c5a68ba3e9f0aec1c537b69", "score": "0.5370949", "text": "public static function getAvailable()\n {\n return self::$available;\n }", "title": "" }, { "docid": "b703a04017499986b18a7c7bdc5985d0", "score": "0.53685844", "text": "public function get_buffered()\r\n\t{\r\n\t\treturn $this->get_attr('buffered');\r\n\t}", "title": "" }, { "docid": "e93d0cc422b27919be48179629b90562", "score": "0.53600615", "text": "public function getAgreedQuantity()\n {\n return $this->agreedQuantity;\n }", "title": "" }, { "docid": "e93d0cc422b27919be48179629b90562", "score": "0.53600615", "text": "public function getAgreedQuantity()\n {\n return $this->agreedQuantity;\n }", "title": "" }, { "docid": "e8d6858bb08dc8db80c703e954082413", "score": "0.53493017", "text": "public function getGasUsed()\n {\n return $this->gasUsed;\n }", "title": "" }, { "docid": "91ddf2c25a1afd1fb27b5fa23bc51ce9", "score": "0.5344448", "text": "public function getExcessAmount()\n {\n return $this->excessAmount;\n }", "title": "" }, { "docid": "3e9173630925bd7c03e9bd2337d2fb8e", "score": "0.534393", "text": "public function getUseOf()\n {\n return $this->use_of;\n }", "title": "" }, { "docid": "48342b03a709a2ef90502a9c79606947", "score": "0.533672", "text": "public function getProcessedData()\n {\n return $this->processed;\n }", "title": "" }, { "docid": "00b41e159e8806b3f6a83301a2710328", "score": "0.5320594", "text": "public function getUsage()\n {\n if ($this->usage === null) {\n $calculator = new SizeCalculator();\n $calculatedSize = $calculator->calculate($this->volume, $this->volume->findRootFolder());\n\n $this->usage = $calculatedSize->getSize();\n }\n\n return $this->usage;\n }", "title": "" }, { "docid": "fa05cb297126112a81f4ade2c0af6e2d", "score": "0.5313779", "text": "public function getEnergy(){\n\t\treturn $this->energy;\n\t}", "title": "" }, { "docid": "5b3845a50f61abe3b91c86c34d0acb42", "score": "0.53015816", "text": "function available() {\n return $this->current_size - $this->pos();\n }", "title": "" }, { "docid": "a4f15a6e96a9aa6b7f6c080a55db31f8", "score": "0.5300443", "text": "public function getCrenTake()\n {\n return $this->crenTake;\n }", "title": "" }, { "docid": "e18357d2d8261e0d4456bd7835d40dd6", "score": "0.52907836", "text": "public function getSupplyItem()\n {\n return $this->supplyItem;\n }", "title": "" }, { "docid": "b5a26429f99d121c74387ca6f4041ccf", "score": "0.5277158", "text": "public function getNumProducedUnits()\n {\n return $this->producesQuantity;\n }", "title": "" }, { "docid": "fc0149dc2c7c3cdeebea7f673454fe0b", "score": "0.5271378", "text": "public function getValue()\n {\n \treturn $this->value;\n }", "title": "" }, { "docid": "442e0b160b6f17703545190623689d19", "score": "0.5266906", "text": "function getValue()\r\n {\r\n return $this -> _value;\r\n }", "title": "" }, { "docid": "59aa70b4aff0a1b44ee948eece88dc89", "score": "0.5263395", "text": "final public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "c305ee466da6d8476024c377c5e44a0c", "score": "0.52514404", "text": "function peek() {\n return $this->myQueue[0];\n }", "title": "" }, { "docid": "545c558ea613977e90493cb22b1bcf2d", "score": "0.5251053", "text": "public function getBuyQuantity()\n {\n return $this->buy_quantity;\n }", "title": "" }, { "docid": "d84eddb03ebc315fe7aef8d0c1d71699", "score": "0.5244548", "text": "public function getReadOut(){\n\t\tif($this->running) return \"still running\";\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "5e749ab822a1e91bbca91adcdb3401f8", "score": "0.5241489", "text": "public function stock()\n {\n $reserved = $this->reserved < 0 ? 0 : $this->reserved;\n\n return $this->generateStock() - floatval($reserved);\n }", "title": "" }, { "docid": "9fa7ac2f1c660ce50f2bde74f0fdb104", "score": "0.52349144", "text": "public function getEligibleQuantity();", "title": "" }, { "docid": "cdbc50fb20c1ba0abd4a28a4b6c26362", "score": "0.523048", "text": "public function getQty()\n {\n return isset($this->qty) ? $this->qty : null;\n }", "title": "" }, { "docid": "bbaa3d4020eef2ea21e0c18fba4bcc7a", "score": "0.5226125", "text": "function getQueued() {\n\t\treturn $this->_Queued;\n\t}", "title": "" }, { "docid": "8e02a80cd2de344e1bd5b4e33a7026f3", "score": "0.5222339", "text": "public function getQuantity() \n {\n return $this->_fields['Quantity']['FieldValue'];\n }", "title": "" }, { "docid": "cc396231d6a2227cae70507d3df2460a", "score": "0.5216628", "text": "public function getRemaining() : IntegerInterface;", "title": "" }, { "docid": "e42d1cee8293ee35a8d59f20011858cd", "score": "0.5215367", "text": "public function getUsage()\n {\n return $this->usage;\n }", "title": "" }, { "docid": "30d4d180b9a02458610db866e6c497a2", "score": "0.5210642", "text": "public function getUsed() {\n\t\treturn OMVModuleZFSUtil::SizeTobytes($this->properties[\"logicalused\"][\"value\"]);\n\t}", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.52023447", "text": "public function getQuantity();", "title": "" }, { "docid": "25275e8c00e95f271749c7baf87454eb", "score": "0.5199718", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "25275e8c00e95f271749c7baf87454eb", "score": "0.5199718", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5197139", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5197139", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5197139", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.5197139", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "97dcf0aa1283887cc2fb4e16924681f8", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $data = [\n 'game_id' => 'numeric',\n 'chapter' => 'numeric',\n 'number' => 'numeric',\n 'content' => 'string'\n ];\n\n return $this->prepareAndExecuteUpdateQuery($request, $data, $id, self::MODEL, self::DEPENDENCIES, self::PIVOT_DEPENDENCIES);\n }", "title": "" } ]
[ { "docid": "995ba0c8f03901b2d9d4e3a2b71aed6a", "score": "0.7192627", "text": "public function put($resource);", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "23bd42dc38bca65e850c1b8f771c0f0f", "score": "0.6837518", "text": "public function update(ResourceInterface $resource)\n {\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "191338cd6ef896bff360364575acf011", "score": "0.67335975", "text": "function update( $resource ){\n\n\n\n}", "title": "" }, { "docid": "82d962f8a232812e11e659906a06c4bf", "score": "0.64792234", "text": "abstract function updateResource(array $resource): array;", "title": "" }, { "docid": "3e0f043be946ab7842b0af2e1d74c916", "score": "0.6411816", "text": "protected function _update ()\n {\n $storage = $this->_make_storage ();\n $storage->update_object ($this);\n }", "title": "" }, { "docid": "94019d08a7f8811e4983869c0f46c3d1", "score": "0.63963556", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n $data = $request->validated();\n\n $status = $resource->fill($data)->save();\n\n if($status) {\n return redirect()->route('resource.index')->with('success', 'Обновлено успешно');\n }\n\n return back()->withInput();\n }", "title": "" }, { "docid": "f3a644eac430ac72a35e4e871bd91db8", "score": "0.6383551", "text": "public function update(Request $request, $id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "4f3179762365be3e1ddb7c5eec12dffb", "score": "0.6367317", "text": "public function update($id)\n\t{\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules_edit);\n\t\tif($validator->passes()){\n\n\n\t\t\t$resource = \\App\\Resource::find($id);\n\n\t\t\tif(isset($inputs['image'])){\n\n\t\t\t\t$file = $resource->image;\n\n\t\t\t\tunlink('pictures/' . $file);\n\n\t\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t\t$constrain->aspectRatio();\n\t\t\t\t})->save($destinationPath . $fileName);\n\t\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t$inputs['image'] = $fileName;\n\t\t\t}\n\n\t\t\t$resource->update($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "8c18bfa316f6f5346468923c884b7854", "score": "0.62746567", "text": "public function update(ResourceRequest $request, $id)\n {\n $resource = $this->resources->findOrFail($id);\n\n $this->resources->update($resource, $request->only([\n 'author_id',\n 'category_id',\n 'title',\n 'body',\n 'description',\n 'meta_description',\n 'status',\n ]));\n\n if ($request->hasFile('mini_image')) {\n $uploadedFile = $request->file('mini_image');\n\n if ($resource->mini_image) {\n Storage::delete('public/' . $resource->mini_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['mini_image' => $pathFile]);\n }\n\n if ($request->hasFile('featured_image')) {\n $uploadedFile = $request->file('featured_image');\n\n if ($resource->featured_image) {\n Storage::delete('public/' . $resource->featured_image);\n }\n\n $pathFile = $uploadedFile->store($this->resources->makeImagePath(), 'public');\n $resource->update(['featured_image' => $pathFile]);\n }\n\n if ($resource->category->isCaseStudies()) {\n return redirect()->route('spark.kiosk.resources.case-studies.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }\n\n return redirect()->route('spark.kiosk.resources.edit', ['id' => $id])\n ->with('alert.success', __('Updated successfully!'));\n }", "title": "" }, { "docid": "125e988ea4b035f1db7a8b5327bfb780", "score": "0.61922735", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"file_upload\" => \"required\",\n \"title\" => \"required|min:1|max:30\",\n \"credit\" => \"required|integer\",\n ]);\n\n $res = Resource::find($id);\n $res->owner_user_id = Auth::id();\n $res->access_role = implode('|', $request->access_role);\n $res->description = $request->description;\n $res->credit = $request->credit;\n // $res->file_upload = FileHelper::saveResourceFile($request->file_upload);\n $res->file_upload = $request->file_upload; // as url\n // $res->type = ($request.file_upload)->getClientOriginalExtension();\n $res->type = \"url\";\n if(!empty($request->book_id) and Book::find($requst->book_id))\n $res->owner_book_id = $request->book_id;\n $res->update();\n \n Session::flash('success', '资源信息修改成功');\n\n return redirect()->route('resource.show', $res->id);\n }", "title": "" }, { "docid": "2faaf8ddd37fb3a3dd00d2067935e627", "score": "0.618546", "text": "public function update(UpdateResourceArticleRequest $request, Resource $resource): JsonResponse\n {\n\n if ($request->hasFile('url')) {\n Storage::disk('article')->delete($resource->url);\n $resource->url = $request->url->store('articles', 'article');\n }\n\n if ($resource->isClean()) {\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar', 422);\n }\n\n $resource->save();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.updated'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "41d9c906adb39164a3ea97f83f0d6b4c", "score": "0.6004039", "text": "public function update(Request $request, $id) {\n //\n $resource = Resource::find($id);\n if($request->resourceislink == \"No\"){\n if($resource->external_link == \"Yes\"){\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|mimes:pdf,xls,xlsm,xlsx,doc,docx,ppt,pptm,pptx,jpeg,bmp,png,bmp,gif,svg',\n ]);\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n ]);\n }\n }else{\n $validator = Validator::make($request->all(), [\n 'resource_name' => 'required',\n 'file' => 'required|url',\n ]);\n }\n\n if ($validator->fails()) {\n $access_log = new AccessLog;\n $access_log->user = Auth::user()->username;\n $access_log->link_accessed = str_replace(url('/'),\"\",url()->current());\n $access_log->action_taken = \"Edit \".$resource->resource_type.\" Resource\";\n $access_log->action_details = \"Editing of \".$resource->resource_type.\" Resource interrupted due to validation errors\";\n $access_log->action_status = \"Failed\";\n $access_log->save();\n\n return back()->withErrors($validator)->withInput()->with('editresource',$resource);\n }else{\n if($request->resourceislink == \"No\"){\n if($request->file){\n //Upload the resource file in storage/app/public/resources folder \n $file_name = (string) ($request->file->store('public/resources'));\n $file_name = str_replace('public/', '', $file_name);\n \n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $file_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n }\n }else{\n $edit_resource = Resource::find($id);\n $edit_resource->resource_name = $request->resource_name;\n $edit_resource->resource_location = $request->file;\n $edit_resource->external_link = $request->resourceislink;\n $edit_resource->subfolder_id = $request->subfolder_id;\n $edit_resource->save();\n } \n \n return back()->with('resouce','Resource was succesfully uploaded')->with('resoucetype',$resource->resource_type);\n }\n }", "title": "" }, { "docid": "1b397375316ae1351b5a50f45f20bc46", "score": "0.6000568", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')){\n $resources = $request->session()->get('resources');\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $priceInput = $request->input('price');\n \n if(isset($resources[$id]) && (isset($resources[$idInput])==false || $idInput==$id)){\n // $resource = $resources[$id];\n $resource = ['id' => $idInput, 'name' => $nameInput, 'price' => $priceInput];\n unset($resources[$id]);\n $resources[$idInput]=$resource;\n $request->session()->put('resources', $resources);\n \n return redirect('resource')->with('message', 'Se editado el elemento correctamente');\n }\n \n }\n return back()->withInput();\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.597514", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.59242314", "text": "public function save($resource);", "title": "" }, { "docid": "c94044d21c7dac20d5d21a469d63f195", "score": "0.59235406", "text": "public function testItShouldUpdateSpecifiedResource()\n {\n $this->json('PUT', $this->base_url . $this->getId(), $this->data, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "9645d8e1c1b4d32587e5589c88868755", "score": "0.5878462", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->fill($request->all());\n $resource->save();\n\n $resource->tags()->sync($request->tags);\n\n $message = 'El recurso literario \"' . $resource->title . '\" fue modificado.';\n $class = 'warning';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "630a533750db7d2a089a96d2e8e1e2d0", "score": "0.5843074", "text": "public function update(Request $request, $id)\n\t{\n\t\t$accessLevel = $request->user()->hasAccessTo('storage', 'edit', 0);\n\t\tif ($accessLevel < 1) {\n\t\t\tthrow new AccessDeniedHttpException('You don\\'t have permission to access this page');\n\t\t}\n\n\t\t$this->validate($request, [\n\t\t\t'title' => 'required'\n\t\t]);\n\n\t\t$storage = storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\t\tif (is_null($storage)) {\n\t\t\treturn 'No such storage';\n\t\t}\n\n\t\t$storage->title = $request->title;\n\t\t$storage->type = $request->type;\n\t\t$storage->description = $request->description;\n\t\t$storage->organization_id = $request->user()->organization_id;\n\n\t\t$storage->save();\n\n\t\tSession::flash('success', 'Новый склад успешно сохранен!');\n\n\t\treturn redirect()->route('storage.show', $storage->storage_id);\n\t}", "title": "" }, { "docid": "a6fd2ebf36845fedc38da71edc963161", "score": "0.58306503", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->available_colors = $request->available_colors;\n $product->available_sizes = $request->available_sizes;\n $product->discount = $request->discount;\n $product->image = $request->image;\n $product->stock = $request->stock;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "f0482e3ac4ae9626608914e5608b9630", "score": "0.58134246", "text": "public function updateStream($path, $resource, array $config = [])\n {\n $result = parent::updateStream($path, $resource, $config);\n\n if ($result && $resource = $this->get($path)) {\n return $this->dispatch(new SyncFile($resource));\n }\n\n return $result;\n }", "title": "" }, { "docid": "44b2a146d07735a49eec32f23fe41df0", "score": "0.5792586", "text": "public function updateById();", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f67879fb9debb5940a340430c2ce7193", "score": "0.5784806", "text": "public function update(Request $request, Problem $problem, Storage $storage)\n {\n if ($storage->name !== $request->name) {\n $isExists = $problem->storages()->where('name', $request->name)->exists();\n if ($isExists) {\n dd(\"storage `\" . $request->name . \"` is already exists\");\n }\n }\n $storage->fill($request->all());\n $storage->save();\n return redirect(route('problems.show', [\n 'problem' => $problem,\n ]));\n }", "title": "" }, { "docid": "3042155ddc4627ea088faa7fbe4fcbfd", "score": "0.57552326", "text": "public function update($id, Request $request)\n\t{\n\n\t\t$entity = $this->manager->getRepository()->findResource($id);\n\n\t\tif (empty($entity))\n\t\t\tabort(404);\n\n\t\t$params = $request->all();\n\t\t$params = array_merge($params, ['resource_container' => $entity, 'user' => $this->getUser()]);\n\n\t\t$entity = $this->manager->updateOrCreate([\n\t\t\t'resource_container_id' => $entity->id,\n\t\t\t'user_id' => $this->getUser()->id\n\t\t], $params);\n\t\t\n\t\treturn $this->success([\n\t\t\t'message' => 'ok',\n\t\t\t'data' => [\n\t\t\t\t'resource' => $this->serialize($entity)\n\t\t\t]\n\t\t]);\n\n\n\t}", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "3ec7c5a8877f8c46b7760a665414271c", "score": "0.5738682", "text": "public function update(Request $request, int $id)\n {\n $data = $request->except(\"image\");\n $product = $this->product->findOrFail($id);\n if($request->hasFile(\"image\") && $request->image->isValid()){\n Storage::delete($product->image);\n $data[\"image\"] = $request->image->store(\"products/\".$request->name);\n }\n $product->update($data);\n return redirect()->route(\"products.index\");\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "6b5928bfd8cfb173f6ff973bf5da429a", "score": "0.5725117", "text": "public function update(Request $request)\n {\n //\n\n $item = $request->id;\n if ($request->hasFile('thumb')) {\n $thumb = $request->file('thumb');\n $thumb_file = $this->uploadImage($thumb, '');\n $data['image'] = $thumb_file;\n\n }\n $data = $request->all();\n\n\n $slug = \\Illuminate\\Support\\Str::slug($data['name']);\n $data['slug'] = $slug;\n\n\n $product = Product::find($item);\n\n $product->fill($data);\n\n if ($product->save()) {\n return redirect()->back()->with('success', 'Product updated Successfully');\n }\n\n }", "title": "" }, { "docid": "9002704608400a526dfa928357d65ebf", "score": "0.57221955", "text": "public function update(Request $request)\n {\n\n $product = Products::find($request->id);\n\n $product->update([\n 'name' => $request->name,\n 'stock' => $request->stock,\n 'id_user' => Auth::user()->id\n ]);\n\n if($request->file('imagen')){\n $imagename = $request->file('imagen')->getClientOriginalName();\n $request->file('imagen')->storeAs('public/image', $imagename);\n // $path = Storage::disk('public')->put('image', $request->file('imagen')->getClientOriginalName());\n $product->fill(['imagen' => 'storage/image/'.$imagename])->save();\n }\n\n return $product;\n }", "title": "" }, { "docid": "72e37fd6c46c81cc34e4aad069244d7f", "score": "0.5696679", "text": "abstract function put($path, $data);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "615ba40be5a0af225501e371af76c0b2", "score": "0.5691626", "text": "public function update(Request $request, $id)\n {\n \n $social = Social::find($id);\n $this->validate(request(), [\n 'name' => 'required',\n 'link' => 'required',\n 'icon' => 'required'\n ]);\n\n Storage::Delete('public/social/'.$social->icon);\n\n if ($request->hasFile('icon')) {\n $filename=$request->icon->getClientOriginalName();\n $request->icon->storeAs('public/social',$filename);\n $social->icon=$filename;\n $social->name = $request->get('name');\n $social->link = $request->get('link');\n $social->save();\n return redirect('/admin/social')->with('success','Social has been updated');\n \n }\n\n\n\n }", "title": "" }, { "docid": "d55f58a252de4e09d616136ab381ea2d", "score": "0.5689798", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'group_id'=>'exists:groups,id|integer',\n 'name'=>'required|min:1|max:16|unique:resources,name,'.$id,\n 'description'=> 'max:255'\n ]);\n\n $resource = Resource::find($id);\n $resource->group_id = $request->get('group_id');\n $resource->name = $request->get('name');\n $resource->description = $request->get('description');\n $resource->save();\n\n return redirect('/resources')->with('success', 'Resource has been updated');\n }", "title": "" }, { "docid": "09f959fbad30c2f941ea086cc7dad93f", "score": "0.56853646", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::find($id);\n $product->fill($request->all())->save();\n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $product->fill(['file' => asset($path)])->save();\n } \n return redirect()->route('products.edit', \n $product->id)->with('info', 'Info de product actualizada con éxito');\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "8c2162a8e7fe286f725a1d03ccd562a3", "score": "0.5662784", "text": "public function update(Request $request, $id)\n {\n $update = HomeT::find($id); \n Storage::disk('public')->delete('img/avatar/'.$update->src);\n $update->src = $request->file('src')->hashName();\n $update->temoignage = $request->temoignage; \n $update->nom = $request->nom; \n $update->prenom = $request->prenom; \n $update->fonction = $request->fonction; \n\n $update->save(); \n $request->file('src')->storePublicly('img/avatar/', 'public');\n\n return redirect()->back(); \n }", "title": "" }, { "docid": "c0268fd89d504e7e3334bdc92717f035", "score": "0.5641325", "text": "public function update() {\n\t\t\n\t\t$mods = $this->_data_modified[$this->_data_position];\n\t\tif (count($mods) < 1) return true; // no changes.\n\t\t\t\n\t\t// Build data\n\t\t$changes = [];\n\t\tforeach ($mods as $mod) $changes[$mod] = $this->__get($mod);\n\t\t\n\t\t// Build URL\n\t\t$url = \"table/\".$this->_table_name.\"/\".$this->__get(\"sys_id\");\n\t\t\n\t\t// Use GlideAccess to run the PUT command \n\t\t// Throw a GlideAccessException or a GlideAuthenticationException on error \n\t\t$result = $this->_access->put($url, json_encode($changes));\n\t\t\t\n\t\t// Clear out the pending updates for this record\n\t\t$this->_data_modified[$this->_data_position] = [];\n\t}", "title": "" }, { "docid": "194348e8143807f54599362cf6318737", "score": "0.5635772", "text": "public function update (object $entity);", "title": "" }, { "docid": "3f82a5c4e0e6d64fd1809d61189f5d3d", "score": "0.56336915", "text": "public function update(Request $request)\n {\n $slider=Slider::find($request->id);\n if($request->hasFile('image')) {\n $file = $request->file('image');\n $file_name = $file->getClientOriginalName();\n $path = $request->file('image')->storeAs('public/slider',$file_name);\n $slider->image=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/slider/' . $Image)){\n $delete= Storage::delete('/public/slider/' . $Image);\n }\n } \n $slider->title=$request->title;\n $slider->updated_at=date('Y-m-d H:m:s');\n $slider->update();\n alert::success('Slider Updated Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "bba4992ee37e44374ffa661fa659a09a", "score": "0.56323135", "text": "public function update (EntityInterface $entity);", "title": "" }, { "docid": "072d1df8727e8fc01d135f9b601cd0cc", "score": "0.5626336", "text": "public function update(Request $request, int $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"name\" => \"required\"\n ]);\n $store = self::store($data, $resource_id);\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'listing category updated successfully']);\n }", "title": "" }, { "docid": "7afe1f5b389ba43a34c655b4630cdebb", "score": "0.56085145", "text": "public function update (Request $request, $id)\n {\n// $product = Product::find($id);\n//\n// $product->name='foo';\n//\n// $product->save();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.5600381", "text": "function setResource($resource);", "title": "" }, { "docid": "c5d23e5b9877982ada89cdd5d607b6f1", "score": "0.5595249", "text": "public function put($path);", "title": "" }, { "docid": "2617ce73a1286e2959b6286b9cbb5cdc", "score": "0.55937576", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required|max:30|unique:sizes,name,'.$id \n ]);\n\n $size = Size::findOrFail($id);\n $size->name = $request->name; \n $size->save();\n\n return new SizeResource($size);\n }", "title": "" }, { "docid": "828dbd6951736580bd5869c57009736a", "score": "0.559071", "text": "public function update(int $resourceId): JsonResponse\n {\n $resource = static::resource();\n $resource = $resource::findOrFail($resourceId);\n\n $request = app(static::resourceFormRequest());\n\n $resource = $resource->fill($request->validated());\n\n DB::transaction(function () use ($resource, $request) {\n $this->authorize('isAdmin');\n $resource->save();\n });\n\n return $this->sendResponse($resource, 'Record Updated Successfully');\n }", "title": "" }, { "docid": "222e617c89991e0979d369309504472e", "score": "0.55868655", "text": "function put($resource, $payload = array(), $headers = array())\n {\n $result = $this->client->put($this->build_url($resource), [\n 'headers' => array_merge([\n 'Content-Type' => $this->getContentType(),\n 'Authorization' => $this->getBearer(),\n 'Content-Length' => (!count($payload)) ? 0 : strlen(json_encode($payload)),\n ], $headers),\n 'body' => json_encode($payload)\n ]);\n\n return $result;\n }", "title": "" }, { "docid": "aeb943a599e58a4bbe6bd7e228755660", "score": "0.55803686", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,\n [\n 'title'=>'required|max:50',\n 'price'=>'required',\n 'description'=>'required|max:100'\n ,\n 'imagePath'=>'required'\n ],[\n 'required'=>'El campo :attribute es obligatorio'\n ]\n );\n $product=Product::find($id);\n $product->title = $request->input('title');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n // $product->imagePath = $request->input('imagePath');\n\n $nombreImagen = str_slug($product->title) . '.' .request()->imagePath->extension();\n // storeAs recibe dos parametros el nombre de la carpeta y el nombre del archivo\n request()->imagePath->storeAs('public', $nombreImagen);\n $product->imagePath = $nombreImagen;\n \n $product->save();\n\n return redirect()->action('Admin\\ProductsController@index');\n\n }", "title": "" }, { "docid": "cc73a907b4a48e339742b8c2bd070415", "score": "0.5572921", "text": "public function update(Request $request, $id) {\n $resource = static::$resource::findOrFail($id);\n \n $data = $request->validate(static::$validation);\n\n $resource->update($data);\n\n foreach($data as $key => $value) {\n if(is_array($value) && method_exists($resource, $key)) {\n call_user_func([$resource, $key])->sync($value);\n }\n }\n\n return redirect($this->getUrl())->with('success', $this->getResourceName(false) . ' updated successfully');\n }", "title": "" }, { "docid": "3220bb444c54147e54b8e439712c9f11", "score": "0.55686116", "text": "public function update(Request $request, $id)\n\t{\n ob_start(); // not needed if output_buffering is on in php.ini\n ob_implicit_flush(); // implicitly calls flush() after every ob_flush()\n\n $product = Product::findOrFail($id);\n $this->validate($request,\n [\n 'dish' => 'required|min:5',\n 'menu_category_id' => 'required|Integer',\n 'price' => 'required'\n ]\n );\n\n \n $product->update($request->all());\n\n if($request->file('image')) {\n\n // get product id and sku and use it to identify image\n $imageName = $product->sku . '-' . $product->id . '.' . \n $request->file('image')->getClientOriginalExtension();\n\n // save the new image\n $request->file('image')->move(\n base_path() . '/public/images/', $imageName\n );\n $product->image = $imageName;\n\n // update product with new image name\n $product->update();\n //flush();\n ob_clean();\n ob_flush();\n //clearstatcache ();\n $products = Product::all();\n\n } // if updated image was submitted\n \n return redirect('products_admin');\n }", "title": "" }, { "docid": "c270afb4bf92903f6af7a541b2310395", "score": "0.55680007", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('slug', $id)->first();\n $product->name = $request->name;\n $product->slug = str_slug($request->name);\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->old_price = $request->old_price;\n $product->min_order = $request->min_order;\n $product->description = $request->description;\n\n if(!$request->has('in_stock')){\n $product->in_stock = false;\n }else{\n $product->in_stock = true;\n }\n\n if(!$request->has('is_featured')){\n $product->featured = false;\n }else{\n $product->featured = true;\n }\n\n if($request->hasFile('image')){\n $path = storage_path('app/public/products');\n \\File::isDirectory($path) or \\File::makeDirectory($path, 0777, true, true);\n\n $image = $request->file('image');\n $filename = time().'.'.$image->getClientOriginalExtension();\n $image->move($path,$filename);\n $oldfile = $product->photo;\n $product->photo = $filename;\n \\File::delete($path.'/'.$oldfile);\n }\n\n $product->update();\n \\Session::flash('success', 'Product was successfully updated');\n return back();\n }", "title": "" }, { "docid": "9b0a1be95f266f1629ffadd26d65152d", "score": "0.55679286", "text": "protected function updateResource($resource, $id, array $data, $message = null)\n {\n $resource = $resource->findOrFail($id);\n\n $resource->update($data);\n\n return $resource;\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a262aa354909e0f60e98829ffd019274", "score": "0.5557795", "text": "public function update(Request $request, $id)\n {\n $instrument = Instruments::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $instrument->path;\n }\n\n $instrument->update([\n 'name' => $request->name,\n 'href' => $request->href,\n 'description' => $request->content,\n 'photo' => $path\n ]);\n session()->flash('success','Инструмент успешно обновлен');\n return redirect()->route('instrument.index');\n }", "title": "" }, { "docid": "392bdf3b4d83d7a822d671646207f552", "score": "0.55553967", "text": "public function update($request, int $id);", "title": "" }, { "docid": "3cc3c8178bfb516c83781b7b045205b3", "score": "0.5553084", "text": "public function update()\n\t{\n\t\t$this->reset_error_msg();\n\t\t$result = ajax::asset_update(\n\t\t\t\t\t\t$this->schema->folder_id,\n\t\t\t\t\t\t$this->schema->view_name,\n\t\t\t\t\t\t$this->fields,\n\t\t\t\t\t\t$this->id\n\t\t);\n\t\tif (!is_int($result)) {\n\t\t\t$this->set_error_msg($result);\n\t\t}\t\n\t}", "title": "" }, { "docid": "39ec1d6074d8d2034e596ad13d30da68", "score": "0.55506486", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|min:1',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'quantity' => 'required|min:1',\n ]);\n\n $product = Product::find($id);\n $product->store_id = Auth::guard('store')->user()->id;\n $product->product_name = $request->get('name');\n $product->product_description = $request->get('description');\n $product->product_price = $request->get('price');\n $product->product_quantity = $request->get('quantity');\n $current_image = $product->product_image;\n $new_image = \"\";\n\n if ($request->has('subcategory')) {\n $product->subcategory_id = $request->get('subcategory');\n }\n if ($request->has('parameter')) {\n $product->product_parameter_id = $request->get('parameter');\n }\n if ($request->has('image')) {\n $new_image = $request->file('image');\n $extension = $new_image->getClientOriginalExtension();\n $filename = 'product-' . time() . '.' . $extension;\n $product->product_image = $filename;\n $new_image->storeAs('products', $filename, 'public');\n }\n $product->save();\n if (Storage::disk('public')->exists('products/' . $new_image)) {\n Storage::disk('public')->delete('products/' . $current_image);\n }\n return redirect()->route('products.index')->with('success', 'Product updated');\n }", "title": "" }, { "docid": "b2529b99a7a37449008d06dce086f0aa", "score": "0.55367374", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'image' => ['max:1024','nullable'],\n 'link' => ['url','nullable']\n ]);\n\n $store = Promotionalslider::find($id);\n $store->link = $request->link;\n if($request->hasfile('image')){\n\n $imagePath = $store->image;\n\n if(File::Exists($imagePath)){\n File::delete($imagePath);\n }\n\n $filename = str_replace(' ','-', $request->image->getClientOriginalName());\n $request->image->move(public_path('media/promotional_slider/'),$filename);\n $store->image ='public/media/promotional_slider/'.$filename;\n }\n \n\n if($store->save()){\n $notification = array(\n 'message'=>'Successfully Promotional Slider Updated',\n 'alert-type'=>'success'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }else{\n $notification = array(\n 'message'=>'Something Went Wrong',\n 'alert-type'=>'error'\n );\n\n return redirect()->route('promotional-slider')->with($notification);\n }\n }", "title": "" }, { "docid": "91039ce0cfc444382b037c86ba4ab01d", "score": "0.55300915", "text": "public function update( $data );", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.5526578", "text": "public abstract function update($data);", "title": "" }, { "docid": "21ec885e595c2bf310bc026dbe22811d", "score": "0.5520187", "text": "public function update(Request $request, $id)\n {\n\n\n $contents = $request->data;\n\n if ($id === 'options') {\n\n Storage::put('options.json', json_encode($contents));\n\n }\n\n if ($id === 'templates') {\n\n Storage::put('templates.json', json_encode($contents));\n\n }\n\n if ($id === 'documentation') {\n\n Storage::put('documentation.json', json_encode($contents));\n\n }\n\n\n return response('', 200);\n }", "title": "" }, { "docid": "ac2aad33da58e5ad706eece6ab1eea86", "score": "0.55200577", "text": "public function update(Request $request, $id): \\Illuminate\\Http\\RedirectResponse\n {\n $request->validate([\n 'name' => 'required',\n ]);\n $br = BaseResources::find($id);\n $br->name = $request->name;\n $br->save();\n return redirect()->route('bases.index')\n ->with('success','Base Resource has been updated successfully');\n }", "title": "" }, { "docid": "8f3102dfb73015454da2f2685b058666", "score": "0.5517063", "text": "public function update(Request $request, $id)\n {\n // $request->validate([\n // 'title' => 'required',\n // 'price' => 'required',\n // 'description' => 'required|numeric',\n // 'image' => 'required|image|mimes:jpeg,png,jpg,gif',\n // ]);\n\n\n $product = Product::find($id);\n $product->title = $request->get('Title');\n $product->description = $request->get('Description');\n //$product->image = $request->get();\n $product->price = $request->get('Price');\n if($request->hasFile('Image')){\n $file = $request->file('Image');\n $filename = time().'.'.$file->getClientOriginalExtension();\n $location = public_path('/images');\n $file->move($location,$filename);\n $oldImage = $product->image;\n \\Storage::delete($oldImage);\n $product->image = $filename;\n\n }\n $product->save();\n return back()->withInfo('product successfully update');\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "b54270ca9c777eb769ba1aabcadc3d1e", "score": "0.55085415", "text": "public function update($object){\n \n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "550e526ae84b71f87da655893d62fd3e", "score": "0.55022335", "text": "public function update(Request $request, $id)\n {\n $productPic = $this->productRepo->find($id);\n $product = $request->except('_token', 'photo', '_method', 'product_categ', 'ar', 'en', 'volume', 'measure', 'num_of_item', 'item_cost');\n $product_categ = $request->get('product_categ');\n\n $activeLangCode = \\LanguageHelper::getLangCode();\n\n $product_trans = $request->only($activeLangCode);\n\n if ($request->hasFile('photo')) {\n // Delete old image first.\n $thumbnail_path = public_path() . '/images/products/thumb/' . $productPic->photo;\n File::delete($thumbnail_path);\n\n // Save the new one.\n $image = $request->file('photo');\n $imageName = $this->upload($image, 'products', true);\n $product['photo'] = $imageName;\n }\n\n $this->productRepo->update($id, $product, $product_trans, $product_categ);\n\n return redirect('/admin-panel/product')->with('updated', 'updated');\n }", "title": "" }, { "docid": "a43ab06ada401992dd7f3fdb88d45bfc", "score": "0.5498034", "text": "public function update(Model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "e12ba95416c234deaa01e27943c5b363", "score": "0.5497075", "text": "public function update(ProductStoreRequest $request, $id)\n {\n //\n $product = Product::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->category_id = $request->category_id;\n $product->price = $request->price;\n $product->image_path = $product->image_path;\n\n \n if($product->save()) {\n if($request->hasFile('image_path')) {\n $extension = $request->file('image_path')->getClientOriginalExtension();\n\n $filename = $product->id . '.' . $extension;\n\n $path = $request->file('image_path')->storeAs('products', $filename);\n $product->image_path = $filename;\n $product->save();\n }\n }\n\n return redirect()->route('products.index')->with('success', 'Product has been updated');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "5e25fde2b05dc8aa69161eca66edd608", "score": "0.5493595", "text": "public function update()\n\t\t{\n\t\t\t// with an insert instead.\n\t\t\t$this->save();\n\t\t}", "title": "" }, { "docid": "97425bf86b91309c01997fb129746a78", "score": "0.5489399", "text": "public function testUpdate() {\n\n $book = $this->bookFactory->generate(1, TRUE);\n $book->set('name', 'Changed name');\n $res = $this->patch('/api/books' . $book->getId(), $this->toJson($book->getValues(TRUE)));\n $this->assertEquals(204, $res->getStatusCode());\n $book = $this->bookStorage->find($book->getId());\n $this->assertEquals('Changed name', $book->get('name'));\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "684d005a26a2cb523ebddd9952606e58", "score": "0.54879177", "text": "public function update(Request $request, Product $product)\n {\n //\n \n $product=Product::find($request->input('id'));\n $filename=$product->image;\n if($request->hasFile('img')){\n Storage::delete($filename);\n $filename=Storage::put('public/products', $request->file('img'));\n }\n $product->name=$request->input('name');\n $product->image=$filename;\n $update=$product->save();\n if($update){\n return redirect()->route('product.show',['product'=>$product])->with(['scucess' => 'Sucessfully updated']);\n }\n }", "title": "" }, { "docid": "69899e5cc810b430e81a78ef78bbb9aa", "score": "0.54833865", "text": "public function putAction()\n\t{\n\t\t$this->_connectionApi->put();\n\t}", "title": "" }, { "docid": "f84f36825279804eeb3fa246acad7d33", "score": "0.5482953", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n unset($data['_token']);\n unset($data['_method']);\n unset($data['image']);\n $rs = Pr::find($id)->update($data);\n if($rs) {\n if($request->image){\n $prs = Pr::find($id);\n $image_u = $prs->media;\n $image_u = str_replace('/storage/app/', '', $image_u);\n $path = '/storage/app/'.@$request->file('image')->store('prs');\n $prs->image = $path;\n $prs->save();\n Storage::delete($image_u);\n }\n return redirect(route('prs.index'));\n }else{\n return back();\n }\n }", "title": "" }, { "docid": "c583b303a0fc1fb0c4ff1107b3e09e10", "score": "0.5479377", "text": "public function update(StoreSlide $request, $id)\n {\n $slide = Slide::find($id);\n $slide->url = $request->input('url');\n\n if ($request->hasFile('cover')) {\n // upload and rsize image\n $file_handler = new CarouselFiles($slide, $request);\n $image = $file_handler->save();\n\n $slide->image = $image;\n }\n\n $slide->save();\n\n return redirect()->route('admin_carousel_edit', ['slide' => $id]);\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.5478411", "text": "public function update($data) {\n }", "title": "" }, { "docid": "749485fd3edd17fca5d56cd2e62d0c66", "score": "0.547553", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n\n $old_image = $item->image_url;\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'items');\n $requestData['image_url'] = $path;\n File::delete(public_path() . $old_image);\n\n }\n\n $item->update($requestData);\n\n return redirect('/admin/items');\n }", "title": "" }, { "docid": "9f003d2b5bf2d688d40ed0c072d56402", "score": "0.5468303", "text": "public function update(Request $request, $id)\n {\n Auth::User()->authorizeRoles(['admin']);\n $this->validate($request, [\n 'title' =>'required',\n 'description' =>'required',\n 'isbn' =>'required',\n 'quantity' =>'required',\n 'price' =>'required',\n 'author' =>'required',\n 'genre' =>'required',\n 'image' =>'image|nullable|max:1999'\n ]);\n\n $item = Catalog::find($id);\n if ($request->hasFile('image')) {\n $path = $request->file('image')->store('catalog_images', 's3');\n if ($item->image != 'catalog_images/noimage.jpg') {\n Storage::disk('s3')->delete($item->image);\n }\n $item->image=$path;\n }\n $item->title=$request->input('title');\n $item->description=$request->input('description');\n $item->isbn=$request->input('isbn');\n $item->quantity=$request->input('quantity');\n $item->price=$request->input('price');\n $item->authorId=$request->input('author');\n $item->genreId=$request->input('genre');\n $item->save();\n return redirect('/catalog/'.$id)->with('success', 'Item updated');\n }", "title": "" }, { "docid": "dbac649412e8591fc3a2a2615f2f7767", "score": "0.5468077", "text": "abstract protected function update($entity);", "title": "" }, { "docid": "6555dceeb8fb592d28c1c54627f3087e", "score": "0.5467873", "text": "public static function updateResource($path, $object, $email)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n self::connection()->addHeader('X-BEHALF-KEY', $email);\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "fff4ed84e179c6d810f4109953693135", "score": "0.5464452", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "4360333bf1732261e8e76d77713982a2", "score": "0.54556817", "text": "private function updateEntity(Model\\BaseModel $entity, string $uri, string $resourceFieldKey): void {\n\t\t$tags = [];\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// Preserve the tags temporarily.\n\t\t\t// We'll sync them later.\n\t\t\t$tags = $entity->getTags();\n\t\t}\n\n\t\t$rawApiResponse = $this->communicator->put($uri, [], [\n\t\t\t$resourceFieldKey => $entity->export(),\n\t\t]);\n\n\t\t$newData = $rawApiResponse->getValue(sprintf('[%s]', $resourceFieldKey));\n\t\t$entity->hydrate($newData);\n\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// The requests (and hydration) above made us lose the tags,\n\t\t\t// since they're managed through another API.\n\t\t\t// Let's assign/de-assign tags now.\n\t\t\t$this->ensureTagsSynced($entity, $tags);\n\t\t}\n\t}", "title": "" }, { "docid": "95ec1039e714eda8d36c46e04fc2aeae", "score": "0.54446787", "text": "public function updateResource(Resources $resources) {\n $preparedStmt = \"UPDATE \" . $resources->getTableName() . \" SET title=?, categoryName=?, linkResource=? WHERE resourceID=?\";\n $resources->setSql($preparedStmt);\n $response = $this->connection->update($resources);\n return $response;\n }", "title": "" }, { "docid": "7db59e65f55b9762d20b09aede45101b", "score": "0.54399514", "text": "public function update(Request $request, Product $product)\n {\n if($request['image']){\n $file = $request['image'];\n $image = $this->ImageUploader($file,'images/');\n// unlink($product->image);\n }else{\n $image = $product->image;\n }\n if($request['file']){\n $file = $request['image'];\n $val = $this->ImageUploader($file,'files/');\n// unlink($product->file);\n }else{\n $val = $product->file;\n }\n\n\n $data = $request->all();\n $product->tags()->sync($data['tag_id']);\n $data['image'] = $image;\n $data['file'] = $val;\n\n $product->update($data);\n return redirect(route('product.index'));\n }", "title": "" }, { "docid": "80ec716f79dfea9cd0d35ec83acd6fad", "score": "0.54376215", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n \t\n \tif(isset($input['image']))\n\t \t$input['image'] = $this->upload ($input['image']);\n \t\n \tItem::findOrFail($id)->update($input);\n \t\n \treturn redirect()->back();\n }", "title": "" }, { "docid": "45006333af499b7a8ef5e992e8465995", "score": "0.54331666", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n\t\tself::storeOrUpdate($product, $request);\n\n\t\treturn redirect('/products')->with('edited', \"Product edited: $product->name\");\n }", "title": "" }, { "docid": "8fb9613a7e05f846bb10235d1d3c4c4b", "score": "0.54254407", "text": "public function update(Request $request, $id)\n {\n $validation=$request->validate([\n \"text\"=>\"required\",\n\n \n ]);\n $update=Slider::find($id);\n if (request()->hasFile(key:'img')) {\n $img=request()->file(key:'img')->hashName();\n request()->file(key:'img')->storeAs(path:'',name:$img);\n $update->img=$img;\n }\n $update->text=$request->text;\n $update->save();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "2ff7fd3eab671b99901b6f6734766160", "score": "0.54233396", "text": "abstract public function update($entity);", "title": "" }, { "docid": "f34a06d4191c968bf71a45ea518e7ed0", "score": "0.54212976", "text": "public function updateObject( $id, $acl = null, $metadata = null, \n\t\t$extent = null, $data = null, $mimeType = null, $checksum = null );", "title": "" }, { "docid": "b67a35c68f5872515b02fce609275aaa", "score": "0.54202235", "text": "public function update(Request $request, $id)\n {\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n\n $destinationPath = 'uploads/products/images'; // upload path\n $extension = $file->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111,99999).'.'.$extension; // renameing image\n\n $imageName = $destinationPath . '/' . $fileName;\n\n $file->move($destinationPath, $fileName); // uploading file to given path \n\n $picPath = $imageName;\n\n }else{\n $picPath = $product->pic;\n }\n \n $name = $request->get('product_name') ?: $product->name;\n $desc = $request->get('product_desc') ?: $product->desc;\n $price = $request->get('product_price') ?: $product->price; \n\n $product = \\App\\Product::find($id)->update([\n 'name' => $name,\n 'desc' => $desc,\n 'price' => $price,\n 'pic' => $picPath\n ]);\n\n return redirect('/admin/viewProducts');\n }", "title": "" }, { "docid": "cdb8493452b057388fcb678d2dccb96c", "score": "0.5417866", "text": "public function update($id, Request $request);", "title": "" } ]
b37e4729bf86264a544576a4cd992b5d
Alignements en HTML (Oldstyle, preferer CSS) Cette fonction cree le paragraphe s'il n'existe pas (texte sur un seul para)
[ { "docid": "bbdc16d894ba8b26c08caa9fe60521bf", "score": "0.76927537", "text": "function aligner($letexte, $justif='') {\n\t$letexte = trim($letexte);\n\tif (!strlen($letexte)) return '';\n\n\t// Paragrapher proprement\n\t$letexte = paragrapher($letexte, true);\n\n\t// Inserer les alignements\n\tif ($justif)\n\t\t$letexte = str_replace(\n\t\t'<p class=\"spip\">', '<p class=\"spip\" align=\"'.$justif.'\">',\n\t\t$letexte);\n\n\treturn $letexte;\n}", "title": "" } ]
[ { "docid": "dbe74698e2653906f904c4596af5c83a", "score": "0.655014", "text": "function reemplazar($cual){\n\t$cual = str_replace('<p align=\"justify\">', \"\" , $cual);\n\treturn $cual;\n}", "title": "" }, { "docid": "a661446eeb837fe0c042d349ee3d943e", "score": "0.6172739", "text": "function do_bbcode_align($action, $attr, $content, $params, $node_object) {\n\treturn '<div style=\"text-align:'. $attr['default'] .'\">'. $content .'</div>';\n}", "title": "" }, { "docid": "1a8dfa60fe532dece24ff35a2d3d30d9", "score": "0.597064", "text": "public function setTitleAlign($align);", "title": "" }, { "docid": "085d5889b352a1fb61cda1026f488f1f", "score": "0.59397614", "text": "function IParagrafo($stId=null, $chAlign='J') {\n\tparent::IComponenteBase();\n\t$this->setTag('p');\n\t$this->setAlign($chAlign);\n}", "title": "" }, { "docid": "077cc0f1f1b43464882b0ee0705355f5", "score": "0.57388586", "text": "function printTextFiller($numParagraphs = 1)\n{\n $text1 = \" Lorem ipsum dolor sit amet, consectetur adipisicing elit,\" . \"\\n\" .\n \" sed do eiusmod tempor incididunt ut labore et dolore magna\" . \"\\n\" . \n \" aliqua. Ut enim ad minim veniam, quis nostrud exercitation \" . \"\\n\" .\n \" ullamco laboris nisi ut aliquip ex ea commodo consequat. \" . \"\\n\".\n \" Duis aute irure dolor in reprehenderit in voluptate velit \" . \"\\n\".\n \" esse cillum dolore eu fugiat nulla pariatur. Excepteur sint \" . \"\\n\".\n \" occaecat cupidatat non proident, sunt in culpa qui officia \" . \"\\n\".\n \" deserunt mollit anim id est laborum. \" . \"\\n\";\n $text2 = \"Nunc velit dolor, consequat vel elementum a, sollicitudin \".\"\\n\".\n \"eget nulla. Quisque imperdiet faucibus arcu, at rutrum sem \" . \"\\n\".\n \"malesuada tempor. Ut rhoncus convallis placerat. Pellentesque \" . \"\\n\".\n \"varius justo odio. Quisque eu sem leo, nec rutrum tellus. \" . \"\\n\".\n \"In hac habitasse platea dictumst. Nulla dictum accumsan \" . \"\\n\".\n \"facilisis. Quisque vitae dolor eu velit faucibus volutpat. \" . \"\\n\".\n \"Cras non lectus id nibh pulvinar tincidunt. Donec facilisis \" . \"\\n\".\n \"pharetra eros ullamcorper tempor. Praesent non ullamcorper urna. \".\"\\n\".\n \"Quisque eget nisl id massa convallis aliquet in laoreet felis. \" .\"\\n\".\n \"Nulla facilisi. Pellentesque sodales, risus id semper gravida, \" . \"\\n\".\n \" nisi elit aliquam nunc, in hendrerit urna risus eu purus. \" . \"\\n\".\n \"Sed condimentum tempus condimentum. Mauris lacinia viverra \" . \"\\n\".\n \"eros sed sollicitudin. Maecenas tincidunt luctus tortor, \" . \"\\n\".\n \" ac bibendum lorem molestie id. Proin hendrerit diam eu \" . \"\\n\".\n \" libero consequat in aliquet nibh commodo. \" . \"\\n\" ; \nfor($i=0;$i< $numParagraphs ; $i++) {\n if ($i%2==0){\n print $text1;\n }\n else{\n print $text2;\n }\n print \"<br />\\n\";\n}\n}", "title": "" }, { "docid": "8f465f8bf6f0c4585a0fb82dc6d11dc4", "score": "0.57020104", "text": "public function getTextAlign()\n\t{\n\t\treturn array(\n\t\t\t'left',\n\t\t\t'right',\n\t\t\t'center',\n\t\t\t'justify'\n\t\t);\n\t}", "title": "" }, { "docid": "cd55135dda1a4d1185c0b5ae101c6a72", "score": "0.5698669", "text": "public function getPalignment($dom, $html, $username, $StudentFiles)\n\t{\n\t\t$paragraphs = $dom->getElementsByTagName('p');\n\t\t// Alignment types, ignoring left, as that's default\n\t\t$alignment_type = array(\n\t\t\t\t\t\t'right' => 0,\n\t\t\t\t\t\t'center' => 0,\n\t\t\t\t\t\t'justify' => 0\n\t\t\t\t\t\t);\n\n\t\t// Search for inline paragraph alignment types.\n\t\t// Left is default, so no need to search for it.\n\t\tforeach($alignment_type as $type=>$value)\n\t\t{\n\t\t\tforeach($paragraphs as $paragraph)\n\t\t\t{\n\t\t\t if($paragraph->getAttribute('align') === $type)\n\t\t\t {\n\t\t\t\t$alignment_type[$type]++;\n\t\t\t }\n\t\t\t elseif($paragraph->hasAttribute('style'))\n\t\t\t {\n\t\t\t\t$style = $paragraph->getAttribute('style');\n\t\t\t\tif((strtolower(substr($style, strlen(\"text-align:\"), strlen($type))) === $type) \n\t\t\t\t\t|| (strtolower(substr($style, strlen(\"text-align: \"), strlen($type))) === $type))\n\t\t\t\t{\n\t\t\t\t\t$alignment_type[$type]++;\n\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Search Embedded CSS for paragraphy alignment type\n\t\tpreg_match_all('/\\b(?:p\\s*?[{]\\s*(text-align.*?)(?=[;}]))/', $html, $matches);\n\t\t//print_r($matches);\n\n\t\tforeach($alignment_type as $type=>$value)\n\t\t{\n\t\t\tforeach($matches[1] as $match)\n\t\t\t{\n\t\t\t\tif(strpos(strtolower($match), $type) !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$alignment_type[$type]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Search in external CSS file\n\t\tforeach($StudentFiles[\"css\"] as $StudentFile)\n\t\t{\n\t\t\tif($StudentFile->getusername() === $username &&\n\t\t\t\t(strpos(strtoupper($StudentFile->getFilename()), \"CA2\") !== FALSE))\n\t\t\t{\n\t\t\t\t//echo \"Checking: \" . $StudentFile->getFilepath() . \"\\n\";\n\t\t\t\t$cssfile = file_get_contents($StudentFile->getFilepath());\n\t\t\t\t\t\t\t\n\t\t\t\tpreg_match_all('/\\b(?:p\\s*?[{]\\s*(text-align.*?)(?=[;}]))/', $cssfile, $matches);\n\t\t\t\tforeach($alignment_type as $type=>$value)\n\t\t\t\t{\n\t\t\t\t\tforeach($matches[1] as $match)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(strpos(strtolower($match), $type) !== FALSE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$alignment_type[$type]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\n\t\t// Only get a mark if all 3 types are found. Left is ignored as that's the default one.\n\t\tif(($alignment_type['right'] > 0) && ($alignment_type['center'] > 0) ||\n\t\t ($alignment_type['right'] > 0) && ($alignment_type['justify'] > 0) ||\n\t\t ($alignment_type['center'] > 0) && ($alignment_type['justify'] > 0))\n\t\t{\n\t\t\t$this->ca2Marks += 0.25;\n\t\t\t$this->ca2Comments .= \"At least 3 types of paragraph alignment used: Good\";\n\t\t}\n\t\telseif(\n\t ($alignment_type['right'] > 0) && ($alignment_type['center'] === 0) && ($alignment_type['justify'] === 0)\n\t|| ($alignment_type['right'] === 0) && ($alignment_type['center'] > 0) && ($alignment_type['justify'] === 0)\n\t|| ($alignment_type['right'] === 0) && ($alignment_type['center'] === 0) && ($alignment_type['justify'] > 0)\n\t\t) \n\t\t{\n\t\t\t$this->ca2Marks += 0.125;\n\t\t\t$this->ca2Comments .= \"Need to use 3 types of alignment: Left Right Center and Justify\";\n\t\t}\n\t\telseif(($alignment_type['right'] === 0) && ($alignment_type['center'] === 0)\n\t\t\t\t&& ($alignment_type['justify'] === 0)\n\t\t)\n\t\t{\n\t\t\t$this->ca2Comments .= \"No paragraph alignments found.\";\n\t\t}\n\t}", "title": "" }, { "docid": "cb2cf81e56ffb2cb94682aec606c59f4", "score": "0.5549061", "text": "function MultiAlignCell($w,$h,$text,$border=0,$ln=0,$align='L',$fill=false)\n{\n $x = $this->GetX() + $w;\n $y = $this->GetY();\n\n // Make a call to FPDF's MultiCell\n $this->MultiCell($w,$h,$text,$border,$align,$fill);\n\n // Reset the line position to the right, like in Cell\n if( $ln==0 )\n {\n $this->SetXY($x,$y);\n }\n}", "title": "" }, { "docid": "cb2cf81e56ffb2cb94682aec606c59f4", "score": "0.5549061", "text": "function MultiAlignCell($w,$h,$text,$border=0,$ln=0,$align='L',$fill=false)\n{\n $x = $this->GetX() + $w;\n $y = $this->GetY();\n\n // Make a call to FPDF's MultiCell\n $this->MultiCell($w,$h,$text,$border,$align,$fill);\n\n // Reset the line position to the right, like in Cell\n if( $ln==0 )\n {\n $this->SetXY($x,$y);\n }\n}", "title": "" }, { "docid": "8e4fd4b9ded85be326e1252ac98092a9", "score": "0.55488634", "text": "function paragrafos($trecho) {\n// Tks André Tobias && http://ma.tt/2003/01/updated-autop/\n\tif ( (blogparm('BREAKLINES') === false) || (trim($trecho) === '') ) return '';\n\t$trecho = $trecho . \"\\n\";\n\t$blocos_pre = array();\n\t// remove o conteúdo de todos os blocos <pre> e guarda num array, para reinserir depois\n\tif ( strpos($trecho, '<pre') !== false ) {\n\t\t$trecho_sub = explode( '</pre>', $trecho );\n\t\t$par_end = array_pop($trecho_sub);\n\t\t$trecho = '';\n\t\t$i = 0;\n\t\tforeach ( $trecho_sub as $trecho_part ) {\n\t\t\t$start = strpos($trecho_part, '<pre');\n\t\t\tif ( $start === false ) {\n\t\t\t\t$trecho .= $trecho_part;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = \"<pre bloco-$i></pre>\";\n\t\t\t$blocos_pre[$name] = substr( $trecho_part, $start ) . '</pre>';\n\t\t\t$trecho .= substr( $trecho_part, 0, $start ) . $name;\n\t\t\t$i++;\n\t\t}\n\t\t$trecho .= $par_end;\n\t}\n\t$pipe=\"|\";\t\n\t// troca quebras sucessivas em HTML por ASCII\n\t$trecho = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $trecho);\n\t// insere uma quebra antes de cada bloco, 2 quebras depois\n\t$bloqueiras=\"p;ul;ol;li;dd;dt;dl;div;hr;blockquote;h1;h2;h3;h4;h5;h6;pre;fieldset;form;option;select;map;area;table;tr;td;thead;tfoot;caption;tbody;math;style\";\n\t$bloqueiras=\"(?:\".strtr($bloqueiras,\";\",$pipe).\")\";\n\t$bigblocks='form|div|address';\n\t$smallblocks='pre|p|ul|ol|li|td|div|dl|dd|dt|th';\n\t$trecho = preg_replace('!(<' . $bloqueiras . '[^>]*>)!', \"\\n$1\", $trecho);\n\t$trecho = preg_replace('!(</' . $bloqueiras . '>)!', \"$1\\n\\n\", $trecho);\n\t// substitui quebras MS-DOS por quebras UNIX, trata quebras múltiplas (2 ou +)\t\n\t$trecho = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $trecho); \n\t$trecho = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $trecho); \n\n\t// divide os parágrafos (.*\\n\\n) em um array\n\t$trechos = preg_split('/\\n\\s*\\n/', $trecho, -1, PREG_SPLIT_NO_EMPTY);\n\t$trecho = '';\n\n\t// marca todo paragrafo como <p>.*</p>\t\n\tforeach ( $trechos as $paragrafo )\n\t\t$trecho .= '<p>' . trim($paragrafo, \"\\n\") . \"</p>\\n\";\n\n\t// remove parágrafos vazios\n\t$trecho = preg_replace('|<p>\\s*</p>|', '', $trecho);\n\t\n\t// casos especiais em que o <p> precisa ser movido ou removido\n\t$trecho = preg_replace(';<p>([^<]+)</('.$bigblocks.')>;',\"<p>$1</p></$2>\", $trecho);\n\t$trecho = preg_replace(\";<p>(<li.+?)</p>;\",\"$1\",$trecho);\n\t$trecho = preg_replace(';<p><blockquote([^>]*)>;i',\"<blockquote$1><p>\",$trecho);\n\t$trecho = str_replace('</blockquote></p>','</p></blockquote>', $trecho);\n\t$trecho = preg_replace(';<p>\\s*(</?'.$bloqueiras.'[^>]*>)\\s*</p>;',\"$1\",$trecho);\n\t$trecho = preg_replace(';<p>\\s*(</?'.$bloqueiras.'[^>]*>);',\"$1\",$trecho);\n\t$trecho = preg_replace(';(</?'.$bloqueiras.'[^>]*>)\\s*</p>;',\"$1\", $trecho);\n\t// remonta o trecho\n\t$trecho = preg_replace_callback(';<(script|style).*?<\\/\\\\1>;s','preg_quebras',$trecho);\n\t$trecho = preg_replace(';(?<!<br />)\\s*\\n;',\"<br />\\n\",$trecho); \n\t$trecho = str_replace('<xXzZ />',\"\\n\", $trecho);\n\t$trecho = preg_replace(';(</?'.$bloqueiras.'[^>]*>)\\s*<br />;',\"$1\",$trecho);\n\t$trecho = preg_replace(';<br />(\\s*</?(?:'.$smallblocks.')[^>]*>);','$1',$trecho);\n\t$trecho = preg_replace( \";\\n</p>$;\",'</p>', $trecho );\n\tif (0<count($blocos_pre) )\n\t\t$trecho = str_replace(array_keys($blocos_pre), array_values($blocos_pre), $trecho);\n\treturn $trecho;\n}", "title": "" }, { "docid": "39a60640b28cbce9086b8ea14a2d1f0f", "score": "0.5548848", "text": "function leftFloatAlign()\n\t{\n\t\t$this->content_obj->setHorizontalAlign(\"LeftFloat\");\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "54089a1042901753f017cdb39763869c", "score": "0.554363", "text": "function leftAlign()\n\t{\n\t\t$this->content_obj->setHorizontalAlign(\"Left\");\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "eb83eb38ff77d176ca4509013157073b", "score": "0.54982483", "text": "function centerAlign()\n\t{\n\t\t$this->content_obj->setHorizontalAlign(\"Center\");\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "8a71e1fa3b6a74b01d25bb4f27c52c12", "score": "0.5451214", "text": "function supimpa_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#supimpa {\n\t\tfloat: $x;\n\t\tpadding-$x: 15px;\n\t\tpadding-top: 5px;\t\t\n\t\tmargin: 0;\n\t\tfont-size: 11px;\n\t}\n\t</style>\n\t\";\n}", "title": "" }, { "docid": "c21a5f57a8f6a054a4bd37e24d524c58", "score": "0.5424401", "text": "function wpautop($pee, $br = 1)\n\t{\n\t\t$pee = $pee . \"\\n\"; // just to make things a little easier, pad the end\n\t\t$pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n\t\t// Space things out a little\n\t\t$allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)';\n\t\t$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\n\t\t$pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n\t\t$pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); // cross-platform newlines\n\t\tif ( strpos($pee, '<object') !== false ) {\n\t\t\t$pee = preg_replace('|\\s*<param([^>]*)>\\s*|', \"<param$1>\", $pee); // no pee inside object/embed\n\t\t\t$pee = preg_replace('|\\s*</embed>\\s*|', '</embed>', $pee);\n\t\t}\n\t\t$pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee); // take care of duplicates\n\t\t// make paragraphs, including one at the end\n\t\t$pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$pee = '';\n\t\tforeach ( $pees as $tinkle )\n\t\t\t$pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n\t\t$pee = preg_replace('|<p>\\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace\n\t\t//$pee = preg_replace('!<p>([^<]+)\\s*?(</(?:div|address|form)[^>]*>)!', \"<p>$1</p>$2\", $pee);\n\t\t$pee = preg_replace( '|<p>|', \"$1<p>\", $pee );\n\t\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); // don't pee all over a tag\n\t\t$pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); // problem with nested lists\n\t\t$pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n\t\t$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n\t\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n\t\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n\t\tif ($br) {\n\t\t\t$pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', create_function('$matches', 'return str_replace(\"\\n\", \"<WPPreserveNewline />\", $matches[0]);'), $pee);\n\t\t\t$pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); // optionally make line breaks\n\t\t\t$pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n\t\t}\n\t\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n\t\t$pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n\t\tif (strpos($pee, '<pre') !== false)\n\t\t\t$pee = preg_replace_callback('!(<pre.*?>)(.*?)</pre>!is', 'clean_pre', $pee );\n\t\t$pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\n\t\t//$pee = preg_replace('/<p>\\s*?(' . get_shortcode_regex() . ')\\s*<\\/p>/s', '$1', $pee); // don't auto-p wrap shortcodes that stand alone\n\t\treturn $pee;\n\t}", "title": "" }, { "docid": "1f0d22c08e9baf3cd1978b05e1ce826d", "score": "0.54015595", "text": "function img_text ($text, $par = array() ) {\n\n if (!is_array($text)) $text = array($text);\n\n if (!is_array($par)) {\n // width - height - fontsize - align - line-height\n $size = array(\n array(),\n array('w' => 17, 'h' => 100), // 1 - ...\n array('w' => 10, 'h' => 70 , 'f' => 8 , 'a' => 1, 'l' => '8'), // 2 - ...\n array('w' => 16, 'h' => 64 , 'f' => 6),\n array('w' => 12, 'h' => 100, 'f' => 8), // 4 - ...\n array('w' => 12, 'h' => 24 , 'f' => 8 , 'a' => 1), // 5 - ...\n array('w' => 16, 'h' => 140), // 6 - ...\n array('w' => 16, 'h' => 30 , 'a' => 1), // 7 - ...\n array('w' => 12, 'h' => 100, 'f' => 10, 'l' => '10'), // 8 - ...\n array('w' => 16, 'h' => 40 , 'a' => 1), // 9 - ...\n array('w' => 10, 'h' => 70 , 'f' => 8 , 'a' => 1, 'l' => '9' ), // 10 - ...\n array('w' => 12, 'h' => 100, 'f' => 10, 'l' => '10'), // 11 - ...\n array('w' => 9, 'h' => 100, 'f' => 8 , 'l' => '8' ), // 12 - ...\n array('w' => 12, 'h' => 40 , 'f' => 10, 'l' => '10'), // 13 - ...\n array('w' => 9, 'h' => 40 , 'f' => 8 , 'l' => '8' ), // 14 - ...\n );\n \n if (isset($size[$par])) $par = $size[$par];\n else $par = array();\n }\n\n $default = array('w' => 320, 'h' => 240, 'f' => 12, 'a' => 0, 'l' => 0);\n foreach ($default as $k=>$v) {\n if (!isset($par[$k])) $par[$k] = $v;\n }\n\n if (!$par['l']) $par['l'] = ($par['f'] + 2);\n\n\n\n $file = 'c/'.$par['w'].'-'.$par['h'].'-'.$par['f'].'-'.$par['a'].'-'.$par['l'].'-'.rawurlencode(substr(implode('-',$text),0,192));\n\n if (!file_exists($file)) {\n //if (1) {\n // create a new one\n $image = imagecreatetruecolor ($par['h'], $par['w']);\n $transp = imagecolorallocate ($image, 255, 255, 255);\n imagecolortransparent ($image, $transp);\n $black = imagecolorallocate ($image, 0, 0, 0);\n\n imagefilledrectangle ($image, 0, 0, $par['h']-1, $par['w']-1, $transp);\n //imagerectangle ($image, 0, 0, $par['h']-1, $par['w']-1, $black);\n\n $x = $par['l'];\n\n foreach ($text as $v) {\n $y = 2;\n\n if ($par['a'] == 1) {\n $box = imagettfbbox ($par['f'], 0, 'i/tahoma.ttf', $v);\n $y = round($par['h'] / 2) - round(($box[2] - $box[0]) / 2);\n }\n\n imagettftext ($image, $par['f'], 0, $y, $x, $black, 'i/tahoma.ttf', $v);\n $x += $par['l'];\n }\n\n $image = imagerotate ($image, 90, $black);\n\n // cache it & output\n imagepng ($image, $file);\n //if ($run_mode == 'pict') imagepng ($image);\n //else \n $image = fread (fopen ($file, 'rb'), filesize ($file) );\n }\n\n else {\n // read from cache\n $image = fread (fopen ($file, 'rb'), filesize ($file) );\n //if ($run_mode == 'pict') echo $image;\n }\n\n $image = '<img src=\"data:image/png;base64,'.base64_encode($image).'\">';\n\n return $image;\n }", "title": "" }, { "docid": "ec55483eeabb64d39825c4817fa34b09", "score": "0.534566", "text": "private function generateText_align($settings)\n {\n $styles = \"\";\n if (!empty($settings->value)) {\n $styles .= 'text-align:' . $settings->value . $this->isImportant() . ';';\n }\n return $styles;\n }", "title": "" }, { "docid": "7f510be355889b1dea6f0a7fa3c2eebb", "score": "0.5338261", "text": "public function setTextAlign($value)\r\n {\r\n if($this->textAlign != $value)\r\n {\r\n $this->textAlign = $value;\r\n $this->invalidate();\r\n }\r\n }", "title": "" }, { "docid": "9f137ded3181876e5c764a86a82bddf9", "score": "0.5337416", "text": "static function do_daddy_align($action, $attr, $content, $params, $node_object) {\n return '<div style=\"text-align:'. $attr['default'] .'\">'. $content .'</div>';\n }", "title": "" }, { "docid": "b56739c1159ae5980a7260f0635bdecd", "score": "0.53303534", "text": "function Div1($align = -1)\n {\n $options = \"\" ;\n if ($align != -1)\n $options = \" ALIGN =\\\"$align\\\"\" ;\n\n echo \"<DIV\" . $options . \">\\n\" ;\n }", "title": "" }, { "docid": "9d2f822f0ca04092c715f4b2aeda96d2", "score": "0.5325751", "text": "function nl2p2($html) \r\n{\r\n $html = preg_replace(\"/(\\r\\n|\\n|\\r)/\", \"\\n\", $html);\r\n // Only allow two newlines in a row. \r\n $html = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $html);\r\n \r\n // Put <p>..</p> around paragraphs \r\n $html = preg_replace('/\\n?(.+?)(\\n\\n|\\z)/s', \"<p>$1</p>\", $html);\r\n \r\n // convert newlines not preceded by </p> to a <br /> tag \r\n $html = preg_replace('|(?<!</p> )\\s*\\n|', \"<br />\", $html);\r\n \r\n return $html; \r\n}", "title": "" }, { "docid": "81389023676bc46c2808ab060b836808", "score": "0.5263474", "text": "public function getTextAlign()\r\n {\r\n return $this->textAlign;\r\n }", "title": "" }, { "docid": "43f8c61fd6531831470a48aaf4ece631", "score": "0.5250089", "text": "function wpautop($pee, $br = true) {\n\t$pre_tags = array();\n\n\tif ( trim($pee) === '' )\n\t\treturn '';\n\n\t// Just to make things a little easier, pad the end.\n\t$pee = $pee . \"\\n\";\n\n\t/*\n\t * Pre tags shouldn't be touched by autop.\n\t * Replace pre tags with placeholders and bring them back after autop.\n\t */\n\tif ( strpos($pee, '<pre') !== false ) {\n\t\t$pee_parts = explode( '</pre>', $pee );\n\t\t$last_pee = array_pop($pee_parts);\n\t\t$pee = '';\n\t\t$i = 0;\n\n\t\tforeach ( $pee_parts as $pee_part ) {\n\t\t\t$start = strpos($pee_part, '<pre');\n\n\t\t\t// Malformed html?\n\t\t\tif ( $start === false ) {\n\t\t\t\t$pee .= $pee_part;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$name = \"<pre wp-pre-tag-$i></pre>\";\n\t\t\t$pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';\n\n\t\t\t$pee .= substr( $pee_part, 0, $start ) . $name;\n\t\t\t$i++;\n\t\t}\n\n\t\t$pee .= $last_pee;\n\t}\n\t// Change multiple <br>s into two line breaks, which will turn into paragraphs.\n\t$pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n\n\t$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n\t// Add a single line break above block-level opening tags.\n\t$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\n\n\t// Add a double line break below block-level closing tags.\n\t$pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n\n\t// Standardize newline characters to \"\\n\".\n\t$pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); \n\n\t// Collapse line breaks before and after <option> elements so they don't get autop'd.\n\tif ( strpos( $pee, '<option' ) !== false ) {\n\t\t$pee = preg_replace( '|\\s*<option|', '<option', $pee );\n\t\t$pee = preg_replace( '|</option>\\s*|', '</option>', $pee );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n\t * so they don't get autop'd.\n\t */\n\tif ( strpos( $pee, '</object>' ) !== false ) {\n\t\t$pee = preg_replace( '|(<object[^>]*>)\\s*|', '$1', $pee );\n\t\t$pee = preg_replace( '|\\s*</object>|', '</object>', $pee );\n\t\t$pee = preg_replace( '%\\s*(</?(?:param|embed)[^>]*>)\\s*%', '$1', $pee );\n\t}\n\n\t/*\n\t * Collapse line breaks inside <audio> and <video> elements,\n\t * before and after <source> and <track> elements.\n\t */\n\tif ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {\n\t\t$pee = preg_replace( '%([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*%', '$1', $pee );\n\t\t$pee = preg_replace( '%\\s*([<\\[]/(?:audio|video)[>\\]])%', '$1', $pee );\n\t\t$pee = preg_replace( '%\\s*(<(?:source|track)[^>]*>)\\s*%', '$1', $pee );\n\t}\n\n\t// Remove more than two contiguous line breaks.\n\t$pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee);\n\n\t// Split up the contents into an array of strings, separated by double line breaks.\n\t$pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n\n\t// Reset $pee prior to rebuilding.\n\t$pee = '';\n\n\t// Rebuild the content as a string, wrapping every bit with a <p>.\n\tforeach ( $pees as $tinkle ) {\n\t\t$pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n\t}\n\n\t// Under certain strange conditions it could create a P of entirely whitespace.\n\t$pee = preg_replace('|<p>\\s*</p>|', '', $pee); \n\n\t// Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n\t$pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n\t\n\t// If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); \n\t\n\t// In some cases <li> may get wrapped in <p>, fix them.\n\t$pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); \n\t\n\t// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n\t$pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n\t$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n\t\n\t// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n\t\n\t// If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n\n\t// Optionally insert line breaks.\n\tif ( $br ) {\n\t\t// Replace newlines that shouldn't be touched with a placeholder.\n\t\t$pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', '_autop_newline_preservation_helper', $pee);\n\n\t\t// Replace any new line characters that aren't preceded by a <br /> with a <br />.\n\t\t$pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); \n\n\t\t// Replace newline placeholders with newlines.\n\t\t$pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n\t}\n\n\t// If a <br /> tag is after an opening or closing block tag, remove it.\n\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n\t\n\t// If a <br /> tag is before a subset of opening or closing block tags, remove it.\n\t$pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n\t$pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\n\n\t// Replace placeholder <pre> tags with their original content.\n\tif ( !empty($pre_tags) )\n\t\t$pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);\n\n\treturn $pee;\n}", "title": "" }, { "docid": "b6d29a5d70c64192b7c59b8940f957bc", "score": "0.5248077", "text": "private function __textBox($x,$y,$w,$h,$text='',$aFont=array('font'=>'Times','size'=>8,'style'=>''),$vAlign='T',$hAlign='L',$border=1,$link='',$force=TRUE,$hmax=0,$hini=0){\n $oldY = $y;\n $temObs = FALSE;\n $resetou = FALSE;\n\n //$text = mb_convert_case($text, MB_CASE_UPPER, mb_detect_encoding($text, \"auto\"));\n $text = utf8_decode($text);\n\n if ( $border ) {\n $this->pdf->RoundedRect($x,$y,$w,$h,0.8,'D');\n }\n\n $this->pdf->SetFont($aFont['font'],$aFont['style'],$aFont['size']);\n $incY = $this->pdf->FontSize; //tamanho da fonte na unidade definida\n if ( !$force ) {\n $n = $this->pdf->WordWrap($text,$w);\n } else {\n $n = 1;\n }\n\n $altText = $incY * $n;\n $lines = explode(\"\\n\", $text);\n\n If ( $vAlign == 'T' ) {\n $y1 = $y+$incY;\n }\n If ( $vAlign == 'C' ) {\n $y1 = $y + $incY + (($h-$altText)/2);\n }\n If ( $vAlign == 'B' ) {\n $y1 = ($y + $h)-0.5; //- ($altText/2);\n }\n\n foreach( $lines as $line ) {\n $texto = trim($line);\n $comp = $this->pdf->GetStringWidth($texto);\n if ( $force ) {\n $newSize = $aFont['size'];\n while ( $comp > $w ) {\n $this->pdf->SetFont($aFont['font'],$aFont['style'],--$newSize);\n $comp = $this->pdf->GetStringWidth($texto);\n }\n }\n if ( $hAlign == 'L' ) {\n $x1 = $x+1;\n }\n if ( $hAlign == 'C' ) {\n $x1 = $x + (($w - $comp)/2);\n }\n if ( $hAlign == 'R' ) {\n $x1 = $x + $w - ($comp+0.5);\n }\n\n if ($hini >0){\n if ($y1 > ($oldY+$hini)){\n if (!$resetou){\n $y1 = oldY;\n $resetou = TRUE;\n }\n $this->pdf->Text($x1, $y1, $texto);\n }\n } else {\n $this->pdf->Text($x1, $y1, $texto);\n }\n //incrementar para escrever o proximo\n $y1 += $incY;\n if (($hmax > 0) && ($y1 > ($y+($hmax-1)))){\n $temObs = TRUE;\n break;\n }\n }\n return ($y1-$y)-$incY;\n }", "title": "" }, { "docid": "d8e68f84442769403025083b535708e4", "score": "0.5242127", "text": "function tDataH ($text, $fontsize=-1, $align=\"left\", $colspan=1)\n {\n\n if ($colspan == 1)\n echo \"<td style=\\\"text-align:$align; \\\">$text</td>\\n\";\n else\n echo \"<td style=\\\"text-align:$align; \\\" colspan=\\\"$colspan\\\">$text</td>\\n\";\n\n }", "title": "" }, { "docid": "4311e5dae68f90394294182a1be3c614", "score": "0.5235286", "text": "function set_align($align) {\n\t\tif (preg_match('/\\d/', $align)) { return; }\n\t\tswitch (strtolower($align)) {\n\t\t\tcase 'left': $this->set_text_align(1); break;\n\t\t\tcase 'centre':\n\t\t\tcase 'center': $this->set_text_align(2); break;\n\t\t\tcase 'right': $this->set_text_align(3); break;\n\t\t\tcase 'fill': $this->set_text_align(4); break;\n\t\t\tcase 'justify': $this->set_text_align(5); break;\n\t\t\tcase 'merge': $this->set_text_align(6); break;\n\t\t\tcase 'distributed': $this->set_text_align(7); break;\n\t\t\tdefault: $this->set_text_align(1);\n\t\t}\n\t}", "title": "" }, { "docid": "37e1885c624d27adfd3f825fbff3095e", "score": "0.5231526", "text": "function justify_text($atts, $content = null) {\n\treturn '<div class=\"justify\">' . do_shortcode($content) . '</div>';\n}", "title": "" }, { "docid": "89ddedff06eb734c17790264189db9a9", "score": "0.52262163", "text": "private function formatParagraph($txt)\n {\n // If the paragraph is an html tag, we add a space before\n if ($this->isHtmlTagNotTxt($txt)) {\n // the first element is an html tag and not a text, so we can add a\n // space before it\n return ' ' . $txt;\n }\n // If the text start with word (not punctation), we had a space\n $pattern = '/^\\w/';\n if (preg_match($pattern, $txt)) {\n return ' ' . $txt;\n }\n return $txt;\n }", "title": "" }, { "docid": "ee1a19322f311bc6c2ec8b1656194914", "score": "0.5200932", "text": "public function getTextAlign()\n {\n return $this->textAlign;\n }", "title": "" }, { "docid": "2ea66fbe598cd5745169fa815bb5a4f2", "score": "0.5154501", "text": "public function testJustify()\n {\n $i = $this->initInstance(\n \"test\\n\" .\n \"test test\\n\" .\n \"test test test\\n\" .\n \"test test test test\\n\" .\n \"test test test test test\"\n );\n $this->assertInstanceOf('Image_Text', $i);\n $i->set('halign', Image_Text::IMAGE_TEXT_ALIGN_JUSTIFY);\n $i->init()->render();\n $this->assertTrue(\n imageisthesame(\n $this->_dir . 'justify.png',\n $i->getImg()\n )\n );\n }", "title": "" }, { "docid": "435d4432b132062ce0d1af1de6e409ce", "score": "0.51435274", "text": "public function wpautop($pee, $br = 1)\n {\n if (trim($pee) === '') {\n return '';\n }\n $pee = $pee . \"\\n\"; // just to make things a little easier, pad the end\n $pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n // Space things out a little\n $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\n $pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n $pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); // cross-platform newlines\n if (strpos($pee, '<object') !== false) {\n $pee = preg_replace('|\\s*<param([^>]*)>\\s*|', \"<param$1>\", $pee); // no pee inside object/embed\n $pee = preg_replace('|\\s*</embed>\\s*|', '</embed>', $pee);\n }\n $pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee); // take care of duplicates\n // make paragraphs, including one at the end\n $pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n $pee = '';\n foreach ($pees as $tinkle) {\n $pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n }\n $pee = preg_replace('|<p>\\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace\n $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); // don't pee all over a tag\n $pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); // problem with nested lists\n $pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n if ($br) {\n $pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', array(&$this, '_autop_newline_preservation_helper'), $pee);\n $pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); // optionally make line breaks\n $pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n }\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n if (strpos($pee, '<pre') !== false) {\n //$pee = preg_replace_callback('!(<pre[^>]*>)(.*?)</pre>!is', 'clean_pre', $pee );\n $pee = preg_replace_callback('!(<pre[^>]*>)(.*?)</pre>!is', array(&$this, 'clean_pre'), $pee);\n }\n \n $pee = preg_replace(\"|\\n</p>$|\", '</p>', $pee);\n\n return $pee;\n }", "title": "" }, { "docid": "c813eb30572a3a71260741459e80e1eb", "score": "0.512005", "text": "function format_text_pdf($text){\r\n $list = array(\"<h1\",\"<h2\",\"<h3\",\"<h4\",\"<h5\");\r\n $text = str_replace($list, \"<p\", $text);\r\n\r\n $list = array(\"</h1>\",\"</h2>\",\"</h3>\",\"</h4>\",\"</h5>\");\r\n $text = str_replace($list, \"</p>\", $text);\r\n\r\n $text = strip_tags($text, '<p><a><b><h1><h2><h3><h4><h5><b><ul><ol><li><br><i><span>');\r\n\r\n return $text;\r\n}", "title": "" }, { "docid": "d5a8d43188ec27a9d860c49bd9a578cc", "score": "0.5118554", "text": "function SetAligns($a)\n{\n$this->aligns=$a;\n}", "title": "" }, { "docid": "d5a8d43188ec27a9d860c49bd9a578cc", "score": "0.5118554", "text": "function SetAligns($a)\n{\n$this->aligns=$a;\n}", "title": "" }, { "docid": "d4c95b08f118676b1dbf00a1141ca29f", "score": "0.50972486", "text": "function DisplayHTMLStartTag()\n {\n\t\t$info = CmsNlsOperations::get_language_info(CmsNlsOperations::get_current_language());\n \techo ($info->direction() == 'rtl') ? \"<html dir=\\\"rtl\\\"\\n>\" : \"<html>\\n\";\n }", "title": "" }, { "docid": "873152c9ae20e3ba4b846e68e6c99aa5", "score": "0.50791514", "text": "function tData ($text, $fontsize=-1, $align=\"left\", $colspan=1)\n {\n\n if ($colspan == 1)\n echo \"<td style=\\\"text-align:$align; \\\" >\"\n . nl2br_http (htmlspecialchars ($text, ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5))\n . \"</td>\\n\";\n else\n echo \"<td style=\\\"text-align:$align; \\\" colspan=\\\"$colspan\\\" >\"\n . nl2br_http (htmlspecialchars ($text, ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5))\n . \"</td>\\n\";\n\n }", "title": "" }, { "docid": "aa6be20cbb9af8b03a2871f8f4ee8a91", "score": "0.5070151", "text": "function p ($text,$attrs=array()){ return($this->tag ('p',$text,$attrs));}", "title": "" }, { "docid": "6fd33c452318cb1c7a1eaf135de94781", "score": "0.50682867", "text": "function insert_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#lp-quote {\n\t\tfloat: $x;\n\t\tpadding-$x: 15px;\n\t\tpadding-top: 5px;\t\t\n\t\tmargin: 0;\n\t\tfont-size: 11px;\n\t}\n\t.block-editor-page #lp-quote {\n\t\tdisplay: none;\n\t}\n\t</style>\n\t\";\n}", "title": "" }, { "docid": "5863136407051b5dcf0b4885b4f9f78c", "score": "0.50650537", "text": "function create_text_columns($html, $num_col){\n\t//count number of characters\n\t$base_char_leng = strlen($html);\n\n\t$halfway = $base_char_leng / 2;\n\n\t//divide number of characters by number of desired columns\n\t$char_per_col = $base_char_leng / $num_col;\n\n\t//find the closest space\n\t$first_p = strpos($html, '</p>', $char_per_col);\n\t$pos = strpos($html, '</p>', $char_per_col);\n\tif ($pos === false) {\n\t\t//no paragraph tags\n\t\t$char_per_col = $char_per_col + 90;\n\t\t$pos = strpos($html, ' ', $char_per_col);\n\t\t//$pos = $pos + 90;\n\n\t\t$first_col = substr($html, 0, $pos);\n\t\t$second_col = substr($html, $pos + 1);\n\t\t$bug = 1;\n\n\t}elseif ( $pos < $halfway && $pos > ($halfway - 20) ) {\n\t\t//paragraph break is close to the middle\n\t\t//find the closes space starting from the middle\n\t\t$char_per_col = $char_per_col + 90;\n\t\t$pos = strpos($html, ' ', $char_per_col);\n\t\t//$pos = $pos + 90;\n\n\t\t$first_col = substr($html, 0, $pos);\n\t\t$first_col .= htmlentities('</p>');\n\t\t$second_col = substr($html, $pos + 1);\n\t\t$second_col = htmlentities('<p>') . $second_col;\n\t\t$bug = 3;\n\n\t}elseif ( ($base_char_leng - $pos) <= 5 ) {\n\t\t//paragraph break is at the end\n\t\t//find the closes space starting from the middle\n\t\t$pos = strpos($html, '. ', ($char_per_col + 70) );\n\t\t//$pos = $pos + 90;\n\n\t\t$first_col = substr($html, 0, ($pos+2));\n\t\t$first_col .= htmlentities('</p>');\n\t\t$second_col = substr($html, $pos + 1);\n\t\t$second_col = htmlentities('<p>') . $second_col;\n\t\t$bug = 4;\n\n\t}else{\n\t\t$pos = $pos + 4;\n\t\t$first_col = substr($html, 0, $pos);\n\t\t$second_col = substr($html, $pos + 1);\n\t\t$bug = 5;\n\n\t}\n\t\n\t$result = array();\n\t$result[] = $first_col;\n\t$result[] = $second_col;\n\t$result['bug'] = $bug;\n\t$result['base_char_leng'] = $base_char_leng;\n\t$result['pos'] = $pos;\n\t//$result['raw'] = $html;\n\t//$result['first_p'] = $first_p;\n\n\treturn $result;\n\n}", "title": "" }, { "docid": "ef84f1e41eeb390a41f00d32eab561b4", "score": "0.50553924", "text": "function wpautop($pee, $br = true) {\n\n\t$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n\t$pee = preg_replace('/<img.+?\"\\s\\/>/is', '', $pee);\n\t$pee = preg_replace('/<a\\shref=\".+?\"><\\/a>/is', '', $pee);\n\treturn $pee;\n}", "title": "" }, { "docid": "9d5984642c9f3d14d5b3187e07ef0ea6", "score": "0.50412405", "text": "public function addContrat() {\n\t\n\t $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);\n $font1 = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);\n\t\t \n\t\t $this->_yPosition -= 0;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"12.3Convention N° 3 :\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\"Entre les structures Têtes de Division Exécutante Subvention Marchande des Coûts de Production Nouvelle (S-CM\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Exécutante\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 91;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n $this->drawText(\"SMCPN\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 130;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\"), d’une part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"et\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les Acteurs salariés du\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 143;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n $this->drawText(\"MCNP\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 173;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\", d’autre part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Il est convenu ce qui suit :\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les structures ESMC Têtes de Division Exécutante (S-CM Exécutante\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 353;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n $this->drawText(\"SMCPN\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 391;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\") se mettent d’accord avec les acteurs\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"salariés des trois créneaux : Producteurs, Transformateurs et Distributeurs du marché pour continuellement rémunérer\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"leur travail effectivement accompli, à condition que la rémunération serve à la consommation récurrente et non récurrente\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"sur le\",$this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_xPosition = 63;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n $this->drawText(\"MCNP\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 93;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\".\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"12.4Convention N° 4 :\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\"Entre les structures Têtes de Division Exécutante Subvention Marchande des Coûts d’Investissement (S-CM Exécutante\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"SMCI\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 62;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\"), d’une part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"et\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les Producteurs-Transformateurs des BPS du\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_xPosition = 246;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"MCNP\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_xPosition = 276;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\", d’autre part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Il est convenu ce qui suit :\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les structures ESMC Têtes de Division Exécutante Subvention Marchande des Coûts d’Investissement(S-CM Exécutante\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"SMCI\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 62;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\") se mettent d’accord avec les Producteurs-Transformateurs des BPS du marché pour commander continuellement\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"les marchandises destinées aux réapprovisionnements des Distributeurs-Fournisseurs.\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"La condition convenue est que les Producteurs-Transformateurs obtiennent la\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 385;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"SMCI\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 415;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n $this->drawText(\"pour acheter en retour les BPS\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"auprès des Distributeurs- Fournisseurs des BPS de consommation industrielle pour répondre aux commandes.\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"12.5Convention N° 5 :\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\"Entre les structures Têtes de Division Exécutante Sous-Compte Marchand Exécutante Biens, Produits et Services \", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"(S-CM Exécutante BPS), d’une part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"et\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les Distributeurs-Fournisseurs des BPS du\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 232;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"MCNP\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 262;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\", d’autre part\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Il est convenu ce qui suit :\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Les structures ESMC Têtes de Division Exécutante (S-CM Exécutante BPS) se mettent d’accord avec\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"les Distributeurs-Fournisseurs des BPS du marché pour acheter continuellement leurs marchandises à condition que\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"ceux-ci achètent en retour leurs marchandises en guise de réapprovisionnement auprès des structures ESMC Têtes de\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Division Exécutante (S-CM Exécutante BPS).\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"La modalité convenue est celle du paiement par traites (8 traites par exemple). Pour cela, les structures ESMC Têtes\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"de Division Exécutante (S-CM Exécutante BPS) s’engagent à faire avaliser lesdites traites par les banques en guise de\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"garantie.\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"Cependant, l’exigibilité des redevances aux Distributeurs-Fournisseurs est et reste le procédé de l’achat de BPS en \", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"retour auprès des structures ESMC Têtes de Division Exécutante (S-CM Exécutante BPS).\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"Article 13 :DISPOSITIONS FINALES \", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\"Au vu de tout ce qui précède et étant donné que la disponibilité des unités incombe aux divisions administratrices,\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"que la disponibilité de l’espèce bancaire incombe à la division PBF et que la disponibilité des BPS incombe aux\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"divisions animatrices, la disponibilité des unités, de l’espèce bancaire et des BPS n’incombe nullement au vendeur de\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"la licence\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_xPosition = 82;\n\t\t $rouge = new Zend_Pdf_Color_Rgb(1,0,0);\n $this->setFillColor($rouge);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"MCNP\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_xPosition = 112;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font1,10);\n\t\t $this->drawText(\".\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 20;\n\t\t $this->_xPosition = 37;\n\t\t $noir = new Zend_Pdf_Color_Rgb(0,0,0);\n $this->setFillColor($noir);\n\t\t $this->setFont($font,10);\n\t\t $this->drawText(\"En effet, la liquidité des unités, la liquidité de l’espèce bancaire et la disponibilité des BPS sont exclusivement\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"de la responsabilité des têtes de Divisions : Filières, Technopoles, ACNEV et même de la personne physique,\", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t $this->_yPosition -= 15;\n\t\t $this->_xPosition = 37;\n\t\t $this->drawText(\"chapeautés par les divisions de l’Exécutante, de la Surveillance et de la Détentrice. \", $this->_xPosition, $this->_yPosition, 'UTF-8');\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\n\t\n\t\n\t\n\t}", "title": "" }, { "docid": "4da7ee77825a24bcd0fa0735583f4c3f", "score": "0.50368834", "text": "function sst_wrap_alignment( $block_content, $block ) {\n // Add class to item with background\n if(isset($block['attrs']['backgroundColor'])){\n $block_content = sprintf(\n\t\t\t'<div>%1$s</div>',\n\t\t\t$block_content\n\t\t);\n };\n\n \n // Add class to list items\n if($block['blockName'] == \"core/list\"){\n $block_content = sprintf(\n\t\t\t'<div class=\"%1$s\">%2$s</div>',\n\t\t\t'gutenberg-list',\n\t\t\t$block_content\n\t\t);\n };\n\n // Add wrapper div to align wide and full\n\tif ( isset( $block['attrs']['align'] ) && in_array( $block['attrs']['align'], array( 'wide', 'full' ) ) ) {\n\t\t$block_content = sprintf(\n\t\t\t'<div class=\"%1$s\">%2$s</div>',\n\t\t\t'align-wrap align-wrap-' . esc_attr( $block['attrs']['align'] ),\n\t\t\t$block_content\n\t\t);\n\t} elseif (true) {\n \n };\n\treturn $block_content;\n}", "title": "" }, { "docid": "8e01f1c1a7a2badac8c7870c46929dc2", "score": "0.503459", "text": "public static function get_text_aligment() {\n static $text_align = null;\n if ($text_align === null) {\n $text_align = array(\n array('value' => 'left', 'name' => __('Left', 'themify'), 'icon' => '<span class=\"ti-align-left\"></span>'),\n array('value' => 'center', 'name' => __('Center', 'themify'), 'icon' => '<span class=\"ti-align-center\"></span>'),\n array('value' => 'right', 'name' => __('Right', 'themify'), 'icon' => '<span class=\"ti-align-right\"></span>'),\n array('value' => 'justify', 'name' => __('Justify', 'themify'), 'icon' => '<span class=\"ti-align-justify\"></span>')\n );\n }\n return $text_align;\n }", "title": "" }, { "docid": "d1afbf88f3a16da81bc6cab5f99323a4", "score": "0.50262713", "text": "function rightAlign()\n\t{\n\t\t$this->content_obj->setHorizontalAlign(\"Right\");\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "ac7ba19a283dad40d1b5a109cf518d87", "score": "0.5025381", "text": "function SetAligns($a) \r\n{\r\n $this->aligns=$a; \r\n}", "title": "" }, { "docid": "d83af55c78ed06adf67e73d5c5ff873b", "score": "0.5018481", "text": "function editCellAlignment()\n\t{\n\t\tglobal $ilCtrl, $tpl, $lng, $ilTabs;\n\n\t\t$this->displayValidationError();\n\t\t$this->setTabs();\n\t\t$this->setCellPropertiesSubTabs();\n\t\t$ilTabs->setSubTabActive(\"cont_alignment\");\n\t\t$ilTabs->setTabActive(\"cont_table_cell_properties\");\n\n\t\t// edit form\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t$form->setTitle($this->lng->txt(\"cont_table_cell_properties\"));\n\n\t\t// alignment\n\t\t$options = array(\n\t\t\t\"\" => $lng->txt(\"default\"),\n\t\t\t\"Left\" => $lng->txt(\"cont_left\"),\n\t\t\t\"Center\" => $lng->txt(\"cont_center\"),\n\t\t\t\"Right\" => $lng->txt(\"cont_right\")\n\t\t);\n\t\t$si = new ilSelectInputGUI($lng->txt(\"cont_alignment\"), \"alignment\");\n\t\t$si->setOptions($options);\n\t\t$si->setInfo($lng->txt(\"\"));\n\t\t$form->addItem($si);\n\n\t\t$form->setKeepOpen(true);\n\n\t\t$form->addCommandButton(\"setAlignment\", $lng->txt(\"cont_set_alignment\"));\n\n\t\t$html = $form->getHTML();\n\t\t$html.= \"<br />\".$this->renderTable(\"table_edit\", \"alignment\").\"</form>\";\n\t\t$tpl->setContent($html);\n\n\t}", "title": "" }, { "docid": "6b2360096d35eccb7b78ed5ed8aa60e1", "score": "0.49994326", "text": "function BarreTypoEnrichie_post_propre($texte) {\n\n\t\t$cherche1 = array(\n\t\t\t/* 15 */ \t\",\\[/(.*)/\\],Ums\",\n\t\t\t/* 17 */ \t\",\\[\\|(.*)\\|\\],Ums\",\n\t\t\t/* 19 */ \t\",\\[\\((.*)\\)\\],Ums\",\n\t\t\t/* 21 */ \t\"/\\[\\*\\*/S\",\n\t\t\t/* 21b */ \t\"/\\[\\*/S\",\n\t\t\t/* 22 */\t\"/\\*\\]/S\",\n\t\t\t/* 23 */ \t\"/\\[\\^/S\",\n\t\t\t/* 24 */\t\"/\\^\\]/S\",\n\t\t\t/* 40 */\t\"/\\[([^|][^][]*)\\|([^][]*)\\]/S\",\n\t\t\t/* 41 */\t\"/<a href=([^>]*)>([^|<]*)\\|([^<]*)<\\/a>/S\"\n\n\t\t);\n\t\t$remplace1 = array(\n\t\t\t/* 15 */ \t\"<div style=\\\"text-align:right;\\\">$1</div>\",\n\t\t\t/* 17 */ \t\"<div style=\\\"text-align:center;\\\">$1</div>\",\n\t\t\t/* 19 */ \t\"<div class=\\\"texteencadre-spip\\\">$1</div>\",\n\t\t\t/* 21 */ \t\"<strong class=\\\"caractencadre2-spip\\\">\",\n\t\t\t/* 21b */ \t\"<strong class=\\\"caractencadre-spip\\\">\",\n\t\t\t/* 22 */\t\"</strong>\",\n\t\t\t/* 23 */ \t\"<sup>\",\n\t\t\t/* 24 */\t\"</sup>\",\n\t\t\t/* 25 */\t#\"<ul class=\\\"spip\\\">\",\n\t\t\t/* 26 */\t#\"</ul>\",\n\t\t\t/* 27 */\t#\"<ol class=\\\"spip\\\">\",\n\t\t\t/* 28 */\t#\"</ol>\",\n\t\t\t/* 29 */\t#\"<table class=\\\"spip\\\">\",\n\t\t\t/* 30 */\t#\"</table>\",\n\t\t\t/* 31 */\t#\"<div\",\n\t\t\t/* 32 */\t#\"</div>\",\n\t\t\t/* 33 */\t#\"<h$1>\",\n\t\t\t/* 34 */\t#\"</h$1>\",\n\t\t\t/* 35 */\t#\"<div class='spip_documents'>\",\n\t\t\t/* 36 */\t#\"</div>\",\n\t\t\t/* 37 */\t#\"<div\",\n\t\t\t/* 38 */\t#\"<blockquote class=\\\"spip\\\"><p class=\\\"spip\\\">\",\n\t\t\t/* 39 */\t#\"</p></blockquote>\",\n\t\t\t/* 40 */\t\"<acronym title='$2' class='spip_acronym'>$1</acronym>\",\n\t\t\t/* 41 */\t\"<a href=$1 title=\\\"$3\\\">$2</a>\"\n\n\t\t);\n\t\t$texte = preg_replace($cherche1, $remplace1, $texte);\n\t\t$texte = paragrapher($texte,$GLOBALS['toujours_paragrapher']); // il faut reparagrapher a cause des raccourcis typo que l'on a ajoute (block div)\n\treturn $texte;\n}", "title": "" }, { "docid": "edb3b2c1eef958137b4444acd74c9991", "score": "0.4985335", "text": "function TituloCampos()\n\t{\n\t\t$this->Ln();\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,50,60,60);\n\t\t$header=array(strtoupper(_('#mat')),strtoupper(_('material')),strtoupper(_('familia')),strtoupper(_('cantidad')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],5,$header[$k],1,0,'C',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "da9ed80f4d8c5aea95ec4b9c15d643cf", "score": "0.49824503", "text": "function MyApp_Interface_Tail_Phrase()\n {\n return\n $this->BR().\n $this->DIV\n (\n \"This system is Free Software, download: \".\n $this->A(\"https://github.com/olesmith/SiVent2\").\n \"\",\n array(\"ALIGN\" => 'center')\n ).\n $this->BR().\n $this->Html_HR('75%').\n parent::MyApp_Interface_Tail_Phrase().\n \"\";\n }", "title": "" }, { "docid": "833f8f03ae3e47364290628e56626c4e", "score": "0.49752086", "text": "public static function dfd_alignment_options() {\n\t\t\treturn array(\n\t\t\t\t'text-left' => esc_html__('Left', 'dfd-native'),\n\t\t\t\t'text-right' => esc_html__('Right', 'dfd-native'),\n\t\t\t\t'text-center' => esc_html__('Center', 'dfd-native'),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "499571c646911ff05ffb62f6865e018d", "score": "0.49705535", "text": "public function testFormat3() {\n $para = new Para(8);\n $this->assertEquals(\n \"one two\\nthree\\n\\nfour\\nfive six\"\n , $para->format(\"one two three\\n\\nfour five six\"), 'paragraphs are not handled correctly'\n );\n\n $this->assertEquals(\n \"one two\\nthree\\n\\nfour\\nfive six\"\n , $para->format(\"one two\\n three\\n \\nfour five six\"), 'whitespace between paragraphs are not handled correctly'\n );\n }", "title": "" }, { "docid": "67a0f1835296fd28ba9f52c115a0505a", "score": "0.49641043", "text": "public function toHtml(){\n $ret = \"\";\n $textNodes = $this->_getTextNodes();\n\n if ($textNodes !== false) {\n $ret .= \"<div class='text-wrapper' class='row'>\";\n\n foreach ($textNodes as $entry) {\n $class = \" \";\n $style = \" \";\n\n // parse text style and append as css style\n @$testerNode = $entry->firstChild->lastChild->previousSibling;\n if(isset($testerNode) &&\n $testerNode->nodeName==\"w:jc\" &&\n $testerNode->attributes->getNamedItem(\"val\")->nodeValue==\"center\"\n ){\n $class .= \"center \";\n $style .= \"text-align:center; \";\n }\n\n @$testerNodes = $entry->firstChild->lastChild->childNodes;\n if(isset($testerNodes)){\n foreach($testerNodes as $testerNode){\n //if($testerNode->nodeName==\"w:b\") $style .= \"font-weight:bold; \";\n if($testerNode->nodeName==\"w:bCs\") $style .= \"font-weight:bold; border-bottom: solid 1px black; \";\n //if($testerNode->nodeName==\"w:szCs\") $style .= \"border-bottom: solid 1px black; \";\n if($testerNode->nodeName==\"w:color\" && $testerNode->attributes->getNamedItem(\"val\")->nodeValue!=\"000000\"){\n $style .= \"color:#\".$testerNode->attributes->getNamedItem(\"val\")->nodeValue.\";\";\n }\n }\n }\n\n $ret .=\"<p class='\".$class.\"' style='\".$style.\"'>\".$entry->nodeValue.\"</p>\";\n }\n\n $ret .= \"</div>\";\n }\n return $ret;\n }", "title": "" }, { "docid": "c499b03aa3eddd96426f03daaec39bf3", "score": "0.49623278", "text": "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "title": "" }, { "docid": "c499b03aa3eddd96426f03daaec39bf3", "score": "0.49623278", "text": "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "c2dda15b9b48138f79592ccb80ec9e92", "score": "0.49608198", "text": "function SetAligns($a)\n{\n $this->aligns=$a;\n}", "title": "" }, { "docid": "b8cbf6df0053c8a911bacf5c46347d1e", "score": "0.49479705", "text": "function SetAligns($a){\r\n\t\t $this->aligns=$a;\r\n\t }", "title": "" }, { "docid": "b910f239bf3db91da03f66563df7e74a", "score": "0.49303737", "text": "public function align($value) {\n return $this->setProperty('align', $value);\n }", "title": "" }, { "docid": "f4d2b36b9bc957039889c96e21581ec2", "score": "0.4928188", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(195,212,235);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,25,80,25,25,40,35);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('Nro. Fact.')),strtoupper(_('Cobrador')),strtoupper(_('Fecha Asig.')),strtoupper(_('Fecha Rec')),strtoupper(_('Status')),strtoupper(_('\tASIGNADO POR')));\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(10);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,strtoupper($header[$k]),1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "254a8f47805e77c0459ce99b7722d1be", "score": "0.49189222", "text": "protected function _wpautop($pee, $br = true) {\r\n// $pre_tags = array();\r\n//\r\n// if ( trim($pee) === '' )\r\n// return '';\r\n//\r\n// $pee = $pee . \"\\n\"; // just to make things a little easier, pad the end\r\n//\r\n// if ( strpos($pee, '<pre') !== false ) {\r\n// $pee_parts = explode( '</pre>', $pee );\r\n// $last_pee = array_pop($pee_parts);\r\n// $pee = '';\r\n// $i = 0;\r\n//\r\n// foreach ( $pee_parts as $pee_part ) {\r\n// $start = strpos($pee_part, '<pre');\r\n//\r\n// // Malformed html?\r\n// if ( $start === false ) {\r\n// $pee .= $pee_part;\r\n// continue;\r\n// }\r\n//\r\n// $name = \"<pre></pre>\";\r\n// $pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';\r\n//\r\n// $pee .= substr( $pee_part, 0, $start ) . $name;\r\n// $i++;\r\n// }\r\n//\r\n// $pee .= $last_pee;\r\n// }\r\n//\r\n// $pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\r\n// // Space things out a little\r\n// $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)';\r\n// $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\r\n// $pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\r\n// $pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); // cross-platform newlines\r\n//\r\n// if ( strpos( $pee, '<option' ) !== false ) {\r\n// // no P/BR around option\r\n// $pee = preg_replace( '|\\s*<option|', '<option', $pee );\r\n// $pee = preg_replace( '|</option>\\s*|', '</option>', $pee );\r\n// }\r\n//\r\n// if ( strpos( $pee, '</object>' ) !== false ) {\r\n// // no P/BR around param and embed\r\n// $pee = preg_replace( '|(<object[^>]*>)\\s*|', '$1', $pee );\r\n// $pee = preg_replace( '|\\s*</object>|', '</object>', $pee );\r\n// $pee = preg_replace( '%\\s*(</?(?:param|embed)[^>]*>)\\s*%', '$1', $pee );\r\n// }\r\n//\r\n// if ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {\r\n// // no P/BR around source and track\r\n// $pee = preg_replace( '%([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*%', '$1', $pee );\r\n// $pee = preg_replace( '%\\s*([<\\[]/(?:audio|video)[>\\]])%', '$1', $pee );\r\n// $pee = preg_replace( '%\\s*(<(?:source|track)[^>]*>)\\s*%', '$1', $pee );\r\n// }\r\n//\r\n// $pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee); // take care of duplicates\r\n// // make paragraphs, including one at the end\r\n// $pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\r\n// $pee = '';\r\n//\r\n// foreach ( $pees as $tinkle ) {\r\n// $pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\r\n// }\r\n//\r\n// $pee = preg_replace('|<p>\\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace\r\n// $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\r\n// $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); // don't pee all over a tag\r\n// $pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); // problem with nested lists\r\n// $pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\r\n// $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\r\n// $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\r\n// $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\r\n//\r\n// if ( $br ) {\r\n// $pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', '_autop_newline_preservation_helper', $pee);\r\n// $pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); // optionally make line breaks\r\n// $pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\r\n// }\r\n//\r\n// $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\r\n// $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\r\n// $pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\r\n//\r\n// if ( !empty($pre_tags) )\r\n// $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);\r\n\r\n return $pee;\r\n }", "title": "" }, { "docid": "fa7b9ad9d66aec51de00847135b04a17", "score": "0.49184126", "text": "function trekkie_css() {\n\t// This makes sure that the positioning is also good for right-to-left languages\n\t$x = is_rtl() ? 'left' : 'right';\n\n\techo \"\n\t<style type='text/css'>\n\t#trekkie {\n\t\tfloat: $x;\n\t\tpadding-$x: 15px;\n\t\tpadding-top: 5px;\t\t\n\t\tmargin: 0;\n\t\tfont-size: 11px;\n\t}\n\t</style>\n\t\";\n}", "title": "" }, { "docid": "0dd083719f93622c80d905db886d7ee1", "score": "0.49164313", "text": "function media_dei_shortcode_empty_paragraph_fix($content)\n{ \n $array = array (\n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']'\n );\n\n $content = strtr($content, $array);\n\n return $content;\n}", "title": "" }, { "docid": "b5a1ef108723592946337ac1032e517c", "score": "0.49163416", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,40,50,22,20,20,20);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('punto de cobro')),strtoupper(_('cobrador')),strtoupper(_('fecha')),strtoupper(_('hora a.')),strtoupper(_('hora c.')),strtoupper(_('monto')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "34f4ed994f9f9aad75dc0f4f71c9912a", "score": "0.49111196", "text": "function display_logo_align_field() {\n\t\tglobal $publishthis;\n\n\t\t$default_logo_align = '1'; //center\n\t\t$selected = $publishthis->get_option( 'logo_align' );\n\t\t$selected = !isset( $selected ) ? $default_logo_align : $selected;\n\t\t$selected = isset( $_SESSION['publishthis_settings_logo_align'] ) ? $_SESSION['publishthis_settings_logo_align'] : $selected;\n\t\tunset( $_SESSION['publishthis_settings_logo_align'] );\n?>\n\t\t<select name=\"<?php echo $publishthis->option_name ?>[logo_align]\" id=\"publishthis_logo_align\">\n\t\t\t<option <?php selected( $selected, '2' ); ?> value=\"2\">Left Aligned</option>\n\t\t\t<option <?php selected( $selected, '1' ); ?> value=\"1\">Centered</option>\n\t\t\t<option <?php selected( $selected, '3' ); ?> value=\"3\">Right Aligned</option>\n\t\t</select>\n\t\t<?php\n\t}", "title": "" }, { "docid": "b1c8b3381ad81b4cccca3e019bc4e178", "score": "0.49100253", "text": "function lignes_longues($texte, $l = 70, $espace='&#173;') {\n\tif ($l<1) return $texte;\n\tif (!preg_match(\"/[\\w,\\/.]{\".$l.\"}/UmsS\", $texte))\n\t\treturn $texte;\n\t// Passer en utf-8 pour ne pas avoir de coupes trop courtes avec les &#xxxx;\n\t// qui prennent 7 caracteres\n\t#include_spip('inc/charsets');\n\t$texte = str_replace(\"&nbsp;\",\"<&nbsp>\",$texte);\n\t$texte = html2unicode($texte, true);\n\t$texte = str_replace(\"<&nbsp>\",\"&nbsp;\",$texte);\n\t$texte = unicode_to_utf_8(charset2unicode(\n\t\t$texte, $GLOBALS['meta']['charset'], true));\n\n\t// echapper les tags (on ne veut pas casser les a href=...)\n\t$tags = array();\n\tif (preg_match_all('/<.+>|&(?:amp;)?#x?[0-9]+;|&(?:amp;)?[a-zA-Z1-4]{2,6};/UumsS', $texte, $t, PREG_SET_ORDER)) {\n\t\tforeach ($t as $n => $tag) {\n\t\t\t$tags[$n] = $tag[0];\n\t\t\t$texte = str_replace($tag[0], \"<---$n--->\", $texte);\n\t\t}\n\t}\n\t// casser les mots longs qui restent\n\t// note : on pourrait preferer couper sur les / , etc.\n\tif (preg_match_all(\"/[\\w,\\/.]{\".$l.\"}/UmsS\", $texte, $longs, PREG_SET_ORDER)) {\n\t\tforeach ($longs as $long) {\n\t\t\t$texte = str_replace($long[0], $long[0].$espace, $texte);\n\t\t}\n\t}\n\n\t// retablir les tags\n\tif (preg_match_all('/<---[\\s0-9]+--->/UumsS', $texte, $t, PREG_SET_ORDER)) {\n\t\tforeach ($t as $tag) {\n\t\t\t$n = intval(preg_replace(',[^0-9]+,U','',$tag[0]));\n\t\t\t$texte = str_replace($tag[0], $tags[$n], $texte);\n\t\t}\n\t}\n\n\treturn importer_charset($texte, 'utf-8');\n}", "title": "" }, { "docid": "02765e21a4f346a96a27b3dabf29e712", "score": "0.49086568", "text": "function Print_Futer( $Name_Firm )\n{\n // !!!! Achtung %-14s format align left !!!\n $company_line = sprintf( \"| Company: %-14s |\", $Name_Firm ) ;\n echo(\"+--------------------------------------------------------------+\\n\" );\n echo(\"| |\\n\" );\n echo( $company_line . \"\\n\" ) ; // Print company \n echo(\"| |\\n\" );\n echo(\"+--------------------------------------------------------------+\\n\" );\n echo(\"| N/N | Product | COD | QUANTITY| PRICE | Total | \\n\" );\n echo(\"|--------------------------------------------------------------+\\n\" );\n return 0 ;\n}", "title": "" }, { "docid": "d7c54073a1ea256ac61232ab82dde483", "score": "0.49083003", "text": "public function section_text() {}", "title": "" }, { "docid": "2bf2a6979037e645d419aa35d75d219a", "score": "0.4905843", "text": "public static function putFooterTextLine(){\r\n\t\t?>\r\n\t\t\t&copy; <?php _e(\"All rights reserved\",UNITEGALLERY_TEXTDOMAIN)?>, <a href=\"http://bit.do/ZYMg\" target=\"_blank\">Valiano</a>. &nbsp;&nbsp;\t\t\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "c40b0f8bd3cf77bd6cdd776a55b38308", "score": "0.4905453", "text": "public function setAlign(string $value):static {\n return $this->setAttribute('align', $value);\n }", "title": "" }, { "docid": "3c53ea95804ef3359459ba2a56d41c6b", "score": "0.488963", "text": "function foo_vcenter($content=\"\", $link=\"\", $align=\"justify\", $id=\"\", $class=\"\" ){\n\t$str = \tfoo_div($id,'vcenter_table '.$classm,\n\t\t\t\tfoo_div(\"\",\"vcenter_container\",foo_div(\"\", \"vcenter_content \".$align, $content) )\t\t\t\t\n\t\t\t);\n\tif($link!=\"\") $str = foo_link($str,$link);\n\t\n\treturn $str;\n}", "title": "" }, { "docid": "f8a8ad47844ff385008355f429cfa80c", "score": "0.48860407", "text": "function ckeditor_traite_lien_html($texte, $lien, $avant, $apres) {\n\t$titre = '';\n\t$title_regex = \"/\\s?title=[\\\"']([^\\\"']*)[\\\"']\\s?/i\";\n\n\tif (($avant && preg_match($title_regex, stripslashes($avant), $m)) ||\n\t\t($apres && preg_match($title_regex, stripslashes($apres), $m))) {\n\t\t$titre = \"|\".htmlspecialchars_decode(str_replace(\"\\\\'\",\n\t\t\t\t\t\t\t\t \"'\", $m[1]),\n\t\t\t\t\t\t\t ENT_QUOTES);\n\t\t/*\n\t\t * Et si le avant/apres ne contenait que\n\t\t * ca, on purge pour eviter le cas 2 dans\n\t\t * le test qui suit.\n\t\t */\n\t\tif ($avant == $m[0])\n\t\t\t$avant = '';\n\n\t\tif ($apres == $m[0])\n\t\t\t$apres = '';\n\t}\n\n\t$texte=preg_replace('~\\\\\\(.)~',\"$1\",$texte);\n\tif (preg_match(\"~spip\\.php\\?page=(\\w+)(?:&amp;amp;|&amp;|&)id_\\\\1=(\\d+)(#\\w+)?$~\", $lien, $match)) {\n\t\treturn \"[\".strip_tags($texte,\"<strong><em><i><span><img><sub><sup>\").$titre.\"->\".$match[1].\" \".$match[2].$match[3].\"]\" ;\n\t} else if ($avant || $apres) {\n\t\treturn \"<a \".($avant?stripslashes($avant).' ':'').\"href='$lien'\".($apres?' '.stripslashes($apres):'').\">$texte</a>\" ;\n\t} else {\n\t\treturn \"[\".strip_tags($texte,\"<strong><em><i><span><img><sub><sup>\").$titre.\"->\".$lien.\"]\" ;\n\t}\n}", "title": "" }, { "docid": "9840bb038276f19668f4f86c4a1f7c6a", "score": "0.4885177", "text": "function modifierParagraphe() {\r\n\t\tmysql_query(\"UPDATE if_paragraphe SET titre='$this->titrePara', contenu='$this->contenuPara' WHERE numpara='$this->numpara'\");\r\n\t}", "title": "" }, { "docid": "3d56635e1812eec4c5fa6402d777cb5f", "score": "0.48707294", "text": "function mixtape_qodef_title_content_alignment_class($classes) {\n\n //init variables\n $id = mixtape_qodef_get_page_id();\n $title_content_alignment = 'left';\n\n if(($meta_temp = get_post_meta($id, \"qodef_title_area_content_alignment_meta\", true)) != \"\") {\n $title_content_alignment = $meta_temp;\n\n } else {\n $title_content_alignment = mixtape_qodef_options()->getOptionValue('title_area_content_alignment');\n }\n\n $classes[] = 'qodef-content-'.$title_content_alignment.'-alignment';\n\n return $classes;\n\n }", "title": "" }, { "docid": "3c93c98824f7900142081930a94c2f98", "score": "0.48703572", "text": "function _paraHandler($startTag, $attrs = array())\n {\n if ($this->_inHelp && $this->_inBlock) {\n $this->_output .= $startTag ? '<p>' : '</p>';\n }\n }", "title": "" }, { "docid": "a2732b820b1072acbaf94a89e0082f97", "score": "0.48667935", "text": "public static function getAlignmentOptions()\n\t{\n\t\treturn array(0 => array('label' => __('Left'), 'value' => 'left'), 1 => array('label' => __('Center'), 'value' => 'center'), 2 => array('label' => __('Right'), 'value' => 'right'));\n\n\t}", "title": "" }, { "docid": "b31ed501eb0d111643a1ea2749dee3e4", "score": "0.4864257", "text": "function TituloCampos()\n\t{\n\t\t\n\t\t$this->SetFillColor(244,249,255);\n\t\t$this->SetDrawColor(225,240,255);\n\t\t$this->SetLineWidth(.2);\n\t\t//dimenciones de cada campo\n\t\t$w=array(10,70,25,20,20,25,80);\n\t\t$header=array(strtoupper(_('nro')),strtoupper(_('Estacion de trabajo')),strtoupper(_('reporte z')),strtoupper(_('fecha')),strtoupper(_('hora')),strtoupper(_('TOTAL')),strtoupper(_('OBSERVACION')));\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->SetX(15);\n\t\tfor($k=0;$k<count($header);$k++)\n\t\t\t$this->Cell($w[$k],7,$header[$k],1,0,'J',1);\n\t\t$this->Ln();\n\t\treturn $w;\n\t}", "title": "" }, { "docid": "62217a990d94f477748b487663f84dfe", "score": "0.48618084", "text": "public function introducaoParte2()\n {\n\n //adicionar numero pagina correto\n $npage = 0;\n \n $pags = array ( \n 'CARACTERISTICAS-CAPA.pdf', \n 'parte2_pg1.pdf', \n 'parte2_pg2.pdf',\n );\n $insertPdf = new Vtx_Devolutive_Tipo_MPE_InsertPdf($pags, $this->objMakePdf, true); \n \n ######### fim pagina 1 da Parte 2 \n }", "title": "" }, { "docid": "010a4edc7f1ac1e7217d959a1eea07d5", "score": "0.4856916", "text": "function mostrarEnacabezadoEspaciosPerdidos() {\r\n ?> \r\n <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5 px\" cellspacing=\"1px\">\r\n <caption class=\"sigma centrar\"><? echo \"ESPACIOS PERDIDOS\"; ?></caption>\r\n </table>\r\n <?\r\n }", "title": "" }, { "docid": "6ed31eea8a529356ff851a08b3f76808", "score": "0.48546886", "text": "function mfp_Fix_Text_Spacing($the_Post)\n{\n$the_New_Post = str_replace(\"pelicula\", \" PELICULA \", $the_Post);\nreturn $the_New_Post;\n}", "title": "" }, { "docid": "9f92de7e165d551d4a23dd13ca40b9dd", "score": "0.4851933", "text": "function rightFloatAlign()\n\t{\n\t\t$this->content_obj->setHorizontalAlign(\"RightFloat\");\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "d578ceb17e5174877fe242024fdf830a", "score": "0.4846982", "text": "function Footer() {\n // Select Arial italic 8\n $this->SetTextColor(0, 0, 0);\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-40);\n if($this->orientacion=='p'){\n $this->Write(5, '___________________________________________________________________________________________________________________');\n }else if($this->orientacion=='l'){\n $this->Write(5, '____________________________________________________________________________________________________________________________________________________');\n }\n $this->SetY(-30);\n $this->Write(5, utf8_decode('Ministerio del Poder Popular para Transporte Acuático y Aéreo. RIF.G-20010006-0'));\n // Print centered page number\n $this->AliasNbPages();\n $this->Cell(250, 10, 'Pagina ' . $this->PageNo().'/{nb}', 0, 0, 'R');\n }", "title": "" }, { "docid": "7fef08a5c89865483d2f27a3d7a37b92", "score": "0.4842361", "text": "function altecom($view){\n$view=str_replace(\"ocwteam.com\",\"<b>ocwteam.com</b>\",$view);\n$view=str_replace(\"ganti_text\",\"dengan_text\",$view);\n$view=str_replace(\"ganti_text\",\"dengan_text\",$view);\n$view=str_replace(\"ganti_text\",\"dengan_text\",$view);\n$view=str_replace(\"ganti_text\",\"dengan_text\",$view);\n/* yang di bawah ini jangan d edit */\n$view=preg_replace(\"~&lt;[^<>]*&gt;~iU\",\n\"<font color=\\\"#7fffd4\\\">\\\\0</font>\",$view);\n$view=preg_replace(\"~(&lt;[^\\s!]*\\s)([^<>]*)([/?]?&gt;)~iU\",\n\"\\\\1<font color=\\\"#00ff00\\\">\\\\2</font>\\\\3\",$view);\n$view=preg_replace(\"~&lt;!--.*--&gt;~iU\",\n\"<font color=\\\"#ffaaff\\\">\\\\0</font>\",$view);\n$view=preg_replace(\"~(&quot;|&#039;)[^<>]*(&quot;|&#039;)~iU\",\n\"<font color=\\\"#ffff00\\\">\\\\0</font>\",$view);\n$view=preg_replace(\"/\\{(.*?)\\}/i\",\"<font color=\\\"red\\\">{\\\\1}</font>\",$view);\n$view=str_replace(\"\\r\",\"<br />\\r\\n\",$view);\nreturn $view;}", "title": "" }, { "docid": "40caeebb95993c4e295a59541f8f6d11", "score": "0.48412734", "text": "public function Footer(){\n $this->SetY(-15);\n $this->SetX(-530);\n $this->SetFont('Times','',7.5);\n $this->Cell(0,10,'',0,0,'C');\n //$this->Ln('1');\n $this->SetY(-10);\n $this->SetX(-530);\n $this->Cell(0,10,'DOCENTE',0,0,'C');\n $this->SetY(-15);\n $this->SetX(-417);\n $this->Cell(0,10,utf8_decode('LIC. MARTÍN ALONSO ARMENTA ACOSTA'),0,0,'C');\n $this->SetY(-10);\n $this->SetX(-417);\n $this->Cell(0,10,utf8_decode('JEFE DE SERVICIOS DOCENTES'),0,0,'C');\n $this->SetY(-15);\n $this->SetX(-295);\n $this->Cell(0,10,utf8_decode('MC. CÉSAR OCTAVIO MORENO ZUÑIGA'),0,0,'C');\n $this->SetY(-10);\n $this->SetX(-295);\n $this->Cell(0,10,utf8_decode('DIRECTOR DEL PLANTEL'),0,0,'C');\n $this->SetY(-15);\n $this->SetX(-180);\n $this->Cell(0,10,utf8_decode('LICDA. ALICIA MONRROY AYALA'),0,0,'C');\n $this->SetY(-10);\n $this->SetX(-180);\n $this->Cell(0,10,utf8_decode('SUBDIRECTORA ACADÉMICA'),0,0,'C');\n $this->SetY(-15);\n $this->SetX(-65);\n $this->Cell(0,10,utf8_decode('ING. JOSÉ ROMÁN ALCARAZ OROZCO'),0,0,'C');\n $this->SetY(-10);\n $this->SetX(-65);\n $this->Cell(0,10,utf8_decode('SUBDIRECTOR DE ADMINISTRACIÓN'),0,0,'C');\n }", "title": "" }, { "docid": "ed95567c37d6be5a0b7cdbaef3fb0864", "score": "0.4834604", "text": "protected function insertFooter(\\Zend_Pdf_Page $page)\n {\n $text = $this->_scopeConfig->getValue(\n 'cart2quote_pdf/quote/pdf_footer_text',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n $text = '';\n $boxTop = 65;\n $top = $boxTop + 20;\n $boxHeight = 20;\n $boxMargin = 20;\n $font = $this->_setFontRegular($page, 10);\n\n if ($this->y - 20 < 15) {\n $page = $this->newPage([]);\n }\n\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(1));\n foreach ($this->string->split($text, 100, true, true) as $_value) {\n $boxHeight += 10;\n }\n //$page->drawRectangle($boxMargin, $boxTop, $page->getWidth() - $boxMargin, $boxTop + $boxHeight);\n $page->setLineColor(new \\Zend_Pdf_Color_Rgb(0.71,0,0));\n $page->setLineWidth(1);\n //$page->drawLine(30, $top-20, 570, $top-20);\n\n $page->setFillColor(new \\Zend_Pdf_Color_Rgb(0.714, 0.012, 0.016));\n $page->setLineWidth(0.5);\n $page->drawRectangle(0, $top-20, 400, $top-10);\n $page->setFillColor(new \\Zend_Pdf_Color_Rgb(0.5725, 0.5412, 0.5333));\n $page->setLineColor(new \\Zend_Pdf_Color_Rgb(0.5725, 0.5412, 0.5333));\n $page->drawRectangle(400, $top-20, 595, $top-10);\n\n\n $page->setFillColor(new \\Zend_Pdf_Color_GrayScale(0.20));\n foreach ($this->string->split($text, 100, true, true) as $_value) {\n $feed = $this->getAlignCenter(\n trim(strip_tags($_value)),\n $boxMargin,\n $page->getWidth() - ($boxMargin * 2),\n $font,\n 10\n );\n\n $page->drawText(\n trim(strip_tags($_value)),\n $feed,\n $top,\n 'UTF-8'\n );\n\n $top -= 10;\n }\n\n\n $this->insertAddress($page);\n }", "title": "" }, { "docid": "4016d58fbf52bb91c3ac6ab5bef8f528", "score": "0.48274833", "text": "protected function getParagraphField() {\n return '';\n }", "title": "" }, { "docid": "4f638f72de75debeb3ec00c4e28906db", "score": "0.48272443", "text": "function _column_left_align_peso($value, $row)\n {\n $value /= 1000;\n $value = $value != 0 ? number_format($value, 3, \",\", \".\") : \"\";\n return \"<span class='izquierda' style='text-align:left;width:100%;display:block;'>$value</span>\";\n }", "title": "" }, { "docid": "a9a88f588616fbe581f72d3be2526721", "score": "0.48207498", "text": "private function pPrIndent($properties)\n {\n $left = 0;\n $right = 0;\n $firstLineIndent = 0;\n //let us look at the margin left\n if (!empty($properties['margin_left'])) {\n $temp = $this->_wordMLUnits($properties['margin_left'], $properties['font_size']);\n $left += (int) round($temp[0]);\n }\n //let us look now at the padding left\n if (!empty($properties['padding_left'])) {\n $temp = $this->_wordMLUnits($properties['padding_left'], $properties['font_size']);\n $left += (int) round($temp[0]);\n }\n //let us look at the margin right\n if (!empty($properties['margin_right'])) {\n $temp = $this->_wordMLUnits($properties['margin_right'], $properties['font_size']);\n $right += (int) round($temp[0]);\n }\n //let us look now at the padding right\n if (!empty($properties['padding_right'])) {\n $temp = $this->_wordMLUnits($properties['padding_right'], $properties['font_size']);\n $right += (int) round($temp[0]);\n }\n if (!empty($properties['text_indent'])) {\n $temp = $this->_wordMLUnits($properties['text_indent'], $properties['font_size']);\n $firstLineIndent = (int) round($temp[0]);\n }\n\n $indent = '<w:ind w:left=\"' . $left . '\" w:right=\"' . $right . '\" ';\n if ($firstLineIndent != 0) {\n $indent .= 'w:firstLine=\"' . $firstLineIndent . '\" ';\n }\n $indent .= '/>';\n return $indent;\n }", "title": "" }, { "docid": "f0b5ee6a18276e27a91bc1941d76495c", "score": "0.48203892", "text": "function gestionnaire_texte($analyseur, $texte) {\n global $nb;\n global $ligne;\n if ($nb > 2) {\n $ligne = $ligne . $texte;\n }\n }", "title": "" }, { "docid": "ca7c8d1ebf26819225eed50380195267", "score": "0.48124307", "text": "function imageTextWrapped(&$img, $x, $y, $width, $font, $color, $text, $textSize, $align) {\n $y += $textSize;\n $dimensions = imagettfbbox($textSize, 0, $font, \" \");\n $x -= $dimensions[4]-$dimensions[0];\n\n $text = str_replace (\"\\r\", '', $text);\n $srcLines = explode (\"\\n\", $text);\n $dstLines = Array();\n foreach ($srcLines as $currentL) {\n $line = '';\n $words = explode (\" \", $currentL);\n foreach ($words as $word) {\n $dimensions = imagettfbbox($textSize, 0, $font, $line.$word);\n $lineWidth = $dimensions[4] - $dimensions[0];\n if ($lineWidth > $width && !empty($line) ) {\n $dstLines[] = ' '.trim($line);\n $line = '';\n }\n $line .= $word.' ';\n }\n $dstLines[] = ' '.trim($line);\n }\n $dimensions = imagettfbbox($textSize, 0, $font, \"MXQJPmxqjp123\");\n $lineHeight = $dimensions[1] - $dimensions[5];\n\n $align = strtolower(substr($align,0,1));\n foreach ($dstLines as $nr => $line) {\n if ($align != \"l\") {\n $dimensions = imagettfbbox($textSize, 0, $font, $line);\n $lineWidth = $dimensions[4] - $dimensions[0];\n if ($align == \"r\") { \n $locX = $x + $width - $lineWidth;\n } else { \n $locX = $x + ($width/2) - ($lineWidth/2);\n }\n } else {\n $locX = $x;\n }\n $locY = $y + ($nr * $lineHeight);\n imagettftext($img, $textSize, 30, $locX, $locY, $color, $font, $line);\n } \n}", "title": "" } ]
fc73720be2d483252ea84cfcbd691059
/ Function will create folder
[ { "docid": "f33a7c039b77587acefeba5f8167fdaa", "score": "0.6849642", "text": "function createFolderWithFile($folder=\"\", $manufacturer_id)\n{\n\tif( !isDirExists( $folder ) )\n\t{\n\t\tmkDirectory( $folder );\t\t\n\t\t\n\t\t$source = BASE_DIR . \"index.php\";\n\t\t$dest = BASE_DIR . $folder. \"/index.php\";\n\t\t\n\t\tcopy($source, $dest);\t\n\t\t\n\t\t$filename = $folder. \"/index.php\";\n\t\t\n\t\t$old_content = fileRead($filename); \n\t\t$replace_str = \"define( 'MANUFACTURER_ID', \".$manufacturer_id.\"); \\n chdir( '/home/resultig/ebay1/' ); \\n \";\n\t\t$new_content = str_replace(\"define( 'MANUFACTURER_ID', 7);\", $replace_str, $old_content);\n\t\t\n\t\tfileWrite($filename, $new_content);\t\n\t\t\n\t\t//Set the name for your New Sub Domain\n\t\t$subDomainname=$folder;\n\t\t$cPanelUserName=\"resultig\";\n\t\t$cPanelPassName=\"Ix58nXod74\";\n\t\t$rootDomainName=\"ebay1.imthetic.com\"; \n\t\t\n\t\tcreate_subdomain($subDomainname,$cPanelUserName,$cPanelPassName,$rootDomainName);\t\t\n\t}\n}", "title": "" } ]
[ { "docid": "ba7e8d352b2ec866991b096b51909c38", "score": "0.82858616", "text": "public function createFolder()\n {\n mkdir($this->_directory, 0777);\n }", "title": "" }, { "docid": "daed930637587b027778b6fc8633c987", "score": "0.82826114", "text": "abstract function createFolder($folder);", "title": "" }, { "docid": "d0fb94288143834d3eeb6790cbd0392d", "score": "0.817446", "text": "function folderCreate() {\n\t\tis_dir(\"files\") || mkdir(\"files\");\n\t\t// aktueller Folder? jahr(2) monat\n\t\t$path = \"files/\" . substr( date(\"Y\"), -2 ) . date(\"m\");\n\t\t// wenn nicht vorhanden, erstellen\n\t\tis_dir($path) || mkdir($path);\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "02c436d52d005786886ecec119670624", "score": "0.80802536", "text": "public function createDir() {\n\t\tmkdir($this -> getDir());\n\t}", "title": "" }, { "docid": "1524a0bae54d23979d3e813d669f0334", "score": "0.8046271", "text": "public function CreateDirectory(){\n\t\t$this->logedChecker();\n\t\t//get folder name from form\n\t\t$FolderName = $this->input->post(\"FolderName\");\n\t\t//check if its not blank\n\t\tif($FolderName == ''){\n\t\t\tredirect('DataExplorer/index');\n\t\t}\n\t\t//create path\n\t\t$TempFilePath=$this->session->userdata('curr_path') . $this->PARSE_SIGN . $FolderName;\n\t\t//if doesnt exist, create it\n\t\tif (!file_exists($TempFilePath)) {\n\t\t\tmkdir($TempFilePath, 0777, true);\n\t\t}\n\t\tredirect('DataExplorer/index');\n\t}", "title": "" }, { "docid": "0a01cc2b0655a6e571d9fb774809af70", "score": "0.79738975", "text": "public function mkdir();", "title": "" }, { "docid": "d1ac81a5a728e1c7b77a18977f3ef70d", "score": "0.79680777", "text": "public function createDir() {\n \n\t\t$companyName = $this->request->data ['companyName'];\n\t\t\n\t\tmkdir(\"/../../{$companyName}\", 0700);\n\t\t\n }", "title": "" }, { "docid": "73f4953e967b6c042f261af3ccbe7aec", "score": "0.7891533", "text": "function createDir() {\n $album = array('title' => 'Default', 'member_id' => $this->id);\n $this->Album->create();\n $this->Album->save($album);\n\n//\t\t$dir = IMAGES.'upload'.DS.$this->id.DS.'projects'.DS;\n//\t\tif(!file_exists($dir))\n//\t\t\tmkdir($dir, 0777, true);\n }", "title": "" }, { "docid": "a7a5802f895f51a95c233cb0c6863d26", "score": "0.77055013", "text": "public function createDir($path) { }", "title": "" }, { "docid": "7a7b17bff4e8eb7f4cb5e7d07643e88e", "score": "0.7679302", "text": "public function create()\n {\n $this->createUniqueDirectoryName();\n $this->makeDirectory();\n }", "title": "" }, { "docid": "1162ee1676752522531b83bff1d7c8f0", "score": "0.7675919", "text": "abstract public function createFolder($folder, $type = null);", "title": "" }, { "docid": "d5e29f09370ef9a4a11d7a5bc2fa2edc", "score": "0.7652446", "text": "public function createFolder($basename);", "title": "" }, { "docid": "92c09788a9cb13a7cd88af4c18feee2f", "score": "0.7626297", "text": "function create_folder($path='./uploads/global',$chmod=0755) {\n if(!is_dir($path)) //create the folder if it's not already exists\n {\n mkdir($path,0755,TRUE);\n } \n}", "title": "" }, { "docid": "01bc8b9dc330bdd414d16f445e2c55c0", "score": "0.76147854", "text": "function create_folder($user){\n\n mkdir ('../databases/users/'.$user);\n\n create_json($user);\n}", "title": "" }, { "docid": "cd24343dd3c0ec8933b94236b9960843", "score": "0.76120865", "text": "public function createFolderName()\n {\n $this->createAttributesName();\n $result = $this->checkFolderList();\n if (empty($result[1]))\n {\n $data = array();\n $data['key'] = get_option('mailin_apikey');\n $data['webaction'] = 'ADDFOLDER';\n $data['foldername'] = 'wordpress';\n $res = $this->curlRequest($data);\n $res = json_decode($res);\n $folder_id = $res->folder_id;\n $exist_list = '';\n } else\n {\n $folder_id = $result[0];\n $exist_list = $result[2];\n }\n $this->createNewList($folder_id, $exist_list); // create list in mailin\n $this->partnerWordpress(); // create partner name\n }", "title": "" }, { "docid": "9a1ef3514a32c5e531b166e2c8a1bd8a", "score": "0.75911456", "text": "function create_folders($location, $name)\n{\n $folders = array(\n 'lib/data_manager', \n 'lib/forms', \n 'install', \n 'lib/' . $name . '_manager', \n 'lib/' . $name . '_manager/component', \n 'rights', \n 'lib/tables');\n foreach ($folders as $folder)\n {\n Filesystem::create_dir($location . $folder);\n }\n}", "title": "" }, { "docid": "5cd768044ca1f34a3f11a5e5bfc9d475", "score": "0.75386536", "text": "private function makeDirectory(){\n return mkdir($this->filepath);\n }", "title": "" }, { "docid": "360e2d9b683b4dad49c9361b0b81748a", "score": "0.74547565", "text": "public function mkdir($path);", "title": "" }, { "docid": "a5c8b14770da4369da6ded7cc399d561", "score": "0.74542165", "text": "public static function mkdir()\n {\n if (!file_exists(self::getDir())) {\n mkdir(self::getDir(), self::FOLDER_PERMISSIONS, true);\n }\n }", "title": "" }, { "docid": "1e10b2c44aff22debaf3491c08ed91bc", "score": "0.742252", "text": "function createFolder($folders) {\n foreach ($folders as $folder)\n if (!file_exists($folder))\n mkdir($folder);\n\t}", "title": "" }, { "docid": "b56d7a05b6d0a877b143790734673884", "score": "0.74140763", "text": "private function createImageDirectory()\n\t{\n\t\treturn Folder::create(JPATH_ROOT . '/images/thm_organizer');\n\t}", "title": "" }, { "docid": "5d1ce5f38cb4401fe7ad97d276146b99", "score": "0.7410515", "text": "public function createFolder(string $name): self;", "title": "" }, { "docid": "012a6889d5ca9f5090c45288ab2eb476", "score": "0.7371764", "text": "protected abstract function createDir($dir);", "title": "" }, { "docid": "c8c245ba19a38102a1938e2a77c98af4", "score": "0.7364955", "text": "public function newfolder()\n\t\t {\n\t\t if (!@mkdir($this->path, $this->path_right, true))\n\t\t {\n\t\t echo \"can not create a folder\";\n\t\t } else\n\t\t {\n\t\t return true;\n\t\t }\n\t\t }", "title": "" }, { "docid": "942d028a458949a995b04abead150777", "score": "0.7345543", "text": "private function createDestinationDirectory()\n {\n ensure_directory($this->getDestination());\n }", "title": "" }, { "docid": "a60e39ffea980135dded28d89ed3dab6", "score": "0.7315955", "text": "public function createImageFolder()\n {\n $date = explode( \"|\", date(\"y|m|d|H\") );\n list($y, $m, $d, $h) = $date;\n if(!file_exists(self::IMAGE_FOLDER . $y))\n {\n mkdir(self::IMAGE_FOLDER . $y);\n }\n if(!file_exists(self::IMAGE_FOLDER . $y . \"/\" . $m))\n {\n mkdir(self::IMAGE_FOLDER . $y . \"/\" . $m);\n }\n if(!file_exists(self::IMAGE_FOLDER . $y . \"/\" . $m . \"/\" . $d))\n {\n mkdir(self::IMAGE_FOLDER . $y . \"/\" . $m . \"/\" . $d);\n }\n if(!file_exists(self::IMAGE_FOLDER . $y . \"/\" . $m . \"/\" . $d . \"/\" . $h))\n {\n mkdir(self::IMAGE_FOLDER . $y . \"/\" . $m . \"/\" . $d . \"/\" . $h);\n }\n\n $this->imageLocation = $y . \"/\" . $m . \"/\" . $d . \"/\" . $h . \"/\";\n }", "title": "" }, { "docid": "11364fee3f4ec289404dd8b36d463690", "score": "0.72952205", "text": "function create_dir($dir_name) {\n if (!is_dir($dir_name)) {\n mkdir($dir_name);\n echo \"dir created..\";\n }\n }", "title": "" }, { "docid": "9407a631fba5dbe6b0b6027986aa584e", "score": "0.7294086", "text": "public function createImgFolder()\n {\n }", "title": "" }, { "docid": "58a3309fe223ec575a73e7a7ef013352", "score": "0.7259848", "text": "public function createDirs($createDir);", "title": "" }, { "docid": "81c88012c5e9ad75683e1019bd195a01", "score": "0.7255745", "text": "function create_dir($user_dir, $jenis){\n\t\t$dir = $_POST['new_dir'];\n\t\t$location = \"siak_public/siak_upload/\".$user_dir.\"/\".$jenis;\n\t\tif (is_dir($location) == false) {\n\t\t $old_umask = umask(0);\n\t\t mkdir($location, 0755, true);\n\t\t umask($old_umask);\n\t\t if (is_dir($location.\"/\".$dir) == false) {\n\t\t\t$old_umask = umask(0);\n\t\t\tmkdir($location.\"/\".$dir, 0755, true);\n\t\t\tumask($old_umask);\n\t\t }\n\t\t}else{\n\t\t if (is_dir($location.\"/\".$dir) == false) {\n\t\t\t$old_umask = umask(0);\n\t\t\tmkdir($location.\"/\".$dir, 0755, true);\n\t\t\tumask($old_umask);\n\t\t }\n\t\t}\n\t}", "title": "" }, { "docid": "09c1a8064d28df33719401e433478a97", "score": "0.7242557", "text": "protected function makeDirectory()\n {\n if (!$this->files->isDirectory(resource_path('views/' . $this->name))) \n {\n $this->files->makeDirectory(resource_path('views/' . $this->name));\n\n $this->info('Directory created successfully.');\n }\n else{\n\n if ($this->confirm('The ' . $this->name . ' directory exists. Do you want to replace it?'))\n {\n $this->files->deleteDirectory(resource_path('views/' . $this->name, true));\n\n $this->files->makeDirectory(resource_path('views/' . $this->name));\n\n $this->info('Directory created successfully.');\n }\n }\n }", "title": "" }, { "docid": "70f3d2c247df77fbe3994d66616068ea", "score": "0.7241707", "text": "static function makeFolder($folder) {\n\t\tif(!file_exists($base = dirname($folder))) self::makeFolder($base);\n\t\tif(!file_exists($folder)) mkdir($folder, Filesystem::$folder_create_mask);\n\t}", "title": "" }, { "docid": "4f2c638782a628489000a1c426864002", "score": "0.7236121", "text": "function create($nfname, $isfolder, $ndir) {\n global $folder;\n if (!$nfname == \"\") {\n maintop(\"创建\");\n\n if ($isfolder == 1) {\n if(mkdir($ndir.\"/\".$nfname, 0777)) {\n echo \"您的目录<a href=\\\"\".$adminfile.\"?op=home&folder=./\".$nfname.\"/\\\">\".$ndir.\"\".$nfname.\"</a> 已经成功被创建.\\n\"\n .\"&nbsp;<a href=\\\"\".$adminfile.\"?op=home\\\">返回文件管理</a>\\n\";\n } else {\n echo \"您的目录\".$ndir.\"\".$nfname.\" 不能被创建. 请检查您的目录权限是否已经被设置为777\\n\";\n }\n } else {\n if(fopen($ndir.\"/\".$nfname, \"w\")) {\n echo \"您的文件, <a href=\\\"\".$adminfile.\"?op=viewframe&file=\".$nfname.\"&folder=$ndir\\\">\".$ndir.$nfname.\"</a> 已经成功被创建.\\n\"\n .\"&nbsp;<a href=\\\"\".$adminfile.\"?op=home\\\">返回文件管理</a>\\n\";\n } else {\n echo \"您的文件 \".$ndir.\"/\".$nfname.\" 不能被创建. 请检查您的目录权限是否已经被设置为777\\n\";\n }\n }\n mainbottom();\n } else {\n cr();\n }\n}", "title": "" }, { "docid": "e46c3bdec8696498b41bba44024521b8", "score": "0.72218126", "text": "protected function __create_parent_directory()\n {\n $this->moduleFolderName = app_path('Modules/'.$this->module.'/');\n File::makeDirectory($this->moduleFolderName);\n $this->line( trans('system.console.module.created', ['folder' => $this->module ]) );\n }", "title": "" }, { "docid": "2db3f3dc735ef5887637a26bd1b7b2b5", "score": "0.71963745", "text": "function create($nfname, $ndir) {\n global $folder;\n $isfolder = 1;\n $ndir = trim($ndir,\"/\");\n if (!$nfname == \"\") {\n if ($isfolder == 1) {\n if(mkdir($ndir.\"/\".$nfname, 0777)) {\n $response['msg'] = $ndir.\"/\".$nfname.\" succesfully created\";\n $response['msgType'] = \"success\";\n } else {\n $response['msg'] = \"The directory, \".$ndir.\"/\".$nfname.\" could not be created. Check to make sure the permisions on the /files directory is set to 777\";\n $response['msgType'] = \"error\";\n }\n } else {\n if(fopen($ndir.\"/\".$nfname, \"w\")) {\n $response['msg'] = \"Your file, \".$ndir.\"/\".$nfname.\" succesfully created\";\n $response['msgType'] = \"success\";\n } else {\n $response['msg'] = \"The file, \".$ndir.\"/\".$nfname.\" could not be created. Check to make sure the permisions on the /files directory is set to 777\";\n $response['msgType'] = \"error\";\n }\n }\n } else {\n $response['msg'] = \"There is a problem\";\n $response['msgType'] = \"error\";\n }\n echo json_encode($response);\n}", "title": "" }, { "docid": "db0e8d14bcdac4017710691c9d761525", "score": "0.7127514", "text": "private function createFolderIfNoExists()\n {\n if (!is_dir($this->path)) {\n mkdir($this->path, 0777, true);\n }\n }", "title": "" }, { "docid": "c6a5690e0060f576d81296ba827aea59", "score": "0.71250385", "text": "public function createDirectories()\r\n\t{\r\n\t\t$path='';\r\n\t\t$directories=explode('/',trim($this->_imagePath,'/'));\r\n\t\tforeach($directories as $directory)\r\n\t\t{\r\n\t\t\tif(empty($path))\r\n\t\t\t\t$path=$this->_basePath;\r\n\r\n\t\t\t$path.='/'.$directory;\r\n\t\t\tif(!file_exists($path))\r\n\t\t\t\tmkdir($path);\r\n\t\t}\r\n\r\n\t\t$versionPath=$path.'/versions';\r\n\t\tif(!file_exists($versionPath))\r\n\t\t\tmkdir($versionPath);\r\n\t}", "title": "" }, { "docid": "14f8ee5688b91c19b16b89092b641c60", "score": "0.7121742", "text": "function crear_carpeta($url,$name){\n $micarpeta = $url.DIRECTORY_SEPARATOR.$name;\n if (!file_exists($micarpeta)) {\n mkdir($micarpeta, 0777, true);\n }\n return $micarpeta;\n}", "title": "" }, { "docid": "2261b63c76bf2390b87af1908b9a9c62", "score": "0.7121649", "text": "function createDirectory($name){\n\t\tif (empty($name))\n\t\t\treturn False;\n\t\treturn mkdir(PROJECT_BASE_DIR.'/'.REPOSITORY_DIR.'/'.$name, 0777); // 0777 o 0700\n\t}", "title": "" }, { "docid": "a392b9212492660e6c4b5f3278c286d3", "score": "0.7093664", "text": "protected function createDirectories()\n {\n if (!is_dir($directory = path('app/Events'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "fd89e9aa43252b5a5c08f868a2e53b76", "score": "0.7087476", "text": "protected function createDirectories()\n {\n \t/*\n\t\t * View directories\n\t\t */ \n if (! is_dir($directory = resource_path('views/layouts'))) {\n mkdir($directory, 0755, true);\n }\n\n if (! is_dir($directory = resource_path('views/logged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/unlogged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/auth'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/auth/passwords'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail/html'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/mail/markdown'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = resource_path('views/vendor/notifications'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Translations directories\n\t\t */ \n \tif (! is_dir($directory = resource_path('lang/fr'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Controllers directories\n\t\t */\n\t\tif (! is_dir($directory = app_path('Http/Controllers/Auth'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = app_path('Http/Controllers/Logged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\tif (! is_dir($directory = app_path('Http/Controllers/UnLogged'))) {\n mkdir($directory, 0755, true);\n }\n\t\t\n\t\t/*\n\t\t * Notifications directories\n\t\t */\n\t\tif (! is_dir($directory = app_path('Notifications'))) {\n \tmkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "964ece11a5abd4f1262b657505003805", "score": "0.7081514", "text": "protected function createFolders()\n {\n $paths = array(\n $this->testPath,\n $this->getAcceptancePath(),\n $this->getContextPath(),\n $this->getFeaturePath()\n );\n\n foreach ($paths as $path) {\n $this->createFolder($path);\n }\n }", "title": "" }, { "docid": "5e8b9bb58d6e8b96fe542812f359f73e", "score": "0.70646644", "text": "function createFolder($path, $folder_name)\n {\n if(!file_exists($path.'/'.$folder_name)) {\n mkdir($path . $folder_name, 0777, true);\n return $path . $folder_name;\n }\n return false;\n }", "title": "" }, { "docid": "fe04481e4d5ec8654964cfd9f387085a", "score": "0.7064096", "text": "private function createFolder()\n\t{\n\t\t// Check if the log folder exists, create it if not.\n\t\tif (!is_dir($this->currentLogFolder)) {\n\t\t\t$old = umask(0777);\n\t\t\tif (!mkdir($this->currentLogFolder)) {\n\t\t\t\tthrow new \\LoggerException('Unable to create log file folder ' . $this->currentLogFolder);\n\t\t\t}\n\t\t\tchmod($this->currentLogFolder, 0777);\n\t\t\tumask($old);\n\t\t}\n\t}", "title": "" }, { "docid": "1c77b80d7278e01ea2ed055f6d255665", "score": "0.7055613", "text": "function create_dir($dirname){\n \nif ( !file_exists($dirname) ) {\n $oldmask = umask(0); // helpful when used in linux server \n mkdir ($dirname, 0755);\n}\n\n}", "title": "" }, { "docid": "dd9f534b11a1b838b5e7e02a1ee84e91", "score": "0.7048747", "text": "protected static function create_folder() {\n\t\t$upload_dir = wp_upload_dir();\n\t\t$tables_dir = $upload_dir['basedir'] . '/ratesync_tables';\n\n\t\tif ( ! file_exists( $tables_dir ) && ! mkdir( $tables_dir, 0755 ) ) {\n\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\twp_die( __( \"RateSync install failed: couldn't create directory $tables_dir.\", 'wc-ratesync' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "4281bdc846d3ba94cb7b9f0958d1c20b", "score": "0.70462805", "text": "public function mkdir() {\n\t\t$newDir = self::strip($this->newDir);\n\t\t$newPath = $this->uploadDir.'/'.utf8_decode($newDir);\n\t\tif(!$this->checkName($newDir))\n\t\t\treturn;\n\t\tif(@mkdir($newPath))\n\t\t\t$this->message = \"Created directory [$newDir]\";\n\t\telse {\n\t\t\t$error = ($error = error_get_last())? $error['message']: '';\n\t\t\t$this->message(\"Could not make directory '$newDir' ($error)\", true);\n\t\t}\n\t}", "title": "" }, { "docid": "81d76478b4571f9831199ecd410d2a12", "score": "0.7036908", "text": "function putDir($path, FolderShareConnect $server, array $options) {\n echo \"mkdir \".$path.\"\\r\\n\";\n\n //updates the $options array to match runMkdir's inputs\n //the error is that format should be enclosed in quotes\n $inputArr = $options;\n $inputArr['format'] = 'keyvalue';\n $inputArr['command'] = array('mkdir', $path);\n $inputArr['paths'] = array($path);\n runMkdir($server, $inputArr);\n}", "title": "" }, { "docid": "ae8c584b1b87e19c3e4a60df192832cb", "score": "0.7012858", "text": "function create_dirs($path)\n{\n if (!is_dir($path))\n {\n $directory_path = \"\";\n $directories = explode(\"/\",$path);\n array_pop($directories);\n \n foreach($directories as $directory)\n {\n $directory_path .= $directory.\"/\";\n if (!is_dir($directory_path))\n {\n mkdir($directory_path);\n chmod($directory_path, 0777);\n }\n }\n }\n}", "title": "" }, { "docid": "e8169ea96a5643b092d2fc6f47fc6562", "score": "0.7005453", "text": "public function createFolder($path)\n {\n $this->_vfs->createFolder(dirname($path));\n }", "title": "" }, { "docid": "0be5f722680cb1d673da62f10f52b2a5", "score": "0.7004259", "text": "protected function createDirectories()\n {\n if (! is_dir($directory = resource_path('views/session-tokens'))) {\n mkdir($directory, 0755, true);\n\n $this->comment('Created directory ['.$directory.']');\n }\n }", "title": "" }, { "docid": "a6de7a3441b8c2fe2fb981d5ef78f721", "score": "0.69835657", "text": "public function createFolder($parentId, $name, $short);", "title": "" }, { "docid": "2adde7cf9e9289feea038f3346392fad", "score": "0.6983277", "text": "public function mkdir($path , $mode , $options);", "title": "" }, { "docid": "6451fe018c83c7eafa3cb100eea50136", "score": "0.69720656", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('app/Controllers'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "1ff641e4b9b24fc5b9368239f4b78875", "score": "0.69656456", "text": "private function nDirectory($path = ''){\n $path = $path ? DIRECTORY_SEPARATOR.$path : '';\n if(!is_dir($this->_FilePath.$path)){\n mkdir($this->_FilePath.$path,0755,true);\n }\n\n// if(!is_dir($this->_FilePath)){\n// mkdir($this->_FilePath,0755);\n// }\n// if($path && !is_dir($this->_FilePath.$path)){\n// mkdir($this->_FilePath.$path,0755);\n// }\n }", "title": "" }, { "docid": "9bffde2dcd43b75999ebe0c951ba4e13", "score": "0.69541097", "text": "function installCreateDir($dir) {\n echo \"Create directory: $dir\\r\\n\";\n system(\"mkdir -p $dir\");\n}", "title": "" }, { "docid": "1b9ae1727a0d57bdff9485f3371572d1", "score": "0.6949756", "text": "public function create()\n {\n $files = new Filesystem();\n $files->mkdir($this->getDataDirPath());\n }", "title": "" }, { "docid": "8134ef81ee07693ed3a135521e1ffe59", "score": "0.69478434", "text": "public function createFolderPath($path)\r\n {\r\n if( ! file_exists(dirname($path)) ) {\r\n mkdir(dirname($path), $this->options['default_new_folder_permissions'], true);\r\n } else {\r\n }\r\n }", "title": "" }, { "docid": "c9f46eb5ef8b260a6964e68489d9df25", "score": "0.6935168", "text": "protected function __create_child_directories($folder)\n {\n File::makeDirectory($this->moduleFolderName.ucfirst($folder));\n $this->line( trans('system.console.module.created', ['folder' => ucfirst($folder) ]) );\n }", "title": "" }, { "docid": "8410519a5f13c630f9a87b6db414e47a", "score": "0.69193023", "text": "function newdir()\n {\n global $_ARRAYLANG, $objTemplate;\n\n \\Permission::checkAccess(47, 'static');\n\n $this->webPath = $this->arrWebPaths[0];\n \n $selectedTheme = null;\n if (isset($_GET['copy'])) {\n $selectedTheme = $this->themeRepository->findOneBy(array('foldername' => contrexx_input2raw($_GET['copy'])));\n }\n \n // initialize variables\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'skins_create', 'skins_create.html');\n $this->pageTitle = $_ARRAYLANG['TXT_NEW_DIRECTORY'];\n $objTemplate->setVariable(array(\n 'TXT_NEW_DIRECTORY' => $_ARRAYLANG['TXT_NEW_DIRECTORY'],\n 'CREATE_DIR_ACTION' => '?cmd=ViewManager&amp;act=createDir&amp;path=' . $this->webPath,\n 'TXT_DIR_NAME' => $_ARRAYLANG['TXT_DIR_NAME'],\n 'TXT_DB_NAME' => $_ARRAYLANG['TXT_DB_NAME'],\n 'TXT_DESCRIPTION' => $this->webPath,\n 'TXT_CREATE' => $_ARRAYLANG['TXT_CREATE'],\n 'TXT_FROM_TEMPLATE' => $_ARRAYLANG['TXT_FROM_TEMPLATE'],\n 'THEMES_TEMPLATE_MENU' => $this->getThemesDropdown($selectedTheme, false),\n 'TXT_THEMES_EDIT' => $_ARRAYLANG['TXT_SETTINGS_MODFIY'],\n 'TXT_THEMES_CREATE' => $_ARRAYLANG['TXT_CREATE'],\n 'TXT_THEME_IMPORT' => $_ARRAYLANG['TXT_THEME_IMPORT'],\n ));\n \n $this->checkTable($this->oldTable);\n// $this->newdir();\n }", "title": "" }, { "docid": "fa5451b921be596c92b0c12d9f12ec4e", "score": "0.69119483", "text": "public function make_directory($data)\n {\n // TODO: Implement make_directory() method.\n }", "title": "" }, { "docid": "b6847f7745cd5f20b0df0f0cefb0e4e6", "score": "0.6896777", "text": "function create_dir($directory, $permissions = 0777)\r\n{\r\n // if the path has a slash at the end we remove it here\r\n if(substr($directory,-1) == '/')\r\n {\r\n $directory = substr($directory,0,-1);\r\n }\r\n \r\n // if there is no such directory yet - continue\r\n if(! is_dir($directory))\r\n {\r\n // First - recursively create the parent directory\r\n $directory_arr = explode(\"/\", $directory);\r\n array_pop($directory_arr);\r\n $parent = join(\"/\", $directory_arr);\r\n \r\n if ($parent)\r\n create_dir($parent, $permissions);\r\n \r\n // Create our directory now\r\n return @mkdir($directory, $permissions);\r\n }\r\n \r\n return TRUE; // Directory already exists\r\n}", "title": "" }, { "docid": "6141fdd25a8279c3a7119068aad1cbff", "score": "0.6886568", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('resources/views/layouts'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n\r\n if (!is_dir($directory = path('resources/views/auth/passwords'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "2cec1d22d19e48e9f92cf651aacd17b8", "score": "0.6883653", "text": "protected function createDir()\n {\n\n $name = $_POST['mkdir'];\n $dest_path = FILEMANAGER_WORKSPACE . $this->sanitizePathFragment($_POST['within']) . '/';\n\n if (!is_readable($dest_path) || !is_writeable($dest_path)) {\n return $this->_handleAccessError($dest_path);\n }\n\n if (is_dir($dest_path . $name) || file_exists($dest_path . $name)) {\n return $this->handleGeneralError('directory {$file} already exists', array('file' => $name, 'path' => $dest_path));\n }\n\n try {\n mkdir($dest_path . $name);\n\n return $this->handleSuccess('Directory {$dir} successfully created in {$path}', array(\n 'dir' => $name,\n 'path' => substr($dest_path, strlen(FILEMANAGER_WORKSPACE . '/')),\n 'destination' => $dest_path . $name,\n 'destination_path' => $dest_path,\n 'oo_within' => $_POST['within'],\n 'within' => $this->sanitizePathFragment($_POST['within'])\n )\n );\n } catch (Exception $e) {\n return $this->handleGeneralError('Failed creating Directory {$dir} in {$path}', array(\n 'dir' => $name,\n 'path' => substr($dest_path, strlen(FILEMANAGER_WORKSPACE . '/')),\n 'destination' => $dest_path . $name,\n 'destination_path' => $dest_path\n )\n );\n }\n\n return false;\n }", "title": "" }, { "docid": "c7557fdc713bcf507a215124e0f471f5", "score": "0.6882588", "text": "private static function createUploadDirectory() \n {\n $uploadHere = self::$uploadPath.Yii::$app->user->identity->id;\n\n // Create directory for users that never uploaded files before\n if (!is_dir($uploadHere)) {\n\n // Directory with write only by owner permissions is created\n mkdir($uploadHere, 0700);\n }\n }", "title": "" }, { "docid": "1a7bf5c8f55876dcea5a396cbce82641", "score": "0.6880176", "text": "public static function createFolder() {\r\n\t\t$timecode = md5(microtime()); // unique id based on time in microseconds (used to create temporary resources)\r\n\t\t// ResourceDescriptor Object for a folder resource\r\n\t\t$result = new ResourceDescriptor('test_' . $timecode, 'folder', '/test_' . $timecode, 'false');\r\n\t\t$result->setLabel('test_' . $timecode);\r\n\t\t$result->setDescription('REST Test Folder');\r\n\t\t$result->addProperty(new ResourceProperty('PROP_PARENT_FOLDER', '/'));\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "3c684c20fdf6a985e9fe425e41c4072a", "score": "0.68764496", "text": "function createDirs()\n{\n global $outputDir;\n \n @mkdir('build', 0777);\n @mkdir($outputDir, 0755, true);\n @mkdir($outputDir . '/stylesheets', 0755);\n}", "title": "" }, { "docid": "f563791279c90a3fe85e959094075016", "score": "0.68656325", "text": "function createPublicFolder($service, $folderName,$parentId) {\n\n $file = new Google_DriveFile();\n $file->setTitle($folderName);\n $file->setMimeType('application/vnd.google-apps.folder');\n $parent = new Google_ParentReference();\n $parent->setId($parentId);\n $file->setParents(array($parent));\n $createdFile = $service->files->insert($file, array(\n 'mimeType' => 'application/vnd.google-apps.folder',\n ));\n //assign the file with MIME \n $permission = new Google_Permission();\n $permission->setValue('me');\n $permission->setType('anyone');\n $permission->setRole('writer');\n //assign the permission\n\n $service->permissions->insert(\n $createdFile->getId(), $permission);\n\n return $createdFile;\n}", "title": "" }, { "docid": "2ed17b46da3de8bcf2c6a673f6a46038", "score": "0.68589556", "text": "public function createDirectory($path) {\n\n $this->subject->createDirectory($path);\n\n }", "title": "" }, { "docid": "266751ff44e0e63a72ebee36edfd8977", "score": "0.68536", "text": "function processNewDir() \r\n\t{\r\n\t\tif($this->config['safe_mode'] == true)\r\n\t\t\tReturn false;\r\n\r\n\t\tif(isset($_GET['newDir']) && isset($_GET['dir']))\r\n\t\t{\r\n\t\t\t$newDir = rawurldecode($_GET['newDir']);\r\n\t\t\t$dir = rawurldecode($_GET['dir']);\r\n\t\t\t$path = Files::makePath($this->getImagesDir(),$dir);\r\n\t\t\t$fullpath = Files::makePath($path, Files::escape($newDir));\r\n\t\t\tif(is_dir($fullpath))\r\n\t\t\t\tReturn false;\r\n\r\n\t\t\tReturn Files::createFolder($fullpath);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ce2aad720593d8c19ab39ff311d17322", "score": "0.6853361", "text": "public function createDirectories()\n {\n foreach (config('webserver', []) as $key => $params) {\n $path = array_get($params, 'path');\n\n if ($path && ! File::isDirectory($path)) {\n File::makeDirectory($path, 0755, true);\n }\n }\n }", "title": "" }, { "docid": "dd0c59a5954724e8133a7ba230efc548", "score": "0.6839542", "text": "function mkdir_r($dirName, $rights=0755){\n $dirs = explode('/', $dirName);\n $dir='';\n foreach ($dirs as $part) {\n\t\t//echo $part;\n $dir.=$part.'/';\n if (!is_dir($dir) && strlen($dir)>0)\n mkdir($dir, $rights);\n }\n}", "title": "" }, { "docid": "6c02fe8abf99eb31ca64f835d9bdd111", "score": "0.68354124", "text": "public function createFileDir()\n {\n\n $filePath = oxRegistry::getConfig()->getConfigParam(tc_cleverreach_config::SETTING_EXPORT_PATH);\n $filePath = getShopBasePath() . $filePath;\n\n @mkdir($filePath);\n $msg = oxRegistry::getLang()->translateString('TC_CLEVERREACH_ERROR_NO_PATH2') . ': ' . $filePath;\n if (file_exists($filePath) === false) {\n throw new tc_cleverreach_exception($msg);\n }\n }", "title": "" }, { "docid": "9c2e56b4371e3a71a38b5223d7e74662", "score": "0.6814965", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('app/Providers'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "774ca74c211ed2fdeace4a90d750aedc", "score": "0.6814375", "text": "function createUniqueFolder($path){\n $complete = FALSE;\n $i = 0;\n //returns false if it can't do it for whatever reason\n while($i < 10){ //lets not try this forever\n $unique = rand();\n $newPath = $path.\"\\\\\".$unique; //convert to string\n if(file_exists($newPath) || is_dir($newPath)){\n $i++;\n }\n else{\n $complete = TRUE;\n $i = 50; //break out of loop, we did it!\n }\n }\n if(!$complete){\n return FALSE; //\n }\n else{\n $made = mkdir($newPath);\n chmod($newPath,0777);\n if(!$made){\n return FALSE; //PHP failed to make the directory\n }\n else{\n return $newPath;\n }\n }\n }", "title": "" }, { "docid": "026974fac4b9cf17449c990a4f4f9e64", "score": "0.68126476", "text": "protected abstract function createTargetDir();", "title": "" }, { "docid": "26c60e378dd2a04ee668c75d2479542d", "score": "0.6797029", "text": "public function testMakeDirectory()\n {\n $this->assertTrue(File::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "title": "" }, { "docid": "e1f3d73d728191ddb1eef0d4f3c0de8f", "score": "0.67952985", "text": "function newFolder() {\n\t\tglobal $session, $lang;\n\t\t$now = gmdate(\"Y-m-d H:i:s\");\n\t\t$title = $lang[\"PROC_FOLDER_NEW\"];\n\t\t\n\t\t$q = \"INSERT INTO \" . CO_TBL_PROCS_FOLDERS . \" set title = '$title', status = '0', created_user = '$session->uid', created_date = '$now', edited_user = '$session->uid', edited_date = '$now'\";\n\t\t$result = mysql_query($q, $this->_db->connection);\n\t\tif ($result) {\n\t\t \t$id = mysql_insert_id();\n\t\t\treturn $id;\n\t\t}\n\t}", "title": "" }, { "docid": "2eb906262fd83bc5a96d4bcba66b829a", "score": "0.67951727", "text": "function makeDirectory($hashName){\n $upDir = '/home1/typograf/public_html/typograffit/wp-content/uploads/typo/'.$hashName.'/';\n if(!file_exists($upDir)){\n mkdir($upDir, 0777);\n }\n return $upDir;\n}", "title": "" }, { "docid": "947a0f15f63ed7623d140dbb44348a42", "score": "0.6790359", "text": "public function createFolder($name, $parent_id) {\n $url = $this->service->buildUrl(\"/folders\");\n $params = array('name' => $name, 'parent' => array('id' => $parent_id));\n return $this->service->post($url, array(), json_encode($params));\n }", "title": "" }, { "docid": "b77577048fa3969e8a7ba71bec964c41", "score": "0.6785565", "text": "function createFolder($title = 'Graytree', $module = 'graytree', $pid=0) {\t\t\r\n\t\t$fields_values = array();\r\n\t\t$fields_values['pid'] = $pid;\r\n\t\t$fields_values['sorting'] = 10111; #TODO\r\n\t\t$fields_values['perms_user'] = 31;\r\n\t\t$fields_values['perms_group'] = 31;\r\n\t\t$fields_values['perms_everybody'] = 31;\r\n\t\t$fields_values['title'] = $title;\r\n\t\t$fields_values['tx_graytree_foldername'] = strtolower($title);\r\n\t\t$fields_values['doktype'] = 254;\r\n\t\t$fields_values['module'] = $module;\r\n\t\t$fields_values['crdate'] = time();\r\n\t\t$fields_values['tstamp'] = time();\r\n\t\treturn $GLOBALS['TYPO3_DB']->exec_INSERTquery('pages', $fields_values);\r\n\t}", "title": "" }, { "docid": "be904586025270f80e0c5e99e59e0664", "score": "0.678184", "text": "public function createFolder(Request $request)\n {\n $namespace = $request->request->get('namespace');\n $parentPath = $request->request->get('parent');\n $folderName = $request->request->get('foldername');\n\n try {\n $this->filesystem()->createDir(\"$namespace://$parentPath$folderName\");\n\n return $this->json(\"$parentPath$folderName\", Response::HTTP_OK);\n } catch (IOException $e) {\n $msg = Trans::__('Unable to create directory: %DIR%', ['%DIR%' => $folderName]);\n $this->logException($msg, $e);\n\n return $this->json($msg, Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "a7ffe60dc0bfacc0c152d88b13a17e6d", "score": "0.6780335", "text": "function createPath($path) {\n if (is_dir($path)) return true;\n $prev_path = substr($path, 0, strrpos($path, '/', -2) + 1 );\n $return = createPath($prev_path);\n\t\n return ($return && is_writable($prev_path)) ? mkdir($path) : false;\n}", "title": "" }, { "docid": "bdc2fe9bc627d208a98cc4216837db07", "score": "0.67731786", "text": "function createPath($path) {\n if (is_dir($path)) return true;\n $prev_path = substr($path, 0, strrpos($path, '/', -2) + 1 );\n $return = createPath($prev_path);\n // return ($return && is_writable($prev_path)) ? mkdir($path) : false;\n if ($return && is_writable($prev_path)) {\n $ret = mkdir($path);\n chmod($path, 0777);\n return $ret;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "7c865c72b82f54959e295242f3377683", "score": "0.6761784", "text": "private function makeDirectory()\n {\n $config = Config::getInstance();\n \n $dir = '../' . $config->get('upload_dir') . '/users/' . $this->value;\n \n if ( is_dir( $dir ) ) {\n return true;\n }\n \n if ( mkdir( $dir, 0757 ) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a3f421d0101721d193a48c0bdac2f1df", "score": "0.6759598", "text": "function create_folder_loop($folder_name,$loop_level){\n\n\tglobal $dir_path, $new_path, $temp_dir_path, $temp_new_path;\n\t\n\twhile($f = readdir($folder_name)){\n\t\n\t\t$full = $dir_path . \"/\" . $f;\n\n\t\tif(is_dir($full)){\n\n\t\t\tif(($f==\".\")||($f==\"..\")){\n\t\t\t\t\n\t\t\t}else{\n\n\t\t\t\t$new_folder = opendir($full);\n\t\t\t\t$temp_dir_path = $dir_path;\n\t\t\t\t$temp_new_path = $new_path;\n\t\t\t\t$new_path = $new_path . \"/\" . $f;\n\t\t\t\t$dir_path=$full;\n\n\t\t\t\tif(@mkdir($new_path)){\n\t\t\t\t\tif(@chmod($new_path, 0777)){\n\n\t\t\t\t\t\tcreate_folder_loop($new_folder,++$loop_level);\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\treceive_message($_SESSION['toolkits_logon_username'], \"FILE_SYSTEM\", \"MAJOR\", \"Failed to set permissions on folder\", \"Failed to set correct rights on \" . $new_path);\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\n\t\t\t\t\treceive_message($_SESSION['toolkits_logon_username'], \"FILE_SYSTEM\", \"CRITICIAL\", \"Failed to create folder\", \"Failed to create folder \" . $new_path);\n\n\t\t\t\t\treturn false;\n\n\t\t\t\t}\n\n\n\t\t\t}\n\t\n\t\t}else{\n\t\n\t\t\t$file_dest_path = $new_path . \"/\" . $f;\n\t\t\tif(@copy($full, $file_dest_path)){\n\t\t\t\tif(@chmod($file_dest_path, 0777)){\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}else{\n\n\t\t\t\t\treceive_message($_SESSION['toolkits_logon_username'], \"FILE_SYSTEM\", \"CRITICAL\", \"Failed to copy file\", \"Failed to copy file \" . $full . \" \" . $file_dest_path);\n\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\n\t\t\t\treceive_message($_SESSION['toolkits_logon_username'], \"FILE_SYSTEM\", \"MAJOR\", \"Failed to set rights on file\", \"Failed to set rights on file \" . $full . \" \" . $file_dest_path);\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\t}\t\n\t\n\t$dir_path = $temp_dir_path;\n\t$new_path = $temp_new_path;\n\n\t/*\n\t* loop level is used to check for the recusion to make sure it has worked ok. A failure in this is not critical but is used in error reporting\n\t*/\n\n\t$loop_level--;\n\n\tif($loop_level==-1){\n\t\treturn true;\n\t}\n\t\n}", "title": "" }, { "docid": "f2049c0d7303c8a475102adffef7eb8b", "score": "0.674539", "text": "private function generateDirectory()\n {\n $this->storePath = api_get_path(SYS_COURSE_PATH) . $this->course['path'] . '/exercises/';\n\n if (!is_dir($this->storePath)) {\n mkdir($this->storePath);\n }\n\n if (!is_dir($this->storePath . $this->sessionId)) {\n mkdir($this->storePath . $this->sessionId);\n }\n\n if (!empty($this->exerciseId) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId);\n }\n\n if (!empty($this->id) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id);\n }\n\n if (!empty($this->userId) && !is_dir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id . '/' . $this->userId)) {\n mkdir($this->storePath . $this->sessionId . '/' . $this->exerciseId . '/' . $this->id . '/' . $this->userId);\n }\n\n $params = [\n $this->sessionId,\n $this->exerciseId,\n $this->id,\n $this->userId,\n ];\n\n $this->storePath .= implode('/', $params).'/';\n\n return $this->storePath;\n }", "title": "" }, { "docid": "78a057bac64e67cc700a2dae1c5c4371", "score": "0.673842", "text": "public function createDirectory($path) {\n try {\n if (trim($path) != \"\") {\n $arr_path = explode(\"/\", $path);\n $folder = '';\n for ($i = 0; $i < count($arr_path); $i++) {\n if ($i == 0)\n $concat = \"\";\n else\n $concat = \"/\";\n $folder .= $concat . $arr_path[$i];\n if ($arr_path[$i] != \"\" && !is_dir($folder)) {\n mkdir($folder, 0777);\n }\n }\n }\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "2330628c044b03a020406c4963afb3fb", "score": "0.67350817", "text": "public static function make_dir($path) {\n\t\tif( File::isDirectory($path) == false ) {\n\t\t\tFile::makeDirectory($path, 0777, true);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2f738c75d6ef19fee9b69e5934ce9e57", "score": "0.67248225", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('app/Middleware'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "e85e2a6aec8fb698b5ab138dbb098e2c", "score": "0.67139846", "text": "protected function createDirectories()\n {\n if (!is_dir($directory = path('app/Handlers'))) {\n mkdir($directory, 0755, true);\n }\n }", "title": "" }, { "docid": "291b92c4943d26378f049d871b360c7d", "score": "0.6710115", "text": "function createSchemaFolder($name){\n\t$ret = mkdir(GSSCHEMAPATH.'/'.$name);\n\treturn $ret;\n}", "title": "" }, { "docid": "bb72556476305c8a1215a124e6eb522a", "score": "0.6709799", "text": "function createDir($path){\n\t//base case\n\tif (is_dir($path)){\n\t\treturn;\n\t} else {\n\t\tpreg_match('/(.*)[\\/\\\\\\\\]([^\\\\\\\\\\/]+)\\/?$/', $path, $matches);\n\t\tcreateDir($matches[1]);\n\t\t//make directory if it's not a filename.\n\t\tif (preg_match('/(.*)\\.[\\w]+$/', $matches[2])===0) {\n\t\t\tmkdir($matches[0], 0700);\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "d6484eebc0ce0372fccc43b1e2ba73cb", "score": "0.6709301", "text": "public function newFolder($newdir) {\n\t\tmkdir($newdir, Config::get('new_dir_mode'));\n\t}", "title": "" }, { "docid": "353df39479a28dfca89232c2110dd52b", "score": "0.6703938", "text": "function io_makeFileDir($file){\n $dir = dirname($file);\n if(!@is_dir($dir)){\n io_mkdir_p($dir) || msg(\"Creating directory $dir failed\",-1);\n }\n}", "title": "" }, { "docid": "09370343adaa74d5c731cfb9714859fc", "score": "0.6695557", "text": "public function findOrCreateFolder($type, $blog_id) {\n\t\t$path = MEDIAFOLDER.\"b\".$blog_id.\"/\";\n\t\tif(!is_dir($path.$type.\"s\")){ \n\t\t\tif(!is_writable($path)) {\n\t\t\t\techo \"No right to write.\";\n\t\t\t} else {\n\t\t\t\tchdir($path);\n\t\t\t\t$old_umask = umask(0);\n\t\t\t\t#echo \"I am here: \".$_SERVER['SCRIPT_FILENAME'];\n mkdir($type.\"s\");\n umask($old_umask);\n chdir(BASEURL);\n }\n } else {}\n return $path.$type.\"s/\";\n\t}", "title": "" }, { "docid": "8db44f68381c7248d0a6133135ec44cb", "score": "0.6695427", "text": "function create_directory($base_folder, $sub_folder = null)\n {\n $basedir = '';\n\n $CI = get_instance();\n\n $CI->config->load('general');\n\n foreach ($CI->config->item('base_folder') as $key => $value)\n {\n if($key == $base_folder)\n {\n $basedir = $value;\n }\n else {\n log_message('error', 'specified folder path does not exist, Please recheck');\n }\n }\n\n if($sub_folder == null)\n {\n $file_path = $CI->config->item('img_basepath').$basedir.'/';\n }\n else {\n $file_path = $CI->config->item('img_basepath').$basedir.'/'.$sub_folder.'/';\n }\n\n if(!file_exists($file_path))\n {\n mkdir($file_path, 0777, true);\n }\n\n return $file_path;\n }", "title": "" }, { "docid": "d789aad09ec2c706062284cc9e795dc6", "score": "0.66953254", "text": "function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}", "title": "" }, { "docid": "d789aad09ec2c706062284cc9e795dc6", "score": "0.66953254", "text": "function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}", "title": "" }, { "docid": "36de6b105aecc54e97254f6af173320e", "score": "0.6695032", "text": "function mkdir_r($dirName, $rights=0777){\n $dirs = explode('/', $dirName);\n $dir='';\n foreach ($dirs as $part) {\n $dir.=$part.'/';\n if (!is_dir($dir) && strlen($dir)>0)\n mkdir($dir, $rights);\n }\n}", "title": "" } ]
6f7eb3818653fcd24eee147dfba9b107
event: adminhtml_cms_page_edit_tab_meta_prepare_form in: Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Meta::_prepareForm()
[ { "docid": "440bb23718a8261bd0dc7d696677b03f", "score": "0.60353696", "text": "public function addFieldsToCmsMetaTagForm(Varien_Event_Observer $event)\n {\n $isElementDisabled = Mage::getSingleton('admin/session')->isAllowed('cms/page/save') ? false : true;\n\n $form = $event->getForm();\n /* @var $form Varien_Data_Form */\n $fieldset = $form->addFieldset('meta_seo', array('legend' => Mage::helper('loewenstark_seo')->__('Meta Data for SEO'), 'class' => 'fieldset-wide'));\n $fieldset->addField('meta_robots', 'select', array(\n 'name' => 'meta_robots',\n 'label' => Mage::helper('loewenstark_seo')->__('Robots Tag'),\n 'title' => Mage::helper('loewenstark_seo')->__('Robots Tag'),\n 'values' => Mage::getSingleton('loewenstark_seo/system_config_source_cms_robots')->toOptionArray(),\n 'disabled' => $isElementDisabled,\n ));\n }", "title": "" } ]
[ { "docid": "11aa64740f291af38c26789701c2cd17", "score": "0.74952275", "text": "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\t\t\n\t\t$fieldset = $this->getForm()->addFieldset('splash_page_meta', array(\n\t\t\t'legend'=> $this->helper('adminhtml')->__('Meta Data'),\n\t\t\t'class' => 'fieldset-wide',\n\t\t));\n\n\n\t\t$fieldset->addField('page_title', 'text', array(\n\t\t\t'name' => 'page_title',\n\t\t\t'label' => $this->__('Page Title'),\n\t\t\t'title' => $this->__('Page Title'),\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n\t\t$fieldset->addField('meta_description', 'editor', array(\n\t\t\t'name' => 'meta_description',\n\t\t\t'label' => $this->__('Description'),\n\t\t\t'title' => $this->__('Description'),\n\t\t\t'style' => 'width:98%; height:110px;',\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n\t\t$fieldset->addField('meta_keywords', 'editor', array(\n\t\t\t'name' => 'meta_keywords',\n\t\t\t'label' => $this->__('Keywords'),\n\t\t\t'title' => $this->__('Keywords'),\n\t\t\t'style' => 'width:98%; height:110px;',\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n $fieldset->addField('set_index', 'select', array(\n\t\t\t'name' => 'set_index',\n\t\t\t'label' => $this->__('Set Index'),\n\t\t\t'title' => $this->__('Set Index'),\n 'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray(),\n\t\t))->setRenderer(\n\t\t\t$this->getLayout()->createBlock('landingpage/adminhtml_form_field_storechecker')\n\t\t);\n\t\t$this->getForm()->setValues($this->_getFormData());\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1ac3a31327efac1c71240bc76bcd5170", "score": "0.7449521", "text": "protected function _prepareForm()\n\t{\n\t\t/* @var $model Mage_Cms_Model_Page */\n\t\t$model = Mage::registry('cms_page');\n\t\tparent::_prepareForm();\n\t\tdf_h()->cms()->addOnChangeToFormElements($this->getForm(), 'dataChanged();');\n\t\t/* @var $fieldset Varien_Data_Form_Element_Fieldset */\n\t\t$fieldset = $this->getForm()->getElement('content_fieldset');\n\t\tif ($model->getPageId()) {\n\t\t\t/**\n\t\t\t * Обратите внимание,\n\t\t\t * что нельзя применять цепной вызов $fieldset->addField()->addField(),\n\t\t\t * потому что addField() возвращает не $fieldset, а созданное поле.\n\t\t\t */\n\t\t\t$fieldset\n\t\t\t\t->addField(\n\t\t\t\t\t'page_id'\n\t\t\t\t\t,Df_Varien_Data_Form_Element_Abstract::TYPE__HIDDEN\n\t\t\t\t\t,array(\n\t\t\t\t\t\t'name' => 'page_id'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t;\n\t\t\t$fieldset\n\t\t\t\t->addField(\n\t\t\t\t\t'version_id'\n\t\t\t\t\t,Df_Varien_Data_Form_Element_Abstract::TYPE__HIDDEN\n\t\t\t\t\t,array(\n\t\t\t\t\t\t'name' => 'version_id'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t;\n\t\t\t$fieldset\n\t\t\t\t->addField(\n\t\t\t\t\t'revision_id'\n\t\t\t\t\t,Df_Varien_Data_Form_Element_Abstract::TYPE__HIDDEN\n\t\t\t\t\t,array(\n\t\t\t\t\t\t'name' => 'revision_id'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t;\n\t\t\t$fieldset\n\t\t\t\t->addField(\n\t\t\t\t\t'label'\n\t\t\t\t\t,Df_Varien_Data_Form_Element_Abstract::TYPE__HIDDEN\n\t\t\t\t\t,array(\n\t\t\t\t\t\t'name' => 'label'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t;\n\t\t\t$fieldset\n\t\t\t\t->addField(\n\t\t\t\t\t'user_id'\n\t\t\t\t\t,Df_Varien_Data_Form_Element_Abstract::TYPE__HIDDEN\n\t\t\t\t\t,array(\n\t\t\t\t\t\t'name' => 'user_id'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t;\n\t\t}\n\t\t$this->getForm()->setValues($model->getData());\n\t\t// setting current user id for new version functionality.\n\t\t// in posted data there will be current user\n\t\t$this->getForm()->getElement('user_id')->setValue(df_mage()->admin()->session()->getUser()->getId());\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7a236b15a86dad98d8e9bcede2de6c35", "score": "0.69960386", "text": "protected function _prepareForm()\n {\n $model = Mage::registry('stores');\n $form = new Varien_Data_Form();\n $form->setMethod('post');\n // $form->setUseContainer(true);\n $form->setId('edit_form');\n $form->setAction($this->getUrl('*/*/save'));\n $form->setEnctype('multipart/form-data');\n\n $fieldset = $form->addFieldset('meta_fieldset', [\n 'legend' => $this->__('Meta Information'),\n 'class' => 'fieldset-wide']);\n\n $fieldset->addField('meta_title', 'text', [\n 'name' => 'meta_title',\n 'index' => 'meta_title',\n 'label' => $this->__('Meta Title'),\n 'title' => $this->__('Meta Title')\n ]);\n\n $fieldset->addField('meta_keywords', 'textarea', [\n 'name' => 'meta_keywords',\n 'index' => 'meta_keywords',\n 'label' => $this->__('Meta Keywords'),\n 'title' => $this->__('Meta Keywords')\n ]);\n\n $fieldset->addField('meta_description', 'textarea', [\n 'name' => 'meta_description',\n 'index' => 'meta_description',\n 'label' => $this->__('Meta Description'),\n 'title' => $this->__('Meta Description')\n ]);\n\n\n $form->setValues($model->getData());\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "f1598ece85b23051c6e8a255a0a4c008", "score": "0.6811988", "text": "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t// Объект вкладки 'Атрибуты документа'\n\t\t$oAttrTab = Admin_Form_Entity::factory('Tab')\n\t\t\t->caption(Core::_('Document.tab_1'))\n\t\t\t->name('tab_1');\n\n\t\t$this->addTabAfter($oAttrTab, $oMainTab);\n\n\t\t$title = $this->_object->id\n\t\t\t? Core::_('Document_Version.edit')\n\t\t\t: Core::_('Document_Version.add');\n\n\t\t$oMainTab\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$oDocument_Name = Admin_Form_Entity::factory('Input')\n\t\t\t->value(\n\t\t\t\t$this->_object->Document->Name\n\t\t\t)\n\t\t\t->caption(Core::_('Document.name'))\n\t\t\t->name('name')\n\t\t\t->class('form-control input-lg');\n\n\t\t$oMainRow1->add($oDocument_Name);\n\n\t\t$oTextarea_Document = Admin_Form_Entity::factory('Textarea')\n\t\t\t->value(\n\t\t\t\t!is_null($this->_object->id) ? $this->_object->loadFile() : ''\n\t\t\t)\n\t\t\t->rows(15)\n\t\t\t->caption(Core::_('Document_Version.text'))\n\t\t\t->name('text')\n\t\t\t->wysiwyg(TRUE)\n\t\t\t->template_id($this->_object->template_id);\n\n\t\t$oMainRow2->add($oTextarea_Document);\n\n\t\tif (Core::moduleIsActive('typograph'))\n\t\t{\n\t\t\t$oTextarea_Document->value(\n\t\t\t\tTypograph_Controller::instance()->eraseOpticalAlignment($oTextarea_Document->value)\n\t\t\t);\n\n\t\t\t$oUseTypograph = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t->name(\"use_typograph\")\n\t\t\t\t->caption(Core::_('Document.use_typograph'))\n\t\t\t\t->value(1)\n\t\t\t\t->divAttr(array('class' => 'form-group col-sm-12 col-md-6 col-lg-6'));\n\n\t\t\t$oUseTrailingPunctuation = Admin_Form_Entity::factory('Checkbox')\n\t\t\t\t->name(\"use_trailing_punctuation\")\n\t\t\t\t->caption(Core::_('Document.use_trailing_punctuation'))\n\t\t\t\t->value(1)\n\t\t\t\t->divAttr(array('class' => 'form-group col-sm-12 col-md-6 col-lg-6'));\n\n\t\t\t$oMainTab\n\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t$oMainRow3\n\t\t\t\t->add($oUseTypograph)\n\t\t\t\t->add($oUseTrailingPunctuation);\n\t\t}\n\n\t\t$oAttrTab\n\t\t\t->add($oAttrRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oAttrRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oAttrRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t// Выбор макета\n\t\t$oAdditionalTab->delete($this->getField('template_id'));\n\t\t$Template_Controller_Edit = new Template_Controller_Edit($this->_Admin_Form_Action);\n\n\t\t$aTemplateOptions = $Template_Controller_Edit->fillTemplateList($this->_object->Document->site_id);\n\n\t\t$oSelect_Template_Id = Admin_Form_Entity::factory('Select')\n\t\t\t->options(\n\t\t\t\tcount($aTemplateOptions) ? $aTemplateOptions : array(' … ')\n\t\t\t)\n\t\t\t->name('template_id')\n\t\t\t->value(\n\t\t\t\t!is_null($this->_object->id)\n\t\t\t\t? $this->_object->template_id\n\t\t\t\t: 0\n\t\t\t)\n\t\t\t->caption(Core::_('Document_Version.template_id'));\n\n\t\t$oAttrRow1->add($oSelect_Template_Id);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('current'), $oAttrRow2)\n\t\t\t->move($this->getField('description'), $oAttrRow3);\n\n\t\t$this->title($title);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "69adcd28b952bc9198daa417b49289c3", "score": "0.6738445", "text": "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('glugox_process/process/save'),\n 'method' => 'post',\n ],\n ]\n );\n $form->setUseContainer(true);\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "83fd3d1418b4a311a348604e6067a14c", "score": "0.67029846", "text": "protected function _prepareForm () {\n\t\t\t// Load the data and page models\n\t\t\t$data = Mage::helper (\"twofactor/data\");\n\t\t\t$page = Mage::getModel (\"twofactor/page\");\n\t\t\t// Make a new form element\n\t\t\t$form = new Varien_Data_Form ();\n\t\t\t// Add a field-set to the form\n\t\t\t$fieldset = $form->addFieldset (\n\t\t\t\t\"general_configuration\",\n\t\t\t\tarray ( \"legend\" => Mage::helper (\"twofactor\")->__(\"General Configuration\") )\n\t\t\t);\n\t\t\t// Add all the fields to the field-set\n\t\t\t$fieldset->addField ( \"remember_me\", \"text\", array (\n\t\t\t\t\"name\" => \"remember_me\",\n\t\t\t\t\"label\" => Mage::helper (\"twofactor\")->__(\"Remember Me Duration\"),\n\t\t\t\t\"note\" => Mage::helper (\"twofactor\")->__(\"Number of <b>days</b> authentication is remembered\"),\n\t\t\t\t\"required\" => true,\n\t\t\t));\n\t\t\t$fieldset->addField ( \"ban_attempts\", \"text\", array (\n\t\t\t\t\"name\" => \"ban_attempts\",\n\t\t\t\t\"label\" => Mage::helper (\"twofactor\")->__(\"Failed Authentication Threshold\"),\n\t\t\t\t\"note\" => Mage::helper (\"twofactor\")->__(\"Number of failed authentication attempts before a user is temporarily banned\"),\n\t\t\t\t\"required\" => true,\n\t\t\t));\n\t\t\t$fieldset->addField ( \"ban_time\", \"text\", array (\n\t\t\t\t\"name\" => \"ban_time\",\n\t\t\t\t\"label\" => Mage::helper (\"twofactor\")->__(\"Temporary Ban Duration\"),\n\t\t\t\t\"note\" => Mage::helper (\"twofactor\")->__(\"Amount of time in <b>minutes</b> that a user will be banned\"),\n\t\t\t\t\"required\" => true,\n\t\t\t));\n\t\t\t// Set the default values for the form\n\t\t\t$form->setValues ( $data->getData () );\n\t\t\t// Define form settings\n\t\t\t$form->setId (\"edit_form\");\n\t\t\t$form->setMethod (\"post\");\n\t\t\t$form->setUseContainer ( true );\n\t\t\t$form->setAction ( $this->getUrl ( $page::PAGE_CONFIGURE_SAVE ) );\n\t\t\t// Save the form internally and return the result of the inherited method\n\t\t\t$this->setForm ( $form );\n\t\t\treturn parent::_prepareForm ();\n\t\t}", "title": "" }, { "docid": "c3eb942c9ef821590cbdaa4c56f8535f", "score": "0.6701147", "text": "protected function _prepareForm()\n {\n if ($this->_isAllowedAction('save')) {\n $isElementDisabled = false;\n } else {\n $isElementDisabled = true;\n }\n $form = new Varien_Data_Form();\n $model = Mage::registry(\"block_data\");\n $this->setForm($form);\n $fieldset = $form->addFieldset(\"block_data\", array(\"legend\" => Mage::helper(\"ves_blockbuilder\")->__(\"Item information\")));\n\n $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);\n\n if($model->getId()){\n $fieldset->addField(\"block_id\", \"hidden\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"Id\"),\n \"name\" => \"block_id\",\n ));\n }\n $builder_type_label = \"Block\";\n\n if( 1 == Mage::registry('is_pagebuilder')){\n $builder_type_label = \"Page\";\n }\n\n if( 1 == Mage::registry('is_productbuilder')){\n $builder_type_label = \"Product\";\n } \n\n $fieldset->addField(\"title\", \"text\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__($builder_type_label.\" Title\"),\n \"name\" => \"title\",\n \"class\" => \"form-control required-entry\",\n \"required\" => true\n ));\n\n $fieldset->addField(\"alias\", \"text\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"URL Key\"),\n \"name\" => \"alias\",\n \"class\" => \"form-control required-entry\",\n \"required\" => true,\n ));\n \n $fieldset->addField(\"shortcode\", \"hidden\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"Shortcode\"),\n \"name\" => \"shortcode\",\n \"class\" => \"form-control\",\n \"readonly\" => false,\n \"onclick\" => 'jQuery(this).select();'\n ));\n\n if( 1 == Mage::registry('is_pagebuilder')){\n $fieldset->addField('store_id', 'multiselect', array(\n 'name' => 'stores[]',\n 'label' => Mage::helper('ves_blockbuilder')->__('Store View'),\n 'title' => Mage::helper('ves_blockbuilder')->__('Store View'),\n 'required' => true,\n 'values' => Mage::getSingleton('adminhtml/system_store')\n ->getStoreValuesForForm(false, true),\n ));\n } \n $fieldset->addField('status', 'select', array(\n 'label' => Mage::helper('ves_blockbuilder')->__('Status'),\n 'options' => array(\n '1' => Mage::helper('cms')->__('Enabled'),\n '2' => Mage::helper('cms')->__('Disabled'),\n ),\n 'name' => 'status',\n \"class\" => \"form-control required-entry\",\n \"required\" => true,\n ));\n\n $fieldset->addField(\"show_from\", \"date\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"Display \".$builder_type_label.\" From Date\"),\n \"class\" => \"form-control float-left-element\",\n \"name\" => \"show_from\",\n \"image\" => $this->getSkinUrl(\"images/grid-cal.gif\"),\n \"input_format\" => $dateFormatIso,\n \"format\" => $dateFormatIso\n ));\n\n $fieldset->addField(\"show_to\", \"date\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"Display \".$builder_type_label.\" To Date\"),\n \"class\" => \"form-control float-left-element\",\n \"name\" => \"show_to\",\n \"image\" => $this->getSkinUrl(\"images/grid-cal.gif\"),\n \"input_format\" => $dateFormatIso,\n \"format\" => $dateFormatIso\n ));\n\n $fieldset->addField('customer_group', 'multiselect', array(\n 'name' => 'customer_group[]',\n 'label' => Mage::helper('ves_blockbuilder')->__('Enable '.$builder_type_label.' for certain customer groups'),\n 'title' => Mage::helper('ves_blockbuilder')->__('Enable '.$builder_type_label.' for certain customer groups'),\n 'required' => false,\n 'values' => Ves_BlockBuilder_Block_Adminhtml_Blockbuilder_Edit_Tab_Form::getCustomerGroups(),\n ));\n\n\n $fieldset->addField(\"position\", \"text\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"Position\"),\n \"class\" => \"form-control\",\n \"name\" => \"position\",\n ));\n /*\n $fieldset->addField(\"params\", \"hidden\", array(\n \"label\" => Mage::helper(\"ves_blockbuilder\")->__(\"params\"),\n \"name\" => \"params\",\n ));\n */\n \n\n if (Mage::getSingleton(\"adminhtml/session\")->getBlockData()) {\n $form->setValues(Mage::getSingleton(\"adminhtml/session\")->getBlockData());\n Mage::getSingleton(\"adminhtml/session\")->getBlockData(null);\n } elseif ($model) {\n $form->setValues($model->getData());\n }\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "e300a4676dffce2619c39d3a6a790e83", "score": "0.66326106", "text": "protected function _prepareForm()\n\t{\n\t\n\t\t$form = new Varien_Data_Form();\n\t\t$this->setForm($form);\n\n\t\t$helper = Mage::helper('pricehandling');\n\t\t\n\t\t$fieldset = $form->addFieldset('freight-fieldset', array('legend' => $helper->__('Freight Charges'),'class' => 'freight-fieldset-wide'));\n\t\t\n\t\t//$fieldset->addType('customtype', 'synapse_pricehandling_block_adminhtml_pricehandling_edit_tab_selecttype_select');\n\t\t\n\t\t $field = $fieldset->addField('freight', 'text', array(\n\t\t 'label' => $helper->__('Field label'),\n\t\t 'name' => 'freight'\n\t\t ));\n\t\t$field->setRenderer($this->getLayout()->createBlock('synapse_pricehandling_block_adminhtml_pricehandling_edit_tab_selecttype_freight'));\n\t\t\n\t\tif (Mage::registry('turnkeye_adminform')) {\n\t\t$form->setValues(array(1,2,3));\n\t\t}\n\n\t\treturn parent::_prepareForm();\n\t}", "title": "" }, { "docid": "ed8ae392a23632af7ed89fda35569d6e", "score": "0.6580535", "text": "public function prepareForm() {\n\n }", "title": "" }, { "docid": "e3bb56b0c38186d0b9a5be38a43292d2", "score": "0.6573521", "text": "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$modelName = $this->_object->getModelName();\n\n\t\t$shop_id = Core_Array::getGet('shop_id', 0, 'int');\n\n\t\tswitch ($modelName)\n\t\t{\n\t\t\tcase 'shop_purchase_discount_coupon':\n\n\t\t\t\t$oAdditionalTab->delete($this->getField('shop_purchase_discount_id'));\n\n\t\t\t\t$aOptions = $this->_fillShopPurchaseDiscounts($shop_id);\n\n\t\t\t\tif (!count($aOptions))\n\t\t\t\t{\n\t\t\t\t\tthrow new Core_Exception(Core::_('Shop_Purchase_Discount_Coupon.not_enough_discounts'), array(), 0, FALSE);\n\t\t\t\t}\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('shop_purchase_discount_coupon_dir_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Purchase_Discount_Coupon.shop_purchase_discount_coupon_dir_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopPurchaseDiscountCouponDir($shop_id))\n\t\t\t\t\t->name('shop_purchase_discount_coupon_dir_id')\n\t\t\t\t\t->value($this->_object->shop_purchase_discount_coupon_dir_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-lg-3'));\n\n\t\t\t\t$oMainRow1->add($oGroupSelect);\n\n\t\t\t\t$oCouponSelect = Admin_Form_Entity::factory('Select')\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-3'))\n\t\t\t\t\t->caption(Core::_('Shop_Purchase_Discount_Coupon.shop_purchase_discount_id'))\n\t\t\t\t\t->options(\n\t\t\t\t\t\tcount($aOptions) ? $aOptions : array(' … ')\n\t\t\t\t\t)\n\t\t\t\t\t->name('shop_purchase_discount_id')\n\t\t\t\t\t->value($this->_object->shop_purchase_discount_id);\n\n\t\t\t\t$oMainTab->move($this->getField('text')->divAttr(array('class' => 'form-group col-xs-12 col-md-3')), $oMainRow1);\n\t\t\t\t$oMainRow1->add($oCouponSelect);\n\t\t\t\t$oMainTab->move($this->getField('count')->divAttr(array('class' => 'form-group col-xs-12 col-md-2')), $oMainRow1);\n\n\t\t\t\t$oMainTab\n\t\t\t\t\t->move($this->getField('start_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-md-3')), $oMainRow2)\n\t\t\t\t\t->move($this->getField('end_datetime')->divAttr(array('class' => 'form-group col-xs-12 col-md-3')), $oMainRow2)\n\t\t\t\t\t->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-md-3')), $oMainRow2)\n\t\t\t\t\t->move($this->getField('active')->divAttr(array('class' => 'form-group col-xs-12 col-md-3 margin-top-21')), $oMainRow2)\n\t\t\t\t\t;\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Purchase_Discount_Coupon.coupon_form_table_title_edit', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Purchase_Discount_Coupon.coupon_form_table_title_add');\n\t\t\tbreak;\n\t\t\tcase 'shop_purchase_discount_coupon_dir':\n\t\t\t\t$oMainTab\n\t\t\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t\t\t$this->getField('description')->rows(9)->wysiwyg(Core::moduleIsActive('wysiwyg'));\n\t\t\t\t$oMainTab->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow2);\n\n\t\t\t\t// Удаляем группу\n\t\t\t\t$oAdditionalTab->delete($this->getField('parent_id'));\n\n\t\t\t\t$oGroupSelect = Admin_Form_Entity::factory('Select');\n\n\t\t\t\t$oGroupSelect\n\t\t\t\t\t->caption(Core::_('Shop_Purchase_Discount_Coupon_Dir.parent_id'))\n\t\t\t\t\t->options(array(' … ') + self::fillShopPurchaseDiscountCouponDir($shop_id, 0, array($this->_object->id)))\n\t\t\t\t\t->name('parent_id')\n\t\t\t\t\t->value($this->_object->parent_id)\n\t\t\t\t\t->divAttr(array('class' => 'form-group col-xs-12 col-md-6'));\n\n\t\t\t\t$oMainRow3->add($oGroupSelect);\n\n\t\t\t\t$oMainTab->move($this->getField('sorting')->divAttr(array('class' => 'form-group col-xs-12 col-sm-3')), $oMainRow3);\n\n\t\t\t\t$title = $this->_object->id\n\t\t\t\t\t? Core::_('Shop_Purchase_Discount_Coupon_Dir.edit_title', $this->_object->name, FALSE)\n\t\t\t\t\t: Core::_('Shop_Purchase_Discount_Coupon_Dir.add_title');\n\t\t\tbreak;\n\t\t}\n\n\t\t$this->title($title);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e53041161ae593bc5c791ad8b214f23c", "score": "0.6557886", "text": "protected function _prepareForm()\n\t{\n\t\tparent::_prepareForm();\n\n\t\t$this->title(\n\t\t\t$this->_object->id\n\t\t\t\t? Core::_('Chartaccount_Operation_Item.edit_title')\n\t\t\t\t: Core::_('Chartaccount_Operation_Item.add_title')\n\t\t);\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$company_id = Core_Array::getGet('company_id', 0, 'int');\n\n\t\t$oMainTab = $this->getTab('main');\n\t\t$oAdditionalTab = $this->getTab('additional');\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t->add($oLeftBlock = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-sm-6'))\n\t\t\t\t->add($oRightBlock = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-sm-6'))\n\t\t\t);\n\n\t\t$oLeftBlock\n\t\t\t->add($oMainRow1 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oDSubcounts = Admin_Form_Entity::factory('Div')->class('debit-subcounts')->add(Admin_Form_Entity::factory('Span')->value('\t')));\n\n\t\t$oRightBlock\n\t\t\t->add($oMainRow2 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oCSubcounts = Admin_Form_Entity::factory('Div')->class('credit-subcounts')->add(Admin_Form_Entity::factory('Span')->value('\t')));\n\n\t\t$oMainTab\n\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t;\n\n\t\t$aDebitOptions = $this->_object->id\n\t\t\t? Chartaccount_Controller::getOptions(array('dchartaccount_id' => $this->_object->dchartaccount_id))\n\t\t\t: Chartaccount_Controller::getOptions();\n\n\t\t$aCreditOptions = $this->_object->id\n\t\t\t? Chartaccount_Controller::getOptions(array('cchartaccount_id' => $this->_object->cchartaccount_id))\n\t\t\t: Chartaccount_Controller::getOptions();\n\n\t\t$oAdditionalTab->delete($this->getField('dchartaccount_id'));\n\n\t\t$oDebitSelect = Admin_Form_Entity::factory('Select')\n\t\t\t->caption(Core::_('Chartaccount_Operation_Item.dchartaccount_id'))\n\t\t\t->class('form-control input-lg')\n\t\t\t->options($aDebitOptions)\n\t\t\t->name('dchartaccount_id')\n\t\t\t->value($this->_object->dchartaccount_id)\n\t\t\t->onchange(\"$.loadChartaccounts('{$windowId}', $(this).val(), 'd'); $.loadSubcounts('{$windowId}', $(this).val(), {company_id: {$company_id}}, '.debit-subcounts', 'd')\");\n\n\t\t$oMainRow1->add($oDebitSelect);\n\n\t\t$oAdditionalTab->delete($this->getField('cchartaccount_id'));\n\n\t\t$oCreditSelect = Admin_Form_Entity::factory('Select')\n\t\t\t->caption(Core::_('Chartaccount_Operation_Item.cchartaccount_id'))\n\t\t\t->class('form-control input-lg')\n\t\t\t->options($aCreditOptions)\n\t\t\t->name('cchartaccount_id')\n\t\t\t->value($this->_object->cchartaccount_id)\n\t\t\t->onchange(\"$.loadChartaccounts('{$windowId}', $(this).val(), 'c'); $.loadSubcounts('{$windowId}', $(this).val(), {company_id: {$company_id}}, '.credit-subcounts', 'c')\");\n\n\t\t$oMainRow2->add($oCreditSelect);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('amount')->divAttr(array('class' => 'form-group col-xs-12 col-lg-3')), $oMainRow3);\n\n\t\t$oMainRow3\n\t\t\t->add(\n\t\t\t\tAdmin_Form_Entity::factory('Input')\n\t\t\t\t\t->divAttr(array('class' => 'hidden'))\n\t\t\t\t\t->type('hidden')\n\t\t\t\t\t->id('company_id')\n\t\t\t\t\t->name('company_id')\n\t\t\t\t\t->value($company_id)\n\t\t\t);\n\n\t\tif ($this->_object->id)\n\t\t{\n\t\t\tif ($this->_object->dchartaccount_id)\n\t\t\t{\n\t\t\t\t$aSubcounts = array();\n\n\t\t\t\t$oDChartaccount = $this->_object->Chartaccount_Debit;\n\n\t\t\t\tfor ($i = 0; $i < 3; $i++)\n\t\t\t\t{\n\t\t\t\t\t$subcountName = 'sc' . $i;\n\t\t\t\t\t$debitSubcountName = 'd' . $subcountName;\n\n\t\t\t\t\tif ($oDChartaccount->$subcountName)\n\t\t\t\t\t{\n\t\t\t\t\t\t$aSubcounts[$oDChartaccount->$subcountName] = $this->_object->$debitSubcountName;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tChartaccount_Controller::showSubcounts($aSubcounts, $this->_object->dchartaccount_id, $oDSubcounts, $this->_Admin_Form_Controller, array('company_id' => $company_id), 'd');\n\t\t\t}\n\n\t\t\tif ($this->_object->cchartaccount_id)\n\t\t\t{\n\t\t\t\t$aSubcounts = array();\n\n\t\t\t\t$oCChartaccount = $this->_object->Chartaccount_Credit;\n\n\t\t\t\tfor ($i = 0; $i < 3; $i++)\n\t\t\t\t{\n\t\t\t\t\t$subcountName = 'sc' . $i;\n\t\t\t\t\t$creditSubcountName = 'c' . $subcountName;\n\n\t\t\t\t\tif ($oCChartaccount->$subcountName)\n\t\t\t\t\t{\n\t\t\t\t\t\t$aSubcounts[$oCChartaccount->$subcountName] = $this->_object->$creditSubcountName;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tChartaccount_Controller::showSubcounts($aSubcounts, $this->_object->cchartaccount_id, $oCSubcounts, $this->_Admin_Form_Controller, array('company_id' => $company_id), 'c');\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "787c87cfc88c4cbb55c470442f8978dc", "score": "0.65415984", "text": "protected function _prepareForm() \n {\n $form = new Varien_Data_Form();\n $this->setForm($form);\n\n if (Mage::getSingleton('adminhtml/session')->getSimibarcodeData()) {\n $data = Mage::getSingleton('adminhtml/session')->getSimibarcodeData();\n Mage::getSingleton('adminhtml/session')->setSimibarcodeData(null);\n } elseif (Mage::registry('simibarcode_data'))\n $data = Mage::registry('simibarcode_data')->getData();\n\n $width = $height = 200;\n $sampleQR = '<img src=\"http://chart.googleapis.com/chart?chs='.$width.'x'.$height.'&cht=qr&chl='.$data['qrcode'].'\" />';\n //$sampleBar = '</br></br><img src=\"'.Mage::helper(\"adminhtml\")->getUrl('*/*/barcode').'?code='.$data['barcode'].'\" />';\n $sampleBar = '</br></br><img src=\"https://www.barcodesinc.com/generator/image.php?code='.$data['barcode'].'&style=197&type=C128B&width=300&height=150&xres=1&font=3\" />';\n $fieldset = $form->addFieldset('simibarcode_form', array('legend' => Mage::helper('simiconnector')->__('Barcode Information')));\n $fieldset->addType('datetime', 'Simi_Simiconnector_Block_Adminhtml_Simibarcode_Edit_Renderer_Datetime');\n\n $fieldset->addField(\n 'barcode', 'text', array(\n 'label' => Mage::helper('simiconnector')->__('Barcode'),\n 'required' => false,\n 'bold' => true,\n 'name' => 'barcode',\n 'after_element_html' => $sampleBar\n )\n );\n\n $fieldset->addField(\n 'qrcode', 'text', array(\n 'label' => Mage::helper('simiconnector')->__('QR code'),\n 'required' => false,\n 'bold' => true,\n 'name' => 'qrcode',\n 'after_element_html' => $sampleQR\n )\n );\n\n $fieldset->addField(\n 'barcode_status', 'select', array(\n 'label' => Mage::helper('simiconnector')->__('Status'),\n 'name' => 'barcode_status',\n 'required' => false,\n 'values' => Mage::getSingleton('simiconnector/status')->getOptionHash(),\n )\n );\n\n $fieldset->addField(\n 'product_name', 'label', array(\n 'label' => Mage::helper('simiconnector')->__('Product Name'),\n 'required' => false,\n 'bold' => true,\n 'name' => 'product_name',\n )\n );\n\n $fieldset->addField(\n 'product_sku', 'label', array(\n 'label' => Mage::helper('simiconnector')->__('Product Sku'),\n 'required' => false,\n 'bold' => true,\n 'name' => 'product_sku',\n )\n );\n\n $fieldset->addField(\n 'created_date', 'datetime', array(\n 'label' => Mage::helper('simiconnector')->__('Created Date'),\n 'required' => false,\n 'bold' => true,\n 'name' => 'created_date',\n )\n );\n\n $form->setValues($data);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "9c3a74379c745112ca7e3076b3f0fd9b", "score": "0.65103406", "text": "protected function _prepareForm()\n {\n $helper = Mage::helper('oggetto_faq');\n $model = $this->getCurrentQuestionsModel();\n\n $form = new Varien_Data_Form([\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', [\n 'id' => $this->getRequest()->getParam('id')\n ]),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n ]);\n\n $this->setForm($form);\n\n\n $fieldset = $form->addFieldset('edit_form', ['legend' => $helper->__('Questions Information')]);\n\n $fieldset->addField('name', 'label', [\n 'label' => $helper->__('User name'),\n 'name' => 'name',\n ]);\n $fieldset->addField('email', 'label', [\n 'label' => $helper->__('User email'),\n 'name' => 'email',\n ]);\n $fieldset->addField('question_text', 'editor', [\n 'label' => $helper->__('Question text'),\n 'name' => 'question_text',\n ]);\n $fieldset->addField('answer_text', 'editor', [\n 'label' => $helper->__('Answer text'),\n 'name' => 'answer_text',\n ]);\n $fieldset->addField('created_at', 'label', [\n 'label' => $helper->__('Created'),\n 'name' => 'created_at',\n ]);\n $fieldset->addField('with_feedback', 'label', [\n 'label' => $helper->__('With feedback'),\n 'name' => 'with_feedback',\n ]);\n $fieldset->addField('was_notified', 'label', [\n 'label' => $helper->__('Was notified to user'),\n 'name' => 'was_notified',\n ]);\n\n $form->setUseContainer(true);\n\n $form->setValues($model->getData());\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "e1ca2bf0d3e43152755b40fc91fd63a2", "score": "0.64848477", "text": "protected function _prepareForm(){\n\t\t$form = new Varien_Data_Form();\n $this->setForm($form);\n $websites = Mage::helper('siminotification')->getWebsites();\n $list_web = array();\n foreach ($websites as $website) {\n $list_web[] = array(\n 'value' => $website->getId(),\n 'label' => $website->getName(),\n );\n }\n\n\t\tif (Mage::getSingleton('adminhtml/session')->getDeviceData()){\n\t\t\t$data = Mage::getSingleton('adminhtml/session')->getDeviceData();\n\t\t\tMage::getSingleton('adminhtml/session')->setDeviceData(null);\n\t\t}elseif(Mage::registry('device_data'))\n\t\t\t$data = Mage::registry('device_data')->getData();\n\t\t\n\t\t$fieldset = $form->addFieldset('device_form', array('legend'=>Mage::helper('siminotification')->__('Device information')));\n $fieldset->addType('datetime', 'Simi_Siminotification_Block_Adminhtml_Device_Edit_Renderer_Datetime');\n $fieldset->addType('selectname', 'Simi_Siminotification_Block_Adminhtml_Device_Edit_Renderer_Selectname');\n\n\t\t$fieldset->addField('website_id', 'select', array(\n 'label' => Mage::helper('siminotification')->__('Website'),\n 'name' => 'website_id',\n 'values' => $list_web,\n 'disabled' => true,\n ));\n\n $fieldset->addField('plaform_id', 'select', array(\n 'label' => Mage::helper('siminotification')->__('Device Type'),\n 'name' => 'plaform_id',\n 'values' => array(\n array('value' => 1, 'label' => Mage::helper('siminotification')->__('iPhone')),\n array('value' => 2, 'label' => Mage::helper('siminotification')->__('iPad')),\n array('value' => 3, 'label' => Mage::helper('siminotification')->__('Android')),\n ),\n 'disabled' => true,\n ));\n\n $fieldset->addField('country', 'selectname', array(\n 'label' => Mage::helper('siminotification')->__('Country'),\n 'bold' => true,\n 'name' => 'country',\n\n ));\n\n $fieldset->addField('state', 'label', array(\n 'label' => Mage::helper('siminotification')->__('State/Province'),\n // 'bold' => true,\n )); \n\n $fieldset->addField('city', 'label', array(\n 'label' => Mage::helper('siminotification')->__('City'),\n // 'bold' => true,\n )); \n\n $fieldset->addField('device_token', 'label', array(\n 'label' => Mage::helper('siminotification')->__('Device Token'),\n )); \n\n $fieldset->addField('created_time', 'datetime', array(\n 'label' => Mage::helper('siminotification')->__('Create Date'),\n 'bold' => true,\n 'name' => 'created_date',\n )); \n\n\t\t$form->setValues($data);\n\t\treturn parent::_prepareForm();\n\t}", "title": "" }, { "docid": "c35bf5e4572f689f112deb2508187bcc", "score": "0.64466244", "text": "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/export'),\n 'method' => 'post',\n ],\n ]\n );\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Export Settings')]);\n $fieldset->addField(\n 'entity',\n 'select',\n [\n 'name' => 'entity',\n 'title' => __('Entity Type'),\n 'label' => __('Entity Type'),\n 'required' => false,\n 'values' => $this->_entityFactory->create()->toOptionArray()\n ]\n );\n $fieldset->addField(\n 'file_format',\n 'select',\n [\n 'name' => 'file_format',\n 'title' => __('Export File Format'),\n 'label' => __('Export File Format'),\n 'required' => false,\n 'values' => $this->_formatFactory->create()->toOptionArray()\n ]\n );\n\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "50a026d9e6b7b02726f73c4a1df55c16", "score": "0.64447784", "text": "protected function _prepareForm() {\n\n $origForm = parent::_prepareForm();\n $fieldset = $this->_form->getElement('main');\n\n //Set country\n $speedyCountryName = $this->_form->getElement('country_id');\n\n $fieldset->removeField($speedyCountryName->getId());\n\n $speedyCountryNameField = $fieldset->addField($speedyCountryName->getId(), 'select', $speedyCountryName->getData(), $this->_form->getElement('company')->getId()\n );\n\n //Set postcode\n $speedyPostcode = $this->_form->getElement('postcode');\n\n $fieldset->removeField($speedyPostcode->getId());\n\n $speedyPostcodeField = $fieldset->addField($speedyPostcode->getId(), 'text', $speedyPostcode->getData(), $this->_form->getElement('city')->getId()\n );\n\n //Set office enabled\n $speedyOfficeEnabled = $this->_form->getElement('speedy_office_chooser');\n\n $fieldset->removeField($speedyOfficeEnabled->getId());\n\n $speedyOfficeField = $fieldset->addField($speedyOfficeEnabled->getId(), 'select', $speedyOfficeEnabled->getData(), $this->_form->getElement('region')->getId()\n );\n\n\n\n //Set office name\n $speedyOfficeName = $this->_form->getElement('speedy_office_name');\n\n $fieldset->removeField($speedyOfficeName->getId());\n\n $speedyOfficeNameField = $fieldset->addField($speedyOfficeName->getId(), 'text', $speedyOfficeName->getData(), $this->_form->getElement('speedy_office_chooser')->getId()\n );\n\n\n //Set quarter \n $speedyQuarterName = $this->_form->getElement('speedy_quarter_name');\n\n\n $fieldset->removeField($speedyQuarterName->getId());\n\n $speedyQuarterField = $fieldset->addField($speedyQuarterName->getId(), 'text', $speedyQuarterName->getData(), $this->_form->getElement('speedy_office_chooser')->getId()\n );\n\n //Set street name\n $speedyStreetName = $this->_form->getElement('speedy_street_name');\n\n $fieldset->removeField($speedyStreetName->getId());\n\n $speedyStreetField = $fieldset->addField($speedyStreetName->getId(), 'text', $speedyStreetName->getData(), $this->_form->getElement('speedy_quarter_name')->getId()\n );\n\n //Set street number \n $speedyStreetNumber = $this->_form->getElement('speedy_street_number');\n\n $fieldset->removeField($speedyStreetNumber->getId());\n\n $speedyStreetNumberField = $fieldset->addField($speedyStreetNumber->getId(), 'text', $speedyStreetNumber->getData(), $this->_form->getElement('speedy_street_name')->getId()\n );\n\n //Set block number \n $speedyBlokNumber = $this->_form->getElement('speedy_block_number');\n\n $fieldset->removeField($speedyBlokNumber->getId());\n\n $speedyBlockNumberField = $fieldset->addField($speedyBlokNumber->getId(), 'text', $speedyBlokNumber->getData(), $this->_form->getElement('speedy_street_number')->getId()\n );\n\n //Set entrance \n $speedyEntrance = $this->_form->getElement('speedy_entrance');\n\n $fieldset->removeField($speedyEntrance->getId());\n\n $speedyEntranceField = $fieldset->addField($speedyEntrance->getId(), 'text', $speedyEntrance->getData(), $this->_form->getElement('speedy_block_number')->getId()\n );\n\n\n //Set floor \n $speedyFloor = $this->_form->getElement('speedy_floor');\n\n $fieldset->removeField($speedyFloor->getId());\n\n $speedyFloorField = $fieldset->addField($speedyFloor->getId(), 'text', $speedyFloor->getData(), $this->_form->getElement('speedy_entrance')->getId()\n );\n\n //Set floor \n $speedyApartment = $this->_form->getElement('speedy_apartment');\n\n $fieldset->removeField($speedyApartment->getId());\n\n $speedyApartmentField = $fieldset->addField($speedyApartment->getId(), 'text', $speedyApartment->getData(), $this->_form->getElement('speedy_floor')->getId()\n );\n\n //Set address note \n $speedyAddressNote = $this->_form->getElement('speedy_address_note');\n\n $fieldset->removeField($speedyAddressNote->getId());\n\n $speedyAddressNoteField = $fieldset->addField($speedyAddressNote->getId(), 'text', $speedyAddressNote->getData(), $this->_form->getElement('speedy_apartment')->getId()\n );\n\n return $origForm;\n }", "title": "" }, { "docid": "f0c9f4b030e6c60ba3742c47ed6f923e", "score": "0.6437017", "text": "protected function _prepareForm()\r\n {\r\n $model = $this->_getItemModel();\r\n $typeId = $model->getTypeId();\r\n\r\n $extensions = $model->getAllowedExtensions();\r\n $bannerHtml = $bannerHtmlFile = $bannerHtmlCustom = '';\r\n\r\n /**\r\n * Checking if user have permissions to save information\r\n */\r\n if ($this->_getAclHelper()->isActionAllowed($this->_aclSection . '/save')) {\r\n $isElementDisabled = false;\r\n } else {\r\n $isElementDisabled = true;\r\n }\r\n\r\n\r\n $form = new Varien_Data_Form();\r\n $form->setHtmlIdPrefix('banner_main_');\r\n $form->getFieldsetRenderer()->setTemplate('lanot/easybanner/widget/form/renderer/fieldset.phtml');\r\n\r\n //prepare fieldsets\r\n $fieldset = $form->addFieldset('base_fieldset', array(\r\n 'legend' => $this->_getHelper()->__('Banner Item Info')\r\n ));\r\n\r\n $fileFieldset = $form->addFieldset('file_fieldset', array(\r\n 'legend' => $this->_getHelper()->__('Banner File Info'),\r\n 'fieldset_container_id' => 'form_edit_container_file_fieldset',\r\n 'fieldset_container_class' => ($typeId != Lanot_EasyBanner_Model_Banner::TYPE_ID_FILE) ? 'no-display' : '',\r\n ));\r\n\r\n $customFieldset = $form->addFieldset('custom_fieldset', array(\r\n 'legend' => $this->_getHelper()->__('Banner Custom Code Info'),\r\n 'fieldset_container_id' => 'form_edit_container_custom_fieldset',\r\n 'fieldset_container_class' => ($typeId != Lanot_EasyBanner_Model_Banner::TYPE_ID_CUSTOM) ? 'no-display' : '',\r\n ));\r\n\r\n //apply additional renderers\r\n $this->_addElementTypes($fieldset);\r\n $this->_addElementTypes($fileFieldset);\r\n $this->_addElementTypes($customFieldset);\r\n\r\n\r\n if ($model->getId()) {\r\n $fieldset->addField('banner_id', 'hidden', array(\r\n 'name' => 'id',\r\n ));\r\n }\r\n\r\n //prepare banner HTML\r\n if ($model->getType()) {\r\n $bannerHtml = $this->_getHelper()\r\n ->getBannerRenderer($model->getType())\r\n ->disableClick()\r\n ->setBanner($model)\r\n ->render();\r\n if (!empty($bannerHtml)) {\r\n $style = 'width: 100%; overflow: hidden; margin: 15px 0px 0px 0px;';\r\n $bannerHtml = \"<div style='{$style}'>{$bannerHtml}</div>\";\r\n }\r\n }\r\n\r\n if ($typeId === Lanot_EasyBanner_Model_Banner::TYPE_ID_CUSTOM) {\r\n $bannerHtmlCustom = $bannerHtml;\r\n } else {\r\n $bannerHtmlFile = $bannerHtml;\r\n }\r\n\r\n //general information\r\n $fieldset->addField('is_active', 'select', array(\r\n 'name' => 'is_active',\r\n 'label' => $this->_getHelper()->__('Is Active'),\r\n 'required' => true,\r\n 'options' => $model->getAvailableStatuses(),\r\n 'style' => 'width: 200px',\r\n 'disabled' => $isElementDisabled,\r\n ));\r\n\r\n $fieldset->addField('type_id', 'select', array(\r\n 'name' => 'type_id',\r\n 'label' => $this->_getHelper()->__('Banner Type'),\r\n 'required' => true,\r\n 'options' => $model->getAvailableTypes(),\r\n 'style' => 'width: 200px',\r\n 'disabled' => $isElementDisabled,\r\n 'value' => $typeId,\r\n 'onchange' => 'changeBannerTypeId(this.value)'\r\n ));\r\n\r\n $fieldset->addField('title', 'text', array(\r\n 'name' => 'title',\r\n 'label' => $this->_getHelper()->__('Title'),\r\n 'required' => true,\r\n 'disabled' => $isElementDisabled,\r\n ));\r\n\r\n $fieldset->addField('description', 'textarea', array(\r\n 'name' => 'description',\r\n 'label' => $this->_getHelper()->__('Description'),\r\n 'title' => $this->_getHelper()->__('Description'),\r\n 'disabled' => $isElementDisabled,\r\n 'style' => 'height: 60px',\r\n ));\r\n\r\n //file information\r\n $fileFieldset->addField('url', 'text', array(\r\n 'name' => 'url',\r\n 'label' => $this->_getHelper()->__('Url'),\r\n 'disabled' => $isElementDisabled,\r\n ));\r\n\r\n $fileFieldset->addField('width', 'text', array(\r\n 'name' => 'width',\r\n 'label' => $this->_getHelper()->__('Banner Width (px)'),\r\n 'disabled' => $isElementDisabled,\r\n 'style' => 'width: 50px',\r\n ));\r\n\r\n $fileFieldset->addField('height', 'text', array(\r\n 'name' => 'height',\r\n 'label' => $this->_getHelper()->__('Banner Height (px)'),\r\n 'disabled' => $isElementDisabled,\r\n 'style' => 'width: 50px',\r\n ));\r\n\r\n $fileFieldset->addField('path', 'banner', array(\r\n 'name' => 'banner_file',\r\n 'label' => $this->_getHelper()->__('File'),\r\n 'comment' => $this->_getHelper()->__('Allowed extensions: %s', implode(',', $extensions)),\r\n 'disabled' => $isElementDisabled,\r\n 'style' => 'width: 200px;',\r\n ))->setBannerHtml($bannerHtmlFile);\r\n\r\n //custom code information\r\n $customFieldset->addField('code', 'textarea', array(\r\n 'name' => 'code',\r\n 'label' => $this->_getHelper()->__('Custom Code'),\r\n 'disabled' => $isElementDisabled,\r\n ))->setAfterElementHtml($bannerHtmlCustom);\r\n\r\n\r\n Mage::dispatchEvent('adminhtml_easybanner_banner_edit_tab_main_prepare_form', array('form' => $form));\r\n\r\n $form->setValues($model->getData());\r\n $this->setForm($form);\r\n\r\n return parent::_prepareForm();\r\n }", "title": "" }, { "docid": "0c6fbfa9874fe380724ab1c00d78bf14", "score": "0.637817", "text": "protected function _prepareForm()\n {\n if (!$this->canShowTab()) {\n return $this;\n }\n /** @var \\Magento\\Framework\\Data\\Form $form **/\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('_storecredit');\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Store Credit')]);\n\n $fieldset->addField(\n StoreCreditInterface::STORE_CREDIT,\n 'label',\n [\n 'label' => __('Current Balance'),\n 'data-form-part' => 'customer_form',\n 'name' => 'store_credit',\n ]\n );\n\n $symbol = $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencySymbol();\n $fieldset->addField(\n StoreCreditInterface::ADD_OR_SUBTRACT,\n 'text',\n [\n 'label' => __(\n 'Add or substract a credit value %1',\n $symbol\n ),\n 'name' => StoreCreditInterface::ADD_OR_SUBTRACT,\n 'data-form-part' => 'customer_form',\n 'note' => __(\n 'You can add or substract an amount from customer\\'s balance by entering a number. ' .\n 'For example, enter \"99.5\" to add %199.5 and \"-99.5\" to subtract %199.5',\n $symbol\n )\n ]\n );\n\n $fieldset->addField(\n StoreCreditInterface::ADMIN_COMMENT,\n 'textarea',\n [\n 'label' => __('Comment'),\n 'data-form-part' => 'customer_form',\n 'name' => StoreCreditInterface::ADMIN_COMMENT,\n ]\n );\n\n $this->setForm($form);\n return $this;\n }", "title": "" }, { "docid": "e7380e71e995497566695f1f1e1bfb66", "score": "0.6372342", "text": "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('sampleform2_');\n\n $fieldset1 = $form->addFieldset('base_fieldset', ['legend' => __('Fieldset_1_2')]);\n\n $this->createSelectField($fieldset1, 'some_select_field_2', 'Select_Field_Label', true, ['Enabled','Disabled']);\n\n $this->createLinkField($fieldset1, \"some_link_2\", 'Link_Label', 'http://magento.chazmar.com');\n\n $fieldset2 = $form->addFieldset('basic_fieldset', ['legend' => __('Fieldset_2_2')]);\n\n $this->createTextField($fieldset2, 'some_text_field_2', 'Text_Label', true);\n\n $this->createMultiSelectField($fieldset2, 'some_multiselect_field_2', 'MultiSelect_Field_Label', false, [\n ['value' => 'value1', 'label' => 'label1'],\n ['value' => 'value2', 'label' => 'label2'],\n ['value' => 'value3', 'label' => 'label3']\n ]);\n\n $form->setValues([\n 'some_select_field_2' => 0,\n 'some_link_2' => 'link_text_2',\n 'some_text_field_2' => 'some-text-value_2',\n 'some_multiselect_field_2' => ['value1','value2']\n ]);\n\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "679505a1f7e48415724b35040d722c33", "score": "0.6367264", "text": "protected function _prepareForm()\r\n {\r\n $form = new Varien_Data_Form(array(\r\n 'id' => 'edit_form',\r\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\r\n 'method' => 'post',\r\n 'enctype' => 'multipart/form-data'\r\n ));\r\n\r\n $fieldset = $form->addFieldset('contactus_form', array(\r\n 'legend'\t => Mage::helper('dynamic_contactus')->__('Contactus'),\r\n 'class'\t\t=> 'fieldset-wide',\r\n )\r\n );\r\n\r\n $contactus_name = array();\r\n $attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','contactus');\r\n $attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);\r\n $attributeOptions = $attribute->getSource()->getAllOptions();\r\n foreach($attributeOptions as $each){\r\n $contactus_name []= array(\r\n \"label\" =>$each[\"label\"],\r\n \"value\" =>$each[\"label\"]\r\n );\r\n }\r\n\r\n $fieldset->addField('name', 'text', array(\r\n 'name' => 'name',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Name'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('telephone', 'text', array(\r\n 'name' => 'telephone',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Telephone'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('email', 'text', array(\r\n 'name' => 'email',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Email'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('referralcode', 'text', array(\r\n 'name' => 'referralcode',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Referral Code'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('know', 'text', array(\r\n 'name' => 'know',\r\n 'label' => Mage::helper('dynamic_contactus')->__('How did you hear about us?'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('comment', 'textarea', array(\r\n 'name' => 'comment',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Inquiry'),\r\n 'readonly' => true,\r\n ));\r\n $fieldset->addField('no', 'text', array(\r\n 'name' => 'no',\r\n 'label' => Mage::helper('dynamic_contactus')->__('Anti-Spam* What does 3 plus 5 equal?'),\r\n 'readonly' => true,\r\n ));\r\n\t\t\r\n if (Mage::registry('dynamic_contactus')) {\r\n $form->setValues(Mage::registry('dynamic_contactus')->getData());\r\n }\r\n\r\n $form->setUseContainer(true);\r\n $this->setForm($form);\r\n return parent::_prepareForm();\r\n }", "title": "" }, { "docid": "8eb9370713a656a27052307bcb8fbe0a", "score": "0.63022745", "text": "protected function _prepareForm()\n {\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $fieldset = $form->addFieldset('product_template_selecte', []);\n $fieldset->addField(\n 'current-affected-attribute-set',\n 'radio',\n [\n 'after_element_html' => __(\n 'Add configurable attributes to the current Attribute Set (\"%1\")',\n sprintf('<span data-role=\"name-container\">%s</span>', $this->getCurrentAttributeSetName())\n ),\n 'name' => 'affected-attribute-set',\n 'class' => 'admin__control-radio',\n 'css_class' => 'admin__field-option',\n 'checked' => true,\n 'value' => 'current'\n ]\n );\n $fieldset->addField(\n 'new-affected-attribute-set',\n 'radio',\n [\n 'after_element_html' => __('Add configurable attributes to the new Attribute Set based on current'),\n 'name' => 'affected-attribute-set',\n 'class' => 'admin__control-radio',\n 'css_class' => 'admin__field-option',\n 'value' => 'new'\n ]\n );\n $fieldset->addField(\n 'new-attribute-set-name',\n 'text',\n [\n 'label' => __('New attribute set name'),\n 'name' => 'new-attribute-set-name',\n 'required' => true,\n 'css_class' => 'no-display',\n 'field_extra_attributes' => 'data-role=\"affected-attribute-set-new-name-container\"',\n 'value' => ''\n ]\n );\n $fieldset->addField(\n 'existing-affected-attribute-set',\n 'radio',\n [\n 'after_element_html' => __('Add configurable attributes to the existing Attribute Set'),\n 'name' => 'affected-attribute-set',\n 'required' => true,\n 'class' => 'admin__control-radio no-display',\n 'css_class' => 'admin__field-option',\n 'value' => 'existing'\n ]\n );\n $fieldset->addField(\n 'choose-affected-attribute-set',\n 'select',\n [\n 'label' => __('Choose existing Attribute Set'),\n 'name' => 'attribute-set-name',\n 'required' => true,\n 'css_class' => 'no-display',\n 'field_extra_attributes' => 'data-role=\"affected-attribute-set-existing-name-container\"',\n 'values' => $this->attributeSetOptions->toOptionArray()\n ]\n );\n\n $form->setUseContainer(true);\n $this->setForm($form);\n }", "title": "" }, { "docid": "f572268776d295a18144922733ccc61f", "score": "0.62990546", "text": "protected function _prepareForm()\n {\n $model = Mage::registry('secure_rule');\n $helper = Mage::helper('aws_customersecure');\n\n $form = new Varien_Data_Form(\n array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')\n );\n\n $form->setHtmlIdPrefix('email_');\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('aws_customersecure')->__('General Information'),\n 'class' => 'fieldset-wide' // <div class=\"fieldset-wide\" in phtml\n ));\n\n if ($model->getEntityId()) {\n $fieldset->addField('entity_id', 'hidden', array(\n 'name' => 'entity_id'\n ));\n }\n\n $customerCollection = Mage::getResourceModel('customer/group_collection');\n\n $cmsPagesCollection = Mage::getResourceModel('cms/page_collection')\n ->addFieldToFilter('identifier', array('neq' => 'no-route')) // id != no-route\n ->addFieldToFilter('identifier', array('neq' => 'home'));\n\n $emailGroupCollection = Mage::getResourceModel('aws_customersecure/email_collection');\n\n\n\n $fieldset->addField('rule_name', 'text', array(\n 'name' => 'rule_name',\n 'label' => $helper->__('Rule Name'),\n 'title' => $helper->__('Rule Name'),\n 'required' => true,\n ));\n\n $fieldset->addField('code', 'text', array(\n 'name' => 'code',\n 'label' => $helper->__('Code'),\n 'title' => $helper->__('Code'),\n 'required' => true,\n ));\n\n $fieldset->addField('email_groups', 'multiselect', array(\n 'name' => 'email_groups',\n 'label' => $helper->__('Email Groups'),\n 'title' => $helper->__('Email Groups'),\n 'required' => true,\n 'values' => $helper->customToOptionArray($emailGroupCollection, 'entity_id', 'email_group')\n ));\n\n $fieldset->addField('customer_groups', 'multiselect', array(\n 'name' => 'customer_groups',\n 'label' => $helper->__('Customer Groups'),\n 'title' => $helper->__('Customer Groups'),\n 'required' => true,\n 'values' => $helper->customToOptionArray($customerCollection, 'customer_group_id', 'customer_group_code')\n ));\n\n $fieldset->addField('cms_pages', 'multiselect', array(\n 'name' => 'cms_pages',\n 'label' => $helper->__('Cms Pages'),\n 'title' => $helper->__('Cms Pages'),\n 'required' => true,\n 'values' => $helper->customToOptionArray($cmsPagesCollection, 'page_id', 'title')\n ));\n\n $fieldset->addField('is_active', 'select', array(\n 'name' => 'is_active',\n 'label' => $helper->__('Status'),\n 'title' => $helper->__('Status'),\n 'required' => true,\n 'values' => $helper->getStatusArray()\n ));\n\n $fieldset->addField('secure_rule', 'editor', array(\n 'name' => 'secure_rule',\n 'label' => $helper->__('Comment'),\n 'title' => $helper->__('Comment'),\n 'style' => 'height:16em',\n 'required' => true,\n 'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig()\n ));\n\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "bb1ac868843049f64a5fbb917f140928", "score": "0.6297329", "text": "protected function _prepareForm()\n {\n $this->_initFormValues();\n\n // Prepare form\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'use_container' => true, 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Voucher Information')]);\n\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'title' => __('Status'),\n 'name' => 'status',\n 'disabled' => true,\n 'options' => $this->statusProvider->toArray(),\n 'value' => $this->_formValues['status']\n ]\n );\n\n $fieldset->addField(\n 'voucher_id',\n 'hidden',\n [\n 'name' => 'voucher_id',\n 'value' => $this->_formValues['voucher_id']\n ]\n );\n\n $fieldset->addField(\n 'order_id',\n 'hidden',\n [\n 'name' => 'order_id',\n 'value' => $this->_formValues['order_id']\n ]\n );\n\n $fieldset->addField(\n 'sku',\n 'text',\n [\n 'label' => __('SKU'),\n 'title' => __('SKU'),\n 'name' => 'sku',\n 'required' => true,\n 'value' => $this->_formValues['sku']\n ]\n );\n\n $fieldset->addField(\n 'child_sku',\n 'text',\n [\n 'label' => __('Child SKU'),\n 'title' => __('Child SKU'),\n 'name' => 'child_sku', \n 'value' => $this->_formValues['child_sku']\n ]\n );\n\n $fieldset->addField(\n 'voucher_code',\n 'text',\n [\n 'label' => __('Voucher Code'),\n 'title' => __('Voucher Code'),\n 'name' => 'voucher_code',\n 'required' => true,\n 'value' => $this->_formValues['voucher_code']\n ]\n );\n\n $fieldset->addField(\n 'expiration_date',\n 'text',\n [\n 'label' => __('Expiration Date'),\n 'title' => __('Expiration Date'),\n 'name' => 'expiration_date',\n 'required' => true,\n 'value' => $this->_formValues['expiration_date']\n ]\n );\n\n //$this->_prepareStoreElement($fieldset);\n\n $fieldset->addField(\n 'url',\n 'text',\n [\n 'label' => __('Virtual Product Url'),\n 'title' => __('Virtual Product Url'),\n 'name' => 'url',\n 'required' => true,\n 'value' => $this->_formValues['url']\n ]\n );\n\n /* $fieldset->addField(\n 'order_id',\n 'text',\n [\n 'label' => __('Order #'),\n 'title' => __('Order #'),\n 'name' => 'order_id', \n 'disabled' => true,\n 'value' => $this->_formValues['order_id']\n ]\n ); */\n\n $this->setForm($form);\n $this->_formPostInit($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "412eddadb1df16ee6e9a60e67ad5dc9f", "score": "0.6288504", "text": "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_amasty_label');\n /** @var \\Amasty\\Label\\Model\\Rule $ruleModel */\n $ruleModel = $this->ruleFactory->create();\n\n $form = $this->_formFactory->create();\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form->setHtmlIdPrefix('rule_');\n\n /* start condition block*/\n if (\"\" != $model->getData('cond_serialize')) {\n $modelData = $model->getData();\n if (isset($modelData['cond_serialize'])) {\n $ruleModel->setConditions([]);\n $ruleModel->setConditionsSerialized($modelData['cond_serialize']);\n $ruleModel->getConditions()->setJsFormObject('rule_conditions_fieldset');\n }\n }\n if (\"\" != $model->getData('customer_group_ids')) {\n $model->setData(\n 'customer_group_ids',\n $this->serializer->unserialize($model->getData('customer_group_ids'))\n );\n }\n\n $renderer = $this->rendererFieldset->setTemplate(\n 'Magento_CatalogRule::promo/fieldset.phtml'\n )->setNewChildUrl(\n $this->getUrl('catalog_rule/promo_catalog/newConditionHtml/form/rule_conditions_fieldset')\n );\n\n $fieldset = $form->addFieldset(\n 'conditions_fieldset',\n ['legend' => __('Conditions')]\n )->setRenderer(\n $renderer\n );\n\n $fieldset->addField(\n 'conditions',\n 'text',\n [\n 'name' => 'conditions',\n 'label' => __('Product Conditions'),\n 'title' => __('Product Conditions'),\n 'required' => true\n ]\n )->setRule(\n $ruleModel\n )->setRenderer(\n $this->_conditions\n );\n /* end condition block*/\n\n /* start date block*/\n $fldDateRange = $form->addFieldset('timeline', ['legend'=> __('Date Range')]);\n $dateEnabled = $fldDateRange->addField(\n 'date_range_enabled',\n 'select',\n [\n 'label' => __('Use Date Range'),\n 'title' => __('Use Date Range'),\n 'name' => 'date_range_enabled',\n 'options' => [\n '0' => __('No'),\n '1' => __('Yes'),\n ],\n ]\n );\n\n $dateFormat = $this->_localeDate->getDateFormat(\n \\IntlDateFormatter::SHORT\n );\n $fromDate = $fldDateRange->addField(\n 'from_date',\n 'date',\n [\n 'name' => 'from_date',\n 'label' => __('From Date'),\n 'title' => __('From Date'),\n 'input_format' => \\Magento\\Framework\\Stdlib\\DateTime::DATE_INTERNAL_FORMAT,\n 'date_format' => $dateFormat\n ]\n );\n\n $fromTime = $fldDateRange->addField('from_time', 'text', [\n 'name' => 'from_time',\n 'label' => __('From Time'),\n 'title' => __('From Time'),\n 'note' => __('In format 15:32. If the input field is blank, 00:00 will be used.'),\n ]);\n\n $toDate = $fldDateRange->addField('to_date', 'date', [\n 'name' => 'to_date',\n 'label' => __('To Date'),\n 'title' => __('To Date'),\n 'input_format' => \\Magento\\Framework\\Stdlib\\DateTime::DATE_INTERNAL_FORMAT,\n 'date_format' => $dateFormat\n ]);\n\n $toTime = $fldDateRange->addField('to_time', 'text', [\n 'name' => 'to_time',\n 'label' => __('To Time'),\n 'title' => __('To Time'),\n 'note' => __('In format 19:32. If the input field is blank, 00:00 will be used.'),\n ]);\n /* end date block*/\n\n /* start sale block*/\n $fldState = $form->addFieldset('state', ['legend'=> __('State')]);\n $fldState->addField('is_new', 'select', [\n 'label' => __('Is New'),\n 'name' => 'is_new',\n 'values' => [\n 0 => __('Does not matter'),\n 1 => __('No'),\n 2 => __('Yes'),\n ],\n ]);\n\n $isSale = $fldState->addField('is_sale', 'select', [\n 'label' => __('Is on Sale'),\n 'name' => 'is_sale',\n 'values' => [\n 0 => __('Does not matter'),\n 1 => __('No'),\n 2 => __('Yes'),\n ],\n ]);\n\n $specialPriceOnly = $fldState->addField('special_price_only', 'select', [\n 'label' => __('Use Special Price Only'),\n 'name' => 'special_price_only',\n 'note' => __('For `On Sale` condition'),\n 'values' => [\n 0 => __('No'),\n 1 => __('Yes'),\n ],\n ]);\n\n $fldStock = $form->addFieldset('stock', ['legend'=> __('Stock')]);\n $fldStock->addField('stock_status', 'select', [\n 'label' => __('Status'),\n 'name' => 'stock_status',\n 'values' => [\n 0 => __('Does not matter'),\n 1 => __('Out of Stock'),\n 2 => __('In Stock'),\n ],\n ]);\n\n $stockEnabled = $fldStock->addField('product_stock_enabled', 'select', [\n 'label' => __('Use Stock Range'),\n 'title' => __('Use Stock Range'),\n 'name' => 'product_stock_enabled',\n 'options' => [\n '0' => __('No'),\n '1' => __('Yes'),\n ],\n ]);\n\n $stockRangeHigher = $fldStock->addField('stock_higher', 'text', [\n 'label' => __('Display if stock is higher than '),\n 'title' => __('Display if stock is higher than '),\n 'name' => 'stock_higher',\n 'default' => null\n ]);\n\n $stockRangeLess = $fldStock->addField('stock_less', 'text', [\n 'label' => __('Display if stock is lower than '),\n 'title' => __('Display if stock is lower than '),\n 'name' => 'stock_less',\n 'default' => null\n ]);\n\n $fldPriceRange = $form->addFieldset('price', ['legend'=> __('Price Range')]);\n $priceEnabled = $fldPriceRange->addField('price_range_enabled', 'select', [\n 'label' => __('Use Price Range'),\n 'title' => __('Use Price Range'),\n 'name' => 'price_range_enabled',\n 'options' => [\n '0' => __('No'),\n '1' => __('Yes'),\n ],\n ]);\n\n $byPrice = $fldPriceRange->addField('by_price', 'select', [\n 'label' => __('By Price'),\n 'title' => __('By Price'),\n 'name' => 'by_price',\n 'options' => [\n '0' => __('Base Price'),\n '1' => __('Special Price'),\n '2' => __('Final Price'),\n '3' => __('Final Price Incl Tax'),\n '4' => __('Starting from Price'),\n '5' => __('Starting to Price'),\n ],\n ]);\n\n $fromPrice = $fldPriceRange->addField('from_price', 'text', [\n 'name' => 'from_price',\n 'label' => __('From Price'),\n 'title' => __('From Price'),\n ]);\n\n $toPrice = $fldPriceRange->addField('to_price', 'text', [\n 'name' => 'to_price',\n 'label' => __('To Price'),\n 'title' => __('To Price'),\n ]);\n\n $fldGroup = $form->addFieldset('customer_group', ['legend'=> __('Customer Groups')]);\n $groupEnabled = $fldGroup->addField('customer_group_enabled', 'select', [\n 'label' => __('Use Customer Groups'),\n 'title' => __('Use Customer Groups'),\n 'name' => 'customer_group_enabled',\n 'options' => [\n '0' => __('No'),\n '1' => __('Yes'),\n ],\n ]);\n\n $customerGroups = $this->groupRepository->getList($this->searchCriteriaBuilder->create())->getItems();\n $groups = $fldGroup->addField('customer_group_ids', 'multiselect', [\n 'label' => __('For Customer Groups'),\n 'title' => __('For Customer Groups'),\n 'name' => 'customer_group_ids[]',\n 'values' => $this->objectConverter->toOptionArray($customerGroups, 'id', 'code'),\n ]);\n /* end sale block*/\n\n $data = $model->getData();\n if ($data) {\n $data['is_active'] = '1';\n\n if (isset($data['from_date'])) {\n $dateFrom = explode(\" \", $data['from_date']);\n\n if (isset($dateFrom[1]) && $dateFrom[1] != '00:00:00') {\n $data['from_time'] = $dateFrom[1];\n }\n }\n\n if (isset($data['to_date'])) {\n $dateTo = explode(\" \", $data['to_date']);\n\n if (isset($dateTo[1]) && $dateTo[1] != '00:00:00') {\n $data['to_time'] = $dateTo[1];\n }\n }\n\n //set form values\n $form->setValues($data);\n }\n\n // define field dependencies\n /**\n * @var \\Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence\n */\n $dependence = $this->getLayout()->createBlock(\\Magento\\Backend\\Block\\Widget\\Form\\Element\\Dependence::class)\n // Customer Groups\n ->addFieldMap($groupEnabled->getHtmlId(), $groupEnabled->getName())\n ->addFieldMap($groups->getHtmlId(), $groups->getName())\n ->addFieldDependence(\n $groups->getName(),\n $groupEnabled->getName(),\n '1'\n ) // Price Range\n ->addFieldMap($priceEnabled->getHtmlId(), $priceEnabled->getName())\n ->addFieldMap($byPrice->getHtmlId(), $byPrice->getName())\n ->addFieldMap($fromPrice->getHtmlId(), $fromPrice->getName())\n ->addFieldMap($toPrice->getHtmlId(), $toPrice->getName())\n ->addFieldDependence(\n $byPrice->getName(),\n $priceEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $fromPrice->getName(),\n $priceEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $toPrice->getName(),\n $priceEnabled->getName(),\n '1'\n ) // Is on Sale\n ->addFieldMap($isSale->getHtmlId(), $isSale->getName())\n ->addFieldMap($specialPriceOnly->getHtmlId(), $specialPriceOnly->getName())\n ->addFieldDependence(\n $specialPriceOnly->getName(),\n $isSale->getName(),\n '2'\n ) // Date Range\n ->addFieldMap($dateEnabled->getHtmlId(), $dateEnabled->getName())\n ->addFieldMap($fromDate->getHtmlId(), $fromDate->getName())\n ->addFieldMap($fromTime->getHtmlId(), $fromTime->getName())\n ->addFieldMap($toDate->getHtmlId(), $toDate->getName())\n ->addFieldMap($toTime->getHtmlId(), $toTime->getName())\n ->addFieldDependence(\n $fromDate->getName(),\n $dateEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $fromTime->getName(),\n $dateEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $toDate->getName(),\n $dateEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $toTime->getName(),\n $dateEnabled->getName(),\n '1'\n )\n ->addFieldMap($stockEnabled->getHtmlId(), $stockEnabled->getName())\n ->addFieldMap($stockRangeLess->getHtmlId(), $stockRangeLess->getName())\n ->addFieldMap($stockRangeHigher->getHtmlId(), $stockRangeHigher->getName())\n ->addFieldDependence(\n $stockRangeLess->getName(),\n $stockEnabled->getName(),\n '1'\n )\n ->addFieldDependence(\n $stockRangeHigher->getName(),\n $stockEnabled->getName(),\n '1'\n );\n $this->setChild('form_after', $dependence);\n\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "1d60250a044f53a1302fecf56a239dca", "score": "0.6287384", "text": "protected function _prepareForm()\n {\n if (Mage::registry('store_type') == 'website') {\n $websiteModel = Mage::registry('store_data');\n $showWebsiteFieldset = true;\n $showGroupFieldset = $showStoreFieldset = false;\n } elseif (Mage::registry('store_type') == 'group') {\n $groupModel = Mage::registry('store_data');\n $showGroupFieldset = true;\n $showWebsiteFieldset = $showStoreFieldset = false;\n } elseif (Mage::registry('store_type') == 'store') {\n $storeModel = Mage::registry('store_data');\n $showWebsiteFieldset = $showGroupFieldset = false;\n $showStoreFieldset = true;\n }\n\n /* @var $websiteModel Mage_Core_Model_Website */\n /* @var $groupModel Mage_Core_Model_Store_Group */\n /* @var $storeModel Mage_Core_Model_Store */\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getData('action'),\n 'method' => 'post'\n ));\n\n if ($showWebsiteFieldset) {\n if ($postData = Mage::registry('store_post_data')) {\n $websiteModel->setData($postData['website']);\n }\n $fieldset = $form->addFieldset('website_fieldset', array(\n 'legend' => Mage::helper('core')->__('Website Information')\n ));\n /* @var $fieldset Varien_Data_Form */\n\n $fieldset->addField('website_name', 'text', array(\n 'name' => 'website[name]',\n 'label' => Mage::helper('core')->__('Name'),\n 'value' => $websiteModel->getName(),\n 'required' => true,\n 'disabled' => $websiteModel->isReadOnly(),\n ));\n\n $fieldset->addField('website_code', 'text', array(\n 'name' => 'website[code]',\n 'label' => Mage::helper('core')->__('Code'),\n 'value' => $websiteModel->getCode(),\n 'required' => true,\n 'disabled' => $websiteModel->isReadOnly(),\n ));\n\n $fieldset->addField('website_sort_order', 'text', array(\n 'name' => 'website[sort_order]',\n 'label' => Mage::helper('core')->__('Sort Order'),\n 'value' => $websiteModel->getSortOrder(),\n 'required' => false,\n 'disabled' => $websiteModel->isReadOnly(),\n ));\n\n if (Mage::registry('store_action') == 'edit') {\n $groups = Mage::getModel('core/store_group')->getCollection()\n ->addWebsiteFilter($websiteModel->getId())\n ->setWithoutStoreViewFilter()\n ->toOptionArray();\n\n $fieldset->addField('website_default_group_id', 'select', array(\n 'name' => 'website[default_group_id]',\n 'label' => Mage::helper('core')->__('Default Store'),\n 'value' => $websiteModel->getDefaultGroupId(),\n 'values' => $groups,\n 'required' => false,\n 'disabled' => $websiteModel->isReadOnly(),\n ));\n }\n\n if (!$websiteModel->getIsDefault() && $websiteModel->getStoresCount()) {\n $fieldset->addField('is_default', 'checkbox', array(\n 'name' => 'website[is_default]',\n 'label' => Mage::helper('core')->__('Set as Default'),\n 'value' => 1,\n 'disabled' => $websiteModel->isReadOnly(),\n ));\n }\n else {\n $fieldset->addField('is_default', 'hidden', array(\n 'name' => 'website[is_default]',\n 'value' => $websiteModel->getIsDefault()\n ));\n }\n\n $fieldset->addField('website_website_id', 'hidden', array(\n 'name' => 'website[website_id]',\n 'value' => $websiteModel->getId()\n ));\n }\n\n if ($showGroupFieldset) {\n if ($postData = Mage::registry('store_post_data')) {\n $groupModel->setData($postData['group']);\n }\n $fieldset = $form->addFieldset('group_fieldset', array(\n 'legend' => Mage::helper('core')->__('Store Information')\n ));\n\n if (Mage::registry('store_action') == 'edit'\n || (Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'group')) {\n $websites = Mage::getModel('core/website')->getCollection()->toOptionArray();\n $fieldset->addField('group_website_id', 'select', array(\n 'name' => 'group[website_id]',\n 'label' => Mage::helper('core')->__('Website'),\n 'value' => $groupModel->getWebsiteId(),\n 'values' => $websites,\n 'required' => true,\n 'disabled' => $groupModel->isReadOnly(),\n ));\n\n if ($groupModel->getId() && $groupModel->getWebsite()->getDefaultGroupId() == $groupModel->getId()) {\n if ($groupModel->getWebsite()->getIsDefault() || $groupModel->getWebsite()->getGroupsCount() == 1) {\n $form->getElement('group_website_id')->setDisabled(true);\n\n $fieldset->addField('group_hidden_website_id', 'hidden', array(\n 'name' => 'group[website_id]',\n 'no_span' => true,\n 'value' => $groupModel->getWebsiteId()\n ));\n }\n else {\n $fieldset->addField('group_original_website_id', 'hidden', array(\n 'name' => 'group[original_website_id]',\n 'no_span' => true,\n 'value' => $groupModel->getWebsiteId()\n ));\n }\n }\n }\n\n $fieldset->addField('group_name', 'text', array(\n 'name' => 'group[name]',\n 'label' => Mage::helper('core')->__('Name'),\n 'value' => $groupModel->getName(),\n 'required' => true,\n 'disabled' => $groupModel->isReadOnly(),\n ));\n\n $categories = Mage::getModel('adminhtml/system_config_source_category')->toOptionArray();\n\n $fieldset->addField('group_root_category_id', 'select', array(\n 'name' => 'group[root_category_id]',\n 'label' => Mage::helper('core')->__('Root Category'),\n 'value' => $groupModel->getRootCategoryId(),\n 'values' => $categories,\n 'required' => true,\n 'disabled' => $groupModel->isReadOnly(),\n ));\n\n if (Mage::registry('store_action') == 'edit') {\n $stores = Mage::getModel('core/store')->getCollection()\n ->addGroupFilter($groupModel->getId())->toOptionArray();\n //array_unshift($stores, array('label'=>'', 'value'=>0));\n $fieldset->addField('group_default_store_id', 'select', array(\n 'name' => 'group[default_store_id]',\n 'label' => Mage::helper('core')->__('Default Store View'),\n 'value' => $groupModel->getDefaultStoreId(),\n 'values' => $stores,\n 'required' => false,\n 'disabled' => $groupModel->isReadOnly(),\n ));\n }\n\n $fieldset->addField('group_group_id', 'hidden', array(\n 'name' => 'group[group_id]',\n 'no_span' => true,\n 'value' => $groupModel->getId()\n ));\n }\n\n if ($showStoreFieldset) {\n if ($postData = Mage::registry('store_post_data')) {\n $storeModel->setData($postData['store']);\n }\n $fieldset = $form->addFieldset('store_fieldset', array(\n 'legend' => Mage::helper('core')->__('Store View Information')\n ));\n\n if (Mage::registry('store_action') == 'edit'\n || Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'store') {\n $websites = Mage::getModel('core/website')->getCollection();\n $allgroups = Mage::getModel('core/store_group')->getCollection();\n $groups = array();\n foreach ($websites as $website) {\n $values = array();\n foreach ($allgroups as $group) {\n if ($group->getWebsiteId() == $website->getId()) {\n $values[] = array('label'=>$group->getName(),'value'=>$group->getId());\n }\n }\n $groups[] = array('label' => $this->escapeHtml($website->getName()), 'value' => $values);\n }\n $fieldset->addField('store_group_id', 'select', array(\n 'name' => 'store[group_id]',\n 'label' => Mage::helper('core')->__('Store'),\n 'value' => $storeModel->getGroupId(),\n 'values' => $groups,\n 'required' => true,\n 'disabled' => $storeModel->isReadOnly(),\n ));\n if ($storeModel->getId() && $storeModel->getGroup()->getDefaultStoreId() == $storeModel->getId()) {\n if ($storeModel->getGroup() && $storeModel->getGroup()->getStoresCount() > 1) {\n $form->getElement('store_group_id')->setDisabled(true);\n\n $fieldset->addField('store_hidden_group_id', 'hidden', array(\n 'name' => 'store[group_id]',\n 'no_span' => true,\n 'value' => $storeModel->getGroupId()\n ));\n }\n else {\n $fieldset->addField('store_original_group_id', 'hidden', array(\n 'name' => 'store[original_group_id]',\n 'no_span' => true,\n 'value' => $storeModel->getGroupId()\n ));\n }\n }\n }\n\n $fieldset->addField('store_name', 'text', array(\n 'name' => 'store[name]',\n 'label' => Mage::helper('core')->__('Name'),\n 'value' => $storeModel->getName(),\n 'required' => true,\n 'disabled' => $storeModel->isReadOnly(),\n ));\n $fieldset->addField('store_code', 'text', array(\n 'name' => 'store[code]',\n 'label' => Mage::helper('core')->__('Code'),\n 'value' => $storeModel->getCode(),\n 'required' => true,\n 'disabled' => $storeModel->isReadOnly(),\n ));\n\n $fieldset->addField('store_is_active', 'select', array(\n 'name' => 'store[is_active]',\n 'label' => Mage::helper('core')->__('Status'),\n 'value' => $storeModel->getIsActive(),\n 'options' => array(\n 0 => Mage::helper('adminhtml')->__('Disabled'),\n 1 => Mage::helper('adminhtml')->__('Enabled')),\n 'required' => true,\n 'disabled' => $storeModel->isReadOnly(),\n ));\n\n $fieldset->addField('store_sort_order', 'text', array(\n 'name' => 'store[sort_order]',\n 'label' => Mage::helper('core')->__('Sort Order'),\n 'value' => $storeModel->getSortOrder(),\n 'required' => false,\n 'disabled' => $storeModel->isReadOnly(),\n ));\n\n $fieldset->addField('store_is_default', 'hidden', array(\n 'name' => 'store[is_default]',\n 'no_span' => true,\n 'value' => $storeModel->getIsDefault(),\n ));\n\n $fieldset->addField('store_store_id', 'hidden', array(\n 'name' => 'store[store_id]',\n 'no_span' => true,\n 'value' => $storeModel->getId(),\n 'disabled' => $storeModel->isReadOnly(),\n ));\n }\n\n $form->addField('store_type', 'hidden', array(\n 'name' => 'store_type',\n 'no_span' => true,\n 'value' => Mage::registry('store_type')\n ));\n\n $form->addField('store_action', 'hidden', array(\n 'name' => 'store_action',\n 'no_span' => true,\n 'value' => Mage::registry('store_action')\n ));\n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n Mage::dispatchEvent('adminhtml_store_edit_form_prepare_form', array('block' => $this));\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "3d751471036dbf7c2601171c930a7203", "score": "0.6251419", "text": "function _prepareForm() {\n\t\t\t$product = $this->getProduct( );\n\t\t\t$helper = $this->getWarehouseHelper( );\n\t\t\t$form = new Varien_Data_Form( );\n\t\t\t$form->setHtmlIdPrefix( 'product_' );\n\t\t\t$form->setFieldNameSuffix( 'product' );\n\t\t\t$fieldset = $form->addFieldset( 'priority', array( 'legend' => $helper->__( 'Priority' ) ) );\n\t\t\t$stockPrioritiesElement = $fieldset->addField( 'stock_priorities', 'text', array( 'name' => 'stock_priorities', 'label' => $helper->__( 'Warehouse Priority' ), 'title' => $helper->__( 'Warehouse Priority' ), 'required' => false, 'value' => $product->getStockPriorities( ) ) );\n\t\t\t$stockPrioritiesElement->setRenderer( $this->getLayout( )->createBlock( 'warehouse/adminhtml_catalog_product_edit_tab_stock_priority_renderer' ) );\n\t\t\t$this->setForm( $form );\n\t\t\treturn parent::_prepareForm( );\n\t\t}", "title": "" }, { "docid": "497fc6a35acffe59c40f8c0c853202df", "score": "0.6248879", "text": "protected function _prepareForm() {\n $default_warehouse_id = Mage::getModel('inventoryplus/warehouse')\n ->getCollection()\n ->setPageSize(1)->setCurPage(1)->getFirstItem()\n ->getId();\n\t\t$warehousePlugin = (int)Mage::helper('core')->isModuleEnabled('Magestore_Inventorywarehouse');\t\t\t\n $form = new Varien_Data_Form();\n $this->setForm($form);\n if (count(Mage::helper('inventorypurchasing/purchaseorder')->getWarehouseOption()) <= 0) { // Add by Magnus\n $fieldset = $form->addFieldset('purchaseorder_form', array(\n 'legend' => Mage::helper('inventorypurchasing')->__('Select Supplier & Warehouses')\n ));\n $fieldset->addField('pinput_hidden', 'hidden', array(\n 'name' => 'pinput_hidden',\n 'after_element_html' => '<div id=\"messages\"><ul class=\"messages\"><li class=\"error-msg\"><ul><li><span>' . $this->__(\"You don't have permission to create purchase orders for any warehouses.\") . '</span></li></ul></li></ul></div>'\n ));\n return parent::_prepareForm();\n }\n\n $data = '';\n if (Mage::getSingleton('adminhtml/session')->getPurchaseorderData()) {\n $data = Mage::getSingleton('adminhtml/session')->getPurchaseorderData();\n Mage::getSingleton('adminhtml/session')->setPurchaseorderData(null);\n } elseif (Mage::registry('purchaseorder_data')) {\n $data = Mage::registry('purchaseorder_data')->getData();\n }\n \n if(!isset($data['warehouse_ids']) || !$data['warehouse_ids']){\n $data['warehouse_ids'] = explode(',', $this->getRequest()->getParam('warehouse_ids'));\n }\n\n if (is_null($data)) {\n $post = $this->getRequest()->getPost();\n\n Mage::dispatchEvent('purchaseorder_new_tab_form_prepare', array('product_list' => $post['product_list']));\n\n if (isset($post['warehouse_select'])) {\n if ($post['warehouse_select'] != '') {\n $data['warehouse_ids'] = $post['warehouse_select'];\n }\n }\n if (isset($post['supplier_select']))\n $data['supplier_id'] = $post['supplier_select'];\n }\n \n $fieldset = $form->addFieldset('purchaseorder_form', array(\n 'legend' => Mage::helper('inventorypurchasing')->__('Select Supplier')\n ));\n\n //add Field to form\n\n $fieldset->addField('supplier_id', 'select', array(\n 'label' => Mage::helper('inventorypurchasing')->__('Supplier'),\n 'class' => 'required-entry',\n 'name' => 'supplier_id',\n 'disabled' => false,\n 'values' => Mage::helper('inventorypurchasing/supplier')->returnArrAllRowOfcolumnOftableSupplier('supplier_name'),\n 'after_element_html' => '<script type=\"text/javascript\">\n var productTemplateSyntax = /(^|.|\\r|\\n)({{(\\w+)}})/; \n function setSettings(urlTemplate, setElement) {\n var supplier_id = $(\"supplier_id\").value;\n var currency = $(\"currency\").value; \n var change_rate = $(\"change_rate\").value;\n var warehouse_plugin = '.$warehousePlugin.';\n var select1 = document.getElementById(\"warehouse_ids\");\n var wSelected = \"\";\n var j = 0;\n for (var i = 0; i < select1.length; i++) {\n if (select1.options[i].selected){\n if(j!=0) wSelected += \",\";\n wSelected += select1.options[i].value;\n j++;\n }\n }\n\n if(!change_rate){\n alert(\"Please fill Currency Change Rate to continue!\");\n return false;\n }\n\n var warehouse_ids = wSelected;\n if(!warehouse_ids)\n warehouse_ids = select1.value;\n if(!warehouse_ids && !warehouse_plugin){\n warehouse_ids= \\''.$default_warehouse_id.'\\';\n }\n\t\t\t\t\t\tif(!warehouse_ids && warehouse_plugin){\n\t\t\t\t\t\t\talert(\"Please select warehouse to continue!\");\n return false;\n }\n setLocation(urlTemplate+\"supplier_id/\"+supplier_id+\"/warehouse_ids/\"+warehouse_ids+\"/currency/\"+currency+\"/change_rate/\"+change_rate);\n } \n </script>'\n ));\n\n $fieldset->addField('currency', 'select', array(\n 'label' => Mage::helper('inventorypurchasing')->__('Currency'),\n 'class' => 'required-entry',\n // 'required' => true,\n 'name' => 'currency',\n 'values' => Mage::app()->getLocale()->getOptionCurrencies(),\n 'after_element_html' => '<script type=\"text/javascript\">$(\"currency\").value=\\'' . Mage::app()->getStore()->getBaseCurrencyCode() . '\\'</script>',\n ));\n\n $fieldset->addField('change_rate', 'text', array(\n 'label' => Mage::helper('inventorypurchasing')->__('Currency Exchange Rate'),\n 'class' => 'required-entry',\n 'required' => true,\n 'name' => 'change_rate',\n 'after_element_html' => '<br /><div id=\"change_rate_comment\"></div>\n <script type=\"text/javascript\">\n var base_currency = \\'' . Mage::app()->getStore()->getBaseCurrencyCode() . '\\';\n var select_currency = $(\"currency\").value;\n var change_rate = $(\"change_rate\").value;\n if(!change_rate){\n $(\"change_rate\").value = 1;\n }\n var comment = \"(1 \"+ base_currency +\" = \"+ $(\"change_rate\").value +\" \"+select_currency +\")\";\n $(\"change_rate_comment\").innerHTML = comment;\n </script>',\n ));\n if (Mage::helper('core')->isModuleEnabled('Magestore_Inventorywarehouse')) {\n $fieldset->addField('warehouse_ids', 'multiselect', array(\n 'label' => Mage::helper('inventorypurchasing')->__('Warehouse(s)'),\n 'class' => 'required-entry',\n 'name' => 'warehouse_ids',\n 'disabled' => false,\n 'required' => true,\n 'values' => Mage::helper('inventorypurchasing/purchaseorder')->getWarehouseOption(),\n ));\n } else {\n $fieldset->addField('warehouse_ids', 'hidden', array(\n 'name' => 'warehouse_ids'\n ));\n }\n\n $fieldset->addField('continue_button', 'note', array(\n 'text' => $this->getChildHtml('continue_button'),\n ));\n\n $form->setValues($data);\n if(!isset($data['warehouse_ids']) || !$data['warehouse_ids']){\n $form->addValues(array('warehouse_ids' => Mage::getModel('inventoryplus/warehouse')->getCollection()->setPageSize(1)->setCurPage(1)->getFirstItem()->getId()));\n }\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "cac6f402232fc3f64db41515c3c16ff1", "score": "0.6234869", "text": "protected function _prepareForm()\n {\n \tparent::_prepareForm();\n \t$attributeObject = $this->getAttributeObject();\n \t$form = $this->getForm();\n\t\t$fieldset = $form->getElement('base_fieldset');\n\t\t$yesno = Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray();\n \n $fieldset->addField('depends_on', 'depends', array(\n 'name' => 'depends_on[]',\n 'label' => Mage::helper('catalog')->__('Depends On'),\n \t'note'\t\t => 'This attribute must be a filterable attribute for this to have any effect. Any filter options that are selected here will have to have been chosen on the frontend for this filter to show up on the frontend.',\n 'values' => Prattski_DependentFilters_Model_Catalog_Layer_Filters::getOptions(),\n 'mode_labels' => array(\n 'all' => Mage::helper('catalog')->__('None'),\n 'custom' => Mage::helper('catalog')->__('Select Filter(s)')\n ),\n 'required' => false\n ), 'frontend_class');\n \n \t$form->getElement('depends_on')->setSize(10);\n\n if ($dependsOn = $attributeObject->getDependsOn()) {\n $dependsOn = is_array($dependsOn) ? $dependsOn : explode(',', $dependsOn);\n $form->getElement('depends_on')->setValue($dependsOn);\n } else {\n $form->getElement('depends_on')->addClass('no-display ignore-validate');\n }\n \t\n \treturn $this;\n }", "title": "" }, { "docid": "ce60fb1e7fa34c4960ed0fc43fc083cf", "score": "0.61971724", "text": "protected function _prepareLayout()\n {\n $tabsBlock = $this->getLayout()->getBlock('cms_page_edit_tabs');\n /* @var $tabBlock Mage_Adminhtml_Block_Cms_Page_Edit_Tabs */\n if ($tabsBlock) {\n $editBlock = $this->getLayout()->getBlock('cms_page_edit');\n /* @var $editBlock Mage_Adminhtml_Block_Cms_Page_Edit */\n if ($editBlock) {\n $page = Mage::registry('cms_page');\n if ($page) {\n if ($page->getId()) {\n $editBlock->addButton('preview', array(\n 'label' => Mage::helper('gri_cms')->__('Preview'),\n 'onclick' => 'pagePreviewAction()',\n 'class' => 'preview',\n ));\n }\n\n $formBlock = $editBlock->getChild('form');\n if ($formBlock) {\n $formBlock->setTemplate('gri/cms/page/edit/form.phtml');\n if ($page->getUnderVersionControl()) {\n $tabId = $this->getRequest()->getParam('tab');\n if ($tabId) {\n $formBlock->setSelectedTabId($tabsBlock->getId() . '_' . $tabId)\n ->setTabJsObject($tabsBlock->getJsObjectName());\n }\n }\n }\n // If user non-publisher he can save page only if it has disabled status\n if ($page->getUnderVersionControl()) {\n if ($page->getId() && $page->getIsActive() == Mage_Cms_Model_Page::STATUS_ENABLED) {\n if (!Mage::getSingleton('gri_cms/config')->canCurrentUserPublishRevision()) {\n $editBlock->removeButton('delete');\n $editBlock->removeButton('save');\n $editBlock->removeButton('saveandcontinue');\n }\n }\n }\n }\n }\n }\n return $this;\n }", "title": "" }, { "docid": "315cc72fa767b7383ddf329a37ee7ee6", "score": "0.6188316", "text": "protected function _prepareForm()\n {\n $data = $this->_setFactory->create()->load($this->getRequest()->getParam('id'));\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]);\n $fieldset->addField(\n 'attribute_set_name',\n 'label',\n [\n 'label' => __('Name'),\n 'note' => __(\"%1Click here%2 to edit product attribute set\", sprintf('<a href=\"%s\" target=\"_blank\">', $this->getEditAttributeSetUrl()), '</a>'),\n 'name' => 'attribute_set_name',\n 'required' => true,\n 'class' => 'required-entry validate-no-html-tags',\n 'value' => $data->getAttributeSetName()\n ]\n );\n\n if (!$this->getRequest()->getParam('id', false)) {\n $fieldset->addField('gotoEdit', 'hidden', ['name' => 'gotoEdit', 'value' => '1']);\n\n $sets = $this->_setFactory->create()->getResourceCollection()->setEntityTypeFilter(\n $this->_coreRegistry->registry('entityType')\n )->load()->toOptionArray();\n\n $fieldset->addField(\n 'skeleton_set',\n 'select',\n [\n 'label' => __('Based On'),\n 'name' => 'skeleton_set',\n 'required' => true,\n 'class' => 'required-entry',\n 'values' => $sets\n ]\n );\n }\n\n $form->setMethod('post');\n $form->setUseContainer(true);\n $form->setId('set-prop-form');\n $form->setAction($this->getUrl('vendors/*/save'));\n \n $form->setOnsubmit('return false;');\n $this->setForm($form);\n }", "title": "" }, { "docid": "145c983c7c1c1cc02efa6de572b6f892", "score": "0.61788166", "text": "protected function _prepareForm()\n {\n $form = new Varien_Data_Form();\n\n $itemType = $this->getItemType();\n\n $fieldset = $form->addFieldset('content_fieldset', array(\n 'legend' => $this->__('Attribute set mapping')\n ));\n\n if ( !($targetCountry = $itemType->getTargetCountry()) ) {\n $isoKeys = array_keys($this->_getCountriesArray());\n $targetCountry = isset($isoKeys[0]) ? $isoKeys[0] : null;\n }\n $countrySelect = $fieldset->addField('select_target_country', 'select', array(\n 'label' => $this->__('Target Country'),\n 'title' => $this->__('Target Country'),\n 'name' => 'target_country',\n 'required' => true,\n 'options' => $this->_getCountriesArray(),\n 'value' => $targetCountry,\n ));\n if ($itemType->getTargetCountry()) {\n $countrySelect->setDisabled(true);\n }\n\n $attributeSetsSelect = $this->getAttributeSetsSelectElement($targetCountry)\n ->setValue($itemType->getAttributeSetId());\n if ($itemType->getAttributeSetId()) {\n $attributeSetsSelect->setDisabled(true);\n }\n\n $fieldset->addField('attribute_set', 'note', array(\n 'label' => $this->__('Attribute Set'),\n 'title' => $this->__('Attribute Set'),\n 'required' => true,\n 'text' => '<div id=\"attribute_set_select\">' . $attributeSetsSelect->toHtml() . '</div>',\n ));\n\n $categories = Mage::helper('googleshopping/category')->getCategories();\n $fieldset->addField('category', 'select', array(\n 'label' => $this->__('Google Product Category'),\n 'title' => $this->__('Google Product Category'),\n 'required' => true,\n 'name' => 'category',\n 'options' => array_combine($categories, array_map('htmlspecialchars_decode', $categories)),\n 'value' => $itemType->getCategory(),\n ));\n\n $attributesBlock = $this->getLayout()\n ->createBlock('googleshopping/adminhtml_types_edit_attributes')\n ->setTargetCountry($targetCountry);\n if ($itemType->getId()) {\n $attributesBlock->setAttributeSetId($itemType->getAttributeSetId())\n ->setAttributeSetSelected(true);\n }\n\n $attributes = Mage::registry('attributes');\n if (is_array($attributes) && count($attributes) > 0) {\n $attributesBlock->setAttributesData($attributes);\n }\n\n $fieldset->addField('attributes_box', 'note', array(\n 'label' => $this->__('Attributes Mapping'),\n 'text' => '<div id=\"attributes_details\">' . $attributesBlock->toHtml() . '</div>',\n ));\n\n $form->addValues($itemType->getData());\n $form->setUseContainer(true);\n $form->setId('edit_form');\n $form->setMethod('post');\n $form->setAction($this->getSaveUrl());\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "13c7343859459082b4bf5b8fbc155b0a", "score": "0.6175626", "text": "protected function _prepareForm()\n {\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n $model = $this->_coreRegistry->registry('function');\n\n $form->setUseContainer(true);\n $this->setForm($form);\n\n $form->setHtmlIdPrefix('');\n\n $fieldset = $form->addFieldset('ordersexporttool_functions_edit_base', ['legend' => __('Create your own function based on PHP')]);\n\n if ($model->getId()) {\n $fieldset->addField('id', \"hidden\", ['name' => 'id', 'label' => 'id']);\n }\n\n // ===================== all needed urls ===============================\n $fieldset->addField(\n 'script',\n 'textarea',\n [\n 'class' => 'codemirror',\n 'id' => 'script',\n 'name' => 'script',\n 'label' => 'Php script',\n 'required' => false,\n 'note' => \"Example : <br><pre>function example(\\$self,\\$argument_1,\\$argument_2){<br>\" . \"&nbsp;&nbsp;&nbsp;&nbsp;... do something with the arguments...<br>\" . \"&nbsp;&nbsp;&nbsp;&nbsp;return \\$something;<br>\" . \"}</pre><br>\" . \"This custom function can be used in the template as follows: <br>\" . \"<pre>{{any.variable output=\\\"example(\\$self,'value 1','value 2')\\\"}}</pre>\",\n ]\n );\n\n if ($this->_coreRegistry->registry('script')) {\n $model->setScript($this->_coreRegistry->registry('script'));\n $this->_coreRegistry->unregister('script');\n }\n\n $form->setValues($model->getData());\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "2d67a83fc5dbce637e17180b4be19ed8", "score": "0.6150915", "text": "protected function _prepareForm()\n {\n parent::_prepareForm();\n $helper = $this->getWarehouseHelper();\n $model = $this->getModel();\n $isElementDisabled = ($this->isSaveAllowed()) ? false : true;\n $fieldset = $this->getFieldset();\n $fieldset->addField('origin_country_id', 'select', array(\n 'name' => 'origin_country_id', \n 'label' => $helper->__('Country'), \n 'title' => $helper->__('Country'), \n 'required' => true, \n 'disabled' => $isElementDisabled, \n 'values' => $this->getCountryValues(), \n 'class' => 'origin_country_id', \n 'value' => $model->getOriginCountryId(), \n ));\n $fieldset->addField('origin_region_id', 'text', array(\n 'name' => 'origin_region_id', \n 'label' => $helper->__('Region/State'), \n 'title' => $helper->__('Region/State'), \n 'required' => true, \n 'disabled' => $isElementDisabled, \n 'class' => 'origin_region_id', \n 'value' => (($model->getOriginRegionId()) ? \n $model->getOriginRegionId() : \n $model->getOriginRegion()), \n ));\n $fieldset->addField('origin_postcode', 'text', array(\n 'name' => 'origin_postcode', \n 'label' => $helper->__('ZIP/Postal Code'), \n 'title' => $helper->__('ZIP/Postal Code'), \n 'required' => true, \n 'disabled' => $isElementDisabled, \n 'value' => $model->getOriginPostcode(), \n ));\n $fieldset->addField('origin_city', 'text', array(\n 'name' => 'origin_city', \n 'label' => $helper->__('City'), \n 'title' => $helper->__('City'), \n 'required' => true, \n 'disabled' => $isElementDisabled, \n 'value' => $model->getOriginCity(), \n ));\n $fieldset->addField('origin_street1', 'text', array(\n 'name' => 'origin_street1', \n 'label' => $helper->__('Street Address'), \n 'title' => $helper->__('Street Address'), \n 'required' => true, \n 'disabled' => $isElementDisabled, \n 'value' => $model->getOriginStreet1(), \n ));\n $fieldset->addField('origin_street2', 'text', array(\n 'name' => 'origin_street2', \n 'label' => $helper->__('Street Address 2'), \n 'title' => $helper->__('Street Address 2'), \n 'required' => false, \n 'disabled' => $isElementDisabled, \n 'value' => $model->getOriginStreet2(), \n ));\n $this->dispatchPrepareFormEvent();\n return $this;\n }", "title": "" }, { "docid": "e88f9b102fc1a3ee8519e85023394d63", "score": "0.61490256", "text": "abstract public function initializeAdminForm();", "title": "" }, { "docid": "512da35441e5ffbbc58003ed32828016", "score": "0.6090836", "text": "function onContentPrepareForm($form, $data)\r\n {\r\n $app = JFactory::getApplication();\r\n $option = $app->input->get('option');\r\n\r\n\r\n if ($app->isAdmin() or $app->isSite())\r\n {\r\n\r\n $pieces = explode(\",\", $this->params->get('filenames'));\r\n $themodules = explode(\",\", $this->params->get('themodules'));\r\n $db = JFactory::getDBO();\r\n $query = \"SELECT template FROM #__template_styles WHERE client_id = 0 AND home = 1\";\r\n $db->setQuery($query);\r\n $defaultemplate = $db->loadResult();\r\n\r\n $db2 = JFactory::getDBO();\r\n $query2 = 'SELECT module'\r\n .' FROM #__modules'\r\n .' WHERE id = ' . $db->Quote($app->input->get(\"id\"));\r\n $db2->setQuery($query2);\r\n $module = $db2->loadResult();\r\n\r\n foreach($themodules as $key=>$themodule){\r\n if ($module == $themodule){\r\n\r\n if ($this->params->get('thepath') == 'template_override') {\r\n JForm::addFormPath(JPATH_SITE . '/templates/' . $defaultemplate . '/html/' . $themodule . '/');\r\n }\r\n if ($this->params->get('thepath') == 'plugins') {\r\n JForm::addFormPath(JPATH_PLUGINS . '/system/add_xml_fields/');\r\n }\r\n foreach ($pieces as $k => $piece) {\r\n $form->loadFile($pieces[$key], false);\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n }\r\n\r\n return true;\r\n\r\n\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "87c3643adaa6bf8ab257756c45a5a47e", "score": "0.6058345", "text": "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_shop_lookbook_lookbook');\n\t\t\n\t\t$isElementDisabled = false;\n\t\t\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('lookbook_'); // ex: 'sku' text becomes -> 'lookbook_sku' \n $fieldset = $form->addFieldset(\n 'base_fieldset', [\n 'legend' => __('Lookbook Information')]);\n\n if ($model->getId()) {\n $fieldset->addField(\n 'id', \n 'hidden', [\n 'name' => 'id'\n ]\n );\n }\n\t\t\n \n\t\t$fieldset->addField(\n 'sku', \n 'text',\n [\n\t\t\t\t'name' => 'sku', \n\t\t\t\t'label' => __('Group Product SKU'), \n\t\t\t\t'title' => __('Group Product SKU'), \n\t\t\t\t'required' => true,\n\t\t\t\t'note' => 'Choose existing product group sku to avoid errors.',\n\t\t\t]\n );\n\t\t\n $fieldset->addField(\n 'name',\n 'text',\n [\n\t\t\t\t'name' => 'name', \n\t\t\t\t'label' => __('Name'), \n\t\t\t\t'title' => __('Name'), \n\t\t\t\t'required' => true\n\t\t\t]\n );\n\t\t\n\t\t$fieldset->addField(\n 'position',\n 'text',\n [\n\t\t\t\t'name' => 'position', \n\t\t\t\t'label' => __('Order'), \n\t\t\t\t'title' => __('Order')\n\t\t\t]\n );\n\t\t\n\t\t$fieldset->addField(\n 'status',\n 'select',\n [\n 'name' => 'status',\n 'label' => __('Status'),\n 'options' =>$this->_lookbookStatus->toOptionArray() \n \n ]\n );\n\n // $fieldset->addField(\n // 'field_to_hide', \n // 'text', \n // [\n \n // 'name' => $this->getUrl('shop_lookbook/lookbook/uploader'),\n // 'label' => __('Test'),\n // ]\n // );\n\t\t\n\t\t$selectField = $fieldset->addField(\n\t\t\t'photo',\n\t\t\t'image',\n\t\t\t[\n\t\t\t\t'name' => 'photo',\n\t\t\t\t'label' => __('Upload File'),\n\t\t\t\t'title' => __('Upload File'),\n 'required' => true,\n\t\t\t\t//'onclick' => 'startAjax();',\n 'note' => 'Allow image type: jpg, jpeg, gif, png',\n \n\t\t\t]\n\t\t);\n\n // if you want to use onclik or onchange when uploading file\n // $selectField->setAfterElementHtml(\n // '<script type=\"text/javascript\">'.\n // \" \n // function startAjax() {\n\n // jQuery.ajax({\n // url: 'http://127.0.0.1/lookbook/admin/shop_lookbook/lookbook/uploader/key/240990e131914b0a78bb22c92595bd9b74fe79c43132bf350df7b6ceb389b53f/',\n // type: 'post', \n // data: {\n // image: this.value,\n // },\n // success: function(data){\n // console.log(data);\n\n // } \n // });\n // } \n \n // \".\n // '</script>'\n // );\n\n\t\t\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "606ed1a1b47079e78711445c93081431", "score": "0.60522836", "text": "protected function _prepareForm()\n {\n $model = Mage::registry('alliance_bioactives');\n\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data',\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('alliance_bioactives')->__('Bioactive Information'),\n 'class' => 'fieldset-wide',\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array(\n 'name' => 'id',\n ));\n }\n\n $fieldset->addField('date', 'hidden', array(\n 'label' => Mage::helper('alliance_bioactives')->__('Date Created'),\n ));\n\n $fieldset->addField('image', 'image', array(\n 'label' => Mage::helper('alliance_bioactives')->__('Upload Bioactive Image'),\n 'required' => true,\n 'name' => 'image',\n ));\n\n $fieldset->addField('title', 'text', array(\n 'name' => 'title',\n 'label' => Mage::helper('alliance_bioactives')->__('Bioactive Title'),\n 'title' => Mage::helper('alliance_bioactives')->__('Bioactive Title'),\n 'required' => true,\n ));\n\n $fieldset->addField('description', 'textarea', array(\n 'name' => 'description',\n 'label' => Mage::helper('alliance_bioactives')->__('Bioactive Description'),\n 'title' => Mage::helper('alliance_bioactives')->__('Bioactive Description'),\n 'required' => true,\n ));\n\n $fieldset->addField('status', 'select', array(\n 'name' => 'status',\n 'label' => Mage::helper('alliance_bioactives')->__('Status'),\n 'title' => Mage::helper('alliance_bioactives')->__('Status'),\n 'values' => array('Disabled'=>'Disabled','Enabled' => 'Enabled'),\n 'required' => false,\n ));\n\n $form->setValues($model->getData());\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "cb4b97bde807638295913efb9048a4ef", "score": "0.60346264", "text": "public function onContentPrepareForm($form, $data)\n\t{\n\t\treturn SHLdapHelper::triggerEvent('onContentPrepareForm', array($form, $data));\n\t}", "title": "" }, { "docid": "58a571e85247b8902467eb10b739296e", "score": "0.6018104", "text": "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_amasty_storelocator_location');\n\n $yesno = $this->yesno->toOptionArray();\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('location_');\n\n $ObjectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('General')]);\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id']);\n }\n\n $fieldset->addField(\n 'name',\n 'text',\n [\n 'label' => __('Location name'),\n 'required' => true,\n 'name' => 'name',\n ]\n );\n\n\n if (!$this->_storeManager->isSingleStoreMode()) {\n $fieldset->addField(\n 'stores',\n 'multiselect',\n [\n 'name' => 'stores[]',\n 'label' => __('Store View'),\n 'title' => __('Store View'),\n 'required' => true,\n 'values' => $this->_store->getStoreValuesForForm(false, true)\n ]\n );\n } else {\n $fieldset->addField(\n 'store_id',\n 'hidden',\n [\n 'name' => 'store_id[]',\n 'value' => $this->_storeManager->getStore(true)->getId()\n ]\n );\n }\n\n $fieldset->addField(\n 'country',\n 'select',\n [\n 'name' => 'country',\n 'required' => true,\n 'class' => 'countries',\n 'label' => 'Country',\n 'values' => $ObjectManager->get('Magento\\Config\\Model\\Config\\Source\\Locale\\Country')->toOptionArray(),\n ]\n );\n\n $fieldset->addField(\n 'state_id',\n 'select',\n [\n 'name' => 'state_id',\n 'label' => 'State/Province',\n ]\n );\n\n $fieldset->addField(\n 'state',\n 'text',\n [\n 'name' => 'state',\n 'label' => 'State/Province',\n\n ]\n );\n\n $fieldset->addField(\n 'city',\n 'text',\n [\n 'label' => __('City'),\n 'required' => true,\n 'name' => 'city',\n ]\n );\n\n $fieldset->addField(\n 'description',\n 'editor',\n [\n 'label' => __('Description'),\n 'config' => $this->_wysiwygConfig->getConfig(),\n 'name' => 'description',\n ]\n );\n\n $fieldset->addField(\n 'zip',\n 'text',\n [\n 'label' => __('Zip'),\n 'required' => true,\n 'name' => 'zip',\n ]\n );\n\n $fieldset->addField(\n 'address',\n 'text',\n [\n 'label' => __('Address'),\n 'required' => true,\n 'name' => 'address',\n ]\n );\n\n $fieldset->addField(\n 'contact_area',\n 'text',\n [\n 'label' => __('Contact Area'),\n 'name' => 'contact_area',\n ]\n );\n\n $fieldset->addField(\n 'contact',\n 'text',\n [\n 'label' => __('Contact 1'),\n 'name' => 'contact',\n ]\n );\n\n $fieldset->addField(\n 'contact_district',\n 'text',\n [\n 'label' => __('Contact 1 District'),\n 'name' => 'contact_district',\n ]\n );\n\n $fieldset->addField(\n 'phone',\n 'text',\n [\n 'label' => __('Contact Phone 1'),\n 'name' => 'phone',\n ]\n );\n\n $fieldset->addField(\n 'email',\n 'text',\n [\n 'label' => __('Contact Email 1'),\n 'name' => 'email',\n ]\n );\n\n $fieldset->addField(\n 'contact_two',\n 'text',\n [\n 'label' => __('Contact 2'),\n 'name' => 'contact_two',\n ]\n );\n\n $fieldset->addField(\n 'contact_district_two',\n 'text',\n [\n 'label' => __('Contact 2 District'),\n 'name' => 'contact_district_two',\n ]\n );\n\n $fieldset->addField(\n 'contact_phone_two',\n 'text',\n [\n 'label' => __('Contact Phone 2'),\n 'name' => 'contact_phone_two',\n ]\n );\n\n $fieldset->addField(\n 'contact_email_two',\n 'text',\n [\n 'label' => __('Contact Email 2'),\n 'name' => 'contact_email_two',\n ]\n );\n\n $fieldset->addField(\n 'toll_free_phone',\n 'text',\n [\n 'label' => __('Toll-Free Phone'),\n 'name' => 'toll_free_phone',\n ]\n );\n\n $fieldset->addField(\n 'office_phone',\n 'text',\n [\n 'label' => __('Office Phone'),\n 'name' => 'office_phone',\n ]\n );\n\n $fieldset->addField(\n 'fax',\n 'text',\n [\n 'label' => __('Fax'),\n 'name' => 'fax',\n ]\n );\n\n $fieldset->addField(\n 'website',\n 'text',\n [\n 'label' => __('Distributor Website'),\n 'name' => 'website',\n ]\n );\n\n// $fieldset->addField(\n// 'sales_zip_code',\n// 'text',\n// [\n// 'label' => __('Sales Zip Codes'),\n// 'name' => 'sales_zip_code',\n// ]\n// );\n\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'required' => true,\n 'name' => 'status',\n 'values' => ['1' => 'Enabled', '0' => 'Disabled'],\n ]\n );\n\n $fieldset->addField(\n 'show_schedule',\n 'select',\n [\n 'label' => __('Show Schedule'),\n 'required' => false,\n 'name' => 'show_schedule',\n 'values' => $yesno,\n ]\n );\n\n $fieldset->addField(\n 'position',\n 'text',\n [\n 'class' => 'validate-number',\n 'label' => __('Position'),\n 'required' => false,\n 'name' => 'position',\n ]\n );\n\n $form->setValues($model->getData());\n $form->addValues(['id' => $model->getId()]);\n $this->setForm($form);\n //return parent::_prepareForm();\n }", "title": "" }, { "docid": "8ff0427ccd5290f88e91e73b3b7ed5f4", "score": "0.6013635", "text": "protected function _prepareForm()\n {\n $model = $this->getModel();\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('oauth')->__('Consumer Information'), 'class' => 'fieldset-wide'\n ));\n\n if ($model->getId()) {\n $fieldset->addField('id', 'hidden', array('name' => 'id', 'value' => $model->getId()));\n }\n $fieldset->addField('name', 'text', array(\n 'name' => 'name',\n 'label' => Mage::helper('oauth')->__('Name'),\n 'title' => Mage::helper('oauth')->__('Name'),\n 'required' => true,\n 'value' => $model->getName(),\n ));\n\n $fieldset->addField('key', 'text', array(\n 'name' => 'key',\n 'label' => Mage::helper('oauth')->__('Key'),\n 'title' => Mage::helper('oauth')->__('Key'),\n 'disabled' => true,\n 'required' => true,\n 'value' => $model->getKey(),\n ));\n\n $fieldset->addField('secret', 'text', array(\n 'name' => 'secret',\n 'label' => Mage::helper('oauth')->__('Secret'),\n 'title' => Mage::helper('oauth')->__('Secret'),\n 'disabled' => true,\n 'required' => true,\n 'value' => $model->getSecret(),\n ));\n\n $fieldset->addField('callback_url', 'text', array(\n 'name' => 'callback_url',\n 'label' => Mage::helper('oauth')->__('Callback URL'),\n 'title' => Mage::helper('oauth')->__('Callback URL'),\n 'required' => false,\n 'value' => $model->getCallbackUrl(),\n 'class' => 'validate-url',\n ));\n\n $fieldset->addField('rejected_callback_url', 'text', array(\n 'name' => 'rejected_callback_url',\n 'label' => Mage::helper('oauth')->__('Rejected Callback URL'),\n 'title' => Mage::helper('oauth')->__('Rejected Callback URL'),\n 'required' => false,\n 'value' => $model->getRejectedCallbackUrl(),\n 'class' => 'validate-url',\n ));\n\n $fieldset->addField('current_password', 'obscure',\n array(\n 'name' => 'current_password',\n 'label' => Mage::helper('oauth')->__('Current Admin Password'),\n 'title' => Mage::helper('oauth')->__('Current Admin Password'),\n 'required' => true\n )\n );\n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "b925276b52861c4bb9720d1e13ed6bee", "score": "0.6005686", "text": "protected function _prepareForm(Bel_Forms_Builder $form)\r\n\t{}", "title": "" }, { "docid": "88664ccbf2e99ad35ee0470b8edc9887", "score": "0.5971582", "text": "protected function _prepareForm()\n {\n $model = Mage::registry('current_message');\n\n if ($model->getStatus() == Mage_XmlConnect_Model_Queue::STATUS_IN_QUEUE) {\n $this->_fieldsEnabled = true;\n } else {\n $this->_fieldsEnabled = false;\n }\n\n parent::_prepareForm();\n\n if (null !== Mage::registry('current_template')) {\n $templateModel = Mage::registry('current_template');\n } else {\n $templateModel = Mage::getModel('xmlconnect/template')->load($model->getTemplateId());\n }\n\n $fieldset = $this->getForm()->addFieldset(\n \"message_settings\", array('legend' => $this->__('Message Settings')), '^'\n );\n\n if ($model->getId()) {\n $fieldset->addField('message_id', 'hidden', array('name' => 'message_id'));\n }\n\n // set exec_time for showing accordingly to locale datetime settings\n $model->setExecTime(Mage::getSingleton('core/date')->date(null, $model->getExecTime()));\n\n /** @var $sovereignField Varien_Data_Form_Element_Abstract */\n $sovereignField = $fieldset->addField('type', 'select', array(\n 'name' => 'type',\n 'values' => Mage::helper('xmlconnect')->getMessageTypeOptions(),\n 'label' => $this->__('Message Type'),\n 'title' => $this->__('Message Type'),\n 'disabled' => !$this->_fieldsEnabled,\n 'required' => true,\n ));\n\n $fieldset->addField('exec_time', 'date', array(\n 'name' => 'exec_time',\n 'format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),\n 'label' => $this->__('Start Date'),\n 'time' => true,\n 'title' => $this->__('Start Date'),\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'note' => $this->__('If leave this field empty, the message will be sent immediately'),\n 'disabled' => !$this->_fieldsEnabled,\n 'required' => false,\n ));\n\n $this->_addElementTypes($fieldset);\n\n // field dependencies\n if (isset($this->_dependentFields['message_title']) || isset($this->_dependentFields['content'])) {\n $dependenceBlock = $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence');\n\n $dependenceBlock->addFieldMap(\n $this->_dependentFields['message_title']->getHtmlId(),\n $this->_dependentFields['message_title']->getName()\n )\n ->addFieldMap(\n $this->_dependentFields['content']->getHtmlId(),\n $this->_dependentFields['content']->getName()\n )\n ->addFieldMap(\n $sovereignField->getHtmlId(),\n $sovereignField->getName()\n );\n\n if (!empty($this->_dependentFields['message_title'])) {\n $dependenceBlock->addFieldDependence(\n $this->_dependentFields['message_title']->getName(),\n $sovereignField->getName(),\n Mage_XmlConnect_Model_Queue::MESSAGE_TYPE_AIRMAIL\n );\n\n if (!$this->_fieldsEnabled) {\n $this->_dependentFields['message_title']->setReadonly(true, true);\n }\n }\n\n if (!empty($this->_dependentFields['content'])) {\n $dependenceBlock->addFieldDependence(\n $this->_dependentFields['content']->getName(),\n $sovereignField->getName(),\n Mage_XmlConnect_Model_Queue::MESSAGE_TYPE_AIRMAIL\n );\n\n if (!$this->_fieldsEnabled) {\n $this->_dependentFields['content']->setReadonly(true, true);\n }\n }\n $this->setChild('form_after', $dependenceBlock);\n }\n\n if (!$model->getName()) {\n $model->setName($templateModel->getName());\n }\n if (!$model->getPushTitle()) {\n $model->setPushTitle($templateModel->getPushTitle());\n }\n if (!$model->getMessageTitle()) {\n $model->setMessageTitle($templateModel->getMessageTitle());\n }\n if (!$model->getContent()) {\n $model->setContent($templateModel->getContent());\n }\n if (!$model->getTemplateId()) {\n $model->setTemplateId($templateModel->getId());\n }\n if (!$model->getApplicationId()) {\n $model->setApplicationId($templateModel->getApplicationId());\n }\n $model->setMessageId($model->getId());\n\n $this->getForm()->setAction($this->getUrl('*/*/saveMessage'));\n $this->getForm()->setValues($model->getData());\n\n $this->setForm($this->getForm());\n }", "title": "" }, { "docid": "3c534535f71a2611a947e87546348a3a", "score": "0.59682655", "text": "function analyse_analyse_widget_content_type_edit_form(&$form, &$form_state) {\n // provide a blank form so we have a place to have context setting.\n}", "title": "" }, { "docid": "e523f78b8216a7902184d53fa0d47bb2", "score": "0.59672445", "text": "public function catalog_product_attribute_edit_prepare_form(Varien_Event_Observer $observer)\n {\n\n /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */\n $attribute = $observer->getEvent()->getAttribute();\n /** @var $form Varien_Data_Form */\n $form = $observer->getEvent()->getForm();\n $fieldset = $form->addFieldset('elasticgento',\n array('legend' => Mage::helper('elasticgento')->__('Elasticgento'))\n );\n\n $fieldset->addField(\n 'search_weight',\n 'text', array(\n 'name' => 'search_weight',\n 'value' => '0',\n 'label' => Mage::helper('elasticgento')->__('Search Weight'),\n ));\n if ($attribute->getAttributeCode() == 'name') {\n $form->getElement('is_searchable')->setDisabled(1);\n };\n }", "title": "" }, { "docid": "1bfd16f85bd2996ff729a70ac86aa8e7", "score": "0.59483737", "text": "protected function _prepareForm()\n {\n $model = $this->_coreRegistry->registry('current_bsc_drugtest_items');\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('item_');\n $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Drug Test Information')]);\n if ($model->getId()) {\n $fieldset->addField('drugtest_id', 'hidden', ['name' => 'drugtest_id']);\n }\n $fieldset->addField(\n 'product',\n 'text',\n ['name' => 'product', 'label' => __('Product'), 'title' => __('Product'), 'required' => true]\n );\n $fieldset->addField(\n 'product_sku',\n 'text',\n ['name' => 'product_sku', 'label' => __('Product SKU'), 'title' => __('Product SKU'), 'required' => true]\n );\n $fieldset->addField(\n 'flavour',\n 'text',\n ['name' => 'flavour', 'label' => __('Flavour'), 'title' => __('Flavour'), 'required' => true]\n );\n $fieldset->addField(\n 'batch',\n 'text',\n ['name' => 'batch', 'label' => __('Batch'), 'title' => __('Batch'), 'required' => true]\n );\n\n $fieldset->addField(\n 'expiry',\n 'date',\n ['name' => 'expiry', 'date_format' => 'dd-MM-yyyy', 'label' => __('Expiry/BB'), 'title' => __('Expiry/BB'), 'required' => true]\n );\n $fieldset->addField(\n 'certificate_date',\n 'date',\n ['name' => 'certificate_date', 'date_format' => 'dd-MM-yyyy', 'label' => __('Certificate Date'), 'title' => __('Certificate Date'), 'required' => true]\n );\n\n $fieldset->addField(\n 'certify_by',\n 'select', array(\n 'name' => 'certify_by',\n 'label' => __('Certify By'),\n 'title' => __('Certify By'),\n 'required' => true,\n 'values' => array('-1' => 'Please Select..', 'Hasta Certified Product' => 'Hasta Certified Product', 'Hasta - Single Batch Certification' => 'Hasta - Single Batch Certification', 'Informed Sport Certified Product' => 'Informed Sport Certified Product', 'Informed Sport - Single Batch Certification' => 'Informed Sport - Single Batch Certification'),\n 'tabindex' => 1\n ));\n\n $fieldset->addField(\n 'testing_schedule',\n 'select', array(\n 'name' => 'testing_schedule',\n 'label' => __('Testing Schedule'),\n 'title' => __('Testing Schedule'),\n 'required' => true,\n 'values' => array('-1' => 'Please Select..', 'Every Batch Is Tested Under This Program Prior To Release' => 'Every Batch Is Tested Under This Program Prior To Release', 'This Batch Was Selected For Testing By Bsc' => 'This Batch Was Selected For Testing By Bsc'),\n 'tabindex' => 1\n ));\n\n $fieldset->addField(\n 'image',\n 'file',\n [\n 'name' => 'image',\n 'label' => __('Drug Test File:(pdf, doc)'),\n 'title' => __('Drug Test File'),\n 'required' => true\n ]\n );\n\n $fieldset->addField(\n 'status',\n 'select',\n ['name' => 'status', 'label' => __('Status'), 'title' => __('Status'), 'options' => [0 => 'Disable', 1 => 'Enable'], 'required' => true]\n );\n\n $form->setValues($model->getData());\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "0385af75298aa125190e68086bbf7b92", "score": "0.5887027", "text": "function onContentPrepareForm($form, $data){\n\t\tif($form->getName()=='com_menus.item'){\n\t\t\tJForm::addFormPath(YT_INCLUDES_PATH.J_SEPARATOR.'libs'.J_SEPARATOR.'menu'.J_SEPARATOR.'params');\n\t\t\t$form->loadFile('params', false);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e80b5dab06ffa3c14c83fcdc879c149d", "score": "0.58478546", "text": "function mumm_meta_tags_setting_form($form, &$form_state) {\n $form = array();\n\n $settings_language = mumm_helpers_get_settings_language();\n $list_meta = variable_get('list_meta', array());\n\n if (!$form_state['rebuild']) {\n mummm_helpers_set_language_warning_message($settings_language);\n }\n\n $settings_links = mumm_helpers_settings_language_switcher();\n $form['settings_links'] = array(\n '#markup' => $settings_links\n );\n $form['lang'] = array(\n '#type' => 'hidden',\n '#value' => $settings_language,\n );\n\n $category = category_list_metatags();\n foreach ($category as $key => $item) {\n $form['group_meta_' . $key] = array(\n '#type' => 'fieldset',\n '#title' => $item,\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n );\n\n $form['group_meta_' . $key]['meta_title_' . $key] = array(\n '#type' => 'textfield',\n '#title' => t('Title'),\n '#default_value' => isset($list_meta[$settings_language]['title_' . $key]) ? $list_meta[$settings_language]['title_' . $key] : '',\n '#description' => t(\"Meta title\"),\n );\n\n $form['group_meta_' . $key]['meta_description_' . $key] = array(\n '#type' => 'textarea',\n '#title' => t('Description'),\n '#default_value' => isset($list_meta[$settings_language]['desc_' . $key]) ? $list_meta[$settings_language]['desc_' . $key] : '',\n '#description' => t(\"Meta description\"),\n );\n }\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration')\n );\n return $form;\n}", "title": "" }, { "docid": "5f7733aa34e00ec31e9a958653eca22b", "score": "0.5799518", "text": "public function testUpdateMetaform()\n {\n }", "title": "" }, { "docid": "125235e7053a63ff29cd21ebd202702d", "score": "0.57486105", "text": "protected function _prepareForm()\n {\n $isEditable = ($this->getCanEditShapeRule() !== false) ? true : false;\n $form = new Varien_Data_Form();\n $model = Mage::registry('current_shape_rule');\n\n $fieldset = $form->addFieldset('base_fieldset', array(\n 'legend' => Mage::helper('faonni_shape')->__('General Information'),\n ));\n\n if ($model->getId()) {\n $fieldset->addField('rule_id', 'hidden', array(\n 'name' => 'rule_id',\n ));\n }\n\n $fieldset->addField('rule_name', 'text', array(\n 'name' => 'rule_name',\n 'label' => Mage::helper('faonni_shape')->__('Rule Name'),\n 'required' => true,\n ));\n\n $fieldset->addField('rule_description', 'textarea', array(\n 'name' => 'rule_description',\n 'label' => Mage::helper('faonni_shape')->__('Description'),\n 'style' => 'height: 100px;',\n ));\n\n $fieldset->addField('is_active', 'select', array(\n 'label' => Mage::helper('faonni_shape')->__('Status'),\n 'name' => 'is_active',\n 'required' => true,\n 'options' => array(\n '1' => Mage::helper('faonni_shape')->__('Active'),\n '0' => Mage::helper('faonni_shape')->__('Inactive'),\n ),\n ));\n\n if (!$model->getId()) {\n $model->setData('is_active', '1');\n }\n\n $form->setValues($model->getData());\n $this->setForm($form);\n\n if (!$isEditable) {\n $this->getForm()->setReadonly(true, true);\n }\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "ee4fbf706e99da2e7889884c1bec9ed6", "score": "0.56851876", "text": "private function initForm()\n {\n /**\n * this way you can show certain values to customers as selected\n */\n $this->fields_value['type_1'] = true;\n $this->fields_value['type_3'] = true;\n\n $this->fields_form = array(\n 'legend' => array(\n 'title' => $this->module->l('Article'),\n 'icon' => 'icon-info-sign',\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->module->l('Name'),\n 'name' => 'name',\n 'lang' => true,\n 'required' => true,\n 'col' => '4',\n 'hint' => $this->trans('Your internal name for this attribute.', array(), 'Admin.Catalog.Help') . '&nbsp;' . $this->trans('Invalid characters:', array(), 'Admin.Notifications.Info') . ' <>;=#{}',\n ),\n array(\n 'type' => 'textarea',\n 'label' => $this->module->l('Description'),\n 'name' => 'description',\n 'lang' => true,\n 'required' => true,\n 'col' => '4',\n 'hint' => $this->trans('Your internal name for this attribute.', array(), 'Admin.Catalog.Help') . '&nbsp;' . $this->trans('Invalid characters:', array(), 'Admin.Notifications.Info') . ' <>;=#{}',\n ),\n array(\n 'type' => 'checkbox',\n 'label' => $this->module->l('Type'),\n 'name' => 'type',\n 'values' => array(\n 'query' => Group::getGroups($this->context->language->id),\n 'id' => 'id_group',\n 'name' => 'name',\n ),\n 'col' => '4',\n 'hint' => $this->trans('Your internal name for this attribute.', array(), 'Admin.Catalog.Help') . '&nbsp;' . $this->trans('Invalid characters:', array(), 'Admin.Notifications.Info') . ' <>;=#{}',\n ),\n ),\n 'submit' => array(\n 'title' => $this->trans('Save', array(), 'Admin.Actions'),\n )\n );\n }", "title": "" }, { "docid": "01726c7872e38f23a7c072881121fe16", "score": "0.5682972", "text": "public function init_form_fields()\n {\n //fileds for the modal form from the Zones window\n $this->instance_form_fields = array(\n\n 'title' => array(\n 'title' => __('Title', self::PLUGIN_LANG),\n 'type' => 'text',\n 'description' => __('Title to be display on site', self::PLUGIN_LANG),\n 'default' => __('Shipping by Location ', self::PLUGIN_LANG)\n ),\n\n 'cost' => array(\n 'title' => __('Minimum Cost (2 km)', self::PLUGIN_LANG),\n 'type' => 'number',\n 'description' => __('Minimum Cost of shipping', self::PLUGIN_LANG),\n 'default' => 2\n ),\n\n );\n\n //$this->form_fields - use this with the same array as above for setting fields for separate settings page\n }", "title": "" }, { "docid": "840dc7f490ca1defbb9774afda066b0d", "score": "0.56720996", "text": "private function PageForm() {\n\tif (is_null($this->oForm)) {\n\t $oPathIn = fcApp::Me()->GetKioskObject()->GetInputObject();\n\n\t $oForm = new fcForm_DB($this);\n\t \n\t $oField = new fcFormField_Num($oForm,'ID_Place');\n\t\t$oCtrl = new fcFormControl_HTML_DropDown($oField,array());\n\t\t// TODO: maybe this should be doAll *only* for read-only mode?\n\t\t// Do we want to show inactive Places? Current policy: only if we're already in one, and not a new record\n\t\t$doAll = $this->IsNew() ? FALSE : (!$this->HasActivePlace());\n\t\t$oCtrl->SetRecords($this->PlaceTable()->SelectRecords_forDropDown(!$doAll));\n\t\t// TODO: change 'id-place' to action constant\n\t\t$idPlace = $oPathIn->GetInt('id-place');\n\t\tif (!is_null($idPlace)) {\n\t\t $oCtrl->Editable(FALSE);\n\t\t $oField->SetValue($idPlace,TRUE);\n\t\t}\n\t\t\n\t $oField = new fcFormField_Text($oForm,'Code');\n\t\t$oCtrl = new fcFormControl_HTML($oField,array('size'=>8));\n\t\t\n\t $oField = new fcFormField_Text($oForm,'Descr');\n\t\t$oCtrl = new fcFormControl_HTML($oField,array('size'=>30));\n\t\t\n\t \n\t if (!$this->IsNew()) {\n\t\t $oField = new fcFormField_Time($oForm,'WhenCreated');\n\t\t $oCtrl = new fcFormControl_HTML_Timestamp($oField,array());\n\t\t $oCtrl->Editable(FALSE);\n\t\t \n\t\t $oField = new fcFormField_Time($oForm,'WhenEdited');\n\t\t $oCtrl = new fcFormControl_HTML_Timestamp($oField,array());\n\t\t $oCtrl->Editable(FALSE);\n\t\t \n\t\t $oField = new fcFormField_Time($oForm,'WhenVoided');\n\t\t //$oCtrl = new fcFormControl_HTML_Timestamp($oField,array());\n\t\t \n\t\t $oField = new fcFormField_Time($oForm,'WhenCounted');\n\t\t //$oCtrl = new fcFormControl_HTML_Timestamp($oField,array());\n\t\t \n\t\t $oField = new fcFormField_Time($oForm,'WhenTainted');\n\t\t //$oCtrl = new fcFormControl_HTML_Timestamp($oField,array());\n\t }\n\t\t\n\t $oField = new fcFormField_Bit($oForm,'isForSale');\n\t\t$oCtrl = new fcFormControl_HTML_CheckBox($oField,array());\n\t\t\n\t $oField = new fcFormField_Bit($oForm,'isForShip');\n\t\t$oCtrl = new fcFormControl_HTML_CheckBox($oField,array());\n\t\t\n\t $oField = new fcFormField_Bit($oForm,'isEnabled');\n\t\t$oCtrl = new fcFormControl_HTML_CheckBox($oField,array());\n\t\t\n\t $oField = new fcFormField_Text($oForm,'Notes');\n\t\t$oCtrl = new fcFormControl_HTML_TextArea($oField,array('rows'=>3,'cols'=>60));\n\n\t $this->oForm = $oForm;\n\t}\n\treturn $this->oForm;\n }", "title": "" }, { "docid": "dca2093e7632f27bee365af470e4523a", "score": "0.5657057", "text": "abstract protected function get_module_form();", "title": "" }, { "docid": "82c4cffa45e2bd2040a6e0375eeb3f14", "score": "0.56559765", "text": "function prepareTabs()\n {\n $this->addElement(\n 'html', \n ResourceManager::getInstance()->get_resource_html(\n Path::getInstance()->getJavascriptPath(\n 'Chamilo\\Core\\Repository\\ContentObject\\Survey\\Page\\Question\\Select', \n true) . 'Form.js'));\n \n $this->getTabsGenerator()->add_tab(\n new DynamicFormTab(\n self::TAB_QUESTION, \n Translation::get(\n (string) StringUtilities::getInstance()->createString(self::TAB_QUESTION)->upperCamelize()), \n Theme::getInstance()->getImagePath(\n 'Chamilo\\Core\\Repository\\ContentObject\\Survey\\Page\\Question\\Select', \n 'Tab/' . self::TAB_QUESTION), \n 'build_question_form'));\n \n $this->getTabsGenerator()->add_tab(\n new DynamicFormTab(\n self::TAB_OPTION, \n Translation::get(\n (string) StringUtilities::getInstance()->createString(self::TAB_OPTION)->upperCamelize()), \n Theme::getInstance()->getImagePath(\n 'Chamilo\\Core\\Repository\\ContentObject\\Survey\\Page\\Question\\Select', \n 'Tab/' . self::TAB_OPTION), \n 'build_option_form'));\n \n $this->addDefaultTab();\n $this->addMetadataTabs();\n }", "title": "" }, { "docid": "d7c992a2f222db25e1220c43d71daca3", "score": "0.5596919", "text": "public function runBeforeFormOutput( &$form )\n\t{\n\n\t}", "title": "" }, { "docid": "c1e056fcd9b6fc160c78c354c0599c90", "score": "0.5556271", "text": "public function processBeforeRender()\n {\n //\n // override this method if you need to auto-calculate\n // any field values before the form is rendered\n }", "title": "" }, { "docid": "de5ee5f09e4a54391896ad1396388065", "score": "0.55502516", "text": "abstract protected function initInternalForms(): void;", "title": "" }, { "docid": "3277035946d8bebb782afa98322d6be8", "score": "0.5502589", "text": "abstract protected function view_generateFormContent();", "title": "" }, { "docid": "12f87abe88b307cb468164b781aad011", "score": "0.5495137", "text": "public function onContentPrepareForm($form, $data)\r\n {\r\n if ($form->getName() == 'com_config.component' && JFactory::getApplication()->input->get('component') == 'com_content') {\r\n JForm::addFormPath(JPATH_PLUGINS . '/system/remove_article_id/');\r\n $form->loadFile('contentconfig', false);\r\n }\r\n }", "title": "" }, { "docid": "288aaa12ba56066a3d0d6c7890c63cd8", "score": "0.5481756", "text": "private function __setMetaFields()\r\n { \r\n // Only execute if there are no manually defined meta fields\r\n if (empty($this->meta_fields->getAll())) {\r\n\r\n $function = $this->getCallback();\r\n $args = array($this->data, new \\WP_Post(new \\stdClass), $this);\r\n $names = Bebop::util('getControlNamesFromCallable', $function, $args);\r\n\r\n if ($names)\r\n $this->meta_fields->pushList($names);\r\n }\r\n }", "title": "" }, { "docid": "81d73a064a33589598b231d0968cfd9f", "score": "0.5451811", "text": "function processForm()\r\n\t{\r\n\t\t\t\r\n\t\t$this->mc->database->query(\"UPDATE \" . $this->mc->config['database_pref'] . \"revisions SET revision_active = max_revision + 1, max_revision = max_revision + 1\");\r\n\t\t$maximumRevisionIdQuery = $this->mc->database->query(\"SELECT max_revision FROM \" . $this->mc->config['database_pref'] . \"revisions\");\r\n\t\t$this->mc->config['current_revision'] = $maximumRevisionIdQuery->rows[0]->max_revision;\r\n\t\t\t\r\n\t\t/*\r\n\t\t===========\r\n\t\tinsert mode\r\n\t\t===========\r\n\t\t*/\r\n\t\tif($this->tabBarId < 0)\r\n\t\t{\r\n\t\t\t// get new tabbar-id\r\n\t\t\t$maximumTabBarIdQuery = $this->mc->database->query(\"SELECT MAX(tabbar_id) AS max_id FROM \" . $this->mc->config['database_pref'] . \"tabbars\", array());\r\n\t\t\t$maximumTabBarId = $maximumTabBarIdQuery->rows[0]->max_id + 1;\r\n\t\t\t\r\n\t\t\t$this->tabBarId = $maximumTabBarId;\r\n\t\t}\r\n\t\r\n\t\t/*\r\n\t\t=========\r\n\t\tedit mode\r\n\t\t=========\r\n\t\t*/\r\n\t\tif($this->tabBarId >= 0)\r\n\t\t{\r\n\t\t\t$this->cleanUpDirectory();\r\n\t\t\r\n\t\t\r\n\t\t\t// create entry in _tabbars\r\n\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"tabbars (tabbar_id, tabbar_name, revision) VALUES(?, ?, ?)\", array(array($this->tabBarId, \"i\"), array($_REQUEST['tabbar_name']), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t\r\n\t\t\t// now insert new tabs from POST form\r\n\t\t\t$dataIdCount = 1; // will hold the current tab-id for database\r\n\t\t\t$frontIdCount = 1; // counter for iterating over elements in frontent\r\n\t\t\t$defaultTab = 1; // iterate over all items first to find last default tab\r\n\t\t\t$maximumTabId = $_REQUEST['maximumtabid']; // the maximum frontend-tab-id (for iterating)\r\n\t\t\t\r\n\t\t\twhile($frontIdCount <= $maximumTabId)\r\n\t\t\t{\r\n\t\t\t\tif(isset($_REQUEST['tabbar_view_' . $frontIdCount]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabbarIconPath = pathinfo($_REQUEST['tabbar_icon_' . $frontIdCount]);\r\n\t\t\t\t\t$normalTabbarIcon = $tabbarIconPath[\"filename\"] . \".\" . $tabbarIconPath[\"extension\"];\r\n\t\t\t\t\t$retinaTabbarIcon = $tabbarIconPath[\"filename\"] . \"@2x.\" . $tabbarIconPath[\"extension\"];\r\n\t\t\t\t\t\r\n\t\t\t\t\t@copy('images/tabbar/' . $_REQUEST['tabbar_icon_' . $frontIdCount], $this->mc->config['upload_dir'] . '/root/tabbar/' . $normalTabbarIcon);\r\n\t\t\t\t\tif(file_exists('images/tabbar/' . $tabbarIconPath[\"dirname\"] . '/' . $retinaTabbarIcon))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t@copy('images/tabbar/' . $tabbarIconPath[\"dirname\"] . '/' . $retinaTabbarIcon, $this->mc->config['upload_dir'] . '/root/tabbar/' . $retinaTabbarIcon);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// insert record in database\r\n\t\t\t\t\t$this->mc->database->query(\"INSERT INTO \" . $this->mc->config['database_pref'] . \"tabs (tabbar_id, tab_id, tab_position, tab_view, tab_icon, revision) VALUES(?,?,?,?,?,?)\", array(array($this->tabBarId, \"i\"), array($dataIdCount, \"i\"), array($dataIdCount, \"i\"), array($_REQUEST['tabbar_view_' . $frontIdCount], \"i\") , array($normalTabbarIcon), array($this->mc->config['current_revision'], \"i\")));\r\n\t\t\t\t\t// check if this tab is set to default tab\r\n\t\t\t\t\tif(isset($_REQUEST['tabbar_view_default_' .$frontIdCount]) && $_REQUEST['tabbar_view_default_' .$frontIdCount] == 'front')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$defaultTab = $dataIdCount;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// increment ID\r\n\t\t\t\t\t$dataIdCount++;\r\n\t\t\t\t}\r\n\t\t\t\t// increment ID\r\n\t\t\t\t$frontIdCount++;\r\n\t\t\t}\r\n\t\t\t// update default tab\r\n\t\t\t$this->mc->database->query(\"UPDATE \". $this->mc->config['database_pref'] . \"tabs SET tab_default = 1 WHERE tabbar_id = ? AND tab_id = ?\", array(array($this->tabBarId, \"i\"), array($defaultTab, \"i\")), array(array(\"tabs\", \"tabbar_id\", \"tab_id\")));\r\n\t\t\t\r\n\t\t\t// check if tabbar is currently active\r\n\t\t\t// (at least one active view that initialises the tabbar)\r\n\t\t\t$tabbarIsActive = false;\r\n\t\t\t\t\r\n\t\t\t// first check all views that are initialised with the old tabbar\r\n\t\t\t$viewTabbarQuery = $this->mc->database->query(\"SELECT view_id, view_start FROM \" . $this->mc->config['database_pref'] . \"views AS A WHERE view_tabbar = ?\", array(array($this->tabBarId, \"i\")), array(array(\"views\", \"view_id\")));\r\n\t\t\tforeach($viewTabbarQuery->rows as $currentViewTabbar)\r\n\t\t\t{\r\n\t\t\t\t// now check if this view is active (somehow accessible from the startpage)\r\n\t\t\t\t\t\r\n\t\t\t\t// case 1: this view is the startpage already\r\n\t\t\t\tif($currentViewTabbar->view_start == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tabbarIsActive = true; break;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t// case 2: not startpage, check for accessibility\r\n\t\t\t\t// now we need to check the _view_links table for parents\r\n\t\t\t\t// until we hit the root-element (start page)\r\n\t\t\t\t$tabbarIsActive = $this->checkForParentsPath($currentViewTabbar->view_id);\r\n\t\t\t\tif($tabbarIsActive)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$this->mc->database->query(\"UPDATE \" . $this->mc->config['database_pref'] . \"tabbars AS A SET tabbar_active = ? WHERE tabbar_id = ?\", array(array($tabbarIsActive?1:0, \"i\"), array($this->tabBarId, \"i\")), array(array(\"tabbars\", \"tabbar_id\")));\r\n\t\t}\r\n\t\t\r\n\t\t// re-create main xml file and refresh filelist\r\n\t\t$this->mc->filecreator->createGeneralFiles();\r\n\t\t$configSet = true;\r\n\t\tinclude_once('modules/filemanager.module.php');\r\n\t\t$fileManagerObj = new apdModuleFilemanager($this->mc);\r\n\t\t$fileManagerObj->refreshFilelist();\r\n\t\t\r\n\t\theader(\"Location: index.php?m=tabbar&view_id=\" . $this->tabBarId);\r\n\t}", "title": "" }, { "docid": "4ce1153e35da75cc4d78e1a7e51b0015", "score": "0.5441189", "text": "protected function _prepareForm()\n {\n $formName = \\Amasty\\Mostviewed\\Model\\Group::FORM_NAME;\n /** @var \\Amasty\\Mostviewed\\Model\\Group $model */\n $model = $this->_coreRegistry->registry(Edit::CURRENT_GROUP);\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n $form->setHtmlIdPrefix('group_same_as');\n\n /* start condition block*/\n $fieldset = $form->addFieldset(\n 'conditions_fieldset',\n ['legend' => __('Conditions')]\n );\n $renderer = $this->rendererFieldset\n ->setTemplate('Amasty_Mostviewed::rule/condition/fieldset.phtml')\n ->setFieldSetId($model->getSameAsConditionsFieldSetId($formName))\n ->setComment('')\n ->setNewChildUrl(\n $this->getUrl(\n 'amasty_mostviewed/product_group/newConditionHtml/form/'\n . $model->getSameAsConditionsFieldSetId($formName),\n ['form_namespace' => $formName]\n )\n );\n\n $fieldset->setRenderer($renderer);\n\n $fieldset->addField(\n 'same_as_conditions',\n 'text',\n [\n 'name' => 'same_as_conditions',\n 'label' => __('Product \"Same As\" Condition'),\n 'title' => __('Product \"Same As\" Condition'),\n 'required' => true,\n 'data-form-part' => $formName\n ]\n )\n ->setRule($model)\n ->setRenderer($this->conditions);\n\n $form->setValues($model->getData());\n $this->setConditionFormName(\n $model->getWhereConditions(),\n $formName,\n $model->getConditionsFieldSetId($formName)\n );\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "da27e1e7ccea46d93b4de3738b228987", "score": "0.5441069", "text": "public function renderForm()\n {\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('My Module configuration'),\n 'icon' => 'icon-envelope'\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable grades:'),\n 'name' => 'enable_grades',\n 'desc' => $this->l('Enable grades on products.'),\n 'values' => array(\n array(\n 'id' => 'enable_grades_1',\n 'value' => 1,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'enable_grades_0',\n 'value' => 0,\n 'label' => $this->l('Disabled'))\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable comments:'),\n 'name' => 'enable_comments',\n 'desc' => $this->l('Enable comments on products.'),\n 'values' => array(\n array(\n 'id' => 'enable_comments_1',\n 'value' => 1,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'enable_comments_0',\n 'value' => 0,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n )\n ),\n );\n $helper = new HelperForm();\n $helper->table = 'simplecomments';\n $helper->default_form_language = (int)Configuration::get('PS_LANG_DEFAULT');\n $helper->allow_employee_form_lang = (int)Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG');\n $helper->submit_action = 'simple_comments_form';\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false).'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array('fields_value' => array(\n 'enable_grades' => Tools::getValue(\n 'enable_grades',\n Configuration::get('SIMPLECOMMENTS_GRADES')\n ),\n 'enable_comments' => Tools::getValue(\n 'enable_comments',\n Configuration::get('SIMPLECOMMENTS_COMMENTS')\n ),\n ),\n 'languages' => $this->context->controller->getLanguages()\n );\n return $helper->generateForm(array($fields_form));\n }", "title": "" }, { "docid": "a5f35af2dd0040e3ae7195d4d5552858", "score": "0.5426783", "text": "protected function _predisplayForm(Bel_Forms_Builder $form)\r\n\t{}", "title": "" }, { "docid": "88c252cc6429d8c10323585f234a39ce", "score": "0.5415676", "text": "public function adminMenuPageBelowFormHtml()\n {\n }", "title": "" }, { "docid": "ccec3a1e25f0d7e2dcf1ce2070143fc8", "score": "0.5413905", "text": "function process_form(){\r\n}", "title": "" }, { "docid": "72ed857280faa905b9bfd525aac6ed14", "score": "0.5396807", "text": "protected function registerPageFormExtensions()\n {\n $hook_key = 'pages.form';\n $sidebar_hook_key = 'pages.sidebar.form';\n\n /**\n * Register hook for pages form sidebar - set template\n */\n \\Hook::registerFormHook($sidebar_hook_key, function ($record = [], $type) {\n $active_theme = ThemeView::getActiveTheme();\n\n return ThemeView::getAdminView('admin.themes.partials.pages.template_form', [\n 'templates' => array_pluck($active_theme->getTemplates(), 'name', 'slug'),\n 'selected_template' => get_meta_value(array_get($record, 'id'), 'page', 'template'),\n ]);\n });\n\n /**\n * Register hook for pages submit - save selected template\n */\n \\Hook::registerFormSubmit($hook_key, function ($request, $record) {\n /**\n * @var Request $request\n */\n $template = $request->get('template', '');\n set_meta_value(array_get($record, 'id'), 'page', 'template', $template);\n });\n }", "title": "" }, { "docid": "8d4587f36009c819d7e2f89f777ba6be", "score": "0.5391149", "text": "function hs_admin_block_form_alter(&$form, &$form_state, $form_id)\r\n{\r\n if ($form_id == 'block_admin_display_form') {\r\n _hs_admin_block_admin_form_alter($form, $form_state);\r\n }\r\n\r\n // Copy the actions bar on top for on all node edit pages\r\n $node_edit_form_suffix = '_node_form';\r\n if ($node_edit_form_suffix == substr($form_id, -strlen($node_edit_form_suffix))) {\r\n _hs_admin_block_node_form_alter($form, $form_state);\r\n }\r\n}", "title": "" }, { "docid": "cbe4bcdb61de8a4d10b853927192957f", "score": "0.53836185", "text": "function bibdk_news_carousel_settings_admin_form($form, &$form_state) {\n $form = array();\n\n $form['bibdk_news_carousel_settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Frontend settings'),\n );\n\n $form['bibdk_news_carousel_settings']['bibdk_news_carousel_tabs_position'] = array(\n '#title' => t('Position of navigational tabs'),\n '#type' => 'select',\n '#options' => array(\n 'bottom' => t(\"Bottom\"),\n ),\n '#default_value' => variable_get('bibdk_news_carousel_tabs_position', 'bottom'),\n '#required' => TRUE,\n '#description' => t('Select where you want the tabs for displaying the various searches to be placed in frontend.'),\n );\n\n $form['bibdk_news_carousel_settings']['bibdk_news_carousel_description_toggle'] = array(\n '#title' => t('Show descriptions for navigational tabs'),\n '#type' => 'checkbox',\n '#default_value' => variable_get('bibdk_news_carousel_description_toggle', 0),\n '#required' => FALSE,\n '#description' => t('Toggle whether descriptions of the various searches are displayed or not.'),\n );\n\n return system_settings_form($form);\n}", "title": "" }, { "docid": "44b634cdb0bbe57dcdb1ef584824d744", "score": "0.53765893", "text": "function _setFormDef(){\n\t\treturn parent::_setFormDef();\n\t}", "title": "" }, { "docid": "68249256cbb32e29fff3b4b906ca157d", "score": "0.53759664", "text": "public function alterForm() {\n $fid = $this->form['form_key']['#default_value'];\n $pieces = wf_crm_explode_key($fid);\n // Is this a crm component of a CiviCRM-enabled webform?\n if (!$this->data || !$pieces) {\n return;\n }\n list(, $i, $ent, $n, $table, $name) = $pieces;\n $this->field = wf_crm_aval(wf_crm_get_fields(), $table . '_' . $name);\n // Is this a crm field or fieldset?\n if (!$this->field && $table != 'fieldset') {\n return;\n }\n $this->form['#attached']['css'][] = drupal_get_path('module', 'webform_civicrm') . '/css/webform_civicrm_admin.css';\n\n if (empty($this->form['clone']['#value']) || $name == 'fieldset') {\n // Prevent users from editing the form_key and breaking things\n $this->form['form_key']['#disabled'] = TRUE;\n $this->form['form_key']['#value'] = $fid;\n $this->form['form_key']['#description'] = NULL;\n $this->form['form_key']['#attributes']['title'] = t('Automatically set for use by CiviCRM processing.');\n\n // Clone an entire contact when cloning their fieldset\n if (!empty($this->form['clone']['#value'])) {\n $this->form['actions']['submit']['#value'] = t('Clone Contact');\n $new = count($this->data['contact']) + 1;\n $this->form['form_key']['#value'] = implode('_', array('civicrm', $new, $ent, $n, $table, $name));\n $this->form['name']['#default_value'] = wf_crm_contact_label($new, array(), 'plain');\n ++$this->form['position']['weight']['#default_value'];\n array_unshift($this->form['#submit'], 'wf_crm_contact_clone');\n if (empty($this->form_state['input'])) {\n drupal_set_message(t('Press the button below to clone this contact. A new CiviCRM contact will be added to the form with all the settings for !contact. All fields from within this fieldset will be cloned (be careful, that may include non-contact fields).', array('!contact' => wf_crm_contact_label($i, $this->data))), 'status', FALSE);\n }\n }\n }\n elseif (empty($this->form_state['input'])) {\n // Clone a single CiviCRM field\n drupal_set_message(t('You are cloning a CiviCRM component. Refer to the Webform CiviCRM instructions for how to set the key if you want the new field to be processed by CiviCRM. You can also clone an entire contact by clicking the clone button by their fieldset.'), 'status', FALSE);\n }\n\n // Show dropdown list of states\n if ($table === 'address' && $name === 'state_province_id') {\n $this->form['validation']['maxlength']['#type'] = 'hidden';\n $this->form['validation']['maxlength']['#value'] = 5;\n $this->form['value']['#type'] = 'select';\n unset($this->form['value']['#size'], $this->form['value']['#maxlength'], $this->form['value']['#description']);\n $this->form['value']['#options'] = wf_crm_get_states();\n $this->form['value']['#empty_value'] = '';\n }\n\n elseif ($name == 'contribution_page_id') {\n $this->form['value']['#access'] = FALSE;\n $this->form['#prefix'] = '<p>' . t('This is a placeholder for a Contribution Page.') . '</p>';\n }\n\n // Interface for managing options\n elseif (($this->component['type'] === 'hidden' || $this->component['type'] === 'select')) {\n $this->hasOptionsTable = $this->buildOptionsTable();\n }\n\n // Customize options_element a bit\n if (!$this->hasOptionsTable && $this->component['type'] === 'select') {\n $this->alterOptionsElement();\n }\n\n // Money fields\n if (!$this->hasOptionsTable && wf_crm_aval($this->field, 'data_type') == 'Money') {\n $this->moneyOptions();\n }\n\n // Simplify form for hidden fields\n elseif (($name === 'contact_id' || $name === 'external_identifier') && $this->component['type'] === 'hidden') {\n $this->form['value']['#value'] = '';\n $this->form['value']['#access'] = FALSE;\n $this->form['#prefix'] = '<p>'\n . t('There are no configuration options for this hidden field. You can use it for post processing, for example to include a link to the CiviCRM contact in an email.')\n . '</p><p>'\n . t('The webform token for this field is:')\n . '<br /><strong>' . $this->componentToken($this->form['cid']['#value'])\n . '</strong><br /><em>'\n . t('Note: this token will change if you move the field in or out of a fieldset.')\n . '</em></p>';\n }\n // Customize form for checksum element\n elseif ($name == 'cs') {\n $this->form['value']['#title'] = t('Checksum Lifespan');\n $this->form['value']['#required'] = TRUE;\n $this->form['value']['#type'] = 'textfield';\n $this->form['value']['#description'] = t('Enter the number of days for which this checksum will be valid. Enter 0 to never expire.');\n $this->form['#validate'][] = 'wf_crm_cs_validate';\n $enabled = wf_crm_enabled_fields($this->node);\n $this->form['#prefix'] = '<p>'\n . t('This field will generate a checksum for !contact after the form is submitted. You could use its webform token to create a personalized link for anonymous users.', array('!contact' => wf_crm_contact_label($i, $this->data)))\n . '</p><p>';\n if ($cid_field = wf_crm_aval($enabled, 'civicrm_' . $i . '_contact_1_contact_contact_id')) {\n $this->form['#prefix'] .= t('Example: to link users back to this form, place this line in a webform-generated email:')\n . '<br /><code>'\n . url('node/' . $this->node->nid, array('absolute' => TRUE)) . '?cid' . $i . '=';\n $this->form['#prefix'] .= $this->componentToken($cid_field)\n . '&amp;cs' . $i . '=' . $this->componentToken($this->form['cid']['#value'])\n . '</code></p>';\n $this->form['#prefix'] .= '<p>' . t('Example: to redirect to a contribution page, paste this into the redirect field on the Webform \"Form Settings\" tab (change id from 1 to the real id of your contribution page):')\n . '<br /><code>'\n . 'civicrm/contribute/transact?reset=1&amp;id=1'\n . '&amp;cid=' . $this->componentToken($cid_field)\n . '&amp;cs=' . $this->componentToken($this->form['cid']['#value'])\n . '</code></p>';\n }\n else {\n $this->form['#prefix'] .= t('Consider enabling the hidden contact_id field - hashed links usually require this value.') . '</p>';\n }\n }\n // Alter weights for contact component\n if ($this->form['type']['#value'] == 'civicrm_contact') {\n $this->form['display']['#weight'] = -1;\n }\n // Allow widget to be altered, unless it's a contact or file\n elseif ($this->field && !in_array($this->field['type'], array('civicrm_contact', 'file')) && empty($_GET['type'])) {\n $widgets = array();\n foreach (webform_components() as $k => $v) {\n if ($k !== 'civicrm_contact' && $k !== 'pagebreak' && $k !== 'markup' && empty($v['features']['group'])) {\n $widgets[$k] = $v['label'];\n }\n }\n if ($this->form['type']['#value'] == 'textfield' && $table === 'address') {\n if ($name === 'state_province_id' || $name === 'county_id') {\n $widgets['textfield'] = t('Textfield / AJAX Select');\n }\n }\n $this->form['widget'] = array(\n '#type' => 'fieldset',\n '#title' => t('Widget: %type', array('%type' => wf_crm_aval($widgets, $this->form['type']['#value'], t('Unknown')))),\n '#description' => t('The default widget for this %type field is %widget. You may change it if you wish - for example, a hidden field allows you to set the value without exposing this field to the form.<br />Note: Not all widgets may be compatible with this CiviCRM field - test your form after changing widgets.', array('%type' => str_replace('#', '', $this->field['name']), '%widget' => wf_crm_aval($widgets, $this->field['type'], t('Disabled')))),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n $this->form['widget']['type'] = array(\n '#type' => 'select',\n '#options' => $widgets,\n '#default_value' => $this->form['type']['#value'],\n );\n $this->form['widget']['change_widget'] = array(\n '#type' => 'submit',\n '#value' => t('Change Widget'),\n '#submit' => array('webform_component_edit_form_submit', 'wf_crm_change_widget'),\n '#states' => array(\n 'invisible' => array(\n 'select[name=\"widget[type]\"]' => array('value' => $this->form['type']['#value']),\n ),\n 'disabled' => array(\n 'select[name=\"widget[type]\"]' => array('value' => $this->form['type']['#value']),\n ),\n )\n );\n }\n }", "title": "" }, { "docid": "3cc1feb228a5a902252bb49bbc0d9c3e", "score": "0.5369867", "text": "protected function _pre_render() {\n\t\t\n\t\tparent::_pre_render();\n\t\t\n\t\t// Tab Index\n\t\tif ( $this->form instanceof Halp_Form && true == $this->form->tab_indexes_enabled() ) {\n\t\t\t$last_tab_index = $this->form->get_last_tab_index();\n\t\t\t$current_tab_index = $last_tab_index + 1;\n\t\t\t$this->attributes['tabindex'] = $current_tab_index;\n\t\t\t$this->form->set_last_tab_index( $current_tab_index );\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "3dad67f2c6d249968783118e6527fe92", "score": "0.53632236", "text": "function setFormInfo($t) { $this->_formInfo = $t; }", "title": "" }, { "docid": "ea778b5318250c094aab332b3ed71d1e", "score": "0.53583556", "text": "function options_form(&$form, &$form_state) {\n parent::options_form($form, $form_state);\n }", "title": "" }, { "docid": "9c82b164854cb638ccf0fb9b67f7aaee", "score": "0.5357694", "text": "public function ves_pdfpro_apikey_form_prepare_after(Varien_Event_Observer $observer){\r\n \t$fieldset = $observer->getFieldset();\r\n \t$vesHelper = Mage::helper('ves_core');\r\n \t$fieldset->addField('logo', 'image', array(\r\n \t\t\t'label' => Mage::helper('pdfpro')->__('Logo'),\r\n \t\t\t'class' => 'required-entry',\r\n \t\t\t'required' => true,\r\n \t\t\t'name' => 'logo',\r\n \t),'api_key');\r\n \t$fieldset->setData('legend', Mage::helper('pdfpro')->__(''));\r\n \t$elm = $fieldset->getForm()->getElement('api_key');\r\n \t$elm->setData('label',Mage::helper('advancedpdfprocessor')->__('Identifier'));\r\n \t$elm->setData('class','validate-xml-identifier');\r\n }", "title": "" }, { "docid": "68091675c019c46bb2ac98a86e229cce", "score": "0.5353575", "text": "function modbus_chart_table_report_content_type_edit_form_submit($form, &$form_state) {\r\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\r\n $form_state['conf'][$key] = $form_state['values'][$key];\r\n }\r\n}", "title": "" }, { "docid": "b819eaf6ebe6ab285a167634542a8f8b", "score": "0.53469145", "text": "public function output_setup_form() {\n\t\t$this->output_controls_html( 'wordpress' );\n\t}", "title": "" }, { "docid": "21224b5ebe5f0e8ab07666f2729af43a", "score": "0.5345171", "text": "function bmg_new_form_markup() {\n\t//Double check user capabilities\n\tif( !current_user_can('manage_options')) {\n\t\treturn;\n\t}\n\n\tinclude( plugin_dir_path( __FILE__ ) . './templates/admin/new-form.php');\n}", "title": "" }, { "docid": "c8a03eb8c103c89d771825c630e989f8", "score": "0.5326196", "text": "public function prepareSave(Form $form, SiteTreeNodeInterface $page)\n {\n $areaPointer = $this->widgetTool->parseAreaPointer(\n $form['redirect__redirect_target_i']\n );\n $page->redirect_type = 'internal';\n $page->redirect_target = $areaPointer['pageId'] . '#' . $this->widgetTool->widgetToAnchor($form['widget__select']);\n }", "title": "" }, { "docid": "ea8d02fe8995bc26aa74dd7466a2d7da", "score": "0.53252316", "text": "function onDoForm() {\n\t \tOverrideUtil::callHooks('HTMLForm','HTMLForm::onDoForm',null,$this->config);\n\t \t\n\t\t$this->callHooks('onDoForm');\n\t \n\t}", "title": "" }, { "docid": "d1ea8efe37d419b321af3bb0f42c01a4", "score": "0.5324894", "text": "public function init_form_fields() {\r\n $this->log('[Info] Entered init_form_fields()...');\r\n $log_file = 'cryptomarket-' . sanitize_file_name(wp_hash('cryptomarket')) . '-log';\r\n $logs_href = get_bloginfo('wpurl') . '/wp-admin/admin.php?page=wc-status&tab=logs&log_file=' . $log_file;\r\n\r\n $this->form_fields = array(\r\n 'title' => array(\r\n 'title' => __('Title', 'cryptomarket'),\r\n 'type' => 'text',\r\n 'description' => __('Controls the name of this payment method as displayed to the customer during checkout.', 'cryptomarket'),\r\n 'default' => __('CryptoCompra by CryptoMarket', 'cryptomarket'),\r\n 'desc_tip' => true,\r\n ),\r\n 'description' => array(\r\n 'title' => __('Customer Message', 'cryptomarket'),\r\n 'type' => 'textarea',\r\n 'description' => __('Message to explain how the customer will be paying for the purchase.', 'cryptomarket'),\r\n 'default' => 'You will be redirected to CryptoMarket to complete your purchase.',\r\n 'desc_tip' => true,\r\n ),\r\n 'payment_receiver' => array(\r\n 'title' => __('Payment Receiver', 'cryptomarket'),\r\n 'type' => 'paymentreceivertext',\r\n 'description' => __('Email from .', 'cryptomarket'),\r\n 'default' => __('[email protected]', 'cryptomarket'),\r\n 'desc_tip' => true\r\n ),\r\n 'api_key' => array(\r\n 'title' => __('API Key', 'cryptomarket'),\r\n 'type' => 'apikeytext',\r\n 'description' => __('API Key of you CryptoMarket account.', 'cryptomarket'),\r\n 'desc_tip' => true\r\n ),\r\n 'api_secret' => array(\r\n 'title' => __('API Secret', 'cryptomarket'),\r\n 'type' => 'apisecrettext',\r\n 'description' => __('API Secret of you CryptoMarket account.', 'cryptomarket'),\r\n 'desc_tip' => true\r\n ),\r\n 'order_states' => array(\r\n 'type' => 'order_states'\r\n ),\r\n 'debug' => array(\r\n 'title' => __('Debug Log', 'cryptomarket'),\r\n 'type' => 'checkbox',\r\n 'label' => sprintf(__('Enable logging <a href=\"%s\" class=\"button\">View Logs</a>', 'cryptomarket'), $logs_href),\r\n 'default' => 'no',\r\n 'description' => sprintf(__('Log cryptomarket events, inside <code>%s</code>', 'cryptomarket'), wc_get_log_file_path('cryptomarket')),\r\n 'desc_tip' => true,\r\n ),\r\n 'support_details' => array(\r\n 'title' => __('Plugin & Support Information', 'cryptomarket'),\r\n 'type' => 'title',\r\n 'description' => sprintf(__('This plugin version is %s and your PHP version is %s. If you need assistance, please contact [email protected]. Thank you for using cryptomarket!', 'cryptomarket'), get_option('woocommerce_cryptomarket_version'), PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION),\r\n ),\r\n );\r\n\r\n $this->log('[Info] Initialized form fields: ' . var_export($this->form_fields, true));\r\n $this->log('[Info] Leaving init_form_fields()...');\r\n }", "title": "" }, { "docid": "d630ea450e1cd04b2c139843f56b11d7", "score": "0.5323528", "text": "function SemanticFormsOffline_sfHTMLBeforeForm($targetTitle, &$pre_form_html) {\r\n\tglobal $wgOut;\r\n\t$hasTitle = $targetTitle && $targetTitle->exists();\r\n\tif (!isset($_POST['wpSave']) && !$hasTitle) {\r\n\t\t$pre_form_html .= '<fieldset class=\"SemanticFormsOffline\">'\r\n\t\t\t\t. '<legend>Offline Forms</legend>'\r\n\t\t\t\t. '<p>'\r\n\t\t\t\t. ' <span class=\"message\">You are online.</span>'\r\n\t\t\t\t. ' <span class=\"counter\">0</span> items stored.'\r\n\t\t\t\t. ' <a class=\"button mw-ui-button mw-ui-primary\">Go offline.</a>'\r\n\t\t\t\t. '</p>'\r\n\t\t\t\t. '</fieldset>';\r\n\t\t$wgOut->addModules('ext.SemanticFormsOffline');\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "2e4c93f868c5c929dcfa9aeb0cc3d445", "score": "0.5315499", "text": "function process_meta_form($frm)\n{\n\tglobal $CFG, $DB;\n\tswitch ($frm)\n\t{\n\t\tcase 'activitytype':\n\t\t\t$name = optional_param('activitytype', NULL, PARAM_RAW);\n\t\t\tif ( empty($name) )\n\t\t\t{\n\t\t\t\t$errors[] = \"Activity type cannot be empty.\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$data = new stdClass;\n\t\t\t$data->name = $name;\n\t\t\t$frmid = optional_param('frmid', NULL, PARAM_INT);\n\t\t\tif ( empty($frmid) )\n\t\t\t{\n\t\t\t\t$DB->insert_record('cpd_activity_type', $data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data->id = $frmid;\n\t\t\t\t$DB->update_record('cpd_activity_type', $data);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'cpdyears':\n\t\t\t$startday = optional_param('startday', NULL, PARAM_RAW);\n\t\t\t$startmonth = optional_param('startmonth', NULL, PARAM_RAW);\n\t\t\t$startyear = optional_param('startyear', NULL, PARAM_RAW);\n\t\t\t$endday = optional_param('endday', NULL, PARAM_RAW);\n\t\t\t$endmonth = optional_param('endmonth', NULL, PARAM_RAW);\n\t\t\t$endyear = optional_param('endyear', NULL, PARAM_RAW);\n\t\t\t\n\t\t\t$starttime = strtotime(\"{$startday}-{$startmonth}-{$startyear}\");\n\t\t\t$endtime = strtotime(\"{$endday}-{$endmonth}-{$endyear}\");\n\t\t\t\n\t\t\tif ($starttime && $endtime)\n\t\t\t{\n\t\t\t\t$endtime += ((60 * 60 * 24) -1); //Add 23:59:59\n\t\t\t\tif ($starttime > $endtime)\n\t\t\t\t{\n\t\t\t\t\t$errors[] = \"Start date cannot be more than end date.\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$data = new stdClass;\n\t\t\t\t$data->startdate = $starttime;\n\t\t\t\t$data->enddate = $endtime;\n\t\t\t\t$frmid = optional_param('frmid', NULL, PARAM_INT);\n\t\t\t\tif ( empty($frmid) )\n\t\t\t\t{\n\t\t\t\t\t$DB->insert_record('cpd_year', $data);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data->id = $frmid;\n\t\t\t\t\t$DB->update_record('cpd_year', $data);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$errors[] = \"Date(s) invalid.\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'status':\n\t\t\t$name = optional_param('status', NULL, PARAM_RAW);\n\t\t\tif ( empty($name) )\n\t\t\t{\n\t\t\t\t$errors[] = \"Status name cannot be empty.\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if ($old_status = $DB->get_record('cpd_status', array('name'=>$name)))\n\t\t\t{\n\t\t\t\t$errors[] = \"Status name must be unique.\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$data = new stdClass;\n\t\t\t$data->name = $name;\n\t\t\t$frmid = optional_param('frmid', NULL, PARAM_INT);\n\t\t\tif ( empty($frmid) )\n\t\t\t{\n\t\t\t\t// Set display order as well\n\t\t\t\t$results = $DB->get_records_sql(\"select (max(display_order) + 1) as bottom from {cpd_status}\");\n\t\t\t\t$data->display_order = current($results) ? current($results)->bottom : 1;\n\t\t\t\t$DB->insert_record('cpd_status', $data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data->id = $frmid;\n\t\t\t\t$DB->update_record('cpd_status', $data);\n\t\t\t}\n\t}\n\t\n\tif (isset($errors))\n\t{\n\t\treturn $errors;\n\t}\n}", "title": "" }, { "docid": "f0c6031a7d378da17bb647d976586680", "score": "0.53154373", "text": "function ExtendedEditForm() {\n\t\t$section = $this->owner->Section();\n\n\t\tif($section == 'approved') {\n\t\t\t$filter = \"\\\"IsSpam\\\" = 0 AND \\\"NeedsModeration\\\" = 0\";\n\t\t\t$title = \"<h2>\". _t('CommentAdmin.APPROVEDCOMMENTS', 'Approved Comments').\"</h2>\";\n\t\t} else if($section == 'unmoderated') {\n\t\t\t$filter = '\"NeedsModeration\" = 1';\n\t\t\t$title = \"<h2>\"._t('CommentAdmin.COMMENTSAWAITINGMODERATION', 'Comments Awaiting Moderation').\"</h2>\";\n\t\t} else {\n\t\t\t$filter = '\"IsSpam\" = 1';\n\t\t\t$title = \"<h2>\"._t('CommentAdmin.SPAM', 'Spam').\"</h2>\";\n\t\t}\n\n\t\t$filter .= ' AND \"PageComment\".\"ParentID\" > 0';\n\t\t\n\t\t//non-admin users see comments filtered by subsite:\n\t\tif (!Permission::check(\"ADMIN\"))\n\t\t\t$filter .= ' AND ' . self::SubsiteWhere(false);\n\t\t\n\t\t$tableFields = array(\n\t\t\t\"Name\" => _t('CommentAdmin.AUTHOR', 'Author'),\n\t\t\t\"Comment\" => _t('CommentAdmin.COMMENT', 'Comment'),\n\t\t\t\"Parent.Title\" => _t('CommentAdmin.PAGE', 'Page'),\n\t\t\t\"CommenterURL\" => _t('CommentAdmin.COMMENTERURL', 'URL'),\n\t\t\t\"Created\" => _t('CommentAdmin.DATEPOSTED', 'Date Posted')\n\t\t);\n\t\t\n\t\t//this should probably be a pet-pack-specific extension:\n\t\tif (Permission::check(\"ADMIN\"))\n\t\t\t$tableFields[\"Parent.Subsite.Title\"] = 'Subsite';\n\n\t\t$popupFields = new FieldSet(\n\t\t\tnew TextField('Name', _t('CommentAdmin.NAME', 'Name')),\n\t\t\tnew TextField('CommenterURL', _t('CommentAdmin.COMMENTERURL', 'URL')),\n\t\t\tnew TextareaField('Comment', _t('CommentAdmin.COMMENT', 'Comment'))\n\t\t);\n\n\t\t$idField = new HiddenField('ID', '', $section);\n\t\t$table = new SubsiteCommentTableField(\n\t\t\t$this->owner, \"Comments\", \"PageComment\", $section, \n\t\t\t$tableFields, $popupFields, array($filter), \n\t\t\t'Created DESC',\n\t\t\t'LEFT JOIN \"SiteTree\" on \"SiteTree\".\"ID\" = \"PageComment\".\"ParentID\"\n\t\t\t LEFT JOIN \"Subsite\" on \"Subsite\".\"ID\" = \"SiteTree\".\"SubsiteID\"\n\t\t\t'\n\t\t);\n\t\t\n\t\t$table->setParentClass(false);\n\t\t$table->setFieldCasting(array(\n\t\t\t'Created' => 'SS_Datetime->Full',\n\t\t\t'Comment' => array('HTMLText->LimitCharacters', 150)\n\t\t));\n\t\t\n\t\t$table->setPageSize(CommentAdmin::get_comments_per_page());\n\t\t$table->addSelectOptions(array('all'=>'All', 'none'=>'None'));\n\t\t$table->Markable = true;\n\t\t\n\t\t$fields = new FieldSet(\n\t\t\tnew LiteralField(\"Title\", $title),\n\t\t\t$idField,\n\t\t\t$table\n\t\t);\n\n\t\t$actions = new FieldSet();\n\n\t\tif($section == 'unmoderated') {\n\t\t\t$actions->push(new FormAction('acceptmarked', _t('CommentAdmin.ACCEPT', 'Accept')));\n\t\t}\n\n\t\tif($section == 'approved' || $section == 'unmoderated') {\n\t\t\t$actions->push(new FormAction('spammarked', _t('CommentAdmin.SPAMMARKED', 'Mark as spam')));\n\t\t}\n\n\t\tif($section == 'spam') {\n\t\t\t$actions->push(new FormAction('hammarked', _t('CommentAdmin.MARKASNOTSPAM', 'Mark as not spam')));\n\t\t}\n\n\t\t$actions->push(new FormAction('deletemarked', _t('CommentAdmin.DELETE', 'Delete')));\n\n\t\tif($section == 'spam') {\n\t\t\t$actions->push(new FormAction('deleteall', _t('CommentAdmin.DELETEALL', 'Delete All')));\n\t\t}\n\n\t\t$form = new Form($this->owner, \"EditForm\", $fields, $actions);\n\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "007a413f5bdfdd61f3b97d48c7bf4d66", "score": "0.5311493", "text": "function initializeForm()\n {\n\n }", "title": "" }, { "docid": "e6eaffbcf1e502f9edb60b358848cb29", "score": "0.53093624", "text": "public function init_admin() {\n\n\t\tparent::init_admin();\n\n\t\tif ( $this->_requires_credit_card ) {\n\t\t\t// Enable the credit card field.\n\t\t\tadd_filter( 'gform_enable_credit_card_field', '__return_true' );\n\t\t}\n\n\t\tadd_filter( 'gform_currencies', array( $this, 'supported_currencies' ) );\n\n\t\tadd_filter( 'gform_delete_lead', array( $this, 'entry_deleted' ) );\n\t\tadd_action( 'gform_before_delete_field', array( $this, 'before_delete_field' ), 10, 2 );\n\n\t\tif ( rgget( 'page' ) == 'gf_entries' ) {\n\t\t\tadd_action( 'gform_payment_details', array( $this, 'entry_info' ), 10, 2 );\n\t\t}\n\t}", "title": "" }, { "docid": "534919664c134723f40dd24a85de0a77", "score": "0.529676", "text": "function admin_settings_form_submit($form, &$form_state) {\n if (isset($form['#block_info'], $form_state['values']['admin_toolbar']['blocks'])) {\n $blocks = array();\n foreach (array_keys(array_filter($form_state['values']['admin_toolbar']['blocks'])) as $bid) {\n $blocks[$bid] = isset($form['#block_info'][$bid]['cache']) ? $form['#block_info'][$bid]['cache'] : DRUPAL_NO_CACHE;\n }\n $form_state['values']['admin_toolbar']['blocks'] = $blocks;\n }\n}", "title": "" }, { "docid": "850a390640b922976fe27cbe58fda7ad", "score": "0.5295718", "text": "protected function _prepareForm()\n {\n /* @var $model \\Magento\\Paypal\\Model\\Report\\Settlement\\Row */\n $model = $this->_coreRegistry->registry('current_transaction');\n $fieldsets = [\n 'reference_fieldset' => [\n 'fields' => [\n 'transaction_id' => ['label' => $this->_settlement->getFieldLabel('transaction_id')],\n 'invoice_id' => ['label' => $this->_settlement->getFieldLabel('invoice_id')],\n 'paypal_reference_id' => [\n 'label' => $this->_settlement->getFieldLabel('paypal_reference_id'),\n ],\n 'paypal_reference_id_type' => [\n 'label' => $this->_settlement->getFieldLabel('paypal_reference_id_type'),\n 'value' => $model->getReferenceType($model->getData('paypal_reference_id_type')),\n ],\n 'custom_field' => ['label' => $this->_settlement->getFieldLabel('custom_field')],\n ],\n 'legend' => __('Reference Information'),\n ],\n 'transaction_fieldset' => [\n 'fields' => [\n 'transaction_event_code' => [\n 'label' => $this->_settlement->getFieldLabel('transaction_event_code'),\n 'value' => sprintf(\n '%s (%s)',\n $model->getData('transaction_event_code'),\n $model->getTransactionEvent($model->getData('transaction_event_code'))\n ),\n ],\n 'transaction_initiation_date' => [\n 'label' => $this->_settlement->getFieldLabel('transaction_initiation_date'),\n 'value' => $this->formatDate(\n $model->getData('transaction_initiation_date'),\n \\IntlDateFormatter::MEDIUM,\n true\n ),\n ],\n 'transaction_completion_date' => [\n 'label' => $this->_settlement->getFieldLabel('transaction_completion_date'),\n 'value' => $this->formatDate(\n $model->getData('transaction_completion_date'),\n \\IntlDateFormatter::MEDIUM,\n true\n ),\n ],\n 'transaction_debit_or_credit' => [\n 'label' => $this->_settlement->getFieldLabel('transaction_debit_or_credit'),\n 'value' => $model->getDebitCreditText($model->getData('transaction_debit_or_credit')),\n ],\n 'gross_transaction_amount' => [\n 'label' => $this->_settlement->getFieldLabel('gross_transaction_amount'),\n 'value' => $this->_localeCurrency->getCurrency(\n $model->getData('gross_transaction_currency')\n )->toCurrency(\n $model->getData('gross_transaction_amount')\n ),\n ],\n ],\n 'legend' => __('Transaction Information'),\n ],\n 'fee_fieldset' => [\n 'fields' => [\n 'fee_debit_or_credit' => [\n 'label' => $this->_settlement->getFieldLabel('fee_debit_or_credit'),\n 'value' => $model->getDebitCreditText($model->getCastedAmount('fee_debit_or_credit')),\n ],\n 'fee_amount' => [\n 'label' => $this->_settlement->getFieldLabel('fee_amount'),\n 'value' => $this->_localeCurrency->getCurrency(\n $model->getData('fee_currency')\n )->toCurrency(\n $model->getCastedAmount('fee_amount')\n ),\n ],\n ],\n 'legend' => __('PayPal Fee Information'),\n ],\n ];\n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create();\n foreach ($fieldsets as $key => $data) {\n $fieldset = $form->addFieldset($key, ['legend' => $data['legend']]);\n foreach ($data['fields'] as $id => $info) {\n $fieldset->addField(\n $id,\n 'label',\n [\n 'name' => $id,\n 'label' => $info['label'],\n 'title' => $info['label'],\n 'value' => isset($info['value']) ? $info['value'] : $model->getData($id)\n ]\n );\n }\n }\n $this->setForm($form);\n return parent::_prepareForm();\n }", "title": "" }, { "docid": "1d0ede71cea48fe4a88359a8f54209c4", "score": "0.5275899", "text": "function m_customOptionForm()\n\t{\n\t\t$libFunc=new c_libFunctions();\n\t\t#INTIALIZING TEMPLATES\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"optionform\", $this->optionTemplate);\n\t\t$this->ObTpl->set_block(\"optionform\",\"IMG_BLK\",\"dspimg_blk\");\n\t\t$this->ObTpl->set_block(\"optionform\",\"LINK_BLK\",\"dsplink_blk\");\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\", GRAPHICS_PATH);\n\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\", SITE_URL);\n\t\t$this->ObTpl->set_var(\"TPL_SHOPURL\",SITE_URL.\"ecom/\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL1\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL2\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL3\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL4\",\"\");\n\t\t\n\t\t//defining language variables\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CUSTOMOPTTXT\",LANG_CUSTOMOPTBUILD);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_FIELDNAME\",LANG_FIELDNAME);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_DESCRIPTION\",LANG_DESCRIPTION);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_FIELDTYPE\",LANG_TYPEOFTXT);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_QUANTITYBOX\",LANG_QUANTITYBOX);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_INPUTBOX\",LANG_INPUTBOX);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_CHECKBOX\",LANG_CHECKBOX);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_TEXTAREA\",LANG_TEXTAREA);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_USESTOCK\",LANG_USINGSTOCK);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_ALLOWBACK\",LANG_ALLOWBACKORDERS);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_STOCKLVL\",LANG_STOCKLVL);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_ADDTLPRICE\",LANG_ADDTLPRICE);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_ONOFF\",LANG_ONOFF);\n\t\t$this->ObTpl->set_var(\"LANG_VAR_OPTIMAGE\",LANG_OPTIMAGE);\n\t\t/*CHECKING FOR POST VARIABLES\n\t\tIF VARIABLES ARE SET THEN ASSIGNING THEIR VALUE TO VARIABLE SAMEVARIABLE\n\t\tAS USED WHEN RETURNED FROM DATABASE\n\t\tTHIS THING IS USED TO REMOVE REDUNDANCY AND USE SAME FORM FOR EDIT AND INSERT*/\n\n\t\tif(count($_POST) > 0)\n\t\t{\n\t\t\tif(isset($this->request[\"cname\"]))\n\t\t\t\t$row_option[0]->vName= $this->request[\"cname\"];\n\t\t\tif(isset($this->request[\"description\"]))\n\t\t\t\t$row_option[0]->vDescription=$this->request[\"description\"];\n\t\t\tif(isset($this->request[\"type\"]))\n\t\t\t\t$row_option[0]->vType =$this->request[\"type\"];\n\t\t\n\t\t\tif(isset($this->request[\"use_inventory\"]))\n\t\t\t\t$row_option[0]->iUseInventory=$this->request[\"use_inventory\"];\n\n\t\t\tif(isset($this->request[\"backorder\"]))\n\t\t\t\t$row_option[0]->iBackorder=$this->request[\"backorder\"];\n\n\t\t\tif(isset($this->request[\"inventory\"]))\n\t\t\t\t$row_option[0]->iInventory=$this->request[\"inventory\"];\n\t\t\tif(isset($this->request[\"price\"]))\n\t\t\t\t$row_option[0]->fPrice=$this->request[\"price\"];\n\t\t\tif(isset($this->request[\"state\"]))\n\t\t\t\t$row_option[0]->iState =$this->request[\"state\"];\n\n\n\t\t\t$row_option[0]->vImage = \"\";\t\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_option[0]->vName = \"\";\n\t\t\t$row_option[0]->vDescription=\"\";\n\t\t\t$row_option[0]->vType=\"\";\n\t\t\t$row_option[0]->iUseInventory=\"\";\n\t\t\t$row_option[0]->iBackorder=\"\";\n\t\t\t$row_option[0]->iInventory=\"\";\n\t\t\t$row_option[0]->fPrice=\"\";\n\t\t\t$row_option[0]->vImage = \"\";\t\n\t\t\t$row_option[0]->iState=\"\";\n\t\t}\t\t\n\t\t#IF EDIT MODE SELECTED\n\n\t\tif(isset($this->request['choiceid']) && !empty($this->request['choiceid']))\n\t\t{\n\t\t\t$this->obDb->query = $this->obDb->query = \"SELECT * FROM \".CHOICES.\" WHERE iChoiceid_PK ='\".$this->request['choiceid'].\"'\";\n\t\t\t$row_option=$this->obDb->fetchQuery();\n\t\t\tif(!isset($this->request['msg']) || empty($this->request['msg']))\n\t\t\t{\n\t\t\t\t$this->request[\"tmFormatEditDate\"]=$libFunc->dateFormat($row_option[0]->tmEditDate);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",LBL_LAST_UPDATE.$this->request['tmFormatEditDate']);\n\t\t\t}\n\n\t\t\tif($this->err==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\t\t\t\t\t\t\n\t\t\t}\n\n\t\t\tif($row_option[0]->vType==\"input\")\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL2\",\"selected\");\n\t\t\t}\n\t\t\telseif($row_option[0]->vType==\"checkbox\")\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL3\",\"selected\");\n\t\t\t}\n\t\t\telseif($row_option[0]->vType==\"textarea\")\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL4\",\"selected\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL1\",\"selected\");\n\t\t\t}\n\t\t\tif($row_option[0]->iUseInventory==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED1\",\"checked\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED1\",\"\");\n\t\t\t\t}\t\n\t\t\tif($row_option[0]->iBackorder==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED2\",\"checked\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED2\",\"\");\n\t\t\t\t}\t\n\t\t\tif($row_option[0]->iState==1)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED3\",\"checked\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED3\",\"\");\n\t\t\t\t}\t\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"edit\");\n\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHOICEID\",$this->request['choiceid']);\n\t\t\t#HANDLING BLOCKS\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LBLBUTTON\",LBL_EDIT_CHOICE);\n\t\t\tif(file_exists($this->imagePath.\"options/\".$row_option[0]->vImage) && $row_option[0]->vImage!=\"\")\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_IMGLBL\",\"Edit Image\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_IMGLBL\",\"Add Image\");\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"dspimg_blk\",\"\");\n\t\t\t$this->ObTpl->parse(\"dsplink_blk\",\"LINK_BLK\");\n\n\t\t}\t\n\t\telse #IF ADD\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_CHOICEID\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"Add\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED1\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED2\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED3\",\"checked\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SEL1\",\"selected\");\n\t\t\t$this->obDb->query = $this->obDb->query = \"SELECT count(*) as totalCnt FROM \".CHOICES;\n\t\t\t$row_choice1=$this->obDb->fetchQuery();\n\t\t\tif(!isset($this->request['msg']))\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"Total Records \".$row_choice1[0]->totalCnt);\n\t\t\t}\n\t\t\telseif($this->err==1)\n\t\t\t{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LBLBUTTON\",LBL_ADD_CHOICE);\n\t\t\t$this->ObTpl->set_var(\"dsplink_blk\",\"\");\n\t\t\t$this->ObTpl->parse(\"dspimg_blk\",\"IMG_BLK\");\n\t\t}\t\n\n\n\t\t#ASSIGNING FORM ACTION\t\t\t\t\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_FORMURL\", SITE_URL.\"ecom/adminindex.php?action=ec_option.choiceadd\");\n\n\t\t#ASSIGNING FORM VARAIABLES\n\n\t\t$this->ObTpl->set_var(\"TPL_VAR_TITLE\", $libFunc->m_displayContent($row_option[0]->vName));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_DESC\", $libFunc->m_displayContent($row_option[0]->vDescription));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PRICE\", $libFunc->m_displayContent($row_option[0]->fPrice));\n\t\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_INVENTORY\", $libFunc->m_displayContent($row_option[0]->iInventory ));\n\t\treturn($this->ObTpl->parse(\"return\",\"optionform\"));\n\t}", "title": "" }, { "docid": "c8d577da2f479646085b4bde2ea0434f", "score": "0.5270415", "text": "public function __construct() {\r\n parent::__construct();\r\n\r\n $this->_objectId = 'id';\r\n $this->_blockGroup = 'reqforcoupon';\r\n $this->_controller = 'adminhtml_reqforcoupon';\r\n $this->removeButton('delete');//To remove delete button\r\n $this->removeButton('reset');//To remove reset button\r\n $this->_updateButton('save', 'label', Mage::helper('reqforcoupon')->__('Send Mail'));//save button was renamed as send email\r\n \r\n $this->_formScripts[] = \"\r\n function toggleEditor() {\r\n if (tinyMCE.getInstanceById('reqforcoupon_content') == null) {\r\n tinyMCE.execCommand('mceAddControl', false, 'reqforcoupon_content');\r\n } else {\r\n tinyMCE.execCommand('mceRemoveControl', false, 'reqforcoupon_content');\r\n }\r\n }\r\n\r\n function saveAndContinueEdit(){\r\n editForm.submit($('edit_form').action+'back/edit/');\r\n }\r\n \";\r\n }", "title": "" }, { "docid": "0cd7f66e0edb8053a73f59482fc7b72a", "score": "0.525973", "text": "function Plugins_Forms() {\n\t\t$this->__construct ();\n\t}", "title": "" }, { "docid": "cf3b6ecf8755298893873981dae62bc8", "score": "0.5239301", "text": "function my_module_action_pane_edit_form_submit($form, &$form_state) {\n $form_fields = array(\n 'action_pane_body',\n 'action_pane_body_class',\n 'action_pane_link_text',\n 'action_pane_link_text_class',\n 'action_pane_url',\n 'action_pane_url_target',\n 'action_pane_anchor_class',\n 'action_pane_wrapper_class',\n );\n foreach ($form_fields as $key) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n}", "title": "" }, { "docid": "08420c472ffb55ba719dbdedb123d8a1", "score": "0.5236555", "text": "public function prepareForForm()\r\n\t{\r\n\t\t$this->setScenario('formModel');\r\n\t\t$attributes = $this->attributes();\r\n\t\tforeach($attributes as $name)\r\n\t\t{\r\n\t\t\t$column = $this->getTableSchema()->getColumn($name);\r\n\t\t\tif($column)\r\n\t\t\t{\r\n\t\t\t\tif(stripos($column->dbType, 'decimal') !== false)\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = $this->$name;\r\n\t\t\t\t\t$this->$name = ($value && is_numeric($value)) ? Yii::$app->formatter->asDecimal($value) : $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c1bd5c7a7ee53da6247ab2893d5eeab0", "score": "0.5232443", "text": "protected function getConfigForm()\r\n {\r\n $states = CreditCard_OrderState::getOrderStates();\r\n \r\n $order_states=array();\r\n \r\n foreach($states as $state){\r\n $order_states[]=array(\"id\"=>$state[\"id_order_state\"],\"name\"=>$state[\"name\"]);\r\n }\r\n\r\n $fields_form = array(\r\n 'form' => array(\r\n 'legend' => array(\r\n 'title' => $this->trans('Configuración ePayco', array(), 'Modules.Payco.Admin'),\r\n 'icon' => 'icon-envelope'\r\n ),\r\n 'input' => array(\r\n array(\r\n 'type' => 'text',\r\n 'label'=> $this->trans('Titulo', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_TITULO',\r\n 'required' => true,\r\n 'desc' => $this->trans('Titulo que el usuario vera durante el Checkout del Plugin', array(), 'Modules.Payco.Admin'),\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->trans('P_CUST_ID_CLIENTE', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_CUST_ID_CLIENTE',\r\n 'desc' => $this->trans('Id del cliente recibidor primario (App, Maketplace, Tienda, etc).',\r\n array(), 'Modules.Payco.Admin'),\r\n 'required' => true\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->trans('P_KEY', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_KEY',\r\n 'desc' => $this->trans('Llave para firmar la información enviada y recibida de ePayco', array(), 'Modules.Payco.Admin'),\r\n 'required' => true\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->trans('PUBLIC_KEY', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'PUBLIC_KEY',\r\n 'desc' => $this->trans('LLave para autenticar y consumir los servicios de ePayco.', array(), 'Modules.Payco.Admin'),\r\n 'required' => true\r\n ),\r\n array(\r\n 'type' => 'radio',\r\n 'label'=> $this->trans('Habilitar modo pruebas', array(), 'Modules.Payment.Admin'),\r\n 'name' => \"P_TEST_REQUEST\",\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'P_TEST_REQUEST_TRUE',\r\n 'value' => true,\r\n 'label' => $this->trans('Si (Transacciones en pruebas)', array(), 'Modules.Payment.Admin'),\r\n ),\r\n array(\r\n 'id' => 'P_TEST_REQUEST_FALSE',\r\n 'value' => false,\r\n 'label' => $this->trans('No (Transacciones en producción)', array(), 'Modules.Payment.Admin'),\r\n )\r\n ),\r\n ),\r\n array(\r\n 'type' => 'radio',\r\n 'label'=> $this->trans('Idioma del checkout', array(), 'Modules.Payment.Admin'),\r\n 'name' => \"LENGUAJE\",\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'LANGUAJE_ES',\r\n 'value' => true,\r\n 'label' => $this->trans('Español', array(), 'Modules.Payment.Admin'),\r\n ),\r\n array(\r\n 'id' => 'LANGUAJE_EN',\r\n 'value' => false,\r\n 'label' => $this->trans('Ingles', array(), 'Modules.Payment.Admin'),\r\n )\r\n ),\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->trans('Página de Respuesta', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_URL_RESPONSE',\r\n 'placeholder'=>\"http://tutienda.com/respuesta\",\r\n 'desc' => $this->trans('Url de la tienda mostrada luego de finalizar el pago.', array(), 'Modules.Payco.Admin'),\r\n 'required' => true\r\n ),\r\n array(\r\n 'type' => 'text',\r\n 'label' => $this->trans('Página de Confirmación', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_URL_CONFIRMATION',\r\n 'placeholder'=>\"http://tutienda.com/confirmacion\",\r\n 'desc' => $this->trans('Url de Confirmación donde ePayco confirma el pago.', array(), 'Modules.Payco.Admin'),\r\n 'required' => true\r\n ),\r\n array(\r\n 'type' => 'radio',\r\n 'label'=> $this->trans('Tipo de checkout ePayco', array(), 'Modules.Payco.Admin'),\r\n 'name' => \"P_TYPE_CHECKOUT\",\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'onpage',\r\n 'value' => true,\r\n 'label' => $this->trans('OnPage Checkout (El usuario al pagar se queda en la tienda no hay redirección a ePayco)', array(), 'Modules.Payco.Admin'),\r\n ),\r\n array(\r\n 'id' => 'standart',\r\n 'value' => false,\r\n 'label' => $this->trans('Estandar Checkout (El usuario al pagar es redireccionado a la pasarela de ePayco)', array(), 'Modules.Payco.Admin'),\r\n )\r\n ),\r\n ),\r\n array(\r\n 'type' => 'radio',\r\n 'label'=> $this->trans('Reducir el stock en transacciones pendientes', array(), 'Modules.Payco.Admin'),\r\n 'name' => \"P_REDUCE_STOCK_PENDING\",\r\n 'is_bool' => true,\r\n 'values' => array(\r\n array(\r\n 'id' => 'P_REDUCE_STOCK_PENDING_TRUE',\r\n 'value' => true,\r\n 'label' => $this->trans('Si', array(), 'Modules.Payment.Admin'),\r\n ),\r\n array(\r\n 'id' => 'P_REDUCE_STOCK_PENDING_FALSE',\r\n 'value' => false,\r\n 'label' => $this->trans('No', array(), 'Modules.Payment.Admin'),\r\n )\r\n ),\r\n ),\r\n array(\r\n 'type' => 'select',\r\n 'label' => $this->trans('Estado final Pedido', array(), 'Modules.Payco.Admin'),\r\n 'name' => 'P_STATE_END_TRANSACTION',\r\n 'desc' => $this->trans('Escoja el estado del pago que se aplicar al confirmar la trasacción.', array(), 'Modules.Payco.Admin'),\r\n 'required' => true,\r\n 'options' => array(\r\n 'id' => 'id',\r\n 'name' => 'name',\r\n 'default' => array(\r\n 'value' => '',\r\n 'label' => $this->l('Seleccione un estado de Orden')\r\n ),\r\n 'query'=>$order_states,\r\n\r\n ),\r\n )\r\n ),\r\n 'submit' => array(\r\n 'title' => $this->trans('Save', array(), 'Admin.Actions'),\r\n )\r\n ),\r\n );\r\n\r\n return $fields_form;\r\n }", "title": "" }, { "docid": "96ed7cc524e52e60809e79cf7a6e3e77", "score": "0.52290064", "text": "protected function renderForm()\n {\n $helper = new HelperForm();\n\n $helper->show_toolbar = false;\n $helper->table = $this->table;\n $helper->module = $this;\n $helper->default_form_language = $this->context->language->id;\n $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0);\n\n $helper->identifier = $this->identifier;\n $helper->submit_action = 'guardar'; \n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false)\n .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigFormValues('id_customer', 'reduction_percent', 'minimum_amount', 'code'), \n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id,\n );\n\n return $helper->generateForm(array($this->getConfigForm()));\n }", "title": "" }, { "docid": "10c5f49fb0967716dea2fd6705ff376f", "score": "0.5227948", "text": "public function render() {\n\t\twp_nonce_field( \"eventpresso/metabox/{$this->id}/save\", \"eventpresso_metabox_{$this->id}\" );\n\n\t\tdo_action( \"eventpresso/metabox/before\", $this );\n\t\t$this->filter_fields();\n\t\t$tabs = $this->get_tabs();\n\t\t?>\n\t\t<div class=\"eventpresso-metabox-container <?php echo $tabs ? 'eventpresso-metabox-has-tabs' : '' ?>\">\n\t\t\t<?php if($tabs) : ?>\n\t\t\t<ul class=\"eventpresso-tabs-container\">\n\t\t\t\t<?php foreach($tabs as $id => $tab) : ?>\n\t\t\t\t<li class=\"eventpresso-tab-container\" data-tab=\"<?php echo $id ?>\">\n\t\t\t\t\t<a href=\"#\">\n\t\t\t\t\t\t<?php if($tab['icon']) : ?>\n\t\t\t\t\t\t<span class=\"dashicons <?php echo $tab['icon'] ?>\"></span>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t<?php echo $tab['label'] ?>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</ul>\n\t\t\t<?php endif; ?>\n\t\t\t<div class=\"eventpresso-fields-container\">\n\t\t\t\t<?php foreach($this->get_fields() as $name => $field) : ?>\n\t\t\t\t<?php\n\t\t\t\t\tdo_action( \"eventpresso/metabox/{$field['type']}/render/before\", $field, 'metabox-'.$this->id.'-field-'.$field['name'], $this );\n\t\t\t\t?>\n\t\t\t\t<div class=\"eventpresso-field-container eventpresso-field-id-<?php echo $name ?> eventpresso-field-container-<?php echo $field['type'] ?>\" <?php echo isset($field['tab']) ? 'data-tab=\"'.$field['tab'].'\"' : '' ?>>\n\t\t\t\t\t<div class=\"eventpresso-field-label\">\n\t\t\t\t\t\t<label for=\"metabox-<?php echo $this->id; ?>-field-<?php echo $field['name']; ?>\"><?php echo $field['label']; ?></label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"eventpresso-field-content\">\n\t\t\t\t\t\t<?php do_action( \"eventpresso/metabox/{$field['type']}/render\", $field, 'metabox-'.$this->id.'-field-'.$field['name'], $this ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php if( $field['description'] ) : ?>\n\t\t\t\t\t<div class=\"eventpresso-field-description\">\n\t\t\t\t\t\t<p class=\"description\"><?php echo $field['description'] ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\t\tdo_action( \"eventpresso/metabox/{$field['type']}/render/after\", $field, 'metabox-'.$this->id.'-field-'.$field['name'], $this );\n\t\t\t\t?>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\n\t\tdo_action( \"eventpresso/metabox/after\", $this );\n\t}", "title": "" }, { "docid": "c8410c51d4131596c2a63c513f1c981a", "score": "0.5227222", "text": "private function composePageForm()\n {\n View::composer(\n\n 'admin.page._form',\n\n function($view)\n {\n $view->with([\n 'positions' => ListHelper::page_positions(),\n ]);\n });\n }", "title": "" }, { "docid": "604fdecaa538a7c497f362170267ba1f", "score": "0.5226794", "text": "public function action_form_publish($form, $post)\n\t{\n\t\tif ( $form->content_type->value == Post::type('plugin') ) {\n\t\t\t// remove silos we don't need them, do we?\n\t\t\t$form->remove($form->silos);\n\t\t\t\n\t\t\t// add guid after title\n\t\t\t$guid = $form->append('text', 'plugin_details_guid', 'null:null', 'GUID');\n\t\t\t$guid->value = $post->info->guid;\n\t\t\t$guid->template = ($post->slug) ? 'admincontrol_text' : 'guidcontrol';\n\t\t\t$form->move_after($form->plugin_details_guid, $form->title);\n\n\t\t\t// add instructions after content\n\t\t\t$instructions = $form->append('textarea','plugin_details_instructions', 'null:null', 'Instructions');\n\t\t\t$instructions->value = $post->info->instructions;\n\t\t\t$instructions->class[] = 'resizable';\n\t\t\t$instructions->template = 'admincontrol_textarea';\n\t\t\t$form->move_after($form->plugin_details_instructions, $form->content);\n\n\t\t\t// todo Fix all the tabindexes - there are two #2s right now and GUID has none.\n\n\t\t\t// todo Remove the settings tab, as it's not needed\n\t\t\t$plugin_details = array(\n\t\t\t\t'url' => $post->info->url,\n\t\t\t\t'screenshot' => $post->info->screenshot,\n\t\t\t\t'author' => $post->info->author,\n\t\t\t\t'author_url' => $post->info->author_url,\n\t\t\t\t'license' => $post->info->license\n\t\t\t);\n\n\t\t\t$plugin_form_fields = $form->publish_controls->append('fieldset', 'plugin_details', 'Plugin Details');\n\n\t\t\tforeach ( $plugin_details as $field => $value ) {\n\t\t\t\t$plugin_field = $plugin_form_fields->append('text', 'plugin_details_' . $field, 'null:null', ucfirst(str_replace('_', ' ', $field)));\n\t\t\t\t$plugin_field->value = $value;\n\t\t\t\t$plugin_field->template = 'tabcontrol_text';\n\t\t\t}\n\t\t\t\n\t\t\t$plugin_versions = $form->publish_controls->append('fieldset', 'plugin_versions', 'Plugin Versions');\n\t\t\tif ( $post->slug != '' ) {\n\t\t\t\t$form->plugin_versions->append('static', 'current_versions', 'Current Versions');\n\t\t\t\tforeach ( (array) $post->versions as $version ) {\n\t\t\t\t\t$version_info = $version->status . \": \" . $post->title . \" \" . $version->version . \" -- \" . $version->description;\n\t\t\t\t\t$plugin_versions->append('static', 'version_info', $version_info);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$form->plugin_versions->append('static', 'new_version', 'Add New Version');\n\t\t\t$version = $plugin_versions->append('text', 'plugin_version_version', 'null:null', _t( 'Version Number' ));\n\t\t\t$version->template = 'tabcontrol_text';\n\t\t\t$description = $plugin_versions->append('text', 'plugin_version_description', 'null:null', _t( 'Version Description' ));\n\t\t\t$description->template = 'tabcontrol_text';\n\t\t\t$url = $plugin_versions->append('text', 'plugin_version_url', 'null:null', _t( 'Archive URL' ));\n\t\t\t$url->template = 'tabcontrol_text';\n\t\t\t$habari_version = $plugin_versions->append('text', 'plugin_version_habari_version', 'null:null', _t( 'Compatible Habari Version <br> (\"x\" is a wildcard, eg. 0.5.x)' ));\n\t\t\t$habari_version->template = 'tabcontrol_text';\n\n\t\t\t$status = $plugin_versions->append( 'select', 'plugin_version_status', 'null:null', 'Status');\n\t\t\t$status->template = 'tabcontrol_select';\n\t\t\t$status->options = array(\n\t\t\t\t'release' => 'Release',\n\t\t\t\t'critical' => 'Critical',\n\t\t\t\t'bugfix' => 'Bugfix',\n\t\t\t\t'feature' => 'Feature',\n\t\t\t\t);\n\n\t\t\t$requires = $plugin_versions->append('text', 'plugin_version_requires', 'null:null', _t( 'Requires' ));\n\t\t\t$requires->template = 'tabcontrol_text';\n\t\t\t$provides = $plugin_versions->append('text', 'plugin_version_provides', 'null:null', _t( 'Provides' ));\n\t\t\t$provides->template = 'tabcontrol_text';\n\t\t\t$recommends = $plugin_versions->append('text', 'plugin_version_recommends', 'null:null', _t( 'Recommends' ));\n\t\t\t$recommends->template = 'tabcontrol_text';\n\n\t\t\t$sourcelink = $plugin_versions->append('text', 'plugin_version_source_link', 'null:null', _t( 'Link to Source' ));\n\t\t\t$sourcelink->template = 'tabcontrol_text';\n\t\t\t/* @todo validate sourcelink */\n\t\t}\n\t\telse if ( $form->content_type->value == Post::type( 'license' ) ) {\n\t\t\t// clean up the form a little...\n\t\t\t$form->remove( $form->silos );\n\t\t\t$form->remove( $form->content );\n\t\t\t$form->remove( $form->tags );\n\t\t\t$settings = $form->publish_controls->settings;\n\t\t\t$settings->minor_edit->remove();\n\t\t\t$settings->comments_enabled->remove();\n\t\t\t$settings->pubdate->remove();\n\n\t\t\t// add shortname after title\n\t\t\t$shortname = $form->append('text', 'license_shortname', 'null:null', _t('Short Name') );\n\t\t\t$shortname->value = $post->info->shortname;\n\t\t\t$shortname->template = 'admincontrol_text';\n\t\t\t$form->move_after($form->license_shortname, $form->title);\n\n\t\t\t// add simpletext after shortname\n\t\t\t$simpletext = $form->append('textarea','license_simpletext', 'null:null', _t('Simplified Text') );\n\t\t\t$simpletext->value = $post->info->simpletext;\n\t\t\t$simpletext->class[] = 'resizable';\n\t\t\t$simpletext->template = 'admincontrol_textarea';\n\t\t\t$form->move_after($form->license_simpletext, $form->license_shortname);\n\n\t\t\t// add link after simpletext\n\t\t\t$link = $form->append('text', 'license_link', 'null:null', _t('Link') );\n\t\t\t$link->value = $post->info->link;\n\t\t\t$link->template = 'admincontrol_text';\n\t\t\t$form->move_after($form->license_link, $form->license_simpletext);\n\t\t}\n\t}", "title": "" }, { "docid": "963beff23d98e43128a13c0c6a808e48", "score": "0.52266806", "text": "function admin_dynamicFormsBuild($data,$db) {\n\tif(!checkPermission('edit','dynamicForms',$data)) {\n\t\t$data->output['abort']=true;\n $data->output['abortMessage']='<h2>'.$data->phrases['core']['accessDeniedHeading'].'</h2>'.$data->phrases['core']['accessDeniedMessage'];\n\t\treturn;\n\t}\t\n\tif($data->action[3]===false){\n\t\t$data->output['abort']=true;\n\t\t$data->output['abortMessage']='<h2>'.$data->phrases['core']['invalidID'].'</h2>';\n\t\treturn;\n\t}\n\t$data->action[3]=intval($data->action[3]);\n\t$statement=$db->prepare('getFieldParamByID','admin_dynamicForms');\n\t$statement->execute(array(':id' => $data->action[3]));\n\t$fieldParam=$statement->fetch();\n\tif($fieldParam===false){\n\t\t$data->output['abort']=true;\n\t\t$data->output['abortMessage']='<h2>'.$data->phrases['core']['invalidID'].'</h2>';\n\t\treturn;\n\t}\n $data->output['fieldParam']['param']=$fieldParam['param'];\n $data->output['fieldParam']['value']=$fieldParam['value'];\n $data->output['fromForm']=new formHandler('formFieldParam',$data,true);\n $data->output['fromForm']->caption=$data->phrases['dynamic-forms']['modifyFieldParam'];\n if((!empty($_POST['fromForm']))&&($_POST['fromForm']==$data->output['fromForm']->fromForm)) {\n\t\t$data->output['fromForm']->populateFromPostData();\n\t\tif ($data->output['fromForm']->validateFromPost()) {\n $data->output['fromForm']->sendArray[':form']=$fieldParam['form'];\n $data->output['fromForm']->sendArray[':field']=$fieldParam['id'];\n $statement=$db->prepare('addFieldParam','admin_dynamicForms');\n if($statement->execute($data->output['fromForm']->sendArray)) {\n $data->output['savedOkMessage']=$data->phrases['dynamic-forms']['fieldParamSaveSuccessMessage'];\n } else {\n\t\t\t\t$data->output['abort'] = true;\n\t\t\t\t$data->output['abortMessage'] = '<h2>'.$data->phrases['core']['databaseErrorHeading'].'</h2>'.$data->phrases['core']['databaseErrorMessage'];\n\t\t\t\treturn;\n }\n\t\t\tcommon_updateAcrossLanguageTables($data,$db,'form_fields_params',array('id'=>$fieldParam['id']),array(\n\t\t\t\t'form' => $fieldParam['form'],\n\t\t\t\t'field' => $fieldParam['field'],\n\t\t\t\t'param' => $fieldParam['param']\n\t\t\t));\n\t\t}\n }\n}", "title": "" }, { "docid": "0bd935389ccac4883622eb5a35e5fa10", "score": "0.52224153", "text": "private function populateForm()\n {\n $this->form->get('version')->setValue($this->continuationDetailData['version']);\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "5e8960abb8bdf3af84097448b429e9c3", "score": "0.0", "text": "public function create()\n {\n return view('cars.create');\n }", "title": "" } ]
[ { "docid": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.7940849", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.7736471", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7727345", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7727345", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.7685094", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.7623494", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.7598827", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.74656546", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.7457964", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "c21d88e95f75db4b51a6283406449c62", "score": "0.74498004", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.73877543", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.734714", "text": "public function new()\n {\n $this->addBreadcrumb($this->instance, 'new');\n $this->authorize('create', $this->resourceType);\n\n return $this->view('new')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('isUpdate', false);\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.73436236", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.73404884", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.7278289", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7247554", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.7246473", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.7239546", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.723695", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.7236507", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.7211511", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7157628", "text": "public function actionCreate()\r\n {\r\n $resource = new Resource();\r\n $typeResource = TypeResource::find()->all();\r\n \r\n\r\n if ($resource->load(Yii::$app->request->post()) && $resource->save()) {\r\n\r\n return $this->redirect(['view','id' => $resource->id]);\r\n\r\n }\r\n\r\n return $this->render('create',[\r\n 'resource' => $resource,\r\n 'typeResource' => $typeResource\r\n ]);\r\n }", "title": "" }, { "docid": "f94b74924ee0cca1c87e741d9a20dc31", "score": "0.71321034", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"ADD\";\n $viewData[\"student\"] = new Student();\n\n return view('pages.students.form', $viewData);\n }", "title": "" }, { "docid": "9736289698140cf16452b76256ddbe3c", "score": "0.7129173", "text": "public function create()\n {\n $permissions = PermissionGroup::get();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('roles.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('permissions', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7127075", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.71268123", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.7123722", "text": "public function create()\n {\n return view('paperforms.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113729", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113729", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113729", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7113729", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "750adc77c36f18c747b430100ee399b2", "score": "0.71127814", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.71002555", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.70982444", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.70835364", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.70708424", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.70665616", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.7066068", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.7060066", "text": "public function create()\n {\n //display the create form of a new item\n return view('items.create_form');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.7058235", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2b3d89889319d795b9c5394468d0ea54", "score": "0.7051055", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.7050876", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7049117", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.7047501", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.7016578", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7013588", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7013588", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.7007117", "text": "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add Supplier']);\n config(['global.parent_text_content_title' => 'Suppliers']);\n\n //set submit route\n config(['global.submit_link' => 'store.supplier']);\n //set index route\n config(['global.index_link' => '/suppliers']);\n\n return view('supplier.create');\n }", "title": "" }, { "docid": "64c776e59f1522c2eaee823d173e2039", "score": "0.70036846", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.6997807", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6992816", "text": "public function create()\n\t{\n\t\t// return View::make('avverbi.create');\n\t\treturn View::make('avverbi.edit');\n\t}", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.6983467", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.6980299", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.6967005", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6966235", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.69620466", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6961539", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6957548", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6956306", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.69552916", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.6955187", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.6947929", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.69475776", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.69473386", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.69443977", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6942884", "text": "public function newAction()\n {\n $entity = new Rio();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "14ece53d5ad54ed8cdddb207f598627a", "score": "0.69372076", "text": "public function create()\n {\n //adicionar\n $professores = Professor::all();\n $action = route('disciplinas.store');\n return view('admin.disciplinas.form', compact('action', 'professores'));\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6927811", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.6927587", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.69252545", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.69181126", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.6917205", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.6911304", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.6906209", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.69010025", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68943065", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.6894049", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.6892289", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.68891996", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.6888901", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.68883234", "text": "public function actionCreate()\n {\n $model = $this->findModel();\n\n $this->saveModel($model);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.6884404", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.6884152", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.68811756", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "de77b116e66ae6b2ef708621f63ada16", "score": "0.68768054", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.687632", "text": "public function create()\n\t{\n\t\t//add new car\n\t\treturn View::make('cars.create');\n\t}", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6875632", "text": "public function create()\n\t{\n\t $config = $this->getFormData();\n\n return view('client.create', $config);\n\t}", "title": "" }, { "docid": "9337b2142bbd4240614c97696097e5e6", "score": "0.6875541", "text": "public function create()\n {\n return view( 'form.product', [\n 'isCreate' => true,\n 'categorys' => Category::all(),\n 'title' => 'New Product',\n 'product' => new Product(),\n 'navActive' => 'addProduct',\n ] );\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.68740624", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.68723536", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.68702096", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.68695086", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.68646854", "text": "public function actionCreate()\n {\n $model = new ShowWith;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "354e1ae6b1f6e5a63b1294b3c9b61c1c", "score": "0.68638045", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.68627703", "text": "public function get_create()\n\t{\n\t\t$this->layout->title = 'New Relationship';\n\t\t$this->layout->content = View::make('relationships.create');\n\t}", "title": "" }, { "docid": "46163db00cf7d58cd76418e971c834ad", "score": "0.68617314", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.6860742", "text": "public function adminCreate()\n {\n $configuration = $this->getFormFieldData();\n $configuration ['title_name'] = trans('app.file_upload');\n $configuration ['title'] = trans('app.resources');\n $configuration ['back_to_list'] = route('app.resources.index');\n return view('admin.adminForm',$configuration);\n }", "title": "" }, { "docid": "1c0601360736a4b5109044192d5528ed", "score": "0.6858793", "text": "public function create()\n {\n $data = array();\n $data['add'] = trans('main.add');\n return view('service.form', $data);\n }", "title": "" }, { "docid": "c2f03754ef7971403714c63774c1d964", "score": "0.68582153", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.6856296", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.6855391", "text": "public function newAction()\n {\n $entity = new Plancapacitacion();\n $form = $this->createForm(new PlancapacitacionType(), $entity);\n\n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Plan de capacitaciones\", $this->get(\"router\")->generate(\"pantalla_capacitaciones\"));\n $breadcrumbs->addItem(\"Registrar plan\",\"\");\n \n return $this->render('CapacitacionBundle:Plancapacitacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "65d2939b8cc2deedb3c2ef899635dc8a", "score": "0.0", "text": "public function rules()\n {\n $actual=Carbon::now();\n switch ($this->method()) {\n case 'GET':\n \n case 'POST': {\n return [\n 'evento'=>'required|max:200|min:3|regex:/^[\\pL\\s\\-]+$/u|unique:fechas,evento',\n 'ubicacion'=>'max:200|regex:/^[\\pL\\s\\-]+$/u',\n 'fechaI'=>'required|date|after_or_equal:' . $actual . '',\n 'fechaF'=>'required|after_or_equal:fechaI',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'evento'=>'required|max:200|min:3|regex:/^[\\pL\\s\\-]+$/u|unique:fechas,evento,' . $this->fecha->id. ',id',\n 'ubicacion'=>'max:200|regex:/^[\\pL\\s\\-]+$/u',\n 'fechaI'=>'required|date|after_or_equal:' . $actual . '',\n 'fechaF'=>'required|after_or_equal:fechaI',\n ];\n }\n }\n\n\n }", "title": "" } ]
[ { "docid": "9b89453638fa0d4bc780cfdebb220131", "score": "0.8036255", "text": "public function rules()\n {\n $rules = [];\n\n if ( $this->method() === 'POST' || $this->method() === ' PUT' ) {\n $this->getFormRules();\n }\n\n return $rules;\n }", "title": "" }, { "docid": "89398cc7f50750dc2ae322a69cb0c250", "score": "0.7995462", "text": "public function rules()\n {\n return $this->getValidationFields(\n $this->getActionType($this->request->all())\n );\n }", "title": "" }, { "docid": "f6ab600d6b673f5114135a035ebce59b", "score": "0.7950227", "text": "public function rules()\n {\n $rules = [];\n\n if ( $this->method() === 'POST' || $this->method() === ' PUT' ) {\n $this->getFormRules($this->method());\n }\n\n return $rules;\n }", "title": "" }, { "docid": "b8ca04d826eaa84878e020778fd41e1e", "score": "0.7949796", "text": "public function getRules()\n {\n $action = $this->getActionReplaced();\n if (method_exists($this->formRequest, $action)) {\n return call_user_func([$this->formRequest, $action]);\n }\n\n if (method_exists($this->formRequest, 'rules')) {\n return call_user_func([$this->formRequest, 'rules']);\n }\n\n return [];\n }", "title": "" }, { "docid": "f7517761384aa353c6df2754b575bc81", "score": "0.79358065", "text": "public function rules()\n {\n $this->setRouteConfig();\n $fields = $this->routeConfig['fields'] ?? [];\n foreach ($fields as $item => $options) {\n $this->rules[$item] = $options['validation'];\n if (isset($options['messages'])) {\n $this->messages[$item] = $options['messages'];\n }\n }\n return $this->rules;\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79247683", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "52be1d286898f85929d52a279b9545e3", "score": "0.79086185", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'email' => 'email:rfc|required',\n 'pwd' => 'required',\n ];\n case 'GET':\n case 'PATCH':\n return [\n 'id' => 'required',\n 'age' => 'int',\n 'mobile' => [\n 'regex:/^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199)\\d{8}$/'\n ],\n ];\n case 'PUT':\n return [];\n }\n }", "title": "" }, { "docid": "a321fc04f50a8ba99045804443d62314", "score": "0.7823126", "text": "private function getValidationRules()\n {\n\n $rules = array(\n \"section_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected section_id\")),\n \"zip_code\" => new ListingAssert\\ContainsGermanZipCode(),\n \"city_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected city_id\")),\n \"title\" => new Assert\\Length(array(\n \"min\" => 5,\n \"max\" => 50,\n \"minMessage\" => \"Title must be at least {{ limit }} characters long\",\n \"maxMessage\" => \"Title cannot be longer than {{ limit }} characters\",\n )),\n \"description\" => new Assert\\Length(array(\n \"min\" => 50,\n \"max\" => 500,\n \"minMessage\" => \"Description must be at least {{ limit }} characters long\",\n \"maxMessage\" => \"Description cannot be longer than {{ limit }} characters\",\n )),\n \"period_id\" => new Assert\\Type(array(\"type\" => \"integer\", \"message\" => \"Unexpected period_id\")),\n \"user_id\" => new Assert\\Email(array(\"message\" => \"Unexpected user_id\")),\n );\n\n return $rules;\n }", "title": "" }, { "docid": "e8eb155c31aba6afb2d444e7b1758894", "score": "0.7789196", "text": "public function getValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "d48df1f4bb18f16bd695b235ef71d62d", "score": "0.7788251", "text": "public function rules()\n {\n return array(\n array('request', 'validateRequest'),\n array('response', 'validateResponse'),\n );\n }", "title": "" }, { "docid": "a4717b733b811c92adcd74248f5f1282", "score": "0.77868754", "text": "public function rules()\n {\n $rules = [\n 'course_nr' => 'required|max:255',\n 'location' => 'required|max:255',\n 'course_type_id' => [\n 'required',\n Rule::exists('course_types', 'id')->where(function ($query) {\n $query->where('team_id', \\Auth::user()->currentTeam->id);\n }),\n ],\n 'date_from' => 'required|date|date_format:d.m.Y',\n 'date_to' => 'required|date|date_format:d.m.Y',\n 'deadline' => 'required|date|date_format:d.m.Y',\n 'link' => 'required',\n ];\n\n // special rules for creating\n if ($this->method() == 'PUT') {\n //\n }\n\n return $rules;\n }", "title": "" }, { "docid": "f0c0a7ccf6d26b0fe1bd3333ccd27544", "score": "0.77476233", "text": "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'_NewsletterID' => 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'_Classname' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_Params' => array(\n\t\t\t\t'string' => array('min' => 1,'max' => 255,),\n\t\t\t),\n\t\t\t'_EmailName' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_MessageType' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\n\t\t);\n\t}", "title": "" }, { "docid": "fe08b253b6b8c926faabd2e0afe9e830", "score": "0.7726493", "text": "protected function getRules()\n {\n return $rules = [\n 'email' => 'required|email',\n 'password' => 'required',\n 'name' => 'required| min:5',\n 'image' => 'required'\n ];\n }", "title": "" }, { "docid": "69d2f18603b4efbb72db6a620de796a7", "score": "0.7720789", "text": "protected function getValidationRules()\n {\n }", "title": "" }, { "docid": "13babec56ccc2a5193a77e3c155876d3", "score": "0.769998", "text": "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [\n 'config_id' => 'required'\n ];\n }\n case 'POST': {\n return [\n 'environment' => 'required',\n 'type' => 'required',\n 'description' => 'required',\n 'name' => 'required'\n ];\n }\n case 'PUT':{\n return [\n 'environment' => 'required',\n 'type' => 'required',\n 'description' => 'required',\n 'name' => 'required'\n ];\n }\n case 'PATCH':\n default:\n break;\n }\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7681417", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "d932018bf793de86e2dfa0d1a05e8514", "score": "0.76716614", "text": "public function rules()\n {\n return $this->rules[$this->method()];\n }", "title": "" }, { "docid": "ff02d9edb0ca361b0378bc7735a6b8cb", "score": "0.76656437", "text": "public function rules() {\n return $this->rules;\n }", "title": "" }, { "docid": "54f63005140a5a4be09ab0f2968cfe8d", "score": "0.76624864", "text": "public function rules() {\r\n return $this->rules;\r\n }", "title": "" }, { "docid": "3d4941aa217a7b9b43cdeca5f53e8140", "score": "0.76597947", "text": "public function rules()\n {\n return $this->feedService->generateValidationRules( $this->all() );\n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7656743", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7656743", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "94d0a80b3d880184b7fe944484862145", "score": "0.7635421", "text": "public function rules()\n {\n\n return $this->rules;\n\n }", "title": "" }, { "docid": "2afc6bd160a3552e980bc78c44ea51b0", "score": "0.7623756", "text": "public function rules()\n {\n return $this->getRuleBuilder()\n ->add('name')->required()\n ->add('language')->required()\n ->get();\n }", "title": "" }, { "docid": "4db9bdb5e7daba3560e73230713f9f65", "score": "0.7612793", "text": "public function getValidationRules()\n {\n return [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => ['required', 'email', Rule::unique('users')->ignore($this->id)],\n 'phone' => 'string',\n 'password' => 'confirmed'\n ];\n }", "title": "" }, { "docid": "52ee9504ffeb27a8726e869bb67be0f9", "score": "0.75832725", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'key' => 'required',\n 'secret' => 'required',\n 'return_url' => 'required',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "aeb27720e5cf6142e839ca9d6835c2a2", "score": "0.75711375", "text": "public function rules()\n {\n $setting = app('general_setting');\n $rules = [\n \"supplier_id\" => \"required\",\n \"showroom\" => \"required\",\n ];\n\n if ($this->getMethod() == 'POST') {\n $rules += ['product_id' => 'required'];\n $rules += [\"payment_method\" => \"required\"];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7569507", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.7569507", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "ef6e7c2bae7bd1614f924fc15fba11fb", "score": "0.75587744", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return $this->translateRequest();\n }\n case 'PUT':\n case 'PATCH':\n {\n return $this->translateRequestunique();\n }\n default:break;\n }\n }", "title": "" }, { "docid": "365dc1a9dadf7e4d97c5795f242fd62b", "score": "0.7558275", "text": "public function rules()\n {\n $rules = [];\n if($this->getMethod() == 'POST') {\n $rules = [\n 'user_name' => 'bail|required|string|max:30|unique:users',\n 'email' => 'bail|required|string|email|unique:users|max:255',\n 'password' => 'required|string|min:6'];\n }\n elseif($this->getMethod() == 'PUT') {\n $rules = [\n 'user_name' => 'bail|required|string|max:30|unique:users,user_name,'.$this->user,\n 'email' => 'bail|required|string|email|max:255|unique:users,email,'.$this->user,\n 'password' => 'sometimes|nullable|string|min:6',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "dfb70f9ae9c568d8b2733ce7a22cdd15", "score": "0.7551751", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'project_id' => 'required',\n 'title' => 'required',\n 'primary' => 'required',\n 'comments' => 'required|min:30',\n 'emailable' => 'required',\n 'has_been_emailed' => 'numeric'\n ]; \n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'project_id' => 'required',\n 'title' => 'required',\n 'primary' => 'required',\n 'comments' => 'required|min:30',\n 'emailable' => 'required',\n 'has_been_emailed' => 'numeric'\n ]; \n }\n default: break;\n }\n \n }", "title": "" }, { "docid": "a2199fedff72f4ced1903760028e66fc", "score": "0.7547187", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'name' => 'required|string|max:55',\n 'email' => 'required|string|email|max:35',\n 'phone' => 'required|string|max:25',\n 'theme' => 'required|string|max:105',\n 'message' => 'required|string|max:1001',\n 'captcha' => 'required|captcha',\n ];\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "9ccb39b194e07dfde3c1f1cf0dcbfd42", "score": "0.7542853", "text": "protected function getValidationRules()\n\t{\n\t\treturn array(\n\t\t\t'name' \t\t\t\t=> 'required|max:255',\n\t\t\t'email' \t\t\t=> 'required|email|unique:users,email_address',\n\t\t\t'password'\t\t\t=> 'sometimes|same:confirm_password',\n\t\t\t'is_suspended'\t\t=> 'required|max:1',\n\t\t\t'role'\t\t\t\t=> 'required|in:' . implode(',', $this->roles),\n\t\t);\n\t}", "title": "" }, { "docid": "b4339897a905912ecae16243eb8745e1", "score": "0.7539566", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'POST':\n {\n return [\n 'title' => 'required',\n 'short_description' => 'required',\n 'description' => 'required',\n 'image' => 'required|image',\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => 'required',\n 'short_description' => 'required',\n 'description' => 'required',\n 'image' => 'image',\n ];\n }\n case 'PATCH':\n default:break;\n }\n }", "title": "" }, { "docid": "d1df3212bf6c0df6fba5b19f5b9ddd8a", "score": "0.7534634", "text": "public function rules()\n {\n $rules['body'] = 'required';\n\n if ($this->method() == 'POST') {\n $rules['post_id'] = 'required|numeric';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e691d37d427c38b9c4bf3e15e25eb1f6", "score": "0.75314367", "text": "public function rules()\n {\n return array_merge(\n [\n 'collection.sort' => 'required',\n ],\n $this->withAttributesValidationRules(),\n $this->hasImagesValidationRules(),\n $this->hasUrlsValidationRules()\n );\n }", "title": "" }, { "docid": "6d1f8b30c4231897bd7ee71957dea623", "score": "0.7524302", "text": "public function rules()\n {\n $rules = array();\n if ($this->getMethod() == 'POST') {\n $rules = [\n 'warehouse_id.*' => 'required|integer|min:1',\n 'qty' => 'required|min:1',\n 'productcategory_id' => 'required|integer|min:1',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "56f09f811c4042b6dd733d9d50f3bc94", "score": "0.75238436", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n case 'POST':\n {\n return [\n 'name' => ['required','string'],\n 'link_url' => ['required', 'string'],\n 'status' => ['required','integer'],\n ] ;\n }\n case 'PATCH':\n case 'PUT':\n {\n return [\n 'name' => ['required','string'],\n 'link_url' => ['required','string'],\n 'status' => ['required','integer'],\n ] ;\n }\n default:break;\n }\n }", "title": "" }, { "docid": "2c9ecef98142934e7cbb7daed80a87a2", "score": "0.7518043", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n break;\n case 'DELETE':\n break;\n case 'POST':\n {\n return [\n 'first_name'=> 'required|min:3',\n 'last_name'=> 'required|min:3',\n 'value'=> 'required'\n ];\n break;\n }\n case 'PUT':\n return [\n 'first_name'=> 'required|min:3',\n 'last_name'=> 'required|min:3',\n 'participation'=> 'required'\n ];\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "79d88c756ccda540497592f1b76b0244", "score": "0.75139284", "text": "protected function validationRules()\n {\n return [\n 'full_name' => [\n 'required',\n 'string',\n 'max:255',\n ],\n 'phone' => [\n 'required',\n 'max:20',\n ],\n 'ic_number' => [\n 'required',\n 'max:20',\n ],\n 'sex' => [\n 'required',\n 'in:male,female,others',\n ],\n 'source' => [\n 'nullable',\n 'max:255',\n ],\n ];\n }", "title": "" }, { "docid": "344cb19aed8caa55b899069f09baac1d", "score": "0.7512036", "text": "private function getFormValidationRules() {\n return array(\n 'title' => 'required|max:99',\n 'content' => 'required|max:2048',\n 'img' => 'image|max:3000',\n );\n }", "title": "" }, { "docid": "e1189303b5ec0e580271d191dc9bef17", "score": "0.750377", "text": "public function rules()\n\t{\n\t\t$rules = [];\n\n\t\t//autumn study module validations\n\t\tforeach($this->request->get('autumn_module_names') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_module_names.'.$key] = 'required';\n\t\t}\n\n\t\tforeach($this->request->get('autumn_credits') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_credits.'.$key] = 'required|numeric';\n\t\t}\n\n\t\tforeach($this->request->get('autumn_subjects') as $key => $val)\n\t\t{\n\t\t\t$rules['autumn_subjects.'.$key] = 'required';\n\t\t}\n\n\n\t\t//spring study module validations\n\t\tforeach($this->request->get('spring_module_names') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_module_names.'.$key] = 'required';\n\t\t}\n\n\t\tforeach($this->request->get('spring_credits') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_credits.'.$key] = 'required|numeric';\n\t\t}\n\n\t\tforeach($this->request->get('spring_subjects') as $key => $val)\n\t\t{\n\t\t\t$rules['spring_subjects.'.$key] = 'required';\n\t\t}\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "3902358510d5d9d8dc65ec6fae250bdc", "score": "0.75032306", "text": "protected function getValidationRules()\n {\n if ($rule = config('rule.' . $this->routeName)) {\n return array_filter($rule, function ($item) {\n return $item != 'optional';\n });\n }\n return [];\n }", "title": "" }, { "docid": "e79f065980a0f2a527f08471ad2018a2", "score": "0.75014436", "text": "public function rules()\n {\n switch (Request::getPathInfo()) {\n case '/api/customer/finance/recharge':\n return [\n 'money' => 'required|gte:' . $this->platConfig('min_charge'),\n 'type' => 'required|numeric',\n 'payment_account' => 'nullable',\n 'remark' => 'nullable|max:255',\n 'voucher' => 'nullable',\n ];\n break;\n case '/api/customer/finance/withdraw':\n return [\n 'money' => 'required|gte:' . $this->platConfig('min_withdraw'). '|max:' . $this->platConfig('once_withdraw_money'),\n 'security_code' => 'required|digits:6',\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "84b6d0acf228261d35afa497c258903a", "score": "0.7489511", "text": "public function rules()\n {\n $validationRules = \\Auth::check() ? config('comment.validation.auth')\n : config('comment.validation.not_auth');\n\n return $validationRules;\n }", "title": "" }, { "docid": "6eb6931c0cbeda0504917ae14b5ca6ad", "score": "0.74857205", "text": "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 }", "title": "" }, { "docid": "e570fff35ce7a6458482a99c9558804b", "score": "0.7481469", "text": "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n if ($this->isUpdate()) {\n $notification_template = $this->route('notification_template');\n\n $rules = array_merge($rules, [\n 'title' => 'required',\n 'via' => 'required',\n 'extras.custom.mail.*' => 'email',\n ]);\n\n foreach ($this->get('via', []) as $via) {\n $rules = array_merge($rules, [\n \"body.{$via}\" => 'required',\n ]);\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "3896b79a557d6a34df48370b6b6571d5", "score": "0.7468694", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.team-manage.store\":\n $rule = [\n 'team_name'\t => \"required\",\n 'service_type'\t => \"required\",\n 'team_description' => \"required\",\n 'team_members'\t => \"required\",\n 'header'\t => \"required\",\n 'bed_assignment'\t => \"required\",\n\n ];\n break;\n case \"\":\n $rule = [];\n break;\n };\n\n return $rule;\n }", "title": "" }, { "docid": "11786c1a0adba14e35a41feb5bca1e32", "score": "0.7460022", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n $rules = [];\n\n switch ($this->method()) {\n case 'PATCH':\n case 'PUT':\n\n $inputs = $request->all();\n\n foreach ($this->_rules as $ruleName => $ruleValidation) {\n\n if (isset($inputs[$ruleName])) {\n switch ($ruleName) {\n case 'rate_value':\n $rules[$ruleName] = 'required|array|numeric_array:1,5';\n break;\n case 'type':\n $rules[$ruleName] = 'required|array|numeric_array:1,13';\n break;\n default:\n $rules[$ruleName] = $ruleValidation;\n break;\n }\n }\n }\n break;\n\n case 'GET':\n case 'DELETE':\n $rules = [];\n break;\n case 'POST':\n default:\n $rules = $this->_rules;\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "7a4a0335bd903bfdb2096af1d448ee15", "score": "0.74563944", "text": "public function rules()\n {\n $rules = [\n 'menu_id' => 'required|exists:menus,id',\n 'name' => 'required',\n 'type' => 'required|in:link,route',\n 'target' => 'required|in:_self,_blank',\n ];\n\n if (request()->get('type') == 'link') {\n $rules['url'] = 'required';\n }\n\n if (request()->get('type') == 'route') {\n $rules['route'] = [\n 'required',\n function ($attribute, $value, $fail) {\n if (Route::has($value)) {\n return true;\n }\n\n return $fail(ucfirst($attribute).' not is a real route name');\n },\n ];\n // $rules['parameters'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "8bffe8fab7638e023b07187660eaa3f9", "score": "0.74529165", "text": "public function rules()\n {\n $rules = [];\n\n if ( in_array($this->method(), ['GET', 'DELETE']) )\n $rules['empresa_id'] = 'required|integer|exists:empresa,id';\n\n if ( in_array($this->method(), ['POST', 'PUT']) )\n $rules = [\n 'lar_temporario_id' => 'required|integer|exists:lar_temporario,id',\n 'especie_id' => 'required|integer|exists:especie,id',\n 'capacidade' => 'required|integer',\n 'status' => 'required|integer|in:1,0',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "5226e9b259a77bed07cc06694a23b1f7", "score": "0.7448491", "text": "public function getValidationRules() {\n return [\n 'titolo' => 'required|max:255',\n 'year' => 'required|integer|max:2020',\n 'description' => 'required',\n 'rating' => 'required|integer|min:0|max:10'\n ];\n }", "title": "" }, { "docid": "a43e6b162636d4fe32928dbf990615f4", "score": "0.74484646", "text": "public function rules(): array\n {\n\n return empty($this->all()) ? [] : $this->validationRules();\n }", "title": "" }, { "docid": "35133d19d2e457df4b5e633aaa975be6", "score": "0.744703", "text": "public function rules()\n {\n $this->validateRoles();\n\n $this->attachBasicRules();\n\n $this->adjustRules();\n\n return $this->rules->toArray();\n }", "title": "" }, { "docid": "ab854822d701f192bcf4baf45644a701", "score": "0.7445092", "text": "public function rules() {\n\n\t\t$rules = [\n\t\t\t\"POST\" => [\n\t\t\t\t\"order_id\" => [\n\t\t\t\t\tnew ValidateOrder('App\\\\OrderHeaderTemp', 'id'),\n\t\t\t\t],\n\t\t\t\t\"order_number\" => [\n\t\t\t\t\tnew ValidateOrder('App\\\\OrderHeaderTemp', 'order_number'),\n\t\t\t\t\tnew ValidateOrderBalance('App\\\\OrderHeaderTemp', 'order_number'),\n\t\t\t\t],\n\t\t\t\t\"order_shipping.house_number\"=>\"required\",\n\t\t\t\t\"order_shipping.street\"=>\"required\",\n\t\t\t\t\"order_shipping.zip_code\"=>\"required\",\n\t\t\t\t\"order_shipping.city\"=>\"required\",\n\t\t\t\t\"order_shipping.country\"=>\"required\",\n\n\t\t\t\t\"order_recipient.phone_number\"=>\"required\",\n\t\t\t\t\"order_recipient.full_name\"=>\"required\",\n\t\t\t],\n\t\t\t\"PUT\" => [\n\n\t\t\t],\n\t\t];\n\n\t\treturn $rules[ $this->getMethod() ];\n\t}", "title": "" }, { "docid": "22c44c2fa33dc767165e72cea944f97b", "score": "0.7444538", "text": "public function rules()\n {\n return self::$rules;\n }", "title": "" }, { "docid": "04363eda7e80539a5823accb3759171e", "score": "0.7441013", "text": "public function rules()\n {\n $rules = array();\n $rules['name'] = $this->validarName();\n $rules['type'] = $this->validarType();\n $rules['tecnique'] = $this->validarTecnique();\n $rules['materials'] = $this->validarWeb();\n $rules['review'] = $this->validarReview();\n\n return $rules;\n }", "title": "" }, { "docid": "d1578d73c5590d7bca6fbd95f0cddbd9", "score": "0.7440836", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => 'required|string',\n 'surname' => 'required|string',\n 'photo' => [\n 'image',\n Rule::dimensions()->maxWidth(500)->maxHeight(500)\n ],\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'string',\n 'surname' => 'string',\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "e8fe3be2914ca12b56eb1a91bc9c7c41", "score": "0.7438165", "text": "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|string|in:html,text',\n 'status' => 'required|string|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'array',\n 'language' => 'nullable|string',\n 'vip' => 'boolean',\n 'location' => 'array',\n 'location.latitude' => 'numeric',\n 'location.longitude' => 'numeric',\n 'marketing_permissions' => 'array',\n 'marketing_permissions.*.marketing_permission_id' => 'string',\n 'marketing_permissions.*.enabled' => 'boolean',\n 'ip_signup' => 'nullable|ip',\n 'timestamp_signup' => 'nullable',\n 'ip_opt' => 'nullable|ip',\n 'timestamp_opt' => 'nullable',\n 'tags' => 'array'\n ];\n }", "title": "" }, { "docid": "9d1e63a31cb92fe4cf03c7cabe2f1b9d", "score": "0.7437546", "text": "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [\n 'round_id' => 'required'\n ];\n }\n case 'POST': {\n return [\n 'name' => 'required',\n 'domain' => 'required',\n 'image' => 'required',\n 'mysql_host' => 'required',\n 'mysql_port' => 'required',\n 'mysql_database' => 'required',\n 'mongodb_host' => 'required',\n 'mongodb_port' => 'required',\n 'mongodb_database' => 'required',\n ];\n }\n case 'PUT':{\n return [\n 'name' => 'required',\n 'domain' => 'required',\n 'image' => 'required',\n 'mysql_host' => 'required',\n 'mysql_port' => 'required',\n 'mysql_database' => 'required',\n 'mongodb_host' => 'required',\n 'mongodb_port' => 'required',\n 'mongodb_database' => 'required',\n ];\n }\n case 'PATCH':\n default:\n break;\n }\n }", "title": "" }, { "docid": "917d43637696ccee34b99a294bc0b771", "score": "0.74366605", "text": "public function rules()\n {\n $method = $this->method();\n\n switch ($method) {\n case 'GET':\n case 'DELETE':\n case 'PUT':\n return []; break;\n\n case 'POST':\n case 'PATCH':\n return [\n 'offer-name' => 'required',\n 'offer-description' => 'required',\n 'offer-type' => 'required|numeric',\n 'offer-type-detail' => 'required|numeric',\n ]; break;\n\n default :\n break;\n }\n }", "title": "" }, { "docid": "d8ba7aab3f0d1c486c7dbeccc7a4cccb", "score": "0.74315625", "text": "public function rules()\n {\n $rules = [\n 'navigation_id' => 'required|integer',\n 'name' => 'required',\n 'url' => 'sometimes',\n 'new_window' => 'sometimes',\n 'parent_id' => 'sometimes',\n 'order' => 'sometimes',\n 'status' => 'required|boolean',\n ];\n\n $rules += $this->fields->flatMap(function ($field) {\n return $field->type()->rules($field, $this->{$field->handle});\n })->toArray();\n\n return $rules;\n }", "title": "" }, { "docid": "a0aebac4a4ba4d50d6b401fd68fe3a0c", "score": "0.74302256", "text": "public function rules()\n {\n $rules = $this->rules;\n if(!Request::isMethod('post')){\n $rules['r_name'] = 'required|between:2,16';\n };\n return $rules;\n }", "title": "" }, { "docid": "849f0df6bb0e861d573e419e2ffc2b98", "score": "0.7425092", "text": "public function rules()\n {\n $rules = array();\n\n $rules['nombre_usuario'] = $this->validarNombreUsuario();\n $rules['email'] = $this->validarEmail();\n\n return $rules;\n }", "title": "" }, { "docid": "9642af82330f68c9cc44713b0b847db9", "score": "0.74241954", "text": "public function validationRules( $request )\n {\n /**\n * Retreive the user if here provided\n */\n $user = $request->route( 'id' ) ? User::find( $request->route( 'id' ) ) : false;\n \n /**\n * If the current request process system.users namespace\n */\n $fields = $this->getFields( $user );\n\n if ( $request->route( 'namespace' ) == 'system.users' ) {\n\n /**\n * Use UserFieldsValidation and add assign it to \"crud\" validation array\n * the user object is send to perform validation and ignoring the current edited\n * user\n */\n }\n return Helper::getFieldsValidation( $fields );\n }", "title": "" }, { "docid": "d77c61c541098f3b99652f3b66f393c1", "score": "0.74021703", "text": "public function rules()\n {\n return array_merge((new CommonRequest())->rules(), [\n 'log_name' => ['nullable', 'string',],\n 'description' => ['nullable', 'string',],\n 'subject_id' => ['nullable', 'string',],\n 'subject_type' => ['nullable', 'string',],\n 'causer_id' => ['nullable', 'string',],\n 'causer_type' => ['nullable', 'string',],\n 'properties' => ['nullable', 'string',],\n ]);\n }", "title": "" }, { "docid": "ea38b8b3db764fdc8f3aebd36b321df8", "score": "0.7401203", "text": "public function getRules()\n\t{\n\t\t$rules['product_id'] = ['required', 'exists:' . app()->make(Product::class)->getTable() . ',id'];\n\t\t$rules['active_at'] = ['required', 'date', 'after_or_equal:today'];\n\t\t$rules['price'] = ['required', 'numeric', 'gte:0'];\n\t\t$rules['discount'] = ['required', 'numeric', 'gte:0', 'lte:' . $this->price];\n\t\t\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7393823", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "e7b0626ebdc93b01844cb7ffcf7dfcf0", "score": "0.7393823", "text": "public function rules(): array\n {\n return $this->rules;\n }", "title": "" }, { "docid": "ededd9d385561a3f97cdfa35518b9823", "score": "0.739199", "text": "public function validationRules( $request )\n {\n /**\n * Retreive the user if here provided\n */\n $user = $request->route( 'id' ) ? User::find( $request->route( 'id' ) ) : false;\n \n /**\n * If the current request process users namespace\n */\n $fields = $this->getFields( $user );\n\n if ( $request->route( 'namespace' ) == 'tendoo-users' ) {\n\n /**\n * Use UserFieldsValidation and add assign it to \"crud\" validation array\n * the user object is send to perform validation and ignoring the current edited\n * user\n */\n }\n \n return Helper::getFieldsValidation( $fields );\n }", "title": "" }, { "docid": "5988f5548a36ad0e7be54161ba920923", "score": "0.73908806", "text": "public function rules()\n {\n $rules = [\n\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "f20c09e500fa5ccc2f323778001c9742", "score": "0.7387927", "text": "public function rules()\n {\n $rules = [\n 'goods' => 'required|integer',\n 'quantity' => 'required|integer',\n 'provider_id' => 'required|integer',\n ];\n\n if ($this->isMethod('PUT'))\n unset($rules['provider_id']);\n\n return $rules;\n }", "title": "" }, { "docid": "ef58cbbb42ec9d72b6b14de1cdfb23ee", "score": "0.738694", "text": "public function getRules()\n\t{\n\t\tif(count($this->validationRules) > 0)\n\t\t{\n\t\t\t$array = $this->validationRules;\n\n\t\t\tif(count($this->validationMessages) > 1)\n\t\t\t{\n\t\t\t\t$array['messages'] = $this->validationMessages;\n\t\t\t}\n\t\t\treturn $array;\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "6532e1424abade2381644304c9585243", "score": "0.7375581", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n $inputs = $request->all();\n $rules = [];\n\n switch ($this->method()) {\n case 'PATCH':\n foreach ($this->_rules as $ruleName => $ruleValidation) {\n if (!isset($inputs[$ruleName])) {\n continue;\n }\n\n $user = User::whereUsername($request->profile)->firstOrFail();\n $profile = Profile::whereUserId($user->id)->first();\n\n if ($ruleName == 'mobile') {\n $ruleValidation = $ruleValidation . ',' . $ruleName . ',' . $profile->id;\n $rules[$ruleName] = $ruleValidation;\n } else {\n $rules[$ruleName] = $ruleValidation;\n }\n }\n\n break;\n case 'POST':\n default:\n $rules = $this->_rules;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "c73518d96b9dd51b24eea511b164b53b", "score": "0.7362901", "text": "public function rules()\n {\n return array_get($this->attributes, 'rules', []);\n }", "title": "" }, { "docid": "38e0f861c74f1d705bb5746f22851908", "score": "0.73612916", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'header_title_fr' => 'required|min:3',\n 'header_title_en' => 'required|min:3',\n 'description_fr' => '',\n 'description_en' => '',\n 'background_image' => 'required|mimes:jpg,jpeg,bmp,png|max:10000',\n 'subscribed' => 'required'\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [];\n }\n default:\n break;\n }\n\n return [\n\n ];\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73454034", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73454034", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "fdae987bfb69b57cf9eecea3437cf03a", "score": "0.73375285", "text": "public function getRules()\r\n {\r\n $rules = [\r\n \"fecha\"=>\"required\"\r\n ];\r\n return $rules;\r\n }", "title": "" }, { "docid": "6d3f9f74f37452d186088f075a7ed64e", "score": "0.7337528", "text": "public function rules()\n {\n $method=request()->method();\n\n switch($method):\n\n case 'POST':\n $rules = [\n 'name'=>'required|string|max:100',\n 'car_modal_id'=>'required|numeric',\n 'brand_id'=>'required|numeric',\n 'color'=>'required|string',\n 'year'=>'required|string',\n 'images' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048', \n ];\n break;\n\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name'=>'required|string|max:100',\n 'car_modal_id'=>'required|numeric',\n 'brand_id'=>'required|numeric',\n 'color'=>'required|string',\n 'year'=>'required|string',\n ];\n break;\n\n default: break;\n endswitch;\n\n return $rules;\n\n }", "title": "" }, { "docid": "f65c69b514a80d1fc5688fa8b217dffc", "score": "0.73370236", "text": "public function rules()\n {\n $rules = [];\n if($this->isMethod('post')){\n\n $rules = [\n 'fname' => 'required|max:50|min:3',\n 'lname' => 'required|max:50|min:3',\n 'email'=>'required|email|max:50',\n 'phone'=>'required|max:50',\n 'gender'=>'required|max:1',\n 'department_id'=>'required',\n 'city_id'=>'required',\n 'file'=>'required|image'\n ];\n }\n\n if($this->isMethod('put')){\n\n $rules = [\n 'fname' => 'required|max:50|min:3',\n 'lname' => 'required|max:50|min:3',\n 'email'=>'required|email|max:50',\n 'phone'=>'required|max:50',\n 'gender'=>'required|max:1',\n 'department_id'=>'required',\n 'city_id'=>'required'\n \n ];\n }\n \n\n return $rules;\n }", "title": "" }, { "docid": "747b211336efc2bbe77133ebbc5e56f6", "score": "0.7327775", "text": "public function rules(): array\n {\n if ($this->isUpdating()) {\n $this->rules['email'] = 'required|email';\n }\n\n return $this->rules;\n }", "title": "" }, { "docid": "ec06255ca8d8274320f8ac9d24d08bbd", "score": "0.73274875", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string|max:32',\n 'group' => 'required|string|max:32',\n 'published' => 'boolean',\n ];\n\n if ($this->isMethod('POST')) {\n $rules['attachment'] = 'required|mimes:pdf';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "52799543420e9f211f974888039a906d", "score": "0.73215675", "text": "public function rules()\n {\n return $this->getPostDatasetValidationRules();\n }", "title": "" }, { "docid": "760c56d2b14ca88508ef11bdbbdaa7b5", "score": "0.732021", "text": "public function rules()\n {\n $form_for = $this->request->get('form_for');\n switch ($form_for) {\n case 'company_detail':\n return [\n 'company_name' => 'required|max:50',\n 'company_legal_name' => 'nullable|max:50',\n 'company_short_name' => 'required|max:50',\n 'company_zipcode' => 'nullable|digits_between:1,10|integer',\n 'company_phone' => ['nullable',new PhoneValidationRule],\n 'company_email' => 'nullable|email',\n 'company_website' => 'nullable|url',\n 'company_address' => 'required'\n ];\n break;\n case 'email_setting':\n return [\n 'company_from_email' => 'nullable|email',\n 'smtp_protocol' => 'required',\n 'smtp_host' => 'required',\n 'smtp_user' => 'required',\n 'smtp_password' => 'required',\n 'smtp_port' => 'required'\n ];\n break;\n case 'system_setting':\n return [\n 'default_language' => 'required',\n 'tables_pagination_limit' => 'required|integer',\n 'date_format' => 'required',\n 'time_format' => 'required',\n ];\n break;\n case 'system_update':\n return [\n 'update_url' => 'nullable|url'\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "89a4131eb89a37f7abc486d9b45e22b7", "score": "0.7320009", "text": "public function rules(): array\n {\n return $this->_rules;\n }", "title": "" }, { "docid": "68949944516df68f8f4b4ef5ef97f79f", "score": "0.7318388", "text": "public function rules()\n {\n $rules = [\n 'first_name' => 'required|mb_between:2,100',\n 'last_name' => 'required|mb_between:2,100',\n 'email' => 'required|email|whitelist_email|whitelist_domain',\n 'message' => 'required|mb_between:5,500',\n 'g-recaptcha-response' => (config('settings.security.recaptcha_activation')) ? 'required' : '',\n ];\n \n return $rules;\n }", "title": "" }, { "docid": "37c1bf59d6be0cf7e48940a50214c45e", "score": "0.73117185", "text": "public function getValidationRules() : string {\n return $this->validationRules;\n }", "title": "" }, { "docid": "f04963218843266005b16f0c2b1b525f", "score": "0.7311266", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'cash' => ['required','numeric'],\n 'account' => ['required','string'],\n 'real_name' => ['required'],\n 'bank_of_deposit' => ['nullable']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "4dde70f48d504167b4b259dcaa88fdbb", "score": "0.73090273", "text": "public function rules()\n {\n if ($this->method()=='POST') {\n return [\n 'txtName'=>'required',\n 'txtEmail'=>'required|email|unique:users,email',\n 'txtPassword'=>'required',\n 'txtRePassword'=>'required|same:txtPassword'\n ];\n } elseif ($this->method()=='PUT') {\n return [\n 'txtName'=>'required',\n 'txtEmail'=>'required|email'\n ];\n }\n }", "title": "" }, { "docid": "9993c8efb844d8fbf846f2617913334f", "score": "0.73043096", "text": "private function rules()\r\n {\r\n // get the default parent rules\r\n $rules = [\r\n 'data' => 'required|array',\r\n 'data.id' => ($this->request->method() === 'PATCH') ? 'required|string' : 'string',\r\n 'data.type' => ['required', Rule::in(array_keys(config('jsonapi.resources')))],\r\n 'data.attributes' => 'required|array',\r\n ];\r\n\r\n // merge with other custom specified rules from json api config\r\n return $this->mergeConfigRules($rules);\r\n }", "title": "" }, { "docid": "c5f6d38cd7c31a3aecebaf480c5f40d2", "score": "0.7304253", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'group_id' => ['required', 'numeric'],\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'status' => 'required',\n 'username' => ['required', 'unique:user,username'],\n 'password' => 'required'\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'group_id' => ['required', 'numeric'],\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'status' => 'required',\n 'username' => ['required', 'unique:user,username,'.e($this->input('id'))],\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "365616279c796a4eb32657bca9b925e1", "score": "0.72972155", "text": "public function rules()\n\t{\n\t\treturn array_merge(\n\t\t\t$this->searchUserIdValidator->getRules()\n\t\t);\n\t}", "title": "" }, { "docid": "364b9e6f19ad3fcd1adf5189e30a1246", "score": "0.7288927", "text": "public function rules()\n {\n $rules = array();\n switch ($this->method()) {\n case 'POST':\n {\n $rules['fldNameAR'] = 'required|unique:tbl_rooms,fldNameAR|string';\n $rules['fldNameEN'] = 'required|unique:tbl_rooms,fldNameEN|string';\n $rules['fkBranchID'] = 'required|integer';\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules['fldNameAR'] = 'required|unique:tbl_rooms,fldNameAR,'.Request::segment(3).',pkRoomID|string';\n $rules['fldNameEN'] = 'required|unique:tbl_rooms,fldNameEN,'.Request::segment(3).',pkRoomID|string';\n $rules['fkBranchID'] = 'required|integer';\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "aebae367a00730302aeaf73e01eedb4d", "score": "0.72865456", "text": "public function rules()\n {\n $languages = Language::getAll();\n $validation = [];\n\n foreach ($languages as $language) {\n $validation['title_' . $language->id] = 'required|string|max:190';\n $validation['slug_' . $language->id] = 'required|string|max:190';\n $validation['body_' . $language->id] = 'required|json';\n $validation['fk_language_' . $language->id] = 'required|in:'.$language->id;\n }\n\n $validation['is_active'] = 'boolean';\n $validation['embed'] = 'string|nullable';\n $validation['in_header'] = 'boolean';\n $validation['in_footer'] = 'boolean';\n $validation['add_contact_form'] = 'boolean';\n \n \n return $validation;\n }", "title": "" }, { "docid": "fc2d3e187465b7e729e9091850850e19", "score": "0.7285595", "text": "public function rules()\n {\n $rules = $this->storeRequest->rules();\n $rules['password'] = 'confirmed';\n $rules['email'] = 'required|unique:us_reg_LIST,email_us_LI,NULL,id_us_LI,deleted_at,NULL';\n\n return $rules;\n }", "title": "" }, { "docid": "76ba86fc39a55010c5d51c202ef59a1b", "score": "0.7277092", "text": "public function rules()\n {\n $rules = [];\n $rules['grade_id'] = 'required';\n\n if ($this->summaryIsBeingSubmitted()) {\n $rules['assessment_date'] = 'required|date_format:d/m/Y|size:10';\n\n if ($this->summaryIsHealthAndSafety()) {\n $rules['document_path'] = 'required_without:uploaded_document';\n } elseif ( ! $this->summaryHasInsufficientEvidence()) {\n $rules['document_path'] = 'required_without:uploaded_document';\n }\n }\n\n return $rules;\n }", "title": "" } ]
ee9a1553157a4e4907af0501da6bb2a6
Changes facility name for this lab configuration
[ { "docid": "6f8e9ed5fb7e62da1f84dc45d95d7495", "score": "0.56834704", "text": "public function changeName($new_name)\n {\n global $con;\n $new_name = mysql_real_escape_string($new_name, $con);\n $saved_db = DbUtil::switchToGlobal();\n $query_string =\n \"UPDATE lab_config SET name='$new_name' WHERE lab_config_id=$this->id\";\n query_blind($query_string);\n DbUtil::switchRestore($saved_db);\n }", "title": "" } ]
[ { "docid": "73d5cea1c8da039bdc5f696f23d0932a", "score": "0.609939", "text": "function setName($new_name)\n {\n $this->schoolName = $new_name; \n }", "title": "" }, { "docid": "01d46fc8c245219608638987eaa60905", "score": "0.6081522", "text": "public function setName($value){\n\t\t$this->_c_name = $value;\n\t}", "title": "" }, { "docid": "28fffcb3b42728ee92bf6b429d3d440b", "score": "0.5992175", "text": "public function setName($value) { $this->name = $value; }", "title": "" }, { "docid": "bf7e634681ea808ec45255aa5b0a416d", "score": "0.5938408", "text": "function setName($value)\n\t{\n\t\t$this->name = $value;\n\t}", "title": "" }, { "docid": "a5ab069184d29d9a9a5acca766aee2b2", "score": "0.5933106", "text": "public function setName($value)\r\n {\r\n $this->name = $value;\r\n }", "title": "" }, { "docid": "7648c5ac474de441806078c766084395", "score": "0.59257066", "text": "public function setName($value)\r\n\t{\r\n\t\t$this->_name = $value;\r\n\t}", "title": "" }, { "docid": "442f245de4a26be135328e5eb53c611e", "score": "0.59203535", "text": "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "title": "" }, { "docid": "742cf3425bd895f2644aebb267d80e49", "score": "0.58915395", "text": "function setName( &$value )\r\n {\r\n $this->Name = ( $value );\r\n }", "title": "" }, { "docid": "a6db30c54d5cfeb2b9e7c25653773c5d", "score": "0.5875152", "text": "function set_name($new_name) {\n $this->name = $new_name;\n \t}", "title": "" }, { "docid": "64a430ed3a34e11405d719c98f2d15a4", "score": "0.58342296", "text": "public function setNewName($name) {$this->newname = $name;}", "title": "" }, { "docid": "22b2c6a72c03a635c0fcf2930f2c313e", "score": "0.5831599", "text": "function set_name($newname) {\n\t\t$this->name = $newname;\n\t}", "title": "" }, { "docid": "679fe396306a15bf003568df0a087b43", "score": "0.5820743", "text": "function set_name($new_name) {\r\n $this->name = $new_name;\r\n }", "title": "" }, { "docid": "3bccc75858a7fdb9b5cb5f3185c1da16", "score": "0.5812196", "text": "function setName($new_name)\n\t\t{\n\t\t\t$this->name = $new_name;\n\t\t}", "title": "" }, { "docid": "c2c39d84a9628b391e68e5884838ac37", "score": "0.5774227", "text": "public function setContactITName(?string $value): void {\n $this->getBackingStore()->set('contactITName', $value);\n }", "title": "" }, { "docid": "3d5a66d7feef436ec3e785cd7ca42108", "score": "0.57240164", "text": "private function _formatName() {\n $this->_labelSuffix = str_replace(array('/', '-'), '_', $this->_currentAction);\n }", "title": "" }, { "docid": "84a0be32052773c4c626b6be421975ec", "score": "0.5698846", "text": "function setName($sNewValue) {\n $this->sName = $sNewValue;\n }", "title": "" }, { "docid": "412f0f9ddac2f1820b5d977d6cae08df", "score": "0.5685038", "text": "function setName($new_name)\n {\n $this->name = (string) $new_name;\n }", "title": "" }, { "docid": "f01a8a7e356fff52f2ee669ebc13308b", "score": "0.5661289", "text": "public function setConfiguredAppName() {\n if (!extension_loaded('newrelic')) {\n return;\n }\n $name = \"TYPO3 Portal\";\n if (isset($this->configuration['appname']) && !empty($this->configuration['appname'])) {\n $name = $this->configuration['appname'];\n }\n newrelic_set_appname($name);\n }", "title": "" }, { "docid": "b930a25de4e8623229874affdb70cec6", "score": "0.55958134", "text": "function set_name($name) {}", "title": "" }, { "docid": "fbe41ff5a2579485e40dacdb32c19beb", "score": "0.55893755", "text": "public function setStationNameAttribute($value)\n {\n $this->attributes['station_name'] = ucwords($value);\n }", "title": "" }, { "docid": "f5ed67a90d38f161ba0e4c646cae1dc1", "score": "0.5579795", "text": "public function setNameAttribute($value){\n $this->attributes['name'] = ucfirst($value);\n\n }", "title": "" }, { "docid": "b5bd80115b4821d9a1c5621e27d31aa0", "score": "0.55720085", "text": "public function setNameAttribute($value){\n $this->attributes['name'] = ucwords($value);\n }", "title": "" }, { "docid": "a627758e09619422ed6b50538df2e8a3", "score": "0.55581737", "text": "function change_display_name()\n\t{\n\t\tif ( !$this->ipsclass->vars['shop_on'] )\n\t\t{\n\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_shop_offline'));\n\t\t}\n\t\tif ( !$this->ipsclass->vars['change_dname'] )\n\t\t{\n\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_shop_func_off'));\n\t\t}\n\t\t\n\t\t$shop = array( 'name' => $this->ipsclass->member['members_display_name'],\n\t\t\t\t\t 'price' => $this->ipsclass->do_number_format( $this->ipsclass->vars['change_dname_amt'] ),\n\t\t\t\t\t );\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_points']->shop( $shop );\n\t\t\n\t\t$this->page_title = $this->ipsclass->lang['shop'];\n\t\t$this->nav[] = $this->ipsclass->lang['shop'];\n\t}", "title": "" }, { "docid": "476f7f1d7a515aab5beea4161eee55e3", "score": "0.5555737", "text": "function setName($name)\n {\n if (! preg_match('|^[\\w-]+$|i', $name)) {\n return PEAR::raiseError(\"'$name' is not a valid test case basename\");\n }\n\n $this->name = $name;\n if (empty($this->title)) {\n $this->title = $name;\n }\n }", "title": "" }, { "docid": "c56c7eab4d392fadf14ed1aa45a8f634", "score": "0.5509772", "text": "public function setName( $value );", "title": "" }, { "docid": "ee13edb4f79119670056aa99c15ca979", "score": "0.55069464", "text": "public function setName($name)\n\t{\n\t\t$this->name-$name;\n\t}", "title": "" }, { "docid": "8e3ca19e66e573be1c47e0549c6f67af", "score": "0.54938334", "text": "public function setName ( $name ) {\n\t\t$this->auth_name = $name;\n\t}", "title": "" }, { "docid": "5f3a42cfd3478bfd77fbcd11d94aaa30", "score": "0.54906905", "text": "function set_name($n)\n {\n $this->name = $n;\n }", "title": "" }, { "docid": "7f7043487fdebe2ccfe0ec24665282e9", "score": "0.54849523", "text": "public function setName($name){\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "7f7043487fdebe2ccfe0ec24665282e9", "score": "0.54849523", "text": "public function setName($name){\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "15d3f1c3309995f1c8b25d7fea1bf4b8", "score": "0.5472166", "text": "public function setName($name){\n\t\tif (!$this->NAME){\n\t\t\t$this->NAME = $name;\n\t\t}\n\t}", "title": "" }, { "docid": "e27f220079f025bc6cd09094c695d02a", "score": "0.5466147", "text": "function setName($_name)\n {\n $this->Name = $_name;\n }", "title": "" }, { "docid": "68d521e7dde86522d5e67ebb3233fcbf", "score": "0.54608405", "text": "public function setName($name){\n $name = strtolower($name);\n parent::setName($name);\n }", "title": "" }, { "docid": "fe5e74923e6845a02ab3d3b77713ea4e", "score": "0.54492587", "text": "function setname($name) {}", "title": "" }, { "docid": "84efec95d96e0a5a7b0ccbd8641523c9", "score": "0.54436797", "text": "function setName($name) {\t$this->name = $name; }", "title": "" }, { "docid": "db09c11f45c7864e8c2da068a5ce04e6", "score": "0.54330206", "text": "public function set_section_name($name) {\n $this->section_name = $name;\n }", "title": "" }, { "docid": "83b0677e52e3026ad472922f60e59b53", "score": "0.54190975", "text": "public function changeName(string $paramName);", "title": "" }, { "docid": "bc7dea3f9953517f3cff512303e5fd59", "score": "0.54095346", "text": "function change_friendly_name($new_value){\n\t\t$success = $this->change_value('friendly_name',$new_value);\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "0721082f122d613863e8b517880c8afe", "score": "0.54057276", "text": "public function setName($name){\n\t\t$this->name=$name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.53975695", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "e587c6d522b3e15c81b02176f3feb17e", "score": "0.53974307", "text": "public function setName($name) { $this->name = $name; }", "title": "" }, { "docid": "f8ea6f134825dfdecef1104819e63488", "score": "0.53818566", "text": "public function edit(Facility $facility)\n {\n //\n }", "title": "" }, { "docid": "9c871bc902cfc4f9d9bcc8c4a29bbf36", "score": "0.5379532", "text": "public function setName($name){\n $this->name = $name;\n }", "title": "" }, { "docid": "a591dd4bc433b4db45f314355920cd3d", "score": "0.5371894", "text": "function setName($name);", "title": "" }, { "docid": "a591dd4bc433b4db45f314355920cd3d", "score": "0.5371894", "text": "function setName($name);", "title": "" }, { "docid": "a591dd4bc433b4db45f314355920cd3d", "score": "0.5371894", "text": "function setName($name);", "title": "" }, { "docid": "e8fee686d95bf5538789ec5a60fb9aba", "score": "0.53713685", "text": "public function setName($name) {\n\n\t \t\t $this->name = $name;\n\t }", "title": "" }, { "docid": "55eb59d220700687f2ed83f64cf1985b", "score": "0.5361894", "text": "public function setRol_name($value) {\r\n\t\t\t\t\t\tif( !is_string($value) ) {\r\nif(DEBUG_C)\t\t\t\techo \"<p class='debugClass err'><b>Line \" . __LINE__ . \"</b>: rol_name: Must be DATATYPE 'String'! <i>(\" . basename(__FILE__) . \")</i></p>\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$this->rol_name = cleanString($value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "title": "" }, { "docid": "e95d528da61a36c7d59b8289c2db6d47", "score": "0.5356472", "text": "public function setNameAttribute($value)\n {\n $this->attributes['name'] = proper_case($value);\n }", "title": "" }, { "docid": "c4bfdd6642fe2124ae2533d8235068c3", "score": "0.5353353", "text": "public function setName($name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "c4bfdd6642fe2124ae2533d8235068c3", "score": "0.5353353", "text": "public function setName($name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "50a08d8ee37df4b3da985534b0be6ee0", "score": "0.5353249", "text": "public function setName($name){\n $this->name = $name;\n }", "title": "" }, { "docid": "50a08d8ee37df4b3da985534b0be6ee0", "score": "0.5353249", "text": "public function setName($name){\n $this->name = $name;\n }", "title": "" }, { "docid": "f04ce3515f7e0bb347031fd3012f860e", "score": "0.5351822", "text": "public function setName($name) {\n $this->name= $name;\n }", "title": "" }, { "docid": "d2647839ab2d7faecdc65febb87c2161", "score": "0.5337342", "text": "public function setName($name){\n $this-> name = $name;\n }", "title": "" }, { "docid": "bf8351834b2ac0d213a8832b36122e41", "score": "0.53311795", "text": "public function setName(string $name){\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "b77e93b8ab741940614324a09443e44d", "score": "0.5325989", "text": "public function setName($name) {\n\t\t$this->formName = $name;\n\t}", "title": "" }, { "docid": "c4a2e23f56c020d91d9c5422a0d5be77", "score": "0.53209543", "text": "public function setNameAttribute($value)\n {\n $this->attributes['name'] = ucfirst($value);\n }", "title": "" }, { "docid": "c4a2e23f56c020d91d9c5422a0d5be77", "score": "0.53209543", "text": "public function setNameAttribute($value)\n {\n $this->attributes['name'] = ucfirst($value);\n }", "title": "" }, { "docid": "b85ee733cb66e61251b2aeccdf8d8a46", "score": "0.5319553", "text": "public function getFacilityToEdit() {\n $facilities = $this->db->getAllFacilities();\n $content = \"Select Facility To Edit\";\n $content .= \"<select name='facilityToEdit'>\";\n\n foreach ($facilities as $facility) {\n $content .= \"<option value='$facility[FacilityID]'>$facility[FacilityName]</option>\";\n }\n $content .= \"</select>\";\n $this->displayPopUp($content, \"Select Facility\", \"facilityEdit.php\");\n }", "title": "" }, { "docid": "f5c12dadf0054fc6d73c478a5167542a", "score": "0.53154767", "text": "function setVenueName($newVenue) {\n\n\t\t$this->venueName = $newVenue;\n\n }", "title": "" }, { "docid": "7a824ba15ce1b466908f721ab9261f7c", "score": "0.53067964", "text": "public function setName($name){\n\n $this->name=$name;\n \n }", "title": "" }, { "docid": "58f1c65d29b0bacb6b1064198c0ec692", "score": "0.53054357", "text": "public function SetName ($name);", "title": "" }, { "docid": "039639265f3f86468487ea696f9fed97", "score": "0.5293249", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "39fd2b3507b2ae73cc89bd471f58cd16", "score": "0.5280674", "text": "public function setNameAttribute($value)\n {\n $this->attributes['name'] = strtolower(str_replace(['_','-'], [' ', ' '],$value));\n }", "title": "" }, { "docid": "a523e9003a3aa61b2208252622222ec9", "score": "0.52792835", "text": "function setFulname($fulname)\n {\n $this->fulname = $fulname;\n }", "title": "" }, { "docid": "9cc15f4b373442b2de5d208d3599681c", "score": "0.5278771", "text": "public function setName($name) {\n $this->_name = $name;\n }", "title": "" }, { "docid": "96925c495b3feb1d34c89cba03d191a5", "score": "0.5268143", "text": "public function setNameAttribute($value): void\n {\n $this->attributes['name'] = self::titleCase($value);\n }", "title": "" }, { "docid": "313e3e98150ee91e849f7f9dcbc489f3", "score": "0.5267417", "text": "public function setName( $name = '' )\n\t\t{\n\t\t\t$this->_name = $name;\n\t\t}", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.52644736", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.52644736", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.52644736", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.52644736", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "65542b583217c55d5ba1814577d8b460", "score": "0.52611923", "text": "public function setName($name)\r\n {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.52582836", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.52582836", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "07d983e9416674b9753fefb8554a1cd1", "score": "0.5257116", "text": "public function ChangeNameAction() {\n }", "title": "" }, { "docid": "6f3a03d1164985316ad7716873b23749", "score": "0.52518713", "text": "public function setName($name)\n\t{\n\t\t$this->_name = $name;\n\t}", "title": "" }, { "docid": "0868492ff863db598c2f2e29da3e21fb", "score": "0.52484185", "text": "public function setName( $name ) {\n $this->name = (string) $name;\n }", "title": "" }, { "docid": "82296cbbbd6ce95add38447d35bb116b", "score": "0.52443236", "text": "function setName($name) \r\n {\r\n $this->name = $name; \r\n }", "title": "" }, { "docid": "5a70e594503889438ac1a32e8e01cdfe", "score": "0.52438146", "text": "public function setName(): void;", "title": "" }, { "docid": "eff92356c7173ba6ea34eb8527913354", "score": "0.52418816", "text": "public function setName(string $name):void {\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "9f3dc4aa0a26630b03180cf57cb0768a", "score": "0.52283067", "text": "public function name($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "c2325ba28c208798de9cbf033885150e", "score": "0.5220462", "text": "function netsnmp_session_set_sec_name($snmp_session_s, $name) {}", "title": "" }, { "docid": "751fa9f0880c65b0773aac24ddeb7c0e", "score": "0.52203816", "text": "function optionsframework_option_name() {\n $theme = of_get_theme_info();\n $themeName = $theme['Name'];\n\n\n\t$themeName = preg_replace(\"/\\W/\", \"\", strtolower($themeName) );\n\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themeName;\n\tupdate_option('optionsframework', $optionsframework_settings);\n}", "title": "" }, { "docid": "98192396c094a8a093eb42b821833260", "score": "0.52194875", "text": "public function setName($name)\n\t{\n\t\t$this->name=$name;\n\t}", "title": "" }, { "docid": "5ed00bcf3a4be0e9ebf24522b7de96a2", "score": "0.5216298", "text": "public function setName( string $name ) {\n $this->name = $name;\n }", "title": "" }, { "docid": "062464ad868c190a79b260fb53aca850", "score": "0.52160436", "text": "protected function setName($inName)\n {\n $this->name = $inName;\n }", "title": "" }, { "docid": "e4d862d8ba75810c2aa163d7a70f8bff", "score": "0.5205092", "text": "public function setName($name){\r\n if(is_string($name) && strlen($name) >1){\r\n $this->name=$name;\r\n return \"Name Has Been Updated To $name\";\r\n }\r\n else{\r\n return \"Not Valid Name!\";\r\n }\r\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.52015394", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.52015394", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "788cc58e612ae650b211e3779d03f84a", "score": "0.5198469", "text": "public function setName($value)\n {\n if (!array_key_exists('name', $this->fieldsModified)) {\n $this->fieldsModified['name'] = $this->data['fields']['name'];\n } elseif ($value === $this->fieldsModified['name']) {\n unset($this->fieldsModified['name']);\n }\n\n $this->data['fields']['name'] = $value;\n }", "title": "" }, { "docid": "abbefd15ed77fbef2164151b1b8a0af3", "score": "0.5196436", "text": "public function setAssigneeDisplayName(?string $value): void {\n $this->getBackingStore()->set('assigneeDisplayName', $value);\n }", "title": "" }, { "docid": "46f4733ccbac6f922a3ea0e46fe932b9", "score": "0.5193943", "text": "public function setName($name) {\n\n $this->name = $name;\n }", "title": "" }, { "docid": "a3e6bf5bf49b16b84830db01044e0e45", "score": "0.5187248", "text": "public function setOrganizationUnitName(?string $value): void {\n $this->getBackingStore()->set('organizationUnitName', $value);\n }", "title": "" } ]
acc8590656edcfa8ca6ebca5be01f335
Function to check filters for record.
[ { "docid": "a342ac40bce39a1fb1a467e777a61079", "score": "0.6119173", "text": "public function checkFiltersForRecord($recordId)\n\t{\n\t\t$key = $this->getId() . '_' . $recordId;\n\t\tif (\\App\\Cache::staticHas(__METHOD__, $key)) {\n\t\t\treturn \\App\\Cache::staticGet(__METHOD__, $key);\n\t\t}\n\t\tVtiger_Loader::includeOnce('~/modules/com_vtiger_workflow/VTJsonCondition.php');\n\t\t$conditionStrategy = new VTJsonCondition();\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($recordId);\n\t\t$test = $conditionStrategy->evaluate($this->getRaw('conditions'), $recordModel);\n\t\t\\App\\Cache::staticSave(__METHOD__, $key, $test);\n\n\t\treturn $test;\n\t}", "title": "" } ]
[ { "docid": "4f95969ee33e5fc02745a5596fcabf39", "score": "0.73315734", "text": "public function isRecordToBeFiltered(array $record);", "title": "" }, { "docid": "073fe7f2b4cd999aad10700b3ae31330", "score": "0.7162729", "text": "function CheckFilter() {\n\n\t// Check feedmill popup filter\n\tif (!ewrpt_MatchedArray($GLOBALS[\"seld_feedmill\"], $GLOBALS[\"sel_feedmill\"]))\n\t\treturn TRUE;\n\n\t// Check feedtype popup filter\n\tif (!ewrpt_MatchedArray($GLOBALS[\"seld_feedtype\"], $GLOBALS[\"sel_feedtype\"]))\n\t\treturn TRUE;\n\n\t// Check sid popup filter\n\tif (!ewrpt_MatchedArray($GLOBALS[\"seld_sid\"], $GLOBALS[\"sel_sid\"]))\n\t\treturn TRUE;\n\n\t// Check date popup filter\n\tif (!ewrpt_MatchedArray($GLOBALS[\"seld_date\"], $GLOBALS[\"sel_date\"]))\n\t\treturn TRUE;\n\treturn FALSE;\n}", "title": "" }, { "docid": "8789ba01bebd099bdc9514b23e3a97a3", "score": "0.7086205", "text": "public function checkFilterPredicates() {\n\t}", "title": "" }, { "docid": "f73f0face4a35dcd450d62c078a43413", "score": "0.70791143", "text": "private static function check_field_filters( &$atts ) {\n\t\tif ( ! empty( $atts['filters'] ) ) {\n\n\t\t\tif ( ! isset( $atts['entry_ids'] ) ) {\n\t\t\t\t$atts['entry_ids'] = array();\n\t\t\t\t$atts['after_where'] = false;\n\t\t\t} else {\n\t\t\t\t$atts['after_where'] = true;\n\t\t\t}\n\n\t\t\tforeach ( $atts['filters'] as $key => $value ) {\n\t\t\t\t$atts['entry_ids'] = self::get_entry_ids_for_field_filter( $key, $value, $atts );\n\t\t\t\t$atts['after_where'] = true;\n\n\t\t\t\tif ( ! $atts['entry_ids'] ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "369fbb2a8c082fd9c5e147bff7601e0b", "score": "0.669901", "text": "protected function _validateFilters()\n {\n if ($this->getInfo('noFilters') == 1)\n return false;\n\n if (is_array($this->_filters) && count($this->_filters) > 0)\n return $this->_filters;\n\n return array_combine($this->_fields, $this->_fields);\n }", "title": "" }, { "docid": "b11c11e828cfaf6f0486baff09e5616a", "score": "0.6669205", "text": "function has_filters() {\n //get the list of defined filters\n $filters = $this->get_filters();\n\n //check how many there are\n return count($filters) > 0;\n }", "title": "" }, { "docid": "9a88180ac9d8fa0cb4357719996b4b70", "score": "0.66171235", "text": "public function hasFilters()\n {\n if (count(array_intersect_key(array_combine($this->getFields(), $this->getFields()), $this->_ctrlParams)) > 0)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "9d2f5667082df261f8cb285f559bf3b4", "score": "0.6601346", "text": "public function hasFilters()\n {\n return $this->request->input('filters')!=='';\n }", "title": "" }, { "docid": "62b61d56692c3943b7dd8634181f1814", "score": "0.64764833", "text": "public function isFiltered();", "title": "" }, { "docid": "5f8ad5ba41b7fe52006f0b7a39b30ac9", "score": "0.6402461", "text": "protected function checkFilters() {\r\n\r\n\t\t$this->log.= '- <b>Inicializando filtros para listado</b> <br/>';\r\n\r\n\t\t$sql = array();\r\n\r\n\t\tif ($this->itemAutor != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por autor</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemAutor.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemAutor);\r\n\r\n\t\t\t$this->log.= '- Autor buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_autor = '{$texto}'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemEstado !== false) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemEstado, 'estado', 'noticia_estado')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemFuente != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por fuente</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemFuente.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemFuente);\r\n\r\n\t\t\t$this->log.= '- Fuente a buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_fuente = '{$texto}'\";\r\n\t\t}\r\n\r\n\t\tif ($this->itemId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemId, 'Id', 'noticia_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemObject != '') {\r\n\t\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por objetos asociados</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemObject.'<br/>';\r\n\t\t\t\r\n\t\t\t$oObjs = explode(',', $this->itemObject);\r\n\t\t\t$oObjSearch = array();\r\n\t\t\tforeach($oObjs as $oId=> $o) {\r\n\t\t\t\t$o = trim($o);\r\n\t\t\t\t$oObjSearch[] = \"adjunto_tipo = '{$o}'\";\r\n\t\t\t}\r\n\t\t\t$oSql = implode(' OR ', $oObjSearch);\r\n\t\t\t\r\n\t\t\tif ($oSql != '') {\r\n\r\n\t\t\t\t$oObj='';\r\n\t\t\t\r\n\t\t\t\t$oSql = \"SELECT DISTINCT(adjunto_noticia_id)\r\n\t\t\t\t\tFROM {$this->_table}noticias_multimedia\r\n\t\t\t\t\tWHERE adjunto_noticia_tipo = '{$this->_tipo}' AND {$oSql}\";\r\n\t\t\t\tif ($res = $this->db->query($oSql)){\r\n\t\t\t\t\tif ($this->db->num_rows($res)) {\r\n\t\t\t\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t\t\t\t$rs = $this->db->next($res);\r\n\t\t\t\t\t\t\t$oObj.= ','.$rs[\"adjunto_noticia_id\"];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oObj = substr($oObj,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($oObj == '') {\r\n\t\t\t\t\t$this->log.= '- No existen artículos con los objetos solicitados.<br/>';\r\n\t\t\t\t\t$this->log.= '- Se asigna la búsqueda de noticia_id = 0 <br/>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql[] = \"noticia_id = '0'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sql[] = \"noticia_id IN({$oObj})\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemSeccion) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemSeccion, 'seccion', 'noticia_seccion_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemSQLExtra != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Parámetros externos de SQL</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemSQLExtra.'<br/>';\r\n\r\n\t\t\t$sql[] = $this->itemSQLExtra;\r\n\t\t}\r\n\r\n\t\tif ($this->itemTags != '') {\r\n\t\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por etiqueta</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTags.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTags);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Valor limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\t$oTags = '';\r\n\t\t\t\r\n\t\t\t\t$oSql = \"SELECT adjunto_noticia_id \r\n\t\t\t\t\tFROM {$this->_table}noticias_tags, {$this->_table}noticias_galeria_tags \r\n\t\t\t\t\tWHERE adjunto_tag_id = tag_id \r\n\t\t\t\t\t\tAND tag_tipo = {$this->_tipo} \r\n\t\t\t\t\t\tAND tag_nombre = '{$texto}'\";\r\n\r\n\t\t\t\tif ($res = $this->db->query($oSql)){\r\n\t\t\t\t\tif ($this->db->num_rows($res)) {\r\n\t\t\t\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t\t\t\t$rs = $this->db->next($res);\r\n\t\t\t\t\t\t\t$oTags.= ','.$rs['adjunto_noticia_id'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$oTags = substr($oTags,1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($oTags == '') {\r\n\t\t\t\t\t$this->log.= '- No existen artículos con la etiqueta.<br/>';\r\n\t\t\t\t\t$this->log.= '- Se asigna la búsqueda de noticia_id = 0 <br/>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql[] = \"noticia_id = '0'\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$sql[] = \"noticia_id IN({$oTags})\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTexto != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por texto</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTexto.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTexto);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Texto limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\r\n\t\t\t\t$textoTipo = strtolower(trim($this->itemTextoTipo));\r\n\r\n\t\t\t\tswitch($textoTipo) {\r\n\t\t\t\t\tcase 'and':\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$texto = '+'.$texto;\r\n\t\t\t\t\t\t$texto = str_replace(' ', ' +',$texto);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'or':\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'all':\r\n\t\t\t\t\t\t$texto = \"\\\"{$texto}\\\"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->log.= '- Texto a envíar para la búsqueda:'.$texto.'<br/>';\r\n\r\n\t\t\t\t$sql[] = \"MATCH (noticia_volanta, noticia_titulo, noticia_bajada,\r\n\t\t\t\t\tnoticia_texto, noticia_texto_complementario) \r\n\t\t\t\tAGAINST ('{$texto}' IN BOOLEAN MODE)\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTipo) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemTipo, 'tipo', 'noticia_tipo')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTitulo != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por url friendly del titulo</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTitulo.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTitulo);\r\n\r\n\t\t\t$this->log.= '- Titulo Url Friendly a buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_page_url = '{$texto}'\";\r\n\t\t}\r\n\r\n\t\tif ($this->itemUbicacion) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemUbicacion, 'ubicación', 'noticia_ubicacion_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\r\n\t\tif ($this->itemUserId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemUserId, 'user Id', 'noticia_user_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->log.= '- Asignación de filtros OK <br/>';\r\n\r\n\t\treturn $sql;\t\t\r\n\t}", "title": "" }, { "docid": "bfbdc6761d8b060f7120dbd5a3e6d2da", "score": "0.63426393", "text": "public function actionCheckfilterExist() {\n $filter_name = Yii::$app->request->post('filter_name');\n return SavedFilters::find()->where(['user_id'=>Yii::$app->user->identity->id,'filter_type' => 1, 'LOWER(filter_name)' => strtolower($filter_name)])->count();\n }", "title": "" }, { "docid": "7fa946cfc69bf3b988ecb525f59d531f", "score": "0.6278318", "text": "public function filterRecord(array $record);", "title": "" }, { "docid": "3aea983a21cbdf015b9dad7a88753fb1", "score": "0.6275702", "text": "public function checkFilters(): void\n {\n foreach ($this->filters() as $filter => $_default) {\n if (! isset($this->filters[$filter]) || $this->filters[$filter] === '') {\n $this->filters[$filter] = null;\n }\n }\n }", "title": "" }, { "docid": "06e0e69cd5086c0b8da5c7d67f116632", "score": "0.6251058", "text": "public function checkFilterPredicates() {\n\n\t\t$keywords = $this->consumer->getKeywords();\n\n\t\tif ($this->consumer->getTypeStreaming()==self::TYPE_STREAMING_TRACK) {\n\t\t\t// Keywords\n\t\t\t$this->setTrack($keywords);\n\t\t} else {\n\t\t\t// User follow stream\n\t\t\t$this->setFollow($keywords);\n\t\t}\n\t}", "title": "" }, { "docid": "756e553c0526ed3488060065bc3d13b8", "score": "0.62430364", "text": "function checkFilter($filter, $doc) {\n\t\t\tif (!isset($filter)) {\n\t\t\t return 1;\n\t\t\t}\n\t\t\t$filter = print_r($filter, true); // there seem to be problems with non-string filter values\n\t\t\tif (strlen($filter)<1) {\n\t\t\t return 1;\n\t\t\t}\n\t\t\t// parse filters\n\t\t\t$filterarr = explode(\";\", $filter);\n\t\t\tforeach ($filterarr as $singlefilter) {\n\t\t\t $singlefilterarr = explode('=', $singlefilter);\n\t\t\t $filterattr = $singlefilterarr[0];\n\t\t\t if (isset($singlefilterarr[1])) {\n\t\t\t\t$filterval = $singlefilterarr[1];\n\t\t\t } else {\n\t\t\t\tcontinue;\n\t\t\t }\n\t\t\t switch ($filterattr) {\n\t\t\t case \"author\":\n\t\t\t\t$author_arr = $doc->authors;\n\t\t\t\tif (is_array($author_arr)) {\n\t\t\t\t\t$tmps = $this->comma_separated_names($author_arr);\n \t\t\tif (stristr($tmps, $filterval) === FALSE) {\n \t\t\treturn 0;\n \t\t\t}\n\t\t\t\t} else { return 0; } // if there is no author attribute ...\n\t\t\t\tbreak;\n\t\t\t case \"editor\":\n \t$editor_arr = $doc->editors;\n\t\t\t\tif (is_array($editor_arr)) {\n\t\t\t\t\t$tmps = $this->comma_separated_names($editor_arr);\n \t\t\tif (stristr($tmps, $filterval) === FALSE) {\n \t\t\treturn 0;\n \t\t\t}\n\t\t\t\t} else { return 0; }\n\t\t\t\tbreak;\n\t\t\t case \"tag\":\n\t\t\t case \"tags\":\n \t$tag_arr = @$doc->tags;\n\t\t\t\t$ismatch = 0;\n\t\t\t\tif (is_array($tag_arr)) {\n \t\tfor($i = 0; $i < sizeof($tag_arr); ++$i) {\n \t\t\tif (!(stristr($tag_arr[$i], $filterval) === FALSE)) {\n \t\t\t\t$ismatch = 1;\n\t\t\t\t\t\t}\n \t\t}\n \t} else {\n\t\t\t\t if (!(stristr($tag_arr, $filterval) === FALSE)) {\n\t\t\t\t\t\t$ismatch = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($ismatch == 0) {\n\t\t\t\t \treturn 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t case \"keyword\":\n\t\t\t case \"keywords\":\n \t$keyword_arr = $doc->keywords;\n\t\t\t\t$ismatch = 0;\n\t\t\t\tif (is_array($keyword_arr)) {\n \t\tfor($i = 0; $i < sizeof($keyword_arr); ++$i) {\n \t\t\tif (!(stristr($keyword_arr[$i], $filterval) === FALSE)) {\n \t\t\t\t$ismatch = 1;\n\t\t\t\t\t\t}\n \t\t}\n \t} else {\n\t\t\t\t if (!(stristr($tag_arr, $filterval) === FALSE)) {\n\t\t\t\t\t\t$ismatch = 1;\n\t\t\t\t\t}\n \t}\n\t\t\t\tif ($ismatch == 0) {\n\t\t\t\t return 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t default:\n \t// other attributes\n\t\t\t\tif (!isset($doc->{$filterattr})) {\n\t\t\t\t continue 2;\n\t\t\t\t}\n if (!(strcmp($filterval, $doc->{$filterattr})==0)) {\n\t\t\t\t return 0;\n }\n\t\t\t } // switch\n\t\t\t} // foreach singlefilter\n\t\t\treturn 1;\n\t\t}", "title": "" }, { "docid": "17053d13218cf3fe51046a99686275fb", "score": "0.6230209", "text": "public function checkFilterPredicates() \n {\n\t global $client;\n // This is all that's required, Phirehose will detect the change and reconnect as soon as possible\n $tags = $client->LRANGE('tags', 0, -1);\n $this->setTrack($tags);\n }", "title": "" }, { "docid": "9cdc013a8da0f877c679a8d6fe384ae0", "score": "0.6187054", "text": "function validateFilters($filters) {\n\t\t\n\t\tif (isset ( $this->info ['noFilters'] ) && $this->info ['noFilters']) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$titulos = null;\n\t\t\n\t\tif (is_array ( $filters )) {\n\t\t\treturn $filters;\n\t\t} elseif ($this->_adapter == 'db') {\n\t\t\t//Não forneceu dados, temos que ir buscá-los todos às tabelas\n\t\t\t$titulos = array_combine ( array_keys ( $this->_fieldsNoAs ), array_keys ( $this->_fieldsNoAs ) );\n\t\t}\n\t\t\n\t\tif (isset ( $this->data ['hide'] ) && is_array ( $this->data ['hide'] )) {\n\t\t\t\n\t\t\tforeach ( $this->data ['hide'] as $value ) {\n\t\t\t\tif (array_key_exists ( $value, $titulos )) {\n\t\t\t\t\tunset ( $titulos [$value] );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (is_array ( $titulos )) {\n\t\t\t\t\n\t\t\t\tforeach ( $titulos as $key => $value ) {\n\t\t\t\t\t\n\t\t\t\t\tif (strpos ( $key, '.' ) === false) {\n\t\t\t\t\t\t$key = $this->data ['tableAlias'] . '.' . $key;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (! in_array ( $key, $this->map_array ( $this->_fields, 'replace_AS' ) )) {\n\t\t\t\t\t\tunset ( $titulos [$key] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $titulos;\n\t}", "title": "" }, { "docid": "f1c2355272845cd687de968dd09183d9", "score": "0.61651766", "text": "public function getFilter() : bool;", "title": "" }, { "docid": "3fa4589753f49ba010a3e9c49dd24c0e", "score": "0.61406106", "text": "public function actionCheckSavedfilter(){\n $filter_id = Yii::$app->request->post('filter_id', 0);\n $filter_data = SavedFilters::findOne($filter_id);\n if(isset($filter_data->id)){\n return \"OK\";\n }\n return \"ERROR\";\n }", "title": "" }, { "docid": "0c4f4da985643d5ef3a90eac42df2f62", "score": "0.61223054", "text": "function Page_FilterValidated() {\n\n\t\t// Example:\n\t\t//global $MyTable;\n\t\t//$MyTable->MyField1->SearchValue = \"your search criteria\"; // Search value\n\n\t}", "title": "" }, { "docid": "ed5ffbfb2a9507056919a1f9e940adea", "score": "0.6111711", "text": "public function _check_filters(Array $filters) {\n\n $date_statement = \"Feedback.dtAdded DESC\";\n\n $filters['filed_statement'] = ($filters['filter'] == 'filed') ? 'AND Category.intName != \"default\"' : 'AND Category.intName = \"default\"'; \n $filters['featured'] = 0;\n $filters['published'] = 0;\n $filters['deleted'] = 0;\n\n if ($filters['filter'] and $filters['choice']) {\n //check against filter structure \n if (!array_key_exists($filters['filter'], $this->filter_structure)) {\n throw new Exception(\"{$filters['filter']} not a valid filter structure data type.\");\n } \n \n if (!array_key_exists($filters['choice'], $this->choice_structure)) {\n throw new Exception(\"{$filters['choice']} not a valid choice structure data type.\");\n } \n\n if ($filters['filter'] == 'featured') {\n $filters['featured'] = 1;\n }\n\n if ($filters['filter'] == 'published') {\n $filters['published'] = 1;\n }\n\n if ($filters['filter'] == 'deleted') {\n $filters['deleted'] = 1;\n }\n }\n\n if ($filters['filter'] and $filters['choice'] == false) {\n //check against choice structure \n if (!array_key_exists($filters['filter'], $this->choice_structure)) {\n throw new Exception(\"{$filters['filter']} not a valid choice structure data type.\");\n } else {\n $filters['choice'] = $filters['filter'];\n unset($filters['filter']);\n } \n }\n\n if ($filters['date']) {\n if (!array_key_exists($filters['date'], $this->date_structure)) {\n throw new Exception(\"{$filters['date']} not a valid date structure data type.\");\n } else { \n if($filters['choice'] == 'mostcontent') {\n\n if($filters['date'] == 'date_new' ) {\n $date_statement = \"Feedback.dtAdded DESC, word_count DESC\";\n }\n\n if($filters['date'] == 'date_old' ) {\n $date_statement = \"Feedback.dtAdded ASC, word_count DESC\"; \n } \n } else { \n\n if ($filters['date'] == 'date_new') {\n $date_statement = \"Feedback.dtAdded DESC\";\n }\n\n if ($filters['date'] == 'date_old') { \n $date_statement = \"Feedback.dtAdded ASC\";\n }\n }\n } \n }\n\n if ($filters['choice'] == 'mostcontent' && !$filters['date']) {\n $date_statement = \"word_count DESC\";\n }\n\n //anchor statements \n $sql_statement = call_user_func(function($filters) { \n if($filters['choice'] == 'profanity') {\n return \"AND Feedback.hasProfanity = 1\";\n } \n\n if($filters['choice'] == 'flagged') {\n return \"AND Feedback.isFlagged = 1\";\n }\n\n if ($filters['choice'] == 'positive' && !$filters['rating']) {\n return \"AND Feedback.rating IN (4,5)\";\n }\n\n if ($filters['choice'] == 'negative' && !$filters['rating']) { \n return \"AND Feedback.rating IN (1,2)\";\n }\n\n if ($filters['choice'] == 'neutral' && !$filters['rating']) { \n return \"AND Feedback.rating = 3\";\n }\n\n return null;\n }, $filters); \n\n //ephemeral statements\n $numeric_check = function($id) {\n if( !is_numeric($id) ) {\n throw new \\InvalidArgumentException(\"Site ID is integers only playah!\");\n } \n };\n\n $siteid_statement = $this->_sql_statement_decorator($filters['site_id'], function($id) { \n return \"AND Feedback.siteId = $id\"; \n }, $numeric_check);\n\n $rating_statement = $this->_sql_statement_decorator($filters['rating'], function($rating) { \n return \"AND Feedback.rating = $rating\";\n }, $numeric_check);\n\n \n $priority_statement = $this->_sql_statement_decorator($filters['priority'], function($choice) {\n $choice = trim($choice, \"'\");\n\n if($choice === 'low') {\n return \"AND (Feedback.priority >= 0 AND Feedback.priority <= 30)\"; \n }\n\n if($choice == \"medium\") { \n return \"AND (Feedback.priority >= 30 AND Feedback.priority <= 60)\"; \n }\n \n if($choice == \"high\") { \n return \"AND (Feedback.priority > 60 AND Feedback.priority <= 100)\"; \n }\n\n });\n\n $category_statement = $this->_sql_statement_decorator($filters['category'], function($category) { \n return \"AND Category.intName = $category\"; \n });\n\n $status_statement = $this->_sql_statement_decorator($filters['status'], function($status) { \n return \"AND Feedback.status = $status\";\n });\n\n $filters['status_statement'] = $status_statement;\n $filters['priority_statement'] = $priority_statement;\n $filters['date_statement'] = $date_statement;\n $filters['siteid_statement'] = $siteid_statement;\n $filters['rating_statement'] = $rating_statement;\n $filters['category_statement'] = $category_statement;\n $filters['sql_statement'] = $sql_statement;\n\n return $filters;\n }", "title": "" }, { "docid": "cd5164d89eaaa7f2f51c4c8ea2e326bc", "score": "0.60683393", "text": "public function filterFields();", "title": "" }, { "docid": "e5178e08f8317d366e803bcef3c859f1", "score": "0.6035379", "text": "abstract public function hasFilter( $name );", "title": "" }, { "docid": "d6a4b5de358bfc3d9c04d7c85082c75d", "score": "0.6029073", "text": "private static function checkFilter($method,$table,$id,$extra,$filterConfig){\n\t\tif ($filterConfig==null)\n\t\t\treturn true;\n\t\t\t\n\t\tforeach($filterConfig as $filter=>$filterv){\n\t\t\tswitch($filter){\n\t\t\t\tcase \"method\":\n\t\t\t\t\tif (!self::checkFilterInList($method,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"no_method\":\n\t\t\t\t\tif (!self::checkFilterNotInList($method,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"table\":\n\t\t\t\t\tif (!self::checkFilterInList($table,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"no_table\":\n\t\t\t\t\tif (!self::checkFilterNotInList($table,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"id_defined\":\n\t\t\t\t\tif ($filterv==\"yes\")\n\t\t\t\t\t\tif ($id==null || $id==\"\")\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\n\t\t\t\t\tif ($filterv==\"no\")\n\t\t\t\t\t\tif ($id!=null && $id!=\"\")\n\t\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"id\":\n\t\t\t\t\tif (!self::checkFilterInList($id,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t\tcase \"no_id\":\n\t\t\t\t\tif (!self::checkFilterNotInList($id,$filterv))\n\t\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7b133726268699b16bf7baf23cd30501", "score": "0.5964031", "text": "public function validate() {\n\t\t// expose a hook for custom filters\n\t\twfRunHooks( 'PayflowGatewayCustomFilter', array( &$this ) );\n\t\t$this->gateway_object->action = $this->determineAction();\n\n\t\t$log_msg = '\"' . $this->gateway_object->action . \"\\\"\\t\\\"\" . $this->risk_score . \"\\\"\";\n\t\t$this->log( $this->gateway_data['contribution_tracking_id'], 'Filtered', $log_msg );\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "88f53091c83d49f5443f8a80699fd311", "score": "0.59577847", "text": "public function Check_Filter($data, $tier = NULL)\n\t\t{\n\t\t\treturn NULL;\n\t\t}", "title": "" }, { "docid": "2055b27e76f2722ce7eef854d0963627", "score": "0.5952715", "text": "function onFiltersGot(&$params, &$oRequest)\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "eee3d1c5d23e30499983f04a17634c68", "score": "0.5854396", "text": "public function matching($filters);", "title": "" }, { "docid": "ac56df12e3af6622ebdea0e22a2a1aa7", "score": "0.5838188", "text": "protected function hasFilters()\n {\n return collect($this->query()->has());\n }", "title": "" }, { "docid": "e31024b8025955a4698de343663646cf", "score": "0.5825092", "text": "public function filterable(): bool;", "title": "" }, { "docid": "5c97016ea0ec9cf9217ebe9447ebef2f", "score": "0.5808237", "text": "abstract protected function filters(): array;", "title": "" }, { "docid": "52eefba9b79161f0d3f33b7640573122", "score": "0.5786051", "text": "public function test_filter ()\n\t\t{\n\t\t}", "title": "" }, { "docid": "b2210dbd8f75a1a48787d27d7160f4c1", "score": "0.5765846", "text": "public function isFilterable(): bool\n {\n return empty($this->offset) && empty($this->limit);\n }", "title": "" }, { "docid": "d2d234cce4c80c5f26a259afcb533b43", "score": "0.5746066", "text": "protected function Chunk_Filter()\n {\n $Filter = Zero_Filter::Factory($this->Model);\n if ( false == $Filter->IsInit )\n {\n $condition = Zero_App::$Users->Get_Condition();\n foreach ($this->Model->Get_Config_Filter() as $prop => $row)\n {\n $method = 'Add_Filter_' . $row['Form'];\n if ( method_exists($Filter, $method) )\n {\n if ( isset($row['Visible']) && true == $row['Visible'] )\n $row['Visible'] = 1;\n else\n $row['Visible'] = 0;\n //\n if ( isset($condition[$prop]) )\n {\n if ( 1 < count($condition[$prop]) )\n $Filter->$method($prop, $row, $row['Visible'], $condition[$prop]);\n else\n $Filter->$method($prop, $row, 0, $condition[$prop]);\n }\n else\n $Filter->$method($prop, $row, $row['Visible'], 1);\n }\n else if ( isset($row['DB']) )\n {\n $method = '';\n if ( $row['DB'] == 'I' || $row['DB'] == 'F' )\n $method = 'Add_Search_Number';\n else if ( $row['DB'] == 'T' )\n $method = 'Add_Search_Text';\n\n if ( method_exists($Filter, $method) )\n $Filter->$method($prop, $row);\n\n if ( $method != '' )\n {\n $Filter->Add_Sort($prop, $row);\n if ( 'Sort' == $prop )\n $Filter->Set_Sort($prop);\n }\n }\n// if ( isset($row['Search']) && $row['Search'] )\n// {\n// $method = 'Add_Search_' . $row['Search'];\n// if ( method_exists($Filter, $method) )\n// $Filter->$method($prop, $row);\n// }\n// if ( isset($row['Sort']) && $row['Sort'] )\n// {\n// $Filter->Add_Sort($prop, $row);\n// if ( 'Sort' == $prop )\n// $Filter->Set_Sort($prop);\n// }\n }\n $Filter->IsInit = true;\n }\n\n // Page by page\n if ( isset($_GET['pg']) && 0 < $_GET['pg'] )\n $Filter->Page = $_GET['pg'];\n }", "title": "" }, { "docid": "16d26e6007523f5e28824048f2b7b313", "score": "0.57029074", "text": "protected function filter()\n {\n //\n }", "title": "" }, { "docid": "0f357d8dba600004d3010a71af4037e1", "score": "0.5679874", "text": "public function getFilters() {}", "title": "" }, { "docid": "3c450280d2e7ae5955e9c2e0c7718f11", "score": "0.5670439", "text": "public function filters()\n\t{\n\t\tif ( $_SERVER['HTTP_HOST'] == 'localhost' ) return array();\n\n\t\t//\tPerform access control for CRUD operations\n\t\treturn array(\n\t\t\t'accessControl',\n\t\t);\n\t}", "title": "" }, { "docid": "7548fbc212243d65807f4961a9be28c9", "score": "0.5661004", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['user_state'] = $this->_getSanitizedParam(\"user_state\");\n\t\t\t\t\t$parramsfilter['user_date'] = $this->_getSanitizedParam(\"user_date\");\n\t\t\t\t\t$parramsfilter['user_names'] = $this->_getSanitizedParam(\"user_names\");\n\t\t\t\t\t$parramsfilter['user_level'] = $this->_getSanitizedParam(\"user_level\");\n\t\t\t\t\t$parramsfilter['user_user'] = $this->_getSanitizedParam(\"user_user\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "47804d3f986ed2f84489c1cc7f49feb1", "score": "0.56316644", "text": "function filter_ensure_valid_filter( $p_filter_arr ) {\n\n\t# extend current filter to add information passed via POST\n\tif( !isset( $p_filter_arr['_version'] ) ) {\n\t\t$p_filter_arr['_version'] = config_get( 'cookie_version' );\n\t}\n\t$t_cookie_vers = (int) utf8_substr( $p_filter_arr['_version'], 1 );\n\tif( utf8_substr( config_get( 'cookie_version' ), 1 ) > $t_cookie_vers ) {\n\n\t\t# if the version is old, update it\n\t\t$p_filter_arr['_version'] = config_get( 'cookie_version' );\n\t}\n\tif( !isset( $p_filter_arr['_view_type'] ) ) {\n\t\t$p_filter_arr['_view_type'] = gpc_get_string( 'view_type', 'simple' );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_ISSUES_PER_PAGE] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_ISSUES_PER_PAGE] = gpc_get_int( FILTER_PROPERTY_ISSUES_PER_PAGE, config_get( 'default_limit_view' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_HIGHLIGHT_CHANGED] = config_get( 'default_show_changed' );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_SHOW_STICKY_ISSUES] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_SHOW_STICKY_ISSUES] = gpc_string_to_bool( config_get( 'show_sticky_issues' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_SORT_FIELD_NAME] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_SORT_FIELD_NAME] = \"last_updated\";\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_SORT_DIRECTION] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_SORT_DIRECTION] = \"DESC\";\n\t}\n\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_PLATFORM] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_PLATFORM] = array(\n\t\t\t0 => META_FILTER_ANY,\n\t\t);\n\t}\n\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_OS] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_OS] = array(\n\t\t\t0 => META_FILTER_ANY,\n\t\t);\n\t}\n\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_OS_BUILD] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_OS_BUILD] = array(\n\t\t\t0 => META_FILTER_ANY,\n\t\t);\n\t}\n\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_PROJECT_ID] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_PROJECT_ID] = array(\n\t\t\t0 => META_FILTER_CURRENT,\n\t\t);\n\t}\n\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_START_MONTH] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_START_MONTH] = gpc_get_string( FILTER_PROPERTY_START_MONTH, date( 'm' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_START_DAY] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_START_DAY] = gpc_get_string( FILTER_PROPERTY_START_DAY, 1 );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_START_YEAR] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_START_YEAR] = gpc_get_string( FILTER_PROPERTY_START_YEAR, date( 'Y' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_END_MONTH] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_END_MONTH] = gpc_get_string( FILTER_PROPERTY_END_MONTH, date( 'm' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_END_DAY] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_END_DAY] = gpc_get_string( FILTER_PROPERTY_END_DAY, date( 'd' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_END_YEAR] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_END_YEAR] = gpc_get_string( FILTER_PROPERTY_END_YEAR, date( 'Y' ) );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_FREE_TEXT] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_FREE_TEXT] = '';\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_NOT_ASSIGNED] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_NOT_ASSIGNED] = gpc_get_bool( FILTER_PROPERTY_NOT_ASSIGNED, false );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_FILTER_BY_DATE] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_FILTER_BY_DATE] = gpc_get_bool( FILTER_PROPERTY_FILTER_BY_DATE, false );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_VIEW_STATE_ID] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_VIEW_STATE_ID] = gpc_get( FILTER_PROPERTY_VIEW_STATE_ID, '' );\n\t}\n\telse if( filter_field_is_any( $p_filter_arr[FILTER_PROPERTY_VIEW_STATE_ID] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_VIEW_STATE_ID] = META_FILTER_ANY;\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_TYPE] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_TYPE] = gpc_get_int( FILTER_PROPERTY_RELATIONSHIP_TYPE, -1 );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_BUG] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_RELATIONSHIP_BUG] = gpc_get_int( FILTER_PROPERTY_RELATIONSHIP_BUG, 0 );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_TARGET_VERSION] = META_FILTER_ANY;\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_TAG_STRING] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_TAG_STRING] = gpc_get_string( FILTER_PROPERTY_TAG_STRING, '' );\n\t}\n\tif( !isset( $p_filter_arr[FILTER_PROPERTY_TAG_SELECT] ) ) {\n\t\t$p_filter_arr[FILTER_PROPERTY_TAG_SELECT] = gpc_get_string( FILTER_PROPERTY_TAG_SELECT, '' );\n\t}\n\n\t# initialize plugin filters\n\t$t_plugin_filters = filter_get_plugin_filters();\n\tforeach( $t_plugin_filters as $t_field_name => $t_filter_object ) {\n\t\tif( !isset( $p_filter_arr[ $t_field_name ] ) ) {\n\t\t\tswitch( $t_filter_object->type ) {\n\t\t\t\tcase FILTER_TYPE_STRING:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = gpc_get_string( $t_field_name, $t_filter_object->default );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILTER_TYPE_INT:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = gpc_get_int( $t_field_name, (int)$t_filter_object->default );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILTER_TYPE_BOOLEAN:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = gpc_get_bool( $t_field_name, (bool)$t_filter_object->default );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILTER_TYPE_MULTI_STRING:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = gpc_get_string_array( $t_field_name, array( 0 => META_FILTER_ANY ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase FILTER_TYPE_MULTI_INT:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = gpc_get_int_array( $t_field_name, array( 0 => META_FILTER_ANY ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$p_filter_arr[ $t_field_name ] = META_FILTER_ANY;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $t_filter_object->validate( $p_filter_arr[ $t_field_name ] ) ) {\n\t\t\t$p_filter_arr[ $t_field_name ] = $t_filter_object->default;\n\t\t}\n\t}\n\n\t$t_custom_fields = custom_field_get_ids();\n\n\t# @@@ (thraxisp) This should really be the linked ids, but we don't know the project\n\t$f_custom_fields_data = array();\n\tif( is_array( $t_custom_fields ) && ( count( $t_custom_fields ) > 0 ) ) {\n\t\tforeach( $t_custom_fields as $t_cfid ) {\n\t\t\tif( is_array( gpc_get( 'custom_field_' . $t_cfid, null ) ) ) {\n\t\t\t\t$f_custom_fields_data[$t_cfid] = gpc_get_string_array( 'custom_field_' . $t_cfid, META_FILTER_ANY );\n\t\t\t} else {\n\t\t\t\t$f_custom_fields_data[$t_cfid] = gpc_get_string( 'custom_field_' . $t_cfid, META_FILTER_ANY );\n\t\t\t\t$f_custom_fields_data[$t_cfid] = array(\n\t\t\t\t\t$f_custom_fields_data[$t_cfid],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t# validate sorting\n\t$t_fields = helper_get_columns_to_view();\n\t$t_n_fields = count( $t_fields );\n\tfor( $i = 0;$i < $t_n_fields;$i++ ) {\n\t\tif( isset( $t_fields[$i] ) && in_array( $t_fields[$i], array( 'selection', 'edit', 'bugnotes_count', 'attachment' ) ) ) {\n\t\t\tunset( $t_fields[$i] );\n\t\t}\n\t}\n\t$t_sort_fields = explode( ',', $p_filter_arr['sort'] );\n\t$t_dir_fields = explode( ',', $p_filter_arr['dir'] );\n\tfor( $i = 0;$i < 2;$i++ ) {\n\t\tif( isset( $t_sort_fields[$i] ) ) {\n\t\t\t$t_drop = false;\n\t\t\t$t_sort = $t_sort_fields[$i];\n\t\t\tif( strpos( $t_sort, 'custom_' ) === 0 ) {\n\t\t\t\tif( false === custom_field_get_id_from_name( utf8_substr( $t_sort, utf8_strlen( 'custom_' ) ) ) ) {\n\t\t\t\t\t$t_drop = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif( !in_array( $t_sort, $t_fields ) ) {\n\t\t\t\t\t$t_drop = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( !in_array( $t_dir_fields[$i], array( \"ASC\", \"DESC\" ) ) ) {\n\t\t\t\t$t_drop = true;\n\t\t\t}\n\t\t\tif( $t_drop ) {\n\t\t\t\tunset( $t_sort_fields[$i] );\n\t\t\t\tunset( $t_dir_fields[$i] );\n\t\t\t}\n\t\t}\n\t}\n\tif( count( $t_sort_fields ) > 0 ) {\n\t\t$p_filter_arr['sort'] = implode( ',', $t_sort_fields );\n\t\t$p_filter_arr['dir'] = implode( ',', $t_dir_fields );\n\t} else {\n\t\t$p_filter_arr['sort'] = \"last_updated\";\n\t\t$p_filter_arr['dir'] = \"DESC\";\n\t}\n\n\t# validate or filter junk from other fields\n\t$t_multi_select_list = array(\n\t\tFILTER_PROPERTY_CATEGORY => 'string',\n\t\tFILTER_PROPERTY_SEVERITY_ID => 'int',\n\t\tFILTER_PROPERTY_STATUS_ID => 'int',\n\t\tFILTER_PROPERTY_REPORTER_ID => 'int',\n\t\tFILTER_PROPERTY_HANDLER_ID => 'int',\n\t\tFILTER_PROPERTY_NOTE_USER_ID => 'int',\n\t\tFILTER_PROPERTY_RESOLUTION_ID => 'int',\n\t\tFILTER_PROPERTY_PRIORITY_ID => 'int',\n\t\tFILTER_PROPERTY_PRODUCT_BUILD => 'string',\n\t\tFILTER_PROPERTY_PRODUCT_VERSION => 'string',\n\t\tFILTER_PROPERTY_HIDE_STATUS_ID => 'int',\n\t\tFILTER_PROPERTY_FIXED_IN_VERSION => 'string',\n\t\tFILTER_PROPERTY_TARGET_VERSION => 'string',\n\t\tFILTER_PROPERTY_MONITOR_USER_ID => 'int',\n\t\t'show_profile' => 'int',\n\t);\n\tforeach( $t_multi_select_list as $t_multi_field_name => $t_multi_field_type ) {\n\t\tif( !isset( $p_filter_arr[$t_multi_field_name] ) ) {\n\t\t\tif( FILTER_PROPERTY_HIDE_STATUS_ID == $t_multi_field_name ) {\n\t\t\t\t$p_filter_arr[$t_multi_field_name] = array(\n\t\t\t\t\tconfig_get( 'hide_status_default' ),\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if( 'custom_fields' == $t_multi_field_name ) {\n\t\t\t\t$p_filter_arr[$t_multi_field_name] = array(\n\t\t\t\t\t$f_custom_fields_data,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$p_filter_arr[$t_multi_field_name] = array(\n\t\t\t\t\tMETA_FILTER_ANY,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tif( !is_array( $p_filter_arr[$t_multi_field_name] ) ) {\n\t\t\t\t$p_filter_arr[$t_multi_field_name] = array(\n\t\t\t\t\t$p_filter_arr[$t_multi_field_name],\n\t\t\t\t);\n\t\t\t}\n\t\t\t$t_checked_array = array();\n\t\t\tforeach( $p_filter_arr[$t_multi_field_name] as $t_filter_value ) {\n\t\t\t\t$t_filter_value = stripslashes( $t_filter_value );\n\t\t\t\tif(( $t_filter_value === 'any' ) || ( $t_filter_value === '[any]' ) ) {\n\t\t\t\t\t$t_filter_value = META_FILTER_ANY;\n\t\t\t\t}\n\t\t\t\tif(( $t_filter_value === 'none' ) || ( $t_filter_value === '[none]' ) ) {\n\t\t\t\t\t$t_filter_value = META_FILTER_NONE;\n\t\t\t\t}\n\t\t\t\tif( 'string' == $t_multi_field_type ) {\n\t\t\t\t\t$t_checked_array[] = db_prepare_string( $t_filter_value );\n\t\t\t\t}\n\t\t\t\telse if( 'int' == $t_multi_field_type ) {\n\t\t\t\t\t$t_checked_array[] = db_prepare_int( $t_filter_value );\n\t\t\t\t}\n\t\t\t\telse if( 'array' == $t_multi_field_type ) {\n\t\t\t\t\t$t_checked_array[] = $t_filter_value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$p_filter_arr[$t_multi_field_name] = $t_checked_array;\n\t\t}\n\t}\n\n\tif( is_array( $t_custom_fields ) && ( count( $t_custom_fields ) > 0 ) ) {\n\t\tforeach( $t_custom_fields as $t_cfid ) {\n\t\t\tif( !isset( $p_filter_arr['custom_fields'][$t_cfid] ) ) {\n\t\t\t\t$p_filter_arr['custom_fields'][$t_cfid] = array(\n\t\t\t\t\tMETA_FILTER_ANY,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tif( !is_array( $p_filter_arr['custom_fields'][$t_cfid] ) ) {\n\t\t\t\t\t$p_filter_arr['custom_fields'][$t_cfid] = array(\n\t\t\t\t\t\t$p_filter_arr['custom_fields'][$t_cfid],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$t_checked_array = array();\n\t\t\t\tforeach( $p_filter_arr['custom_fields'][$t_cfid] as $t_filter_value ) {\n\t\t\t\t\t$t_filter_value = stripslashes( $t_filter_value );\n\t\t\t\t\tif(( $t_filter_value === 'any' ) || ( $t_filter_value === '[any]' ) ) {\n\t\t\t\t\t\t$t_filter_value = META_FILTER_ANY;\n\t\t\t\t\t}\n\t\t\t\t\t$t_checked_array[] = db_prepare_string( $t_filter_value );\n\t\t\t\t}\n\t\t\t\t$p_filter_arr['custom_fields'][$t_cfid] = $t_checked_array;\n\t\t\t}\n\t\t}\n\t}\n\n\t# all of our filter values are now guaranteed to be there, and correct.\n\treturn $p_filter_arr;\n}", "title": "" }, { "docid": "ad3031ed0c2cd7fd35f9632981588b27", "score": "0.55956256", "text": "public function hasFilteredField(string $name): bool;", "title": "" }, { "docid": "338f69a6174a30f087782de58cfe775f", "score": "0.5594462", "text": "public function admin_filter() {\r\n\t\t$model = $this->modelClass;\r\n\t\t$filters = Set::filter($this->request->data);\t\t// set::filter gets rid of empty array elements\r\n\t\t// debug($filters);\r\n\t\t\n\t\t// Save pagination limit to session\n\t\tif (@$filters['AdminListLimit'])\r\n\t\t\t$this->Session->write(\"AdminList.limit\", @$filters['AdminListLimit']);\r\n\t\t$this->Session->write(\"AdminList.$model.filters\", @$filters['filters']);\r\n\t\t$this->Session->write(\"AdminList.$model.sort\", @$filters['sort']);\r\n\t\t\n\t\t// Send user back to index, which will pass these filters to the find() function\n\t\t$this->redirect(array('action' => 'index'));\r\n\t}", "title": "" }, { "docid": "bfd9ec7907eb1c658435d179a9bf24a0", "score": "0.5580091", "text": "public function hasApplied(){\n return collect($this->appliedFilters)->isNotEmpty();\n }", "title": "" }, { "docid": "d3efc656d9df70190569c0a8dfb1daf4", "score": "0.5569625", "text": "private function setup_filters() {\n\t\t\n\t}", "title": "" }, { "docid": "c04c149ea4edf1ca1808618a9d1617fa", "score": "0.55577344", "text": "private function handleFilters()\n {\n foreach ($this->postData as $key => $data) {\n if (isset($this->filterData[$key])) {\n $this->runFilters = true;\n\n foreach ($this->filterData[$key] as $filterType) {\n if ($this->runFilters === true) {\n $this->runCorrectFilter([$key, $data], $filterType);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "961a3d3b6f3163a09070e6aa6e7adf26", "score": "0.5548317", "text": "public function getFilterData();", "title": "" }, { "docid": "33132051fe49450990980a8cc3c95930", "score": "0.55257267", "text": "private function addFilters()\n {\n if (!empty($this->filters) && is_string($this->filters)) {\n try {\n $this->filters = unserialize($this->filters);\n } catch (Exception $e) {\n $this->filters = null;\n }\n }\n if (empty($this->filters)) {\n return;\n }\n\n if (xarUserIsLoggedIn()) {\n // get the direct parents of the current user (no ancestors)\n $grouplist = xarCache::getParents();\n } else {\n // check anonymous visitors by themselves\n $grouplist = array(_XAR_ID_UNREGISTERED);\n }\n\n foreach ($grouplist as $groupid) {\n if (empty($this->filters[$groupid])) {\n continue;\n }\n foreach ($this->filters[$groupid] as $filter) {\n if (!isset($this->properties[$filter[0]])) {\n // skip filters on unknown properties\n continue;\n }\n $whereclause = '';\n // TODO: cfr. getwhereclause in search ui\n if ($filter != 'in' && !is_numeric($filter[2])) {\n // escape single quotes\n $filter[2] = str_replace(\"'\", \"\\\\'\", $filter[2]);\n $filter[2] = \"'\" . $filter[2] . \"'\";\n }\n switch ($filter[1])\n {\n case 'in':\n $whereclause = ' IN (' . $filter[2] . ')';\n break;\n case 'eq':\n case 'gt':\n case 'lt':\n case 'ne':\n default:\n $whereclause = ' ' . $filter[1] . ' ' . $filter[2];\n break;\n }\n if (!empty($this->where)) {\n // CHECKME: how about when $this->where is an array ?\n $this->where .= ' and ' . $filter[0] . $whereclause;\n } else {\n $this->where = $filter[0] . $whereclause;\n }\n }\n // one group having filters is enough here !?\n return;\n }\n }", "title": "" }, { "docid": "5ba9f2425c0c6fa23fa19525632e1411", "score": "0.55154943", "text": "public function getFilterInfo();", "title": "" }, { "docid": "ce9a84f9b78490b0e6a9f70803760b38", "score": "0.5512906", "text": "public function filter(){\r\n\t}", "title": "" }, { "docid": "9fb90b62ad1e93a794dd550e3950b172", "score": "0.5512542", "text": "public function isFiltered()\n {\n return $this->filterMatched;\n }", "title": "" }, { "docid": "5aaa9ac351ee7cf2d3c2d33f79c18bd1", "score": "0.551198", "text": "public function filters() \n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "2106e11262c5da69484b81b23a0d7a08", "score": "0.5510642", "text": "public function filterCustomFields();", "title": "" }, { "docid": "57091d0afe912249bb666a3532d9b947", "score": "0.5504766", "text": "public function filter()\n {\n $args = func_get_args();\n $callback = array($this, 'having');\n call_user_func_array($callback, $args);\n }", "title": "" }, { "docid": "25992a0109b4124281041bd4b03d0c47", "score": "0.54968286", "text": "public function cleanFilters(): void\n {\n // Filter $filters values\n $this->filters = collect($this->filters)->filter(function ($filterValue, $filterName) {\n $filterDefinitions = $this->filters();\n\n // Ignore search\n if ($filterName === 'search') {\n return true;\n }\n\n // Filter out any keys that weren't defined as a filter\n if (! isset($filterDefinitions[$filterName])) {\n return false;\n }\n\n // Ignore null values\n if (is_null($filterValue)) {\n return true;\n }\n\n // Handle 'select' filters\n if ($filterDefinitions[$filterName]->isSelect()) {\n foreach ($this->getFilterOptions($filterName) as $optionValue) {\n // If the option is an integer, typecast filter value\n if (is_int($optionValue) && $optionValue === (int)$filterValue) {\n return true;\n }\n\n // Strict check the value\n if ($optionValue === $filterValue) {\n return true;\n }\n }\n }\n\n if ($filterDefinitions[$filterName]->isDate()) {\n // array_sum trick is a terse way of ensuring that PHP\n // did not do \"month shifting\"\n // (e.g. consider that January 32 is February 1)\n $dt = DateTime::createFromFormat(\"Y-m-d\", $filterValue);\n\n return $dt !== false && ! array_sum($dt::getLastErrors());\n }\n\n return false;\n })->toArray();\n }", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5487607", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5487607", "text": "public function getFilters();", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.54864675", "text": "public function getFilter();", "title": "" }, { "docid": "be5661a288e38d80ec0006982ac2c98e", "score": "0.5481318", "text": "protected function filter($filters) \n {\n // Check if $filter is array\n if (is_array($filters)) \n {\n // Iterate filters\n foreach ($filters as $key => $filter) \n {\n RequestFilter::apply($this->request,$key,$filter);\n }\n } \n }", "title": "" }, { "docid": "827f46fb7694b8a4cb2fb20dc0f2901c", "score": "0.54742527", "text": "function validate(&$data, $pk=null,array $filter = array(),array $ignore = array())\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fca398b40fd5fc5c77904cabe7194052", "score": "0.5465483", "text": "function allowedByFilter($name) {\n\t\tif($this->filter === null) {\n\t\t\treturn TRUE;\n\t\t}\n\t\t\t// check wether something is explicitly allowed\n\t\tif(strlen(trim($this->filter['allowed'])) !== 0) {\n\t\t\tif(t3lib_div::inList($this->filter['allowed'], $name)) {\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\t// check wether something is denied\n\t\tif(t3lib_div::inList($this->filter['denied'], $name)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "03e286812126999db385e460271644dd", "score": "0.54600424", "text": "public function getFilter(): array;", "title": "" }, { "docid": "de1da342a676b3a7c2d61db61e420cad", "score": "0.54488224", "text": "abstract protected function getFilterTypes();", "title": "" }, { "docid": "46c242e9499e8e0199bd69c2fbc00c7e", "score": "0.5441979", "text": "public function testFilterEmptyTrue(array $keys, array $record) {\n $emptyFilter = new EmptyFilter($keys);\n $this->assertTrue($emptyFilter->isRecordToBeHandled($record));\n }", "title": "" }, { "docid": "8c91edf6d26e0f8fb365b0d921497e83", "score": "0.54398686", "text": "protected function getFilter()\n {\n \t$filtros = \" user_id <> 1 \";\n if (Session::getInstance()->get($this->namefilter)!=\"\") {\n $filters =(object)Session::getInstance()->get($this->namefilter);\n if ($filters->user_state != '') {\n $filtros = $filtros.\" AND user_state ='\".$filters->user_state.\"'\";\n }\n if ($filters->user_date != '') {\n $filtros = $filtros.\" AND user_date LIKE '%\".$filters->user_date.\"%'\";\n }\n if ($filters->user_names != '') {\n $filtros = $filtros.\" AND user_names LIKE '%\".$filters->user_names.\"%'\";\n }\n if ($filters->user_level != '') {\n $filtros = $filtros.\" AND user_level ='\".$filters->user_level.\"'\";\n }\n if ($filters->user_user != '') {\n $filtros = $filtros.\" AND user_user LIKE '%\".$filters->user_user.\"%'\";\n }\n\t\t}\n return $filtros;\n }", "title": "" }, { "docid": "ecb4a6e737d164a85e2d10f474910ce9", "score": "0.5412776", "text": "public function beforeFilter() {\n parent::beforeFilter();\n\n $res = $this->_validateTest($this->request['action'], $this->request['pass']);\n if($res!==true) {\n return $res;\n }\n }", "title": "" }, { "docid": "e858e6735de23395b6769f9610b77d99", "score": "0.5412601", "text": "function _show_filter () {\n// TODO\n\t}", "title": "" }, { "docid": "b0e0bb9e633799f54d8a8f083cf2d54b", "score": "0.5410288", "text": "public function validate($record);", "title": "" }, { "docid": "66956224bd57bc9e4cc98599179ad8f7", "score": "0.5409328", "text": "public function filters()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "788cb54a3280cea1223c1a1e1e49698e", "score": "0.5407541", "text": "function have_filter_name() {\n\n\t\tif ( isset( $this->filter_name ) AND ! empty( $this->filter_name ) ) {\n\t\t\t$this->set( 'have_filter_name', 1 );\n\t\t} else {\n\t\t\t$this->set( 'have_filter_name', 1 );\n\t\t}\n\n\t\treturn $this->have_filter_name;\n\n\t}", "title": "" }, { "docid": "1c4f1dbdbec71f2dc0bd2c685781b086", "score": "0.53972495", "text": "public function action_records()\n\t{\n\t\t$data = $this->r->find();\n\t\t$filtered = Slicehost::filter_data($data);\n\t\t$this->d($filtered);\n\t}", "title": "" }, { "docid": "b3215123846da83d2f803f44d5222d0f", "score": "0.5388013", "text": "public static function hasFilter(): bool\n {\n return self::$filter != null;\n }", "title": "" }, { "docid": "dbace7e6058bf787af606f895133a7aa", "score": "0.5370517", "text": "function atgc_asdm_filter_data( $collection , $filters , $form_fields ) {\n\t\n\t//echo '<p>Filter data.</p>';\n\t\n\treturn $collection;\n}", "title": "" }, { "docid": "8d4ec8f7b1387e5453af05b02c0fd884", "score": "0.5368212", "text": "private function _check_filter($item, $filter): bool\n {\n if ($filter && $item) {\n $name = \\is_array($item) ? ($item['name'] ?? null) : $item;\n\n if (empty($name)) {\n throw new \\Exception(X::_(\"There is no item to chek the filter against\"));\n }\n\n if (is_string($filter)) {\n if ($filter === 'file') {\n return $this->_is_file($name);\n }\n\n if ($filter === 'dir') {\n return $this->_is_dir($name);\n }\n\n if ($filter === 'both') {\n return true;\n }\n\n $extensions = array_map(\n function ($a) {\n if (substr($a, 0, 1) !== '.') {\n $a = '.' . $a;\n }\n\n return strtolower($a);\n },\n X::split($filter, '|')\n );\n foreach ($extensions as $ext) {\n if (strtolower(substr($name, -strlen($ext))) === $ext) {\n return true;\n }\n }\n\n return false;\n } elseif (is_callable($filter)) {\n return $filter($item);\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.5360051", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.5360051", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "6cb63f658be445a2975dde5e9b52c30b", "score": "0.5359844", "text": "public function getActiveFilters()\n\t{\n\t\t$activeFilters = false;\n\n\t\tif (!empty($this->filter_fields))\n\t\t{\n\t\t\tfor ($i = 0; $i < count($this->filter_fields); $i++)\n\t\t\t{\n\t\t\t\t$filterName = 'filter.' . $this->filter_fields[ $i ];\n\n\t\t\t\tif (property_exists($this->state, $filterName) && (!empty($this->state->{$filterName}) || is_numeric($this->state->{$filterName})))\n\t\t\t\t{\n\t\t\t\t\t$activeFilters = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $activeFilters;\n\t}", "title": "" }, { "docid": "ecd164c10924bcd3f7cb08ce3178e098", "score": "0.5357971", "text": "protected function _applyExternalFilters()\n {\n if (count($this->_externalFilters) == 0)\n return false;\n\n foreach ($this->_externalFilters as $id => $callback) {\n $val = $this->getRequestParamClean($id);\n if ($val) {\n call_user_func_array($callback, array($id, $val, $this->getSelect()));\n $this->_filtersValues[$id] = $this->getRequestParamClean($id);\n }\n }\n }", "title": "" }, { "docid": "bfd76c9ce10b9719e73dfc6ae855602b", "score": "0.5354301", "text": "public function getFilteredFields(): array;", "title": "" }, { "docid": "a206d0d61ce1230c441ffc2cf517b0fb", "score": "0.5337412", "text": "protected function restoreFilterList()\n\t{\n\n\t\t// Return if not reset filter\n\t\tif (Post(\"cmd\") !== \"resetfilter\")\n\t\t\treturn FALSE;\n\t\t$filter = json_decode(Post(\"filter\"), TRUE);\n\t\t$this->Command = \"search\";\n\n\t\t// Field fmea\n\t\t$this->fmea->AdvancedSearch->SearchValue = @$filter[\"x_fmea\"];\n\t\t$this->fmea->AdvancedSearch->SearchOperator = @$filter[\"z_fmea\"];\n\t\t$this->fmea->AdvancedSearch->SearchCondition = @$filter[\"v_fmea\"];\n\t\t$this->fmea->AdvancedSearch->SearchValue2 = @$filter[\"y_fmea\"];\n\t\t$this->fmea->AdvancedSearch->SearchOperator2 = @$filter[\"w_fmea\"];\n\t\t$this->fmea->AdvancedSearch->save();\n\n\t\t// Field idFactory\n\t\t$this->idFactory->AdvancedSearch->SearchValue = @$filter[\"x_idFactory\"];\n\t\t$this->idFactory->AdvancedSearch->SearchOperator = @$filter[\"z_idFactory\"];\n\t\t$this->idFactory->AdvancedSearch->SearchCondition = @$filter[\"v_idFactory\"];\n\t\t$this->idFactory->AdvancedSearch->SearchValue2 = @$filter[\"y_idFactory\"];\n\t\t$this->idFactory->AdvancedSearch->SearchOperator2 = @$filter[\"w_idFactory\"];\n\t\t$this->idFactory->AdvancedSearch->save();\n\n\t\t// Field dateFmea\n\t\t$this->dateFmea->AdvancedSearch->SearchValue = @$filter[\"x_dateFmea\"];\n\t\t$this->dateFmea->AdvancedSearch->SearchOperator = @$filter[\"z_dateFmea\"];\n\t\t$this->dateFmea->AdvancedSearch->SearchCondition = @$filter[\"v_dateFmea\"];\n\t\t$this->dateFmea->AdvancedSearch->SearchValue2 = @$filter[\"y_dateFmea\"];\n\t\t$this->dateFmea->AdvancedSearch->SearchOperator2 = @$filter[\"w_dateFmea\"];\n\t\t$this->dateFmea->AdvancedSearch->save();\n\n\t\t// Field partnumbers\n\t\t$this->partnumbers->AdvancedSearch->SearchValue = @$filter[\"x_partnumbers\"];\n\t\t$this->partnumbers->AdvancedSearch->SearchOperator = @$filter[\"z_partnumbers\"];\n\t\t$this->partnumbers->AdvancedSearch->SearchCondition = @$filter[\"v_partnumbers\"];\n\t\t$this->partnumbers->AdvancedSearch->SearchValue2 = @$filter[\"y_partnumbers\"];\n\t\t$this->partnumbers->AdvancedSearch->SearchOperator2 = @$filter[\"w_partnumbers\"];\n\t\t$this->partnumbers->AdvancedSearch->save();\n\n\t\t// Field description\n\t\t$this->description->AdvancedSearch->SearchValue = @$filter[\"x_description\"];\n\t\t$this->description->AdvancedSearch->SearchOperator = @$filter[\"z_description\"];\n\t\t$this->description->AdvancedSearch->SearchCondition = @$filter[\"v_description\"];\n\t\t$this->description->AdvancedSearch->SearchValue2 = @$filter[\"y_description\"];\n\t\t$this->description->AdvancedSearch->SearchOperator2 = @$filter[\"w_description\"];\n\t\t$this->description->AdvancedSearch->save();\n\n\t\t// Field idEmployee\n\t\t$this->idEmployee->AdvancedSearch->SearchValue = @$filter[\"x_idEmployee\"];\n\t\t$this->idEmployee->AdvancedSearch->SearchOperator = @$filter[\"z_idEmployee\"];\n\t\t$this->idEmployee->AdvancedSearch->SearchCondition = @$filter[\"v_idEmployee\"];\n\t\t$this->idEmployee->AdvancedSearch->SearchValue2 = @$filter[\"y_idEmployee\"];\n\t\t$this->idEmployee->AdvancedSearch->SearchOperator2 = @$filter[\"w_idEmployee\"];\n\t\t$this->idEmployee->AdvancedSearch->save();\n\n\t\t// Field idworkcenter\n\t\t$this->idworkcenter->AdvancedSearch->SearchValue = @$filter[\"x_idworkcenter\"];\n\t\t$this->idworkcenter->AdvancedSearch->SearchOperator = @$filter[\"z_idworkcenter\"];\n\t\t$this->idworkcenter->AdvancedSearch->SearchCondition = @$filter[\"v_idworkcenter\"];\n\t\t$this->idworkcenter->AdvancedSearch->SearchValue2 = @$filter[\"y_idworkcenter\"];\n\t\t$this->idworkcenter->AdvancedSearch->SearchOperator2 = @$filter[\"w_idworkcenter\"];\n\t\t$this->idworkcenter->AdvancedSearch->save();\n\n\t\t// Field idProcess\n\t\t$this->idProcess->AdvancedSearch->SearchValue = @$filter[\"x_idProcess\"];\n\t\t$this->idProcess->AdvancedSearch->SearchOperator = @$filter[\"z_idProcess\"];\n\t\t$this->idProcess->AdvancedSearch->SearchCondition = @$filter[\"v_idProcess\"];\n\t\t$this->idProcess->AdvancedSearch->SearchValue2 = @$filter[\"y_idProcess\"];\n\t\t$this->idProcess->AdvancedSearch->SearchOperator2 = @$filter[\"w_idProcess\"];\n\t\t$this->idProcess->AdvancedSearch->save();\n\n\t\t// Field step\n\t\t$this->step->AdvancedSearch->SearchValue = @$filter[\"x_step\"];\n\t\t$this->step->AdvancedSearch->SearchOperator = @$filter[\"z_step\"];\n\t\t$this->step->AdvancedSearch->SearchCondition = @$filter[\"v_step\"];\n\t\t$this->step->AdvancedSearch->SearchValue2 = @$filter[\"y_step\"];\n\t\t$this->step->AdvancedSearch->SearchOperator2 = @$filter[\"w_step\"];\n\t\t$this->step->AdvancedSearch->save();\n\n\t\t// Field flowchartDesc\n\t\t$this->flowchartDesc->AdvancedSearch->SearchValue = @$filter[\"x_flowchartDesc\"];\n\t\t$this->flowchartDesc->AdvancedSearch->SearchOperator = @$filter[\"z_flowchartDesc\"];\n\t\t$this->flowchartDesc->AdvancedSearch->SearchCondition = @$filter[\"v_flowchartDesc\"];\n\t\t$this->flowchartDesc->AdvancedSearch->SearchValue2 = @$filter[\"y_flowchartDesc\"];\n\t\t$this->flowchartDesc->AdvancedSearch->SearchOperator2 = @$filter[\"w_flowchartDesc\"];\n\t\t$this->flowchartDesc->AdvancedSearch->save();\n\n\t\t// Field partnumber\n\t\t$this->partnumber->AdvancedSearch->SearchValue = @$filter[\"x_partnumber\"];\n\t\t$this->partnumber->AdvancedSearch->SearchOperator = @$filter[\"z_partnumber\"];\n\t\t$this->partnumber->AdvancedSearch->SearchCondition = @$filter[\"v_partnumber\"];\n\t\t$this->partnumber->AdvancedSearch->SearchValue2 = @$filter[\"y_partnumber\"];\n\t\t$this->partnumber->AdvancedSearch->SearchOperator2 = @$filter[\"w_partnumber\"];\n\t\t$this->partnumber->AdvancedSearch->save();\n\n\t\t// Field operation\n\t\t$this->operation->AdvancedSearch->SearchValue = @$filter[\"x_operation\"];\n\t\t$this->operation->AdvancedSearch->SearchOperator = @$filter[\"z_operation\"];\n\t\t$this->operation->AdvancedSearch->SearchCondition = @$filter[\"v_operation\"];\n\t\t$this->operation->AdvancedSearch->SearchValue2 = @$filter[\"y_operation\"];\n\t\t$this->operation->AdvancedSearch->SearchOperator2 = @$filter[\"w_operation\"];\n\t\t$this->operation->AdvancedSearch->save();\n\n\t\t// Field derivedFromNC\n\t\t$this->derivedFromNC->AdvancedSearch->SearchValue = @$filter[\"x_derivedFromNC\"];\n\t\t$this->derivedFromNC->AdvancedSearch->SearchOperator = @$filter[\"z_derivedFromNC\"];\n\t\t$this->derivedFromNC->AdvancedSearch->SearchCondition = @$filter[\"v_derivedFromNC\"];\n\t\t$this->derivedFromNC->AdvancedSearch->SearchValue2 = @$filter[\"y_derivedFromNC\"];\n\t\t$this->derivedFromNC->AdvancedSearch->SearchOperator2 = @$filter[\"w_derivedFromNC\"];\n\t\t$this->derivedFromNC->AdvancedSearch->save();\n\n\t\t// Field numberOfNC\n\t\t$this->numberOfNC->AdvancedSearch->SearchValue = @$filter[\"x_numberOfNC\"];\n\t\t$this->numberOfNC->AdvancedSearch->SearchOperator = @$filter[\"z_numberOfNC\"];\n\t\t$this->numberOfNC->AdvancedSearch->SearchCondition = @$filter[\"v_numberOfNC\"];\n\t\t$this->numberOfNC->AdvancedSearch->SearchValue2 = @$filter[\"y_numberOfNC\"];\n\t\t$this->numberOfNC->AdvancedSearch->SearchOperator2 = @$filter[\"w_numberOfNC\"];\n\t\t$this->numberOfNC->AdvancedSearch->save();\n\n\t\t// Field flowchart\n\t\t$this->flowchart->AdvancedSearch->SearchValue = @$filter[\"x_flowchart\"];\n\t\t$this->flowchart->AdvancedSearch->SearchOperator = @$filter[\"z_flowchart\"];\n\t\t$this->flowchart->AdvancedSearch->SearchCondition = @$filter[\"v_flowchart\"];\n\t\t$this->flowchart->AdvancedSearch->SearchValue2 = @$filter[\"y_flowchart\"];\n\t\t$this->flowchart->AdvancedSearch->SearchOperator2 = @$filter[\"w_flowchart\"];\n\t\t$this->flowchart->AdvancedSearch->save();\n\n\t\t// Field subprocess\n\t\t$this->subprocess->AdvancedSearch->SearchValue = @$filter[\"x_subprocess\"];\n\t\t$this->subprocess->AdvancedSearch->SearchOperator = @$filter[\"z_subprocess\"];\n\t\t$this->subprocess->AdvancedSearch->SearchCondition = @$filter[\"v_subprocess\"];\n\t\t$this->subprocess->AdvancedSearch->SearchValue2 = @$filter[\"y_subprocess\"];\n\t\t$this->subprocess->AdvancedSearch->SearchOperator2 = @$filter[\"w_subprocess\"];\n\t\t$this->subprocess->AdvancedSearch->save();\n\n\t\t// Field requirement\n\t\t$this->requirement->AdvancedSearch->SearchValue = @$filter[\"x_requirement\"];\n\t\t$this->requirement->AdvancedSearch->SearchOperator = @$filter[\"z_requirement\"];\n\t\t$this->requirement->AdvancedSearch->SearchCondition = @$filter[\"v_requirement\"];\n\t\t$this->requirement->AdvancedSearch->SearchValue2 = @$filter[\"y_requirement\"];\n\t\t$this->requirement->AdvancedSearch->SearchOperator2 = @$filter[\"w_requirement\"];\n\t\t$this->requirement->AdvancedSearch->save();\n\n\t\t// Field potencialFailureMode\n\t\t$this->potencialFailureMode->AdvancedSearch->SearchValue = @$filter[\"x_potencialFailureMode\"];\n\t\t$this->potencialFailureMode->AdvancedSearch->SearchOperator = @$filter[\"z_potencialFailureMode\"];\n\t\t$this->potencialFailureMode->AdvancedSearch->SearchCondition = @$filter[\"v_potencialFailureMode\"];\n\t\t$this->potencialFailureMode->AdvancedSearch->SearchValue2 = @$filter[\"y_potencialFailureMode\"];\n\t\t$this->potencialFailureMode->AdvancedSearch->SearchOperator2 = @$filter[\"w_potencialFailureMode\"];\n\t\t$this->potencialFailureMode->AdvancedSearch->save();\n\n\t\t// Field potencialFailurEffect\n\t\t$this->potencialFailurEffect->AdvancedSearch->SearchValue = @$filter[\"x_potencialFailurEffect\"];\n\t\t$this->potencialFailurEffect->AdvancedSearch->SearchOperator = @$filter[\"z_potencialFailurEffect\"];\n\t\t$this->potencialFailurEffect->AdvancedSearch->SearchCondition = @$filter[\"v_potencialFailurEffect\"];\n\t\t$this->potencialFailurEffect->AdvancedSearch->SearchValue2 = @$filter[\"y_potencialFailurEffect\"];\n\t\t$this->potencialFailurEffect->AdvancedSearch->SearchOperator2 = @$filter[\"w_potencialFailurEffect\"];\n\t\t$this->potencialFailurEffect->AdvancedSearch->save();\n\n\t\t// Field kc\n\t\t$this->kc->AdvancedSearch->SearchValue = @$filter[\"x_kc\"];\n\t\t$this->kc->AdvancedSearch->SearchOperator = @$filter[\"z_kc\"];\n\t\t$this->kc->AdvancedSearch->SearchCondition = @$filter[\"v_kc\"];\n\t\t$this->kc->AdvancedSearch->SearchValue2 = @$filter[\"y_kc\"];\n\t\t$this->kc->AdvancedSearch->SearchOperator2 = @$filter[\"w_kc\"];\n\t\t$this->kc->AdvancedSearch->save();\n\n\t\t// Field severity\n\t\t$this->severity->AdvancedSearch->SearchValue = @$filter[\"x_severity\"];\n\t\t$this->severity->AdvancedSearch->SearchOperator = @$filter[\"z_severity\"];\n\t\t$this->severity->AdvancedSearch->SearchCondition = @$filter[\"v_severity\"];\n\t\t$this->severity->AdvancedSearch->SearchValue2 = @$filter[\"y_severity\"];\n\t\t$this->severity->AdvancedSearch->SearchOperator2 = @$filter[\"w_severity\"];\n\t\t$this->severity->AdvancedSearch->save();\n\n\t\t// Field idCause\n\t\t$this->idCause->AdvancedSearch->SearchValue = @$filter[\"x_idCause\"];\n\t\t$this->idCause->AdvancedSearch->SearchOperator = @$filter[\"z_idCause\"];\n\t\t$this->idCause->AdvancedSearch->SearchCondition = @$filter[\"v_idCause\"];\n\t\t$this->idCause->AdvancedSearch->SearchValue2 = @$filter[\"y_idCause\"];\n\t\t$this->idCause->AdvancedSearch->SearchOperator2 = @$filter[\"w_idCause\"];\n\t\t$this->idCause->AdvancedSearch->save();\n\n\t\t// Field potentialCauses\n\t\t$this->potentialCauses->AdvancedSearch->SearchValue = @$filter[\"x_potentialCauses\"];\n\t\t$this->potentialCauses->AdvancedSearch->SearchOperator = @$filter[\"z_potentialCauses\"];\n\t\t$this->potentialCauses->AdvancedSearch->SearchCondition = @$filter[\"v_potentialCauses\"];\n\t\t$this->potentialCauses->AdvancedSearch->SearchValue2 = @$filter[\"y_potentialCauses\"];\n\t\t$this->potentialCauses->AdvancedSearch->SearchOperator2 = @$filter[\"w_potentialCauses\"];\n\t\t$this->potentialCauses->AdvancedSearch->save();\n\n\t\t// Field currentPreventiveControlMethod\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->SearchValue = @$filter[\"x_currentPreventiveControlMethod\"];\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->SearchOperator = @$filter[\"z_currentPreventiveControlMethod\"];\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->SearchCondition = @$filter[\"v_currentPreventiveControlMethod\"];\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->SearchValue2 = @$filter[\"y_currentPreventiveControlMethod\"];\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->SearchOperator2 = @$filter[\"w_currentPreventiveControlMethod\"];\n\t\t$this->currentPreventiveControlMethod->AdvancedSearch->save();\n\n\t\t// Field occurrence\n\t\t$this->occurrence->AdvancedSearch->SearchValue = @$filter[\"x_occurrence\"];\n\t\t$this->occurrence->AdvancedSearch->SearchOperator = @$filter[\"z_occurrence\"];\n\t\t$this->occurrence->AdvancedSearch->SearchCondition = @$filter[\"v_occurrence\"];\n\t\t$this->occurrence->AdvancedSearch->SearchValue2 = @$filter[\"y_occurrence\"];\n\t\t$this->occurrence->AdvancedSearch->SearchOperator2 = @$filter[\"w_occurrence\"];\n\t\t$this->occurrence->AdvancedSearch->save();\n\n\t\t// Field currentControlMethod\n\t\t$this->currentControlMethod->AdvancedSearch->SearchValue = @$filter[\"x_currentControlMethod\"];\n\t\t$this->currentControlMethod->AdvancedSearch->SearchOperator = @$filter[\"z_currentControlMethod\"];\n\t\t$this->currentControlMethod->AdvancedSearch->SearchCondition = @$filter[\"v_currentControlMethod\"];\n\t\t$this->currentControlMethod->AdvancedSearch->SearchValue2 = @$filter[\"y_currentControlMethod\"];\n\t\t$this->currentControlMethod->AdvancedSearch->SearchOperator2 = @$filter[\"w_currentControlMethod\"];\n\t\t$this->currentControlMethod->AdvancedSearch->save();\n\n\t\t// Field detection\n\t\t$this->detection->AdvancedSearch->SearchValue = @$filter[\"x_detection\"];\n\t\t$this->detection->AdvancedSearch->SearchOperator = @$filter[\"z_detection\"];\n\t\t$this->detection->AdvancedSearch->SearchCondition = @$filter[\"v_detection\"];\n\t\t$this->detection->AdvancedSearch->SearchValue2 = @$filter[\"y_detection\"];\n\t\t$this->detection->AdvancedSearch->SearchOperator2 = @$filter[\"w_detection\"];\n\t\t$this->detection->AdvancedSearch->save();\n\n\t\t// Field rpn\n\t\t$this->rpn->AdvancedSearch->SearchValue = @$filter[\"x_rpn\"];\n\t\t$this->rpn->AdvancedSearch->SearchOperator = @$filter[\"z_rpn\"];\n\t\t$this->rpn->AdvancedSearch->SearchCondition = @$filter[\"v_rpn\"];\n\t\t$this->rpn->AdvancedSearch->SearchValue2 = @$filter[\"y_rpn\"];\n\t\t$this->rpn->AdvancedSearch->SearchOperator2 = @$filter[\"w_rpn\"];\n\t\t$this->rpn->AdvancedSearch->save();\n\n\t\t// Field recomendedAction\n\t\t$this->recomendedAction->AdvancedSearch->SearchValue = @$filter[\"x_recomendedAction\"];\n\t\t$this->recomendedAction->AdvancedSearch->SearchOperator = @$filter[\"z_recomendedAction\"];\n\t\t$this->recomendedAction->AdvancedSearch->SearchCondition = @$filter[\"v_recomendedAction\"];\n\t\t$this->recomendedAction->AdvancedSearch->SearchValue2 = @$filter[\"y_recomendedAction\"];\n\t\t$this->recomendedAction->AdvancedSearch->SearchOperator2 = @$filter[\"w_recomendedAction\"];\n\t\t$this->recomendedAction->AdvancedSearch->save();\n\n\t\t// Field idResponsible\n\t\t$this->idResponsible->AdvancedSearch->SearchValue = @$filter[\"x_idResponsible\"];\n\t\t$this->idResponsible->AdvancedSearch->SearchOperator = @$filter[\"z_idResponsible\"];\n\t\t$this->idResponsible->AdvancedSearch->SearchCondition = @$filter[\"v_idResponsible\"];\n\t\t$this->idResponsible->AdvancedSearch->SearchValue2 = @$filter[\"y_idResponsible\"];\n\t\t$this->idResponsible->AdvancedSearch->SearchOperator2 = @$filter[\"w_idResponsible\"];\n\t\t$this->idResponsible->AdvancedSearch->save();\n\n\t\t// Field targetDate\n\t\t$this->targetDate->AdvancedSearch->SearchValue = @$filter[\"x_targetDate\"];\n\t\t$this->targetDate->AdvancedSearch->SearchOperator = @$filter[\"z_targetDate\"];\n\t\t$this->targetDate->AdvancedSearch->SearchCondition = @$filter[\"v_targetDate\"];\n\t\t$this->targetDate->AdvancedSearch->SearchValue2 = @$filter[\"y_targetDate\"];\n\t\t$this->targetDate->AdvancedSearch->SearchOperator2 = @$filter[\"w_targetDate\"];\n\t\t$this->targetDate->AdvancedSearch->save();\n\n\t\t// Field revisedKc\n\t\t$this->revisedKc->AdvancedSearch->SearchValue = @$filter[\"x_revisedKc\"];\n\t\t$this->revisedKc->AdvancedSearch->SearchOperator = @$filter[\"z_revisedKc\"];\n\t\t$this->revisedKc->AdvancedSearch->SearchCondition = @$filter[\"v_revisedKc\"];\n\t\t$this->revisedKc->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedKc\"];\n\t\t$this->revisedKc->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedKc\"];\n\t\t$this->revisedKc->AdvancedSearch->save();\n\n\t\t// Field expectedSeverity\n\t\t$this->expectedSeverity->AdvancedSearch->SearchValue = @$filter[\"x_expectedSeverity\"];\n\t\t$this->expectedSeverity->AdvancedSearch->SearchOperator = @$filter[\"z_expectedSeverity\"];\n\t\t$this->expectedSeverity->AdvancedSearch->SearchCondition = @$filter[\"v_expectedSeverity\"];\n\t\t$this->expectedSeverity->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedSeverity\"];\n\t\t$this->expectedSeverity->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedSeverity\"];\n\t\t$this->expectedSeverity->AdvancedSearch->save();\n\n\t\t// Field expectedOccurrence\n\t\t$this->expectedOccurrence->AdvancedSearch->SearchValue = @$filter[\"x_expectedOccurrence\"];\n\t\t$this->expectedOccurrence->AdvancedSearch->SearchOperator = @$filter[\"z_expectedOccurrence\"];\n\t\t$this->expectedOccurrence->AdvancedSearch->SearchCondition = @$filter[\"v_expectedOccurrence\"];\n\t\t$this->expectedOccurrence->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedOccurrence\"];\n\t\t$this->expectedOccurrence->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedOccurrence\"];\n\t\t$this->expectedOccurrence->AdvancedSearch->save();\n\n\t\t// Field expectedDetection\n\t\t$this->expectedDetection->AdvancedSearch->SearchValue = @$filter[\"x_expectedDetection\"];\n\t\t$this->expectedDetection->AdvancedSearch->SearchOperator = @$filter[\"z_expectedDetection\"];\n\t\t$this->expectedDetection->AdvancedSearch->SearchCondition = @$filter[\"v_expectedDetection\"];\n\t\t$this->expectedDetection->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedDetection\"];\n\t\t$this->expectedDetection->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedDetection\"];\n\t\t$this->expectedDetection->AdvancedSearch->save();\n\n\t\t// Field expectedRpn\n\t\t$this->expectedRpn->AdvancedSearch->SearchValue = @$filter[\"x_expectedRpn\"];\n\t\t$this->expectedRpn->AdvancedSearch->SearchOperator = @$filter[\"z_expectedRpn\"];\n\t\t$this->expectedRpn->AdvancedSearch->SearchCondition = @$filter[\"v_expectedRpn\"];\n\t\t$this->expectedRpn->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedRpn\"];\n\t\t$this->expectedRpn->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedRpn\"];\n\t\t$this->expectedRpn->AdvancedSearch->save();\n\n\t\t// Field expectedClosureDate\n\t\t$this->expectedClosureDate->AdvancedSearch->SearchValue = @$filter[\"x_expectedClosureDate\"];\n\t\t$this->expectedClosureDate->AdvancedSearch->SearchOperator = @$filter[\"z_expectedClosureDate\"];\n\t\t$this->expectedClosureDate->AdvancedSearch->SearchCondition = @$filter[\"v_expectedClosureDate\"];\n\t\t$this->expectedClosureDate->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedClosureDate\"];\n\t\t$this->expectedClosureDate->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedClosureDate\"];\n\t\t$this->expectedClosureDate->AdvancedSearch->save();\n\n\t\t// Field recomendedActiondet\n\t\t$this->recomendedActiondet->AdvancedSearch->SearchValue = @$filter[\"x_recomendedActiondet\"];\n\t\t$this->recomendedActiondet->AdvancedSearch->SearchOperator = @$filter[\"z_recomendedActiondet\"];\n\t\t$this->recomendedActiondet->AdvancedSearch->SearchCondition = @$filter[\"v_recomendedActiondet\"];\n\t\t$this->recomendedActiondet->AdvancedSearch->SearchValue2 = @$filter[\"y_recomendedActiondet\"];\n\t\t$this->recomendedActiondet->AdvancedSearch->SearchOperator2 = @$filter[\"w_recomendedActiondet\"];\n\t\t$this->recomendedActiondet->AdvancedSearch->save();\n\n\t\t// Field idResponsibleDet\n\t\t$this->idResponsibleDet->AdvancedSearch->SearchValue = @$filter[\"x_idResponsibleDet\"];\n\t\t$this->idResponsibleDet->AdvancedSearch->SearchOperator = @$filter[\"z_idResponsibleDet\"];\n\t\t$this->idResponsibleDet->AdvancedSearch->SearchCondition = @$filter[\"v_idResponsibleDet\"];\n\t\t$this->idResponsibleDet->AdvancedSearch->SearchValue2 = @$filter[\"y_idResponsibleDet\"];\n\t\t$this->idResponsibleDet->AdvancedSearch->SearchOperator2 = @$filter[\"w_idResponsibleDet\"];\n\t\t$this->idResponsibleDet->AdvancedSearch->save();\n\n\t\t// Field targetDatedet\n\t\t$this->targetDatedet->AdvancedSearch->SearchValue = @$filter[\"x_targetDatedet\"];\n\t\t$this->targetDatedet->AdvancedSearch->SearchOperator = @$filter[\"z_targetDatedet\"];\n\t\t$this->targetDatedet->AdvancedSearch->SearchCondition = @$filter[\"v_targetDatedet\"];\n\t\t$this->targetDatedet->AdvancedSearch->SearchValue2 = @$filter[\"y_targetDatedet\"];\n\t\t$this->targetDatedet->AdvancedSearch->SearchOperator2 = @$filter[\"w_targetDatedet\"];\n\t\t$this->targetDatedet->AdvancedSearch->save();\n\n\t\t// Field kcdet\n\t\t$this->kcdet->AdvancedSearch->SearchValue = @$filter[\"x_kcdet\"];\n\t\t$this->kcdet->AdvancedSearch->SearchOperator = @$filter[\"z_kcdet\"];\n\t\t$this->kcdet->AdvancedSearch->SearchCondition = @$filter[\"v_kcdet\"];\n\t\t$this->kcdet->AdvancedSearch->SearchValue2 = @$filter[\"y_kcdet\"];\n\t\t$this->kcdet->AdvancedSearch->SearchOperator2 = @$filter[\"w_kcdet\"];\n\t\t$this->kcdet->AdvancedSearch->save();\n\n\t\t// Field expectedSeveritydet\n\t\t$this->expectedSeveritydet->AdvancedSearch->SearchValue = @$filter[\"x_expectedSeveritydet\"];\n\t\t$this->expectedSeveritydet->AdvancedSearch->SearchOperator = @$filter[\"z_expectedSeveritydet\"];\n\t\t$this->expectedSeveritydet->AdvancedSearch->SearchCondition = @$filter[\"v_expectedSeveritydet\"];\n\t\t$this->expectedSeveritydet->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedSeveritydet\"];\n\t\t$this->expectedSeveritydet->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedSeveritydet\"];\n\t\t$this->expectedSeveritydet->AdvancedSearch->save();\n\n\t\t// Field expectedOccurrencedet\n\t\t$this->expectedOccurrencedet->AdvancedSearch->SearchValue = @$filter[\"x_expectedOccurrencedet\"];\n\t\t$this->expectedOccurrencedet->AdvancedSearch->SearchOperator = @$filter[\"z_expectedOccurrencedet\"];\n\t\t$this->expectedOccurrencedet->AdvancedSearch->SearchCondition = @$filter[\"v_expectedOccurrencedet\"];\n\t\t$this->expectedOccurrencedet->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedOccurrencedet\"];\n\t\t$this->expectedOccurrencedet->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedOccurrencedet\"];\n\t\t$this->expectedOccurrencedet->AdvancedSearch->save();\n\n\t\t// Field expectedDetectiondet\n\t\t$this->expectedDetectiondet->AdvancedSearch->SearchValue = @$filter[\"x_expectedDetectiondet\"];\n\t\t$this->expectedDetectiondet->AdvancedSearch->SearchOperator = @$filter[\"z_expectedDetectiondet\"];\n\t\t$this->expectedDetectiondet->AdvancedSearch->SearchCondition = @$filter[\"v_expectedDetectiondet\"];\n\t\t$this->expectedDetectiondet->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedDetectiondet\"];\n\t\t$this->expectedDetectiondet->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedDetectiondet\"];\n\t\t$this->expectedDetectiondet->AdvancedSearch->save();\n\n\t\t// Field expectedRpndet\n\t\t$this->expectedRpndet->AdvancedSearch->SearchValue = @$filter[\"x_expectedRpndet\"];\n\t\t$this->expectedRpndet->AdvancedSearch->SearchOperator = @$filter[\"z_expectedRpndet\"];\n\t\t$this->expectedRpndet->AdvancedSearch->SearchCondition = @$filter[\"v_expectedRpndet\"];\n\t\t$this->expectedRpndet->AdvancedSearch->SearchValue2 = @$filter[\"y_expectedRpndet\"];\n\t\t$this->expectedRpndet->AdvancedSearch->SearchOperator2 = @$filter[\"w_expectedRpndet\"];\n\t\t$this->expectedRpndet->AdvancedSearch->save();\n\n\t\t// Field revisedClosureDatedet\n\t\t$this->revisedClosureDatedet->AdvancedSearch->SearchValue = @$filter[\"x_revisedClosureDatedet\"];\n\t\t$this->revisedClosureDatedet->AdvancedSearch->SearchOperator = @$filter[\"z_revisedClosureDatedet\"];\n\t\t$this->revisedClosureDatedet->AdvancedSearch->SearchCondition = @$filter[\"v_revisedClosureDatedet\"];\n\t\t$this->revisedClosureDatedet->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedClosureDatedet\"];\n\t\t$this->revisedClosureDatedet->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedClosureDatedet\"];\n\t\t$this->revisedClosureDatedet->AdvancedSearch->save();\n\n\t\t// Field revisedClosureDate\n\t\t$this->revisedClosureDate->AdvancedSearch->SearchValue = @$filter[\"x_revisedClosureDate\"];\n\t\t$this->revisedClosureDate->AdvancedSearch->SearchOperator = @$filter[\"z_revisedClosureDate\"];\n\t\t$this->revisedClosureDate->AdvancedSearch->SearchCondition = @$filter[\"v_revisedClosureDate\"];\n\t\t$this->revisedClosureDate->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedClosureDate\"];\n\t\t$this->revisedClosureDate->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedClosureDate\"];\n\t\t$this->revisedClosureDate->AdvancedSearch->save();\n\n\t\t// Field perfomedAction\n\t\t$this->perfomedAction->AdvancedSearch->SearchValue = @$filter[\"x_perfomedAction\"];\n\t\t$this->perfomedAction->AdvancedSearch->SearchOperator = @$filter[\"z_perfomedAction\"];\n\t\t$this->perfomedAction->AdvancedSearch->SearchCondition = @$filter[\"v_perfomedAction\"];\n\t\t$this->perfomedAction->AdvancedSearch->SearchValue2 = @$filter[\"y_perfomedAction\"];\n\t\t$this->perfomedAction->AdvancedSearch->SearchOperator2 = @$filter[\"w_perfomedAction\"];\n\t\t$this->perfomedAction->AdvancedSearch->save();\n\n\t\t// Field revisedSeverity\n\t\t$this->revisedSeverity->AdvancedSearch->SearchValue = @$filter[\"x_revisedSeverity\"];\n\t\t$this->revisedSeverity->AdvancedSearch->SearchOperator = @$filter[\"z_revisedSeverity\"];\n\t\t$this->revisedSeverity->AdvancedSearch->SearchCondition = @$filter[\"v_revisedSeverity\"];\n\t\t$this->revisedSeverity->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedSeverity\"];\n\t\t$this->revisedSeverity->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedSeverity\"];\n\t\t$this->revisedSeverity->AdvancedSearch->save();\n\n\t\t// Field revisedOccurrence\n\t\t$this->revisedOccurrence->AdvancedSearch->SearchValue = @$filter[\"x_revisedOccurrence\"];\n\t\t$this->revisedOccurrence->AdvancedSearch->SearchOperator = @$filter[\"z_revisedOccurrence\"];\n\t\t$this->revisedOccurrence->AdvancedSearch->SearchCondition = @$filter[\"v_revisedOccurrence\"];\n\t\t$this->revisedOccurrence->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedOccurrence\"];\n\t\t$this->revisedOccurrence->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedOccurrence\"];\n\t\t$this->revisedOccurrence->AdvancedSearch->save();\n\n\t\t// Field revisedDetection\n\t\t$this->revisedDetection->AdvancedSearch->SearchValue = @$filter[\"x_revisedDetection\"];\n\t\t$this->revisedDetection->AdvancedSearch->SearchOperator = @$filter[\"z_revisedDetection\"];\n\t\t$this->revisedDetection->AdvancedSearch->SearchCondition = @$filter[\"v_revisedDetection\"];\n\t\t$this->revisedDetection->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedDetection\"];\n\t\t$this->revisedDetection->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedDetection\"];\n\t\t$this->revisedDetection->AdvancedSearch->save();\n\n\t\t// Field revisedRpn\n\t\t$this->revisedRpn->AdvancedSearch->SearchValue = @$filter[\"x_revisedRpn\"];\n\t\t$this->revisedRpn->AdvancedSearch->SearchOperator = @$filter[\"z_revisedRpn\"];\n\t\t$this->revisedRpn->AdvancedSearch->SearchCondition = @$filter[\"v_revisedRpn\"];\n\t\t$this->revisedRpn->AdvancedSearch->SearchValue2 = @$filter[\"y_revisedRpn\"];\n\t\t$this->revisedRpn->AdvancedSearch->SearchOperator2 = @$filter[\"w_revisedRpn\"];\n\t\t$this->revisedRpn->AdvancedSearch->save();\n\t\t$this->BasicSearch->setKeyword(@$filter[Config(\"TABLE_BASIC_SEARCH\")]);\n\t\t$this->BasicSearch->setType(@$filter[Config(\"TABLE_BASIC_SEARCH_TYPE\")]);\n\t}", "title": "" }, { "docid": "0ad30ceaf7f310b13ca44cace66a53ed", "score": "0.5332054", "text": "public function having()\n {\n $args = func_get_args();\n $callback = array($this, '_conditions');\n $this->_filters[][] = call_user_func_array($callback, $args);\n }", "title": "" }, { "docid": "5f859378096f7056fcfe67e5df98879d", "score": "0.5328454", "text": "public function filter();", "title": "" }, { "docid": "0911d908944670b3b349372b45bc2bdb", "score": "0.53276134", "text": "public function filters() {\n\t\treturn array (\n\t\t\t\t'LogRequest'\n\t\t);\n\t}", "title": "" }, { "docid": "1ef6ec0dff5372499c0986525e06db36", "score": "0.53266954", "text": "public function filtersOnID()\n {\n $regexp = '/^(.*\\.)?(\"|`)?ID(\"|`)?\\s?(=|IN)/';\n\n foreach ($this->getWhereParameterised($parameters) as $predicate) {\n if (preg_match($regexp ?? '', $predicate ?? '')) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "8a4c2a4f9c0beab65934a939514c4a5a", "score": "0.5321956", "text": "public function filter_add_validate()\n\t{\n\t\tswitch ($this->input->post()) {\n\t\t\tcase FALSE:\n\t\t\t\t$this->filter_add();\n\t\t\tbreak;\n\t\t\tcase TRUE:\n\t\t\t\t$this->rules_filter();\n\t\t\t\tswitch ($this->form_validation->run()) {\n\t\t\t\t\tcase FALSE:\n\t\t\t\t\t\t$this->filter_add();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRUE:\n\t\t\t\t\t\t# Cargar el modelo de base de datos\n\t\t\t\t\t\t$this->load->model('ShopLayoutModel', 'shop', TRUE);\n\t\t\t\t\t\t# Insertar información en la base de datos\n\t\t\t\t\t\t$this->shop->save_filter($this->input->post());\n\t\t\t\t\t\tredirect('shop-layout-filter/success'); \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "de780b5f68cd2fe75144d5236a62a242", "score": "0.5315205", "text": "function ShowFilterList() {\n\n\t// Initialize\n\t$sFilterList = \"\";\n\n\t// Field feedmill\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_feedmill\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_feedmill\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Feedmill<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field feedtype\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_feedtype\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_feedtype\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Feedtype<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field sid\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_sid\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_sid\"], \", \", EW_REPORT_DATATYPE_STRING);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Sid<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Field date\n\t$sExtWrk = \"\";\n\t$sWrk = \"\";\n\tif (is_array($GLOBALS[\"sel_date\"]))\n\t\t$sWrk = ewrpt_JoinArray($GLOBALS[\"sel_date\"], \", \", EW_REPORT_DATATYPE_DATE);\n\tif ($sExtWrk <> \"\" || $sWrk <> \"\")\n\t\t$sFilterList .= \"Date<br />\";\n\tif ($sExtWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sExtWrk<br />\";\n\tif ($sWrk <> \"\")\n\t\t$sFilterList .= \"&nbsp;&nbsp;$sWrk<br />\";\n\n\t// Show Filters\n\tif ($sFilterList <> \"\")\n\t\techo \"CURRENT FILTERS:<br />$sFilterList\";\n}", "title": "" }, { "docid": "0c514a67a6ff784e1ff7aea7b0339ca8", "score": "0.5308471", "text": "protected function hasFilterFieldset(): bool\n {\n return $this->getFilterFieldset() !== null;\n }", "title": "" }, { "docid": "806c9c0fd2ef9662ce2afca7d3e62076", "score": "0.53078437", "text": "abstract public function getFilterQuery();", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.53058314", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "6f6fcdca5eae09d7053f084d023bb71f", "score": "0.5298579", "text": "public function filterData()\n\t{\n\t\t$this->create_query();\n\t\t$query = $this->db->get();\n\t\treturn $query->num_rows();\n\t}", "title": "" }, { "docid": "b6a2700f7f4a9099f763d6e53038ff16", "score": "0.5296495", "text": "public static function getFilterableFields(): array;", "title": "" }, { "docid": "9c43d553e7acb4a086317f3aa68984d0", "score": "0.52847373", "text": "public function isFilterable()\n {\n return $this->isOperatorFilterable() && $this->isAttributeTypeFilterable();\n }", "title": "" }, { "docid": "7b78a1a6db78ca36e39a23716278074d", "score": "0.5277482", "text": "public function FilterData(DataObject $record) {\n\t\t$result = array();\n\t\tforeach ($this->ListFiltersPersist() as $filterGroup) {\n\t\t\t$data = $filterGroup->getFilterData($record);\n\t\t\tif ($data !== null && (!isset($data['value']) || $data['value'] !== null)) {\n\t\t\t\t$result[$filterGroup->ID] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "483807507201c32e69031859c8e282a3", "score": "0.52708393", "text": "function matches($record) {\n // Start with FALSE for OR and TRUE for AND\n $result = !$this->ored;\n foreach ($this->constraints as $field=>$check) {\n $R = ($check instanceof self)\n ? $check->matches($record)\n : SqlCompiler::evaluate($record, $field, $check);\n if ($this->ored) {\n if ($result |= $R)\n break;\n }\n // Anything AND false\n elseif (!$R) {\n $result = false;\n break;\n }\n }\n return $this->negated ? !$result : $result;\n }", "title": "" }, { "docid": "47be997d3875c7eaef11f98eaa2929ac", "score": "0.5270357", "text": "public function index(){\n\t\tif($this->request && $this->request->is('post'))\n\t\t{\n\t\t $url = array('action'=>'index');\n\t\t $filters = array();\n\n\t\t if(isset($this->data['Recording']['name']) && $this->data['Recording']['name'])\n\t\t $filters['name'] = $this->data['Recording']['name'];\n\t\t\telse\n\t\t\t\t$this->Session->write('RecordingSearch.name_value', null);\n\t\t\t\t\n\t\t\tif(isset($this->data['Recording']['format_id']) && $this->data['Recording']['format_id'])\n\t\t $filters['format_id'] = $this->data['Recording']['format_id'];\n\t\t\telse\n\t\t\t\t$this->Session->write('RecordingSearch.format_id_value', null);\n\t\t\t\n\t\t if(isset($this->data['Recording']['no']))\n\t\t $filters['no'] = $this->data['Recording']['no'];\n\t\t\telse\n\t\t\t\t$this->Session->write('RecordingSearch.no_value', null);\t\t \n\t\t\t\t\n\t\t\t$this->Session->write('RecordingSearch.page_value', 1);\n\t\t\n\t\t\t//redirect user to the index page including the selected filters\n\t\t\t$this->redirect(array_merge($url,$filters)); \n\t\t}\n\t\t\t\t\n\t\t//check filters on passedArgs\n\t\t$conditions = array();\n\t\t\n\t\t/* id */\n\t\tif(isset($this->passedArgs['no'])){\n\t\t\tif($this->passedArgs['no'] != '') \t\t\n \t\t\t$conditions['Recording.no'] = $this->passedArgs['no'];\n\t\t} else {\n\t\t\tif($this->Session->check('RecordingSearch.no_value'))\n\t\t\t\tif($this->Session->check('RecordingSearch.no_value') != '')\n\t\t\t\t\t$conditions['Recording.no'] = $this->Session->read('RecordingSearch.no_value');\n\t\t} \n\n\t\t/* name */\n if(array_key_exists('Recording.no', $conditions) == false) {\n if(isset($this->passedArgs['name']))\n $conditions['Recording.name'] = $this->passedArgs['name']; \n else\n if($this->Session->check('RecordingSearch.name_value'))\n $conditions['Recording.name'] = $this->Session->read('RecordingSearch.name_value');\n }\n\t\t\n\t\t/* company */\n if(array_key_exists('Recording.no', $conditions) == false) {\n if(isset($this->passedArgs['format_id']))\n $conditions['Recording.format_id'] = $this->passedArgs['format_id']; \n else\n if($this->Session->check('RecordingSearch.format_id_value'))\n $conditions['Recording.format_id'] = $this->Session->read('RecordingSearch.format_id_value');\n }\n\n\t\t/* page */\n\t\tif(isset($this->passedArgs['page']))\n\t\t\t$curpage = $this->passedArgs['page'];\n\t\telse\n\t\t\tif($this->Session->check('RecordingSearch.page_value'))\n\t\t\t\t$curpage = $this->Session->read('RecordingSearch.page_value');\n\t\t\telse\n\t\t\t\t$curpage = 1;\n\t\t\t\t\n\t\t/* WRITE FORM VALUES TO SESSION */\n\t\tforeach($conditions As $k=>$v)\n\t\t{\n\t\t\t$this->Session->write(str_replace('Recording', 'RecordingSearch', $k) . '_value', $v);\n\t\t}\n\t\t\n\t\tif(array_key_exists('Recording.name', $conditions) == true) {\n\t\t\t$name = array_shift($conditions);\n\t\t\t$conditions['Recording.name LIKE'] = '%' . $name . '%';\n\t\t}\n\n\t\t$this->paginate = array (\n\t\t\t'conditions' => $conditions,\n 'contain' => array('Format', 'Presentation', 'Comprecordingnote', 'Company', 'Ancillarymusic'),\n\t\t\t'fields' => array('Recording.id', 'Recording.no', 'Recording.name', 'Recording.company_id', 'Recording.catalog', 'Recording.notes', 'Company.company', 'Recording.format_id', 'Format.format', 'Recording.comprecordingnote_id', 'Comprecordingnote.note', 'Recording.presentation_id', 'Presentation.presentation', 'Recording.ancillarymusic_id', 'Ancillarymusic.name', 'Recording.no', 'Recording.notes', 'Recording.recsong_count', 'Recording.recsinger_count'),\n\t\t\t'order' => array ('Recording.no' => 'ASC'),\n\t\t\t'page' => $curpage,\n\t\t\t'limit' => 20,\n\t\t\t'recursive' => 1\n\t\t);\n\t\t\n\t\tif(array_key_exists('Recording.name LIKE', $conditions) == true) {\n\t\t\t$name = str_replace('%', '', $conditions['Recording.name LIKE']);\n\t\t\tunset($conditions['Recording.name LIKE']);\n\t\t\t$conditions['Recording.name'] = str_replace('%', '', $name);\n\t\t}\n\t\t\t\t\t\t\n\t\t/* write page to session */\n\t\tif($curpage > 1)\n\t\t\t$this->Session->write('RecordingSearch.page_value', $curpage);\n\t\t\n\t\t$recordings = $this->paginate('Recording');\n\n\t\t$formats = $this->Recording->Format->find('list', array('order' => 'format'));\n\t\t$this->set(compact('recordings', 'conditions', 'formats'));\n \n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "915ce3d4cc1e1c224280b9346b26f265", "score": "0.52599746", "text": "Function getFiltered($filter) {\n $filter_options = ['plaats', 'denominatie', 'stijl', 'type', 'monument', 'periode', 'gemeente', 'provincie'];\n $sql = 'SELECT * FROM '.DB_VIEW.' WHERE';\n foreach ($filter_options as $field) {\n if (isset($filter[$field])) {\n $s = implode('\\',\\'', $filter[$field]);\n $sql .= ' ' . $field . ' IN (\\'' . $s . '\\') AND';\n }\n }\n if (isset($filter['huidige_bestemming'])) {\n if ($filter['huidige_bestemming'] == ['kerk']) {\n $sql .= ' huidige_bestemming=\\'kerk\\' AND';\n } else {\n $sql .= ' huidige_bestemming<>\\'kerk\\' AND';\n }\n }\n\n $ids = array();\n if (isset($filter['architect'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = str_replace('&amp;', '&', implode('\\',\\'', $filter['architect']));\n $sqla = 'SELECT \"ID\" from \"013_Architect\" WHERE \"Architect\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n if (isset($filter['naam'])) {\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $a = implode('\\',\\'', $filter['naam']);\n $sqla = 'SELECT \"ID\" from \"011_Naam_Kerk\" WHERE \"Naam_Kerk\" IN (\\'' . $a . '\\')';\n $sth = $this->dbh->prepare($sqla);\n $sth->execute();\n $id_s = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n $sql .= ' id IN (' . implode(',', $id_s) . ') AND';\n }\n\n $sql = substr($sql, 0, -4) . ' ORDER BY plaats, naam';\n error_log($sql);\n $this->dbh->exec(\"SET CHARACTER SET utf8\");\n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $res = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $res;\n }", "title": "" }, { "docid": "15ae87d1ec5c4ff08c6d5e74924c6391", "score": "0.5257285", "text": "public function register_filters() {\r\n\r\n\t\t}", "title": "" }, { "docid": "c12534345430e1c1d47af47eb5664163", "score": "0.52565354", "text": "public function handleAllowedFilters(array $filters): void;", "title": "" }, { "docid": "4c17c854065f705751dcfe095acff280", "score": "0.525524", "text": "public function filter(Request $request)\n {\n $filter_by = $request->filter_by;\n if($filter_by == 'date'){\n $this->validate($request, [\n 'start_date' => 'required|date',\n 'end_date' => 'required|date',\n ],\n [\n // 'name.required' => ['A name is required'],\n // 'description.required' => ['A description is required']\n ]\n );\n }else if($filter_by == 'category'){\n $this->validate($request, [\n 'category' => 'required',\n ],\n [\n // 'name.required' => ['A name is required'],\n // 'description.required' => ['A description is required']\n ]\n );\n }else if($filter_by == 'status'){\n $this->validate($request, [\n 'status' => 'required',\n ],\n [\n // 'name.required' => ['A name is required'],\n // 'description.required' => ['A description is required']\n ]\n );\n }else if($filter_by == 'all'){\n $this->validate($request, [\n 'status' => 'required',\n 'category' => 'required',\n 'start_date' => 'required|date',\n 'end_date' => 'required|date',\n ],\n [\n // 'name.required' => ['A name is required'],\n // 'description.required' => ['A description is required']\n ]\n );\n }else{\n return response()->json([\n 'error_no' => -113,\n 'error_msg' => 'Choose any of the filter',\n 'result' => []\n ]);\n }\n\n try{\n if($filter_by == 'date'){\n $from = $request->start_date;\n $to = $request->end_date;\n\n $todo = Auth::user()->todo()->get()->whereBetween('date', [$from, $to]);\n }else if($filter_by == 'category'){\n $category = $request->category;\n $todo = Auth::user()->todo()->get()->where('category', $category);\n }else if($filter_by == 'status'){\n $status = $request->status;\n $todo = Auth::user()->todo()->get()->where('status', $status);\n }else if($filter_by == 'all'){\n $from = $request->start_date;\n $to = $request->end_date;\n $category = $request->category;\n $status = $request->status;\n $todo = Auth::user()->todo()->get()\n ->where('status', $status)\n ->where('category', $category)\n ->whereBetween('date', [$from, $to]);\n }\n\n if($todo){\n return response()->json([\n 'error_no' => 0,\n 'error_msg' => 'success',\n 'result' => $todo\n ]);\n }else{\n return response()->json([\n 'error_no' => -112,\n 'error_msg' => 'Unable to fetch',\n 'result' => []\n ]);\n }\n }catch(Exception $e){\n return response()->json([\n 'error_no' => $e->errorInfo[1],\n 'error_msg' => $e->errorInfo[2],\n ]);\n }\n }", "title": "" }, { "docid": "fc5204a3aaae0d33ebe2650233d3dabb", "score": "0.52548546", "text": "public function has_filter( $key ) {\n\t\treturn has_filter( \"hb/hbelv_{$key}\" );\n\t}", "title": "" }, { "docid": "b3fded95322db24a65676a580705c6e5", "score": "0.52533567", "text": "function allow_configured_filters() {\n return TRUE;\n }", "title": "" }, { "docid": "bc1027a503ae6fb88c1d04fb16578099", "score": "0.5251936", "text": "protected function hasFilterEnabled() {\n $propertyExists = property_exists($this, 'filter');\n return ($propertyExists && $this->filter) || !$propertyExists;\n }", "title": "" } ]
e9f8f98539680eded068391d1e9c29f7
Drops a database and all its related data.
[ { "docid": "77c618b19fed5d233b05b2377c5239e2", "score": "0.6133163", "text": "public function drop(ConnectionInterface $db)\n {\n $database = $db->getDatabase();\n\n $collection = $database->selectCollection($this->table);\n\n $collection->drop();\n }", "title": "" } ]
[ { "docid": "db0139535304c8a376232d3cf304b8e3", "score": "0.7823579", "text": "public function dropDatabase()\n {\n\n try {\n // clone the connection and load the database name\n $connection = clone $this->getEntityManager()->getConnection();\n $dbname = $connection->getDatabase();\n // remove the the database name\n $params = $connection->getParams();\n if (isset($params[SchemaProcessorInterface::PARAM_DBNAME])) {\n unset($params[SchemaProcessorInterface::PARAM_DBNAME]);\n }\n // create a new connection WITHOUT the database name\n $cn = DriverManager::getConnection($params);\n $sm = $cn->getDriver()->getSchemaManager($cn);\n // SQLite doesn't support database creation by a method\n if ($sm instanceof SqliteSchemaManager) {\n return;\n }\n // query whether or not the database already exists\n if (in_array($dbname, $sm->listDatabases())) {\n $sm->dropDatabase($dbname);\n }\n } catch (\\Exception $e) {\n \\error($e);\n }\n }", "title": "" }, { "docid": "1486c29734b8d48c4d8073ec1e0cbd3e", "score": "0.76838374", "text": "public function dropDB ($db) {}", "title": "" }, { "docid": "1486c29734b8d48c4d8073ec1e0cbd3e", "score": "0.76838374", "text": "public function dropDB ($db) {}", "title": "" }, { "docid": "0782dcf1349834d4949aed84a699f24f", "score": "0.7535189", "text": "public function dropDatabase()\n {\n }", "title": "" }, { "docid": "69d5ca01a9b37f165e0f8ec01863b201", "score": "0.7485997", "text": "public function drop() : void\n {\n if (ENVIRONMENT === 'production') {\n throw new InvalidOperationException('Can\\'t drop the database in production');\n } else {\n $database_name = $this->db->database;\n\n $this->dbforge->drop_database($database_name);\n $this->dbforge->create_database($database_name);\n }\n }", "title": "" }, { "docid": "ce72afbe63b1ec8a9bc94582811547af", "score": "0.7398235", "text": "protected function dropDatabaseIfExists() {\n $sql = sprintf('DROP DATABASE IF EXISTS `%s`;', getenv('db'));\n $this->db->exec($sql);\n }", "title": "" }, { "docid": "a7304685ea19dbc57025a783e960e027", "score": "0.73855907", "text": "private function dropAndRecreateDb()\n {\n $this->sql_engine->dropAndCreateDb();\n\n //for SQL Server get a new DB version model instance\n //SQL Server closes the connection if we drop the database\n if (DB_ENGINE == 'sqlsrv') {\n $this->db_versions_model = CodePax_DbVersions::factory();\n }\n }", "title": "" }, { "docid": "76894a9d790c11432058bc42d725eb7b", "score": "0.73814195", "text": "public function dropDatabases()\n {\n foreach ($this->metadataFactory->getAllMetadata() as $class) {\n if ($class->getMetadata('collection') === null) {\n continue;\n }\n\n $this->dropDocumentDatabase($class->className());\n }\n }", "title": "" }, { "docid": "b65e273ddb982f89bc97b09a05f5b2fd", "score": "0.706718", "text": "public function actionDrop()\n {\n if ($this->confirm('This will drop all tables of current database [' . self::$dbName . '].')) {\n self::$db->createCommand(\"SET foreign_key_checks = 0\")->execute();\n $tables = self::$db->schema->getTableNames();\n foreach ($tables as $table) {\n $this->stdout('Dropping table ' . $table . PHP_EOL, Console::FG_RED);\n self::$db->createCommand()->dropTable($table)->execute();\n }\n self::$db->createCommand(\"SET foreign_key_checks = 1\")->execute();\n }\n }", "title": "" }, { "docid": "4c278557dbb718125de906d5f05048d4", "score": "0.6981375", "text": "public function actionDrop()\n {\n if ($this->confirm('This will drop all tables of current database [' . self::$dbName . '].')) {\n self::$db->createCommand(\"SET foreign_key_checks = 0\")->execute();\n $tables = self::$db->schema->getTableNames();\n foreach ($tables as $table) {\n echo 'Dropping table ' . $table . PHP_EOL;\n self::$db->createCommand()->dropTable($table)->execute();\n }\n self::$db->createCommand(\"SET foreign_key_checks = 1\")->execute();\n }\n }", "title": "" }, { "docid": "9734e1eba7ab9dcb9ff52e5959b7dc72", "score": "0.6937947", "text": "public function dropDatabase($datasource);", "title": "" }, { "docid": "f2d75659223a95d3da2526accf374a04", "score": "0.6855018", "text": "public function unsetDatabase()\r\n\t{\r\n\t\tunset($this->database);\r\n\t}", "title": "" }, { "docid": "1cfa276504128e87875a128ccf50cf0b", "score": "0.6851205", "text": "public function deleteDatabase($database);", "title": "" }, { "docid": "c56329c3cfa8b386b3be2dda982b828f", "score": "0.6829565", "text": "public function dropDB($db) {\n\t\t$this->printTable($db);\n\n\t\t//Preparing all the SQL statements.\n\t\t$sql_drop_table = \"DROP TABLE trusted_table\";\n\t\t$sql_drop_role = \"DROP ROLE role_01\";\n\t\t$sql_drop_trusted_context = \"DROP TRUSTED CONTEXT ctx\";\n\n\t\t//Executing the SQLs.\n\t\ttry {\n\t\t\t$db->exec($sql_drop_table);\n\t\t} catch (PDOException $ex) { }\n\n\t\ttry {\n\t\t\t$db->exec($sql_drop_trusted_context);\n\t\t} catch (PDOException $ex) { }\n\n\t\ttry {\n\t\t\t$db->exec($sql_drop_role);\n\t\t} catch (PDOException $ex) { }\n\t}", "title": "" }, { "docid": "95b6484b40ec263d8b23cd0d7a9fa1d0", "score": "0.6763584", "text": "public function cleanDatabase()\n {\n file_put_contents($this->getDB(), '');\n }", "title": "" }, { "docid": "846485457d1c0e0b695725c64d1744e0", "score": "0.6701493", "text": "protected function resetDatabase()\n {\n $database = oxDb::getDb();\n $database->execute(\"TRUNCATE oxarticles\");\n $database->execute(\"TRUNCATE oxdiscount\");\n $database->execute(\"TRUNCATE oxobject2discount\");\n $database->execute(\"TRUNCATE oxprice2article\");\n $tables = $database->getCol(\"SHOW TABLES\");\n if (in_array('oxfield2shop', $tables)) {\n $database->execute(\"TRUNCATE oxfield2shop\");\n }\n $database->execute(\"TRUNCATE oxuser\");\n $database->execute(\"TRUNCATE oxobject2group\");\n $database->execute(\"TRUNCATE oxgroups\");\n }", "title": "" }, { "docid": "9156a3a93d05c72b411301c984693f2a", "score": "0.6686231", "text": "protected function purgeDatabase()\n {\n if (!self::$kernel->getContainer()->has(self::ENTITY_MANAGER_ID)) {\n return;\n }\n\n /** @var EntityManagerInterface $manager */\n $manager = self::$kernel->getContainer()->get(self::ENTITY_MANAGER_ID);\n $connection = $manager->getConnection();\n\n if ($connection->getDriver() instanceof \\Doctrine\\DBAL\\Driver\\PDOMySql\\Driver) {\n $connection->executeUpdate('SET foreign_key_checks = 0;');\n }\n\n $purger = new ORMPurger();\n $executor = new ORMExecutor($manager, $purger);\n $referenceRepository = new ProxyReferenceRepository($manager);\n $executor->setReferenceRepository($referenceRepository);\n $executor->purge();\n\n if ($connection->getDriver() instanceof \\Doctrine\\DBAL\\Driver\\PDOMySql\\Driver) {\n $connection->executeUpdate('SET foreign_key_checks = 1;');\n }\n }", "title": "" }, { "docid": "6f9c961ad3c7d529da610d0d8549484a", "score": "0.6662204", "text": "private function clear_db() {\r\n\t\t$database = $this->User->getDataSource()->config['database'];\r\n\t\t$tables = $this->User->query('SHOW TABLES');\r\n\r\n\t\t\r\n\t\tforeach ($tables as $table) {\r\n\t\t\t$table_name = $table['TABLE_NAMES']['Tables_in_' . $database];\r\n\t\t\tif (array_search($table_name, $this->ommitted_tables) === FALSE) {\r\n\t\t\t\t$this->User->query('DELETE FROM `' . $table_name . '` WHERE 1');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7463d6eb47be40787632b7f1f1150009", "score": "0.66525614", "text": "function destroy($db_name){\n\n\t\tif(!is_string($db_name))\n\t\t\ttrigger_error(\"You cannot destroy multiple databases with the same command. (String needed)\", E_USER_ERROR);\n\n\t\t$opts = new OptionsClass();\n\t\t$opts->db = $db_name;\n\t\t$opts->method = 'DELETE';\n\n\t\t$relax = new Relax($opts, $this->nano);\n\t\treturn $relax->exec();\n\t}", "title": "" }, { "docid": "a9e387c70a2172816dd09204cf91b514", "score": "0.66493374", "text": "public function tearDown() {\r\n\t\t// even when testcases fails\r\n\t\t$this->dropDatabase();\r\n\t}", "title": "" }, { "docid": "17f2b62f79d0ec30db8cce0e0eb98e52", "score": "0.66178393", "text": "public function cleanup()\n {\n $this->db->begin();\n $rslt = $this->db->query( 'SELECT * FROM SQLITE_MASTER' );\n $rslt->setFetchMode( PDO::FETCH_NUM );\n $rows = $rslt->fetchAll();\n foreach ( $rows as $row )\n {\n $table = $row[0];\n $this->db->exec( \"DROP TABLE `$table`\" );\n }\n $this->db->commit();\n }", "title": "" }, { "docid": "877f7807afb194812ab2058a455ffae1", "score": "0.6602274", "text": "protected function cleanUpDb()\n {\n $this->logger->info('Cleaning up database tables from previous test runs...');\n\n $info = Database::getConnectionInfo('default');\n $prefix = $info['default']['prefix']['default'];\n $length = strlen($prefix);\n\n $tables = db_find_tables('phpunit_%');\n\n foreach($tables as $table) {\n // If we're cleaning up a previous run, we likely don't need to\n // account for a prefix.\n $table_to_drop = $prefix ? substr($table, $length) : $table;\n\n if (db_drop_table($table_to_drop)) {\n $this->logger->debug('Dropping table :table', [':table' => $table]);\n } else {\n $this->logger->warning(\"Couldn't drop $table\");\n }\n }\n }", "title": "" }, { "docid": "999c8437873f948d63314c8da5473d6a", "score": "0.65959954", "text": "public static function uninstall()\n {\n $db = XenForo_Application::get('db');\n $db->query(self::$table['dropQuery']);\n }", "title": "" }, { "docid": "3e237b11bc1ac837d229cad5d73305bf", "score": "0.6581551", "text": "public function tearDown() {\n\t\t//$this->db->connection->delete($this->_database);\n\t}", "title": "" }, { "docid": "9faf95a752bf169d55fecc65d086973a", "score": "0.65800655", "text": "public function tearDownStore()\n {\n if ($this->tableExists()) {\n $queries = $this->getSchema()->toDropSql($this->connection->getDatabasePlatform());\n $this->executeSchemaQueries($queries);\n }\n }", "title": "" }, { "docid": "5e15e3de5020e6f5bd3a2f11fa5de12f", "score": "0.65148544", "text": "public function tearDown() {\n if (isset(IsoscelesTestDatabaseHelper::$PDO)) {\n $this->testdb_helper->drop($this->test_database_name);\n }\n parent::tearDown();\n }", "title": "" }, { "docid": "58f3a628297433ddf2d4b8132cf7d0c1", "score": "0.64869946", "text": "public function databaseDelete()\n\t{\n\t\t$this->getConnection()->table('extensions')->where('slug', '=', $this->slug)->delete();\n\t\t$this->databaseAttributes = array();\n\t}", "title": "" }, { "docid": "f4b38c1118b6ced33b4026f8337ed1b7", "score": "0.6476006", "text": "public function clearDb()\n {\n\n $this->dbProvider->clear();\n\n }", "title": "" }, { "docid": "ae254051058d8d9d4a6058463ca6a0b4", "score": "0.646641", "text": "protected function removeDBTables()\n {\n try {\n $schema = new Schema($this->container->get('models'));\n $schema->remove(Transaction::class);\n $schema->remove(TransactionItem::class);\n $schema->remove(OrderLines::class);\n $schema->remove(Configuration::class);\n } catch (Exception $ex) {\n $this->getPluginLogger()->error(\n 'Error when removing database tables',\n [\n 'error' => $ex->getMessage(),\n ]\n );\n }\n }", "title": "" }, { "docid": "72cc4a2c187cdc56db669900823c7a3d", "score": "0.6448442", "text": "function dropDatabase($path = null, $force = false){\n $result = false;\n if ($path) {\n $this->setPath($path);\n }\n if ($this->isDatabase()) {\n while (!$force && $this->isLockAll()) {\n $this->sleep();\n }\n $result = @unlink($this->path);\n if (!$result) {\n if ($this->_ifExistsClause !== 'if_exists') {\n $this->pushError('Cannot dropDatabase(%s)', $this->path);\n }\n } else {\n $this->autoVacuum = false;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "72cc4a2c187cdc56db669900823c7a3d", "score": "0.6448442", "text": "function dropDatabase($path = null, $force = false){\n $result = false;\n if ($path) {\n $this->setPath($path);\n }\n if ($this->isDatabase()) {\n while (!$force && $this->isLockAll()) {\n $this->sleep();\n }\n $result = @unlink($this->path);\n if (!$result) {\n if ($this->_ifExistsClause !== 'if_exists') {\n $this->pushError('Cannot dropDatabase(%s)', $this->path);\n }\n } else {\n $this->autoVacuum = false;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "950c916ae6b1724719260c3fc8514b01", "score": "0.641597", "text": "public static function reset(): void\n {\n if (file_exists('database/database.db')) {\n unlink('database/database.db');\n }\n\n copy('database/database.empty.db', 'database/database.db');\n }", "title": "" }, { "docid": "7a24c714b97b22415dad57a6904ee6b5", "score": "0.6415851", "text": "public function resetTestDatabase()\n {\n /**\n * TODO: delete the executeShellConsoleCommand and use the\n * function executeConsoleCommand after solve the problem\n * that he uses the prod environement.\n */\n $this->executeShellConsoleCommand('doctrine:database:drop --env=test --force');\n $this->executeShellConsoleCommand('doctrine:database:create --env=test');\n $this->executeShellConsoleCommand('doctrine:schema:create --env=test');\n }", "title": "" }, { "docid": "328c3e2517a717357323467d6306543f", "score": "0.6410724", "text": "public function restoreDatabase()\n {\n // restore the test db file\n if (!$this->app) {\n $this->refreshApplication();\n }\n $db = $this->app->make('db')->connection();\n\n copy($db->getDatabaseName() . static::$backupExtension,\n $db->getDatabaseName());\n unlink($db->getDatabaseName() . static::$backupExtension);\n }", "title": "" }, { "docid": "67d3dd302718686f727b2484437571e5", "score": "0.64045364", "text": "public function tearDown(): void\n {\n $this->db_adapter->execute(\"\n DROP SCHEMA exodus_tmp CASCADE;\n \");\n\n $this->db_adapter->commit();\n }", "title": "" }, { "docid": "0812a8c945786d13d005c867761377c4", "score": "0.63909554", "text": "public function closeDatabaseConnection() {\n $this->database = null;\n\n // There is no point of keeping the tmp folder here now.\n if (in_array(\"tmp\", scandir(getcwd()))) {\n $this->deleteFolder(\"./tmp/\");\n }\n }", "title": "" }, { "docid": "ac7beb92d1f6f3d299d199ebbdb7a987", "score": "0.6369435", "text": "function deleteDatabaseOnly() {\n\t\tif($children = $this->myChildren()) {\n\t\t\tforeach($children as $child) $child->deleteDatabaseOnly();\n\t\t}\n\n\t\tparent::deleteDatabaseOnly();\n\t}", "title": "" }, { "docid": "ae6241b6dd8a9dfb86cc24522e132dbf", "score": "0.6364671", "text": "public function tearDown() {\n\t\t$this->_db->dropSchema('galleries');\n\t}", "title": "" }, { "docid": "af31ccfaef3153ac9c264ea42a0c7808", "score": "0.6357442", "text": "public function down(Database $database);", "title": "" }, { "docid": "90136bb812236140d17b5417b76fe7ee", "score": "0.635738", "text": "public function drop()\n {\n if ($this->eventManager->hasListeners(Events::preDropDatabase)) {\n $this->eventManager->dispatchEvent(Events::preDropDatabase, new EventArgs($this));\n }\n\n $result = $this->mongoDB->drop();\n\n if ($this->eventManager->hasListeners(Events::postDropDatabase)) {\n $this->eventManager->dispatchEvent(Events::postDropDatabase, new EventArgs($this));\n }\n\n return $result;\n }", "title": "" }, { "docid": "e07aae444427c9ec6833566a0080e36a", "score": "0.6354114", "text": "public function database_Drop($dbname, $key) {\n\t\t$db = json_decode(file_get_contents('db_'.$dbname.'.json'), true);\n\t\tunset($db[$key]);\n \tfile_put_contents('db_'.$dbname.'.json', json_encode($db));\n\t}", "title": "" }, { "docid": "ed136dc0b7f29103eb19e5b13683723c", "score": "0.63444257", "text": "public function tearDown()\n {\n $this->rmdir($this->cacheDirectory);\n $this->database()->drop();\n }", "title": "" }, { "docid": "ba98f0c52b9752657b2db8ee6f9290c6", "score": "0.6330951", "text": "protected function tearDown(): void\n {\n $this->schema()->dropTable('users');\n $this->schema()->dropTable('posts');\n $this->schema()->dropTable('countries');\n }", "title": "" }, { "docid": "7381569e9bbe8a6184f4004994de4368", "score": "0.63262206", "text": "protected function tearDown()\r\n\t{\r\n\t\t//$this->db->drop('test');\r\n\t}", "title": "" }, { "docid": "872d2a3c141a93f6c39e2e967646fe67", "score": "0.6312598", "text": "public static function removeTablesFromDatabase()\n {\n $results = UsniAdaptor::db()->getSchema()->getTableNames();\n if (!empty($results))\n {\n UsniAdaptor::db()->createCommand('SET FOREIGN_KEY_CHECKS = 0;')->execute();\n foreach ($results as $row)\n {\n UsniAdaptor::db()->createCommand()->dropTable($row)->execute();\n }\n UsniAdaptor::db()->getSchema()->refresh();\n UsniAdaptor::db()->createCommand('SET FOREIGN_KEY_CHECKS = 1;')->execute();\n }\n }", "title": "" }, { "docid": "06d95623603e94dbb223a0dfefeafaa6", "score": "0.62968916", "text": "function drop_phase_database($project, $phase) {\n\n $status_db = determine_status_database_name($project, $phase);\n $query = \"DROP DATABASE `$status_db`\";\n if (! do_mysql_query($query, null, 1))\n die (\"SQL failed for $query when deleting status database $status_db: \" . mysql_error());\n\n}", "title": "" }, { "docid": "ca4dca79986bcdba79e7240ea8d81ca4", "score": "0.6235094", "text": "function vmoodle_drop_database(&$vmoodle, $cnx = null) {\n // Try to delete database.\n $localcnx = 0;\n if (!$cnx) {\n $localcnx = 1;\n $cnx = vmoodle_make_connection($vmoodle);\n }\n\n if (!$cnx) {\n $erroritem->message = get_string('couldnotconnecttodb', 'local_vmoodle');\n $erroritem->on = 'db';\n return $erroritem;\n } else {\n if ($vmoodle->vdbtype == 'mysql') {\n $sql = \"\n DROP DATABASE `{$vmoodle->vdbname}`\n \";\n } else if ($vmoodle->vdbtype == 'postgres') {\n $sql = \"\n DROP DATABASE {$vmoodle->vdbname}\n \";\n } else {\n echo \"vmoodle_drop_database : Database not supported<br/>\";\n }\n $res = vmoodle_execute_query($vmoodle, $sql, $cnx);\n if (!$res) {\n $erroritem->message = get_string('couldnotdropdb', 'local_vmoodle');\n $erroritem->on = 'db';\n return $erroritem;\n }\n if ($localcnx) {\n vmoodle_close_connection($vmoodle, $cnx);\n }\n }\n return false;\n}", "title": "" }, { "docid": "8e19f5c2020c7572acec60b8f0a64bc8", "score": "0.623318", "text": "public function tearDown(): void\n {\n $this->db->close();\n }", "title": "" }, { "docid": "3364c88db782e593e479e03c145c4155", "score": "0.6220969", "text": "public function __testbench_database_drop($connection, \\Nette\\DI\\Container $container);", "title": "" }, { "docid": "c5560fa9202add183e9cdf9406c20d41", "score": "0.6207133", "text": "public function cleanup()\n {\n $class = $this->modelClass;\n $tableName = $this->getTableName();\n // ensure the table exists before dropping\n if ($this->db->schema->getTableSchema($tableName)) {\n $this->db->createCommand()->dropTable($tableName)->execute();\n }\n }", "title": "" }, { "docid": "9f355b1da5bb7aa7daab52556cc19c35", "score": "0.62029475", "text": "public function creer_drop($database) {\n\t\t$sql = \"DROP DATABASE $database \";\n\t\t$this->setSql ( $sql );\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "64a96bd8ef393e89f5e6ab94bf6a4590", "score": "0.6199594", "text": "public function wipeAll() {\n\t\t$this->adapter->exec('SET FOREIGN_KEY_CHECKS=0;');\n\t\tforeach($this->getTables() as $t) {\n\t \t\ttry{\n\t \t\t\t$this->adapter->exec(\"drop table if exists`$t`\");\n\t \t\t}\n\t \t\tcatch(Exception $e){}\n\t \t\ttry{\n\t \t\t\t$this->adapter->exec(\"drop view if exists`$t`\");\n\t \t\t}\n\t \t\tcatch(Exception $e){}\n\t\t}\n\t\t$this->adapter->exec('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "title": "" }, { "docid": "bb64d30a9e3f760fc247455d10878e3b", "score": "0.6197789", "text": "public static function dropDatabaseIfExists($name)\n {\n /** @var \\Illuminate\\Database\\Schema\\MySqlBuilder $instance */\n return $instance->dropDatabaseIfExists($name);\n }", "title": "" }, { "docid": "f10405ad33ea28005a669d8cf4a80d60", "score": "0.6197426", "text": "public function uninstallDb()\n {\n $sql = array();\n\n include dirname(__FILE__) . '/sql_install.php';\n\n $tables = array_keys($sql);\n\n foreach ($tables as $name) {\n Db::getInstance()->execute('DROP TABLE IF EXISTS ' . $name);\n }\n\n return true;\n }", "title": "" }, { "docid": "9131603ccf6902c7d6da0c632d6bb7ed", "score": "0.6191803", "text": "public function migrateDown( IDatabase $db )\n {\n }", "title": "" }, { "docid": "4476be3885118e99fcf89e4f1510b5d2", "score": "0.6191249", "text": "function DeleteDB($name){\n\nif(!mysql_drop_db($name)){\n\techo mysql_errno() . \": \" . mysql_error() . \"\\n\";\n\ttrigger_error (\"Cannot delete the database\", E_USER_ERROR);\n\treturn FALSE;\n}else{\n\treturn TRUE;\n}\n}", "title": "" }, { "docid": "17b7c358e033f4cb24902fa32b28eae1", "score": "0.6187327", "text": "public function drop();", "title": "" }, { "docid": "17b7c358e033f4cb24902fa32b28eae1", "score": "0.6187327", "text": "public function drop();", "title": "" }, { "docid": "bb0bb99e89a264f4051cabea82c1db12", "score": "0.6184326", "text": "function doDropDbCollections() {\n\t\t$this->db = xn(\"db\");\n\t\t$db = $this->_mongo->selectDB($this->db);\n\t\tforeach ($db->listCollections() as $collection) {\n\t\t\t$collection->drop();\n\t\t}\n\t\techo '<script language=\"javascript\">\nwindow.parent.frames[\"left\"].location.reload();\n</script>';\n\t\t$this->redirect(\"db\", array( \"db\" => $this->db ), true);\n\t}", "title": "" }, { "docid": "6d56d67036b944a44117c720a2f99482", "score": "0.6177126", "text": "public function wipeAll() {\n\t\t$this->adapter->exec('PRAGMA foreign_keys = 0 ');\n\t\tforeach($this->getTables() as $t) {\n\t \t\ttry{\n\t \t\t\t$this->adapter->exec(\"drop table if exists`$t`\");\n\t \t\t}\n\t \t\tcatch(Exception $e){}\n\t \t\ttry{\n\t \t\t\t$this->adapter->exec(\"drop view if exists`$t`\");\n\t \t\t}\n\t \t\tcatch(Exception $e){}\n\t\t}\n\t\t$this->adapter->exec('PRAGMA foreign_keys = 1 ');\n\t}", "title": "" }, { "docid": "a35d9202eaf1be645ef5b89fb2f17edf", "score": "0.6161342", "text": "function delete_db() {\n\t\t$spa_id = $this -> input -> post('spa_id');\n\t\t$pdt_id = $this -> input -> post('pdt_id');\n\t\t$stock_added= $this -> input -> post('current_stock');\n\t\t$this -> stock_model -> update_db_del($pdt_id,$stock_added);\n\t\t$this -> db -> delete('stock_load_audit', array('spa_id' => $spa_id));\n\t\t\n\n\t}", "title": "" }, { "docid": "e4bf3692ab2a5274a44dfc2a7973bf3d", "score": "0.61379886", "text": "public function down(Kohana_Database $db)\n\t{\n\t\t// $db->query(NULL, 'DROP TABLE ... ');\n\t}", "title": "" }, { "docid": "e4bf3692ab2a5274a44dfc2a7973bf3d", "score": "0.61379886", "text": "public function down(Kohana_Database $db)\n\t{\n\t\t// $db->query(NULL, 'DROP TABLE ... ');\n\t}", "title": "" }, { "docid": "c2982fbaf9933dee152736cfa5768206", "score": "0.61331964", "text": "public static function plugin_uninstall()\n {\n EPFL404DB::drop();\n }", "title": "" }, { "docid": "8fac37aa426ae5fc11e2aac575d2b9fe", "score": "0.6124095", "text": "function getDropDatabaseSQLQuery($database);", "title": "" }, { "docid": "d6a14573f65c20aa665182281eddedf5", "score": "0.61230564", "text": "abstract public function dropSchema();", "title": "" }, { "docid": "2dcbe012a32bc706d15e3740ac62ac22", "score": "0.60917443", "text": "public function drop()\r\n\t{\r\n\t\techo \" > drop collection {$this->getCollectionName()} ...\";\r\n\t\t$time = microtime(true);\r\n\t\t$this->getDbConnection()->{$this->getCollectionName()}->drop();\r\n\t\techo \" done (time: \" . sprintf('%.3f', microtime(true) - $time) . \"s)\\n\";\r\n\t}", "title": "" }, { "docid": "dfff1befdbb4b8583edc127b04ec8d47", "score": "0.60842544", "text": "function revert_db() {\n\t\t$this->select_db($this->db_name_prev);\n\t}", "title": "" }, { "docid": "3b2d311088e933cdf8a437aebd5accef", "score": "0.60764927", "text": "private function cleanDatabaseTables()\n\t{\n\t\tforeach($this->tables as $table)\n\t\t{\n\t\t\tDB::table($table)->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "7ab2307b5baf51c660afeb7654671486", "score": "0.6074246", "text": "public function closeDB()\n {\n $this->dbConnection = null;\n }", "title": "" }, { "docid": "b91f3e28575b203e11238630cea34b11", "score": "0.6070597", "text": "public static function unsetDatabase($options = null)\n\t{\n\t\tif (is_null($options))\n\t\t{\n\t\t\t$options = Platform::getInstance()->get_platform_database_options();\n\t\t}\n\n\t\t$db = Database::getDatabase($options);\n\t\t$db->close();\n\n\t\tDatabase::unsetDatabase($options);\n\t}", "title": "" }, { "docid": "ad2371ef16501746933b64e893d063a4", "score": "0.6056422", "text": "protected function tearDown() {\n $this->pdo->exec('\n SET FOREIGN_KEY_CHECKS = 0;\n SELECT GROUP_CONCAT(table_schema, \\'.\\', table_name) INTO @tables\n FROM information_schema.tables\n WHERE table_schema = \\''.STOCK_DB.'\\';\n\n SET @tables = CONCAT(\\'DROP TABLE \\', @tables);\n PREPARE stmt FROM @tables;\n EXECUTE stmt;\n DEALLOCATE PREPARE stmt;\n SET FOREIGN_KEY_CHECKS = 1;\n ');\n }", "title": "" }, { "docid": "69b80186569003ddcb5ed64070ad83ef", "score": "0.6050395", "text": "public static function _uninstall($database) {\n\t\t$database->exec(\"DROP TABLE \" . self::entriesTable);\n\t}", "title": "" }, { "docid": "92cf13d681571d854565614191b0f7dc", "score": "0.60373735", "text": "public function drop()\n {\n $this->getAdapter()->dropTable($this->getName());\n }", "title": "" }, { "docid": "89c974c899a98e79bed648612a1997b0", "score": "0.60265505", "text": "public static function down(){\n\n DBW::drop('Cats');\n\n }", "title": "" }, { "docid": "21d238d2c9637b45c8863551373fa5cd", "score": "0.6021734", "text": "public function backupDatabase()\n {\n if (!$this->app) {\n $this->refreshApplication();\n }\n\n $db = $this->app->make('db')->connection();\n if (!file_exists($db->getDatabaseName())) {\n touch($db->getDatabaseName());\n }\n\n copy($db->getDatabaseName(), $db->getDatabaseName() . static::$backupExtension);\n\n $this->unlinkDatabase($db);\n\n touch($db->getDatabaseName());\n\n $this->artisan('migrate');\n $this->seed(DatabaseSeeder::class);\n\n $this->beforeApplicationDestroyed([$this, 'restoreDatabase']);\n }", "title": "" }, { "docid": "59d5a23f5abc9f0a09876d283364b2de", "score": "0.6019861", "text": "public function tearDown()\n\t{\n\t\t$this->executeSqlFile(dirname(__FILE__) . '/db_teardown.sql');\n\t}", "title": "" }, { "docid": "f1b7bb2f5c08976c789d3e54eacaef47", "score": "0.6019572", "text": "protected function createDatabase()\n {\n $this->files->put($this->databaseFile(), '');\n }", "title": "" }, { "docid": "b9653f110b788062642d4a794f225a4b", "score": "0.6018418", "text": "public function run()\n {\n Schema::dropIfExists('users');\n Schema::dropIfExists('password_resets');\n Schema::dropIfExists('failed_jobs');\n Schema::dropIfExists('standards');\n Schema::dropIfExists('definitions');\n Schema::dropIfExists('activities');\n Schema::dropIfExists('answers');\n Schema::dropIfExists('events');\n Schema::dropIfExists('blockly_events');\n Schema::dropIfExists('create_blocks');\n Schema::dropIfExists('delete_blocks');\n Schema::dropIfExists('change_blocks');\n Schema::dropIfExists('move_blocks');\n Schema::dropIfExists('admins');\n\n if (count(DB::table('migrations')->get())) {\n DB::table('migrations')->truncate();\n }\n// if (count(DB::table('answers')->get())) {\n// DB::table('answers')->truncate();\n// }\n// if (count(DB::table('events')->get())) {\n// DB::table('events')->truncate();\n// }\n// if (count(DB::table('activities')->get())) {\n// DB::table('activities')->truncate();\n// }\n }", "title": "" }, { "docid": "bfd8d2be3b37ec0d3b231f4342d23aa0", "score": "0.601251", "text": "private function renewDatabase()\n {\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n }", "title": "" }, { "docid": "afc4c171dc5893e7b39306e3c00685f1", "score": "0.6004985", "text": "public function createDatabase()\n {\n try {\n Doctrine_Core::dropDatabases();\n } catch (Exception $ex) {\n\n }\n\n Doctrine_Core::createDatabases();\n }", "title": "" }, { "docid": "f5036cf96ea9c5b3494c07fcf3521baa", "score": "0.5982481", "text": "public function tearDown(): void\n {\n unlink($this->request->getAttribute('config')['database']['database']);\n }", "title": "" }, { "docid": "205ce70db7d86d74c9e64370c96a8157", "score": "0.59773535", "text": "public function deleteTable(){\n $sql =<<<EOF\n DROP TABLE EMPLOYEE;\nEOF;\n\n $ret = pg_query($this->dbCon->getDbCon(), $sql);\n if(!$ret){\n echo pg_last_error($this->dbCon->getDbCon());\n }\n }", "title": "" }, { "docid": "de0683a2d28c830fa5587592367deed6", "score": "0.5971772", "text": "public function tearDown()\n {\n $this->_adapter = null;\n\n if ($this->_db instanceof DbAdapter) {\n $this->_db->query('DROP TABLE [users]');\n }\n\n $this->_db = null;\n }", "title": "" }, { "docid": "a79b1d16aeb82119f592351db262afe4", "score": "0.5969335", "text": "private function delete_db()\n\t{\n\t\tif (count($this->args) < 1)\n\t\t\treturn $this->generateError(404, \"The DELETE method needs a target id.\");\n\t\t$pdo = $this->linkDb();\n\t\t$req = \"DELETE FROM $this->target WHERE \" . $this->target . \"_id = \" . $this->args[0];\n\t\t$res = $pdo->exec($req);\n\t\t$this->ret_code = 204;\n\t\treturn $req;\n\t}", "title": "" }, { "docid": "bff8423f8412a17657cd4a547d57eb16", "score": "0.59526", "text": "function closeDatabase($db) {\n}", "title": "" }, { "docid": "8f0f898a094e2da03b2707ee7877094a", "score": "0.59494764", "text": "protected function resetDatabase() : void\n {\n PrepareDatabase::resetDatabase();\n }", "title": "" }, { "docid": "c633b87f81508cc1cc29613f02a264ad", "score": "0.59485257", "text": "public function disconnect_db(){\n\t\t$this->newdb->disconnect();\n\t\t$this->newdb_eto->disconnect();\n\t \n\t}", "title": "" }, { "docid": "505364b444d48a0fe3a932495d6d66ca", "score": "0.5947559", "text": "public function cleanDB() {\n\t\t//$sql = \"DELETE FROM \".$this->TAGS_TABLE .\";\";\n\t\t//$this->query($sql);\n\t\t//$sql = \"DELETE FROM \".$this->ZONES_TABLE .\";\";\n\t\t//$this->query($sql);\n\t\t$sql = \"DELETE FROM \".$this->USERS_TABLE .\";\";\n\t\t$this->query($sql);\n\t\t//$sql = \"DELETE FROM \".$this->PLACES_TABLE .\";\";\n\t\t//$this->query($sql);\n\t\t$sql = \"DELETE FROM \".$this->PEOPLE_TABLE .\";\";\n\t\t$this->query($sql);\n\t\t$sql = \"DELETE FROM \".$this->PENDING_TABLE .\";\";\n\t\t$this->query($sql);\n\t\t$sql = \"DELETE FROM \".$this->MEETINGS_TABLE .\";\";\n\t\t$this->query($sql);\t\n\t\t$sql = \"DELETE FROM \".$this->LINK_PT_TABLE .\";\";\n\t\t$this->query($sql);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "d5d23d6ccd0eae9cd3c4de52623c540f", "score": "0.5933744", "text": "public function create_db() {\n dbsteward::cmd(sprintf(\"echo '%s' | psql --host=%s --port=%s --username=%s --dbname=%s --no-password --file -\",\n 'DROP DATABASE IF EXISTS '.static::get_dbname().'; CREATE DATABASE '.static::get_dbname().';',\n static::get_dbhost(), static::get_dbport(), static::get_dbuser_management(), static::get_dbname_management()));\n }", "title": "" }, { "docid": "1a0f130f5e57a16189fabb2492d70884", "score": "0.59329444", "text": "public function closeDB() {\n $mysqlDataSource = MysqlDataSource::getInstance();\n $mysqlDataSource->closeConnection();\n }", "title": "" }, { "docid": "c20beacf50b6f598327e70935929e720", "score": "0.5932869", "text": "public static function shutdown()\n {\n\n Db::shutdown();\n\n }", "title": "" }, { "docid": "8ae0977065d10f7598cbe35b82f6b5ba", "score": "0.59284055", "text": "public function clean_database() {\n\t\t$all_or_nothing = true;\n\t\t\n\t\t$cinemas = $this->db->getView('cinemas','cinemas');\n\t\t\n\t\tforeach ($cinemas->rows as $row ) {\n\t\t\t$this->db->deleteDoc($row->value);\n\t\t}\n\t}", "title": "" }, { "docid": "844f5468d40f02e1ea79d8e5c0d56ab5", "score": "0.59093845", "text": "public function CleanUp() {\n\t\t// Drop Database Objects created by the Plugin\n\t\trequire('install/postscheduler.schema.php');\n\t\tPostSchedulerSchema::Uninstall();\n\t}", "title": "" }, { "docid": "88fc48e6040a176786d1a41c0b67582e", "score": "0.5906794", "text": "function disconnectDB() {\n $dbh = null;\n }", "title": "" }, { "docid": "6d1f31307f89776895df723be8924b1d", "score": "0.5906745", "text": "public static function reloadDatabase()\n {\n self::$db = null;\n }", "title": "" }, { "docid": "4089a7acf5c39d5c14b7a3570e1c14fb", "score": "0.59008753", "text": "public function tearDown()\n\t{\n\t\t// parent::tearDown();\n\t\tTrunk::forgetAll();\n\t\t// $this->artisan('db:seed', [\n\t\t// \t'--class' => 'ClearDB'\n\t\t// ]);\n\t\tStorage::deleteDir('files');\n\t\tStorage::deleteDir('uploads');\n\n\t\tDB::disconnect();\n\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "238faeaef23f898209f040821b20f14a", "score": "0.589772", "text": "public function bulk_delete()\n {\n DB::statement(\"SET foreign_key_checks=0\");\n $databaseName = DB::getDatabaseName();\n $tables = DB::select(\"SELECT * FROM information_schema.tables WHERE table_schema = '$databaseName'\");\n foreach ($tables as $table) {\n $name = $table->TABLE_NAME;\n // print $name.\"<br/>\";\n //if you don't want to truncate migrations\n if ($name == 'migrations') {\n continue;\n }\n DB::table($name)->truncate();\n }\n DB::statement(\"SET foreign_key_checks=1\");\n }", "title": "" }, { "docid": "70f0377d8dd264d6c54873febddf7611", "score": "0.5885191", "text": "public function tearDown()\n {\n $this->resetDatabase();\n }", "title": "" }, { "docid": "a33b58ae75a543f496938de9bf11dff0", "score": "0.5880673", "text": "protected function tearDown(): void\n {\n Schema::drop('groups');\n Schema::drop('members');\n Schema::drop('group_member');\n }", "title": "" } ]
0ad62648b35156e199cd4bc5a4efbb2a
Public method to delete the asociated account
[ { "docid": "3ec502acb1b302fe36b680476bf0271e", "score": "0.72767854", "text": "public function delete_account($id) {\n\t\t$result = $this->db->delete('investorgroups_accounts', array('id' => $id));\n }", "title": "" } ]
[ { "docid": "bb45b95ce6373e0e3f4ec99886a00b94", "score": "0.7821971", "text": "public function deleteAccount() {\r\n //create a connection to the database\r\n require_once dirname(__FILE__).'/Connection.php';\r\n $connection = new Connection();\r\n try {\r\n //connect to the database\r\n $conn = $connection->createConnection();\r\n $statement = $conn->prepare(\"DELETE FROM accounts WHERE id=? OR email=?\");\r\n //bind the values to the statement\r\n $statement->bindValue(1, $this->id);\r\n $statement->bindValue(1, $this->email);\r\n $statement->execute();\r\n //close the db connection\r\n $conn = null;\r\n } catch (PDOException $e) {\r\n //close the db connection\r\n $conn = null;\r\n if($connection->showError()) {\r\n die(\"Failed to delete account from the database with error : {$e->getMessage()}\");\r\n }\r\n }//catch\r\n }", "title": "" }, { "docid": "5f745a391aad199c8be7e471a6acd05b", "score": "0.7732828", "text": "public function deleteAccount(){\n $u = new Users();\n\n if($u->isLogged()) {\n $u->delete($_SESSION['idLogin']);\n $u->logOff();\n header(\"Location: \".BASE_URL);\n }else{\n header(\"Location: \".BASE_URL.\"login\");\n exit;\n }\n }", "title": "" }, { "docid": "17dc63a11b6c5184ad0485406b66be56", "score": "0.77162683", "text": "function deleteAccount(){\n\t\t$userID = Auth::getUserID();\n\t\t$this->setStatus($userID,0);\n\t}", "title": "" }, { "docid": "cecc6dd62a471109af8985d49fa6f649", "score": "0.7553181", "text": "public function deleteAccountAction()\n {\n $user = $this->getRequestingUser();\n $this->repositoryService->get('relation')->deleteAllForUser($user);\n $this->repositoryService->get('message')->deleteAllForUser($user);\n $this->repositoryService->get('wallPost')->deleteAllForUser($user);\n $this->repositoryService->get('album')->deleteAllForUser($user); //we don't need to delete photos, because of @cascade remove\n $this->repositoryService->get('user')->remove($user);\n\n $redirectPage = $this->settings['afterAccountDeletePage'];\n $this->redirect(null, null, null, null, $redirectPage);\n }", "title": "" }, { "docid": "402116ef204a527e740cec4a54360a7a", "score": "0.739853", "text": "function delete_account($account_id)\n\t{\n\t\t$this->db->where($account_id);\n\t\tif ($this->db->delete('ospos_t_accounts'))\n\t\t{\n\t\t\tReturn \"Account $account_id Deleted Successful\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tReturn \"Error occured while deleting $account_id Account\";\n\t\t}\n\t}", "title": "" }, { "docid": "1351efdf02a19d95ed3a054892b67ae2", "score": "0.73784673", "text": "private function deleteTestAccount()\n {\n $accountToDelete = $this->application->getAccount(null, self::TEST_ACCOUNT_NAME);\n if ($accountToDelete)\n $this->application->deleteAccount($accountToDelete->getName());\n }", "title": "" }, { "docid": "6442626708d67af1733d2994500571a1", "score": "0.7286142", "text": "public function delete() {\n\t\t// Remove User\n\t\tunset($this->users[$this->username]);\n\n\t\t// Save array back to JSON\n\t\tCommon::saveJSON('users', $this->users);\n\n\t\t// Remove any active files\n\t\tunset($this->activeFiles[$this->username]);\n\n\t\t// Save array back to JSON\n\t\tCommon::saveJSON('active', $this->actives);\n\n\t\t// Response\n\t\tCommon::sendJSON(\"S2000\");\n\n\t\t// Log\n\t\tCommon::log(\"@\" . date(\"Y-m-d H:i:s\") . \":\\t{\" . $this->activeUser . \"} deleted account {\" . $this->username . \"}\", \"access\");\n\t}", "title": "" }, { "docid": "417fb90617f9e4ab1a8534e35145f97d", "score": "0.7244628", "text": "public function deleteAccount(){\n\t\tparent::delete(\"delete from favorite_workouts where user_id = \" . $this->user_id);\n\t}", "title": "" }, { "docid": "5b8ee6389fecd041aab64a0bb1d4d897", "score": "0.72432923", "text": "function trezor_connect_user_delete($account) {\n trezor_connect_delete_mapping($account);\n}", "title": "" }, { "docid": "2e910a9c4cc44b9f24d1bc41bcd67bae", "score": "0.72358745", "text": "public function deleteAccount() {\n\t\t$user = new User();\n\n\t\tif (!empty($_GET['token'])) {\n\t\t\t$token = htmlspecialchars(stripslashes($_GET['token']));\n\t\t\t$decoded_token = Security::decodeJwt($token);\n\t\t\tif (is_object($decoded_token)) {\n\t\t\t\t$user->find(['email' => $decoded_token->data->email]);\n\t\t\t\tif ($user->getIsDeleted() === 0 && $user->getStatus() !== 0) {\n\t\t\t\t\t$user->setIsDeleted(1);\n\t\t\t\t\t$user->save();\n\t\t\t\t\t$this->logout();\n\t\t\t\t\tMessage::add('USER_ACCOUNT_DISABLED');\n\t\t\t\t\theader(\"Refresh:5; url=/login\", true, 303);\n\t\t\t\t} else {\n\t\t\t\t\theader('location:login');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader('location:login');\n\t\t\t}\n\t\t} else {\n\t\t\t$user->find(['id' => $_SESSION['userStore']->id]);\n\n\t\t\t$token = [\n\t\t\t\t'data' => [\n\t\t\t\t\t'email' => $user->getEmail()\n\t\t\t\t]\n\t\t\t];\n\t\t\t$deleteToken = Security::createJwt($token);\n\n\t\t\t// Send email\n\t\t\t$from = ['email' => MAIL_SENDER, 'name' => MAIL_NAME];\n\t\t\t$to = ['email' => $user->getEmail(), 'name' => ''];\n\t\t\t$subject = APPNAME . ' Suppression de votre compte';\n\t\t\t$link = 'http://localhost/delete-my-account?token=' . $deleteToken;\n\t\t\t$firstname = $user->getFirstname();\n\n\t\t\t$email = Helpers::mailer($from, $to, $subject, ['[appname]', '[email]', '[link]', '[firstname]'], [APPNAME, $to['email'], $link, $firstname], true, 'deleteAccount');\n\t\t\tif ($email['error']) {\n\t\t\t\theader('location:login');\n\t\t\t} else {\n\t\t\t\tMessage::add('USER_ACCOUNT_DISABLED_EMAIL');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2acebb4fb5944a66829380eb29e60c09", "score": "0.71982265", "text": "public function testDeleteAccount()\n {\n $this->setExpectedException('Exception');\n\n Tinebase_User::getInstance()->deleteUser($this->objects['initialAccount']);\n\n $account = Tinebase_User::getInstance()->getUserById($this->objects['initialAccount'], 'Tinebase_Model_FullUser');\n }", "title": "" }, { "docid": "4565fcd7a0f8a0a1c7861fe19ac10da7", "score": "0.7141379", "text": "public function options_deleteAccountAction() {\r\n Auth::checkAuthentication();\r\n $user_id = Session::get('user_id');\r\n if (Session::get('user_role') == Config::get('ROLE_TEACHER', 'gen') && isset($user_id)) {\r\n AccountModel::deleteTeacherAccount($user_id);\r\n LoginModel::logout();\r\n Redirect::to('login/index');\r\n }\r\n }", "title": "" }, { "docid": "10065e2d56cf4c8e8a4499b206ae23ac", "score": "0.7028196", "text": "public function destroy(Account $account)\n {\n //\n }", "title": "" }, { "docid": "10065e2d56cf4c8e8a4499b206ae23ac", "score": "0.7028196", "text": "public function destroy(Account $account)\n {\n //\n }", "title": "" }, { "docid": "e26e2e71356805e4cee60b1160326d50", "score": "0.70154864", "text": "public function deleteUser(){\r\n\t\t$fname = 'Bongo';\r\n\t\t$sql =\"delete from accounts where fname = '$fname' \";\r\n\t\t$results = $this->runQuery($sql);\r\n\t\techo \"Deleted User!\";\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c5e3fb9018e9639e55829edf29102ccd", "score": "0.6991488", "text": "public function delete_account() {\n\t\tif ($this->session->userdata('username') == Settings_model::$db_config['root_admin_username']) {\n\t\t\t$this->session->set_flashdata('error', '<p>'. $this->lang->line('profile_admin_nodelete') .'</p>');\n\t\t\tredirect('membership/profile');\n\t\t}\n\n\t\tif ($this->profile_model->delete_membership()) {\n\n // delete img folders\n $path = FCPATH .'assets/img/members/'. $this->session->userdata('username');\n $this->load->helper(\"file\"); // load the helper\n delete_files($path, true); // delete all files/folders\n rmdir($path); // remove member folder\n\n\t\t\tredirect(\"logout\"); // logout controller destroys session and cookies\n\t\t}\n\t\t$this->session->set_flashdata('error', '<p>'. $this->lang->line('profile_remove_error') .'</p>');\n\t\tredirect('membership/profile');\n\t}", "title": "" }, { "docid": "cfe321c87120c554e945f6da907acbaa", "score": "0.69548297", "text": "public function delete() {\n\n\t\t// Does the User object have an ID?\n\t\tif ( is_null( $this->id_cad ) ) trigger_error ( \"User::delete(): Attempt to delete an User object that does not have its ID property set.\", E_USER_ERROR );\n\t\n\t\t// Delete the User\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n\t\t$st = $conn->prepare ( \"DELETE FROM cadastro WHERE id_cad = :id_cad LIMIT 1\" );\n\t\t$st->bindValue( \":id_cad\", $this->id_cad, PDO::PARAM_INT );\n\t\t$st->execute();\n\t\t$conn = null;\n\t}", "title": "" }, { "docid": "6c2203e460bc401f1ac14cad7d41d985", "score": "0.6919674", "text": "public function accountDelete()\n {\n $user = User::find(Auth::user()->id); \n\n $cars = Car::find($user->cars_id);\n $cars->delete();\n\n $user->delete();\n Auth::logout();\n return redirect('/');\n }", "title": "" }, { "docid": "edfddbea07d4c86c2342ed1cf7bb3b8e", "score": "0.68193334", "text": "public function testDeleteAccounts()\n {\n $this->setExpectedException('Exception');\n \n $todelete = array ( 10, 11 );\n\n Tinebase_User::getInstance()->deleteUsers( $todelete );\n\n $account = Tinebase_User::getInstance()->getUserById($this->objects['deleteAccount'], 'Tinebase_Model_FullUser');\n }", "title": "" }, { "docid": "af3dc36e059a65b303f25af2645b30dd", "score": "0.6818252", "text": "public function testShouldDeleteAccount()\n {\n $data = [\n 'name' => 'My account',\n ];\n\n $body = [\n 'v1/account' => [\n 'country' => 'BJ',\n 'created_at' => '2018-03-12T09:09:03.969Z',\n 'id' => 1,\n 'klass' => 'v1/account',\n 'name' => $data['name'],\n 'timezone' => 'UTC',\n 'updated_at' => '2018-03-12T09:09:03.969Z'\n ]\n ];\n\n $this->mockRequest('post', '/v1/accounts', $data, $body);\n\n $account = \\FedaPay\\Account::create($data);\n\n $this->mockRequest('delete', '/v1/accounts/1');\n\n $account->delete();\n }", "title": "" }, { "docid": "aab0ad322c5f283187be790ecf4ecccd", "score": "0.67790735", "text": "function delete_account($auth_user, $accountid)\n{\n\n $query = \"delete from accounts where accountid='$accountid' and username = '$auth_user'\";\n if(db_connect())\n {\n $result = mysql_query($query);\n }\n return $result;\n}", "title": "" }, { "docid": "66496223d50d5870e7dc70b11a40a6a2", "score": "0.67766136", "text": "public function delete()\n {\n $this->state = 0;\n $this->username = $this->email;\n $this->displayName = null;\n $this->password = '';\n\n $this->setDeletedAt(new \\DateTime());\n }", "title": "" }, { "docid": "e72078b36a4669706b9f10ddac0e2ac9", "score": "0.67723876", "text": "public function deleteAccount($username)\n {\n $this->db->delete('signup');\n $this->db->where('Username',$username);\n return;\n }", "title": "" }, { "docid": "a32061712fbeee5283766b5247e03e8f", "score": "0.6770978", "text": "public function getAccountDelete(){\n\t\t$user = User::find(Auth::user()->id);\n\t\t\n\t\tTask::where('user_id', '=', $user->id)->delete();\n\t\tStage::where('user_id', '=', $user->id)->delete();\n\t\tUser::where('id', '=', $user->id)->delete();\n\t\tauth()->logout();\n\t\t\n\t\treturn Redirect::to('/login');\n\t}", "title": "" }, { "docid": "703659f2dc3ae674e75564ee163897f5", "score": "0.6753942", "text": "public function deleteUserAccount()\n {\n auth('web')->user()->delete();\n\n return $this->successResponse('Account deleted successfully.');\n }", "title": "" }, { "docid": "4187e5cf7f10b716b00861d55ac23f96", "score": "0.6728041", "text": "function i4things_delete_account($facilitatorid, $facilitatorkey, $accountid) {\r\n\t\t$res = I4THINGS::get('mc_del_account', $facilitatorid, $accountid, $facilitatorkey);\r\n\t\t\r\n\t\tif ($res === NULL) {\r\n\t\t\t// log network/server error\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t\r\n\t\t$res = trim($res);\r\n\t\t\r\n\t\tif ($res != 'OK') {\r\n\t\t\t// log operation error - eg. wrong key, wrong id format\t, duplicated id\r\n\t\t\treturn NULL;\r\n\t\t}\r\n\t\t\r\n\t\t// log all OK\r\n\t return $res;\r\n\t}", "title": "" }, { "docid": "11f41190c4dea49c558cd466e3e6e5d3", "score": "0.6724618", "text": "function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM users WHERE id = {$this->getId()};\");\n }", "title": "" }, { "docid": "6d642378c0cf0bd874a35dde01154c38", "score": "0.67022806", "text": "public function delete()\n {\n // Ensure record exists before attempting to delete\n if(isset($this->attributes['id']))\n {\n self::dbConnect();\n $stmt = self::$dbc->query('DELETE FROM users WHERE id = ' . $this->attributes['id']);\n echo \"Record \" . $this->attributes['id'] . \" deleted successfully\";\n }\n else\n {\n echo \"Cannot delete: Record does not exist\";\n }\n }", "title": "" }, { "docid": "64781f768881e9de28e1a02827a95517", "score": "0.6679575", "text": "function gigya_delete_account($uid) {\n if (empty($uid)) {\n return FALSE;\n }\n\n $params = array(\n 'uid' => $uid,\n );\n\n return _gigya_api('deleteAccount', $params);\n}", "title": "" }, { "docid": "c453f86005bbb29884cd3ab03fcd4f8b", "score": "0.66086805", "text": "public function deleteUserAccount()\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t//checks a user is logged in\n\t\t\tif ( Sentry::check()) {\n\t\t\t\t$user = Sentry::getUser();\n\n\t\t\t\t//deletes the account\n\t\t\t\t$user->delete;\n\n\t\t\t\treturn Response::json(array(\n\t\t\t\t\t\t'error' => false,\n\t\t\t\t\t\t'message' => 'User account deleted.'),\n\t\t\t\t\t200\n\t\t\t\t);\n\t\t\t}\n\n\t\t} catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e)\n\t\t{\n\t\t\techo 'User was not found.';\n\t\t}\n\n\t}", "title": "" }, { "docid": "ceafb0c4d710e2df8ed09454e29b8ce5", "score": "0.6607144", "text": "function delete()\n\t{\n\t\tlog_write(\"debug\", \"ldap_auth_manage_zone\", \"Executing delete()\");\n\n\t\t// set the record to manipulate\n\t\t$this->obj_ldap->record_dn\t= \"cn=\". $this->data[\"cn\"] .\"\";\n\n\t\t// delete\n\t\tif ($this->obj_ldap->record_delete())\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\n\t\t// failure\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "09ec11fefdad377fe6db82309eaaa285", "score": "0.66038805", "text": "function bp_settings_screen_delete_account() {\n\n\tif ( bp_action_variables() ) {\n\t\tbp_do_404();\n\t\treturn;\n\t}\n\n\t// Load the template\n\tbp_core_load_template( apply_filters( 'bp_settings_screen_delete_account', 'members/single/settings/delete-account' ) );\n}", "title": "" }, { "docid": "dc2d13cdcde13c57db1f3a4444d6e9de", "score": "0.6574989", "text": "public function delete(){\n $usuario = new banco02();\n $usuario->query(\"DELETE FROM tb_usuarios WHERE idusuario = :ID\", array(\n \":ID\"=> $this->getIdusuario()\n ));\n $this->setIdusuario(0);\n $this->setDesclogin(\"\");\n $this->setDescsenha(\"\");\n $this->setDatacadastro(new DateTime());\n }", "title": "" }, { "docid": "78d8064329fcfa7a7aba03b13f700eca", "score": "0.6534538", "text": "public function destroy($id)\n {\n \tDB::table('user_account_table')->where('id', $id)->delete();\n }", "title": "" }, { "docid": "50b9d8ec89d9bdb8dd7b8351a37da01d", "score": "0.6490896", "text": "public function delete(Request $request)\n\t{\n\t\tif($request->delete_account == 'Yes'){\n\n\t\t\t$user = Auth::user();\n\t\t\tAuth::logout();\n\n\t\t\tif($user->delete()){\n\t\t\t\treturn redirect()->route('upcoming');\n\t\t\t}\n\t\t}\n\t\treturn back();\n\t}", "title": "" }, { "docid": "02dba153434e0b859f097ed0a31184a3", "score": "0.6483137", "text": "public function delete(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::delete(): Attempt to delete a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_USERS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "title": "" }, { "docid": "b17a3f60b1e3994942be13f06ba3c391", "score": "0.6476898", "text": "function deleteAccount($username)\n {\n $this->username = mysqli_real_escape_string($this->con, $username);\n\n $this->sql = \"DELETE FROM users WHERE username='$this->username' && school='$this->auth_school_id' LIMIT 1\";\n\n mysqli_autocommit($this->con, FALSE);\n $this->executeQuery = mysqli_query($this->con, $this->sql);\n\n if (!$this->executeQuery) {\n return '{\"status\":\"SQLExecutionException\"}';\n }\n\n if (mysqli_affected_rows($this->con) == 1) {\n mysqli_commit($this->con);\n\n // $this->ActivityLogger->saveActivity(\"delete\" , \"users\" , \"deleted user with username [$this->username]\") ;\n return '{\"status\":\"success\",\"data\":\"' . $this->username . '\"}';\n } else {\n mysqli_rollback($this->con);\n return '{\"status\":\"failed\"}';\n }\n }", "title": "" }, { "docid": "73eb87741e1569ab7c2d38fe24073250", "score": "0.64648575", "text": "public function deleteAccount($accountName,$userid){\n\t\t$delCom = $this->link->prepare('DELETE FROM accounts WHERE userid = ? AND name = ?');\n\t\t$delCom->bindValue(1,$userid,PDO::PARAM_STR);\n\t\t$delCom->bindValue(2,$accountName,PDO::PARAM_STR);\n\t\treturn $delCom->execute();\n\t}", "title": "" }, { "docid": "c4aedb1c27291af2eb399a6e2732c8a1", "score": "0.64551467", "text": "public function destroy(Account $account)\n {\n $account -> delete();\n return redirect() -> route('account.index');\n }", "title": "" }, { "docid": "d9f1c645f01d2aee95d6542411767302", "score": "0.64403665", "text": "public function destroy(Cuenta $cuenta)\n {\n //\n }", "title": "" }, { "docid": "5619153b77de62c75767f5718a603c8d", "score": "0.6437839", "text": "public function deleteAccount($username){\n $stmt = $this->mysqli->prepare(\"DELETE FROM users WHERE username = ?\");\n $stmt->bind_param(\"s\", $username);\n $success = $stmt->execute();\n $stmt->close();\n\n return $success;\n }", "title": "" }, { "docid": "e780ba2a7babb919f73f218cbb65a080", "score": "0.64087987", "text": "public function drupalUserDeleted(UserInterface $account) {\n // Drupal user account is about to be deleted.\n $this->deleteProvisionedLdapEntry($account);\n ExternalAuthenticationHelper::deleteUserIdentifier($account->id());\n }", "title": "" }, { "docid": "73bfbb8651622549144b878320084990", "score": "0.64042485", "text": "public function delete_investorgroups_account($id_group, $id_account) {\n\t\t$result = $this->db->delete('investorgroups_accounts', array('group_id' => $id_group, 'account_id' => $id_account));\n }", "title": "" }, { "docid": "7dc4bc13d39959d75df0866458cd9c95", "score": "0.639871", "text": "function spamexpertsreseller_TerminateAccount($params) \n{\n include_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'class.connection.php');\n $api = new spamexperts_api($params);\n $api ->call(\"/reseller/remove/username/\".$params['username'].\"/\");\n \n if ($api->isSuccess())\n return \"success\";\n \n return $api->error();\n\t\n}", "title": "" }, { "docid": "c84a235ab2a6d7b9d109ece6591667bb", "score": "0.63955003", "text": "public function deleteAccount($userID){\n $sql = \"DELETE FROM users WHERE id=$userID\";\n $this->$DB->query($sql);\n }", "title": "" }, { "docid": "bf5e495b27abdca584118c933a376f6f", "score": "0.6390103", "text": "public function deleteUser()\n {\n //body\n }", "title": "" }, { "docid": "00aeca960f4df3ab814c00ffe80f00a9", "score": "0.6388103", "text": "public function delete() {\n $event = $this->event('delete:action');\n \n // check for permissions\n $event->check();\n\n if($this->isLastAdmin()) {\n // check the number of left admins to not delete the last one\n throw new Exception(l('users.delete.error.lastadmin'));\n }\n\n // delete the user\n parent::delete();\n\n // flush the cache in case if the user data is \n // used somewhere on the site (i.e. for profiles)\n kirby()->cache()->flush();\n\n kirby()->trigger($event, $this);\n\n }", "title": "" }, { "docid": "40f5bd7480ab124e8983581764bb10a0", "score": "0.63852173", "text": "public function deleteUser(){\n // $logger = new Logger();\n // $logger->log(\"User Created:\");\n $this->logger->log();\n }", "title": "" }, { "docid": "f5adbf38527c00386a780ce6ffffacec", "score": "0.637095", "text": "public function delete_user_account($id)\n {\n if(! isset($_POST['submit']))\n {\n redirect('error_404');\n exit();\n }\n\n if($this->Account_model->delteUserAccount($id))\n {\n redirect('admin/accounts/users');\n exit();\n }\n }", "title": "" }, { "docid": "e85a214afe8f715d83084fdc88d79b35", "score": "0.6362668", "text": "public function delete_halalah_account()\n {\n\n if ($this->check_authentication()) {\n\n $halalah = Halalah::where('center_id', Auth::user()->center->id)->first();\n\n if (empty($halalah)) {\n\n return $this->error_page('خطأ', 'الرجاء التأكد من وجود حساب مسجل في النظام');\n\n } else {\n\n $halalah->delete();\n return redirect()->route('center.halalah.account.show')->with('success', 'تم حذف الحساب بنجاح');\n\n }\n\n } else {\n return $this->external_error_page();\n }\n\n }", "title": "" }, { "docid": "b1d314ab95aa0a0858c0872920c9d602", "score": "0.6332969", "text": "public function destroy(Account $account)\n {\n $account -> delete();\n flash() -> overlay(trans('master.Account deleted'), trans('master.Success!'));\n return redirect() -> route('accounts.index');\n }", "title": "" }, { "docid": "385aaa5f361dc85809ac3b635ada43a5", "score": "0.6325092", "text": "public function delete(){\n $usuario =$this ->cargarModelo(\"Usuario\");\n\n $nombreTabla=\"usuario\";\n $id=\"10\";\n $result= $usuario->delete($nombreTabla,$id);\n }", "title": "" }, { "docid": "f4d4580f8c2e256a328a220496e11d67", "score": "0.63044846", "text": "public function destroy($chartofaccount)\n {\n DB::table('chartofaccounts')->where('id',$chartofaccount)->delete();\n return redirect('coa/show');\n }", "title": "" }, { "docid": "ee49707f7cb54fe270b1905cbce59fff", "score": "0.6298082", "text": "public function testDestroyTransactionByUserAccount()\n {\n $user = User::where('email', config('test.api.email'))->first();\n $token = JWTAuth::fromUser($user);\n\n $account = $this->getAccount($user, $token);\n $transaction = $this->getTransaction($account, $token);\n\n $baseUrl = config('app.url') . '/api/accounts/' . $account->id . '/transactions/' . $transaction->id . '?token=' . $token;\n\n $response = $this->json('DELETE', $baseUrl . '/', []);\n\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'success', 'message', 'transaction'\n ]);\n }", "title": "" }, { "docid": "3fa659b6134f267a85b4961f5bbc4791", "score": "0.6289954", "text": "public function deletePersonalFolder($_account)\n {\n }", "title": "" }, { "docid": "295cd306865af111be365a22657f0b5b", "score": "0.6286003", "text": "function deActivateAccount(){\n\t\t$userID = Auth::getUserID();\n\t\t$this->setStatus($userID,0);\n\t\t$this->logout();\n\t\t$this->send(true);\t\n\t}", "title": "" }, { "docid": "57cb449698fc3856fd793e5064f440ef", "score": "0.6273041", "text": "public function destroy(Account $account)\n {\n $account->delete();\n activity()->log('Delete Account');\n Session::flash('success', 'Success');\n return back();\n }", "title": "" }, { "docid": "d2f272b6602e45132a75a89f35c80a7a", "score": "0.62682384", "text": "public function delete_user_account($id)\n {\n return User::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "e4c30220d2de7bc6ed975a0ede3f83a7", "score": "0.6263246", "text": "public function removeAccount(Request $request){\n\n\t\t$id = $request->input('account_id');\n\t\t$account = Account::find($id);\n\t\t$account->transaction()->delete();\n\t\t$account->delete();\n\n\t\t$user = Session::get('user');\n\t\t$u = User::find($user->id);\n\t\tSession::put('user', $u);\n\n\t\treturn redirect('/clearList');\n }", "title": "" }, { "docid": "6837111ff9a5ffb9f215dd18308e2280", "score": "0.62531507", "text": "public function deleteAccount(Request $request)\n {\n if ($request->getSession()->has('password.confirmed-' . $request->user()->id)) {\n\n $this->data = $this->accounts->deleteAccount();\n\n return $this->handleRedirect($request, route('home'));\n }\n flash()->error('You need to confirm your password first');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "4a4de71801051b263f8c0ccfa5602499", "score": "0.62531155", "text": "public function delete(){\n\n $sql = new Sql();\n\n $sql->query(\"DELETE FROM tb_usuarios WHERE idUsuario = :ID\", array(\n ':ID'=>$this->getIdUsuario()\n ));\n\n $this->setIdUsuario(0);\n $this->setDesLogin(\"\");\n $this->setDesSenha(\"\");\n $this->setDtCadastro(new DateTime());\n }", "title": "" }, { "docid": "f5ba14ebf17ca120926522ca23abf3e7", "score": "0.62424475", "text": "public function deleteUser()\n\t{\n\t\t$this->getConnection()\n\t\t\t->createQueryBuilder()\n\t\t\t->delete($this->getConfig()->getUsersTable(), 'u')\n\t\t\t->where('id = :id')\n\t\t\t->setParameter(':id', $this->getConfig()->getId())\n\t\t\t->execute();\n\t}", "title": "" }, { "docid": "b5d9ed0ab53714e4012b01f3b1159f0f", "score": "0.62323487", "text": "public function unsetAccount() {\n\t\t$this->account = NULL;\n\t}", "title": "" }, { "docid": "b04234b9c94e24c2564c19728f2edd59", "score": "0.6231156", "text": "public function testDeleteByAccount() {\n // Insert categories\n $this->phactory->create( 'website_categories' );\n\n // Delete by account\n $this->account_category->delete_by_account( self::WEBSITE_ID );\n\n // Make sure they exist\n $ph_website_category = $this->phactory->get( 'website_categories', array( 'website_id' => self::WEBSITE_ID ) );\n\n $this->assertEmpty( $ph_website_category );\n }", "title": "" }, { "docid": "87c95ee2fa95e29a7845f17ee9d8d4ba", "score": "0.6230434", "text": "function delete(){\n\t\t$sql = new Sql();\n\n\t\t$sql->consulta(\"DELETE FROM tb_usuarios WHERE idusuario = :ID;\",array(':ID' => $this->idUsuario));\n\t\n\t\t$this->idUsuario= null;\n\t\t$this->desLogin = null;\n\t\t$this->desSenhas = null;\n\t\t$this->dtCadastro = new DateTime();\n\n\t\techo \"dasos deletados do banco\";\n\n\n\t}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6228056", "text": "public function delete() {}", "title": "" }, { "docid": "dcf7a4b5d400148a4086cf077fcd6ed7", "score": "0.62258285", "text": "public function delete_account(int $user_id)\n {\n $this->dbclass->delete(\"users\", ['id' => $user_id]);\n $this->dbclass->delete(\"users_meta\", ['user_id' => $user_id]);\n }", "title": "" }, { "docid": "d428fabc151dc0cc1ae5a3985812b5e1", "score": "0.621043", "text": "function deleteAccidente_trabajador($accidente_trabajador_id)\n\t{\n\t\t$this->db->where('accidente_trabajador_id', $accidente_trabajador_id);\n\t\t$this->db->delete('accidente_trabajador');\n\t}", "title": "" }, { "docid": "20da529e8f8db7088ca37a745e4a9b39", "score": "0.6195049", "text": "public function delete() \n\t{\n\t\tif ($this->user)\n\t\t{\n\t\t\t$where_condition = 'WHERE user_id = '.$this->user->user_id;\n\t\t\t# Delete from users table\n\t\t\tDB::instance(DB_NAME)->delete('users', $where_condition);\n\t\t\t# Delete all the posts\n\t\t\tDB::instance(DB_NAME)->delete('posts', $where_condition);\n\t\t\t# Stop following other users\n\t\t\tDB::instance(DB_NAME)->delete('users_users', $where_condition);\n\t\t\t\n\t\t\t# Stop other users following this\n\t\t\t$where_condition_followed = 'WHERE user_id_followed = '.$this->user->user_id;\n\t\t\tDB::instance(DB_NAME)->delete('users_users', $where_condition_followed);\n\t\t\t\n\t\t\t# Delete their token cookie - effectively logging them out\n\t\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\t}\n\t\t\n\t\t#Re-direct to home page\n\t\tRouter::redirect(\"/\");\n\t}", "title": "" }, { "docid": "6f26dc41b7178f40a1a92acd9e447756", "score": "0.61812544", "text": "public function delete(){\n User::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }", "title": "" }, { "docid": "9e83cd4750085348dd96506387513d3b", "score": "0.6174018", "text": "function _delete_abo() {\n if (user_access('administer easysignup')) {\n $param = drupal_get_query_parameters();\n if (!empty($param)) {\n db_delete('easysignup_users')->condition('email', $param)->execute();\n drupal_set_message(t('Item deleted.'));\n drupal_goto('admin/structure/easysignup/subscribers_list');\n }//dpm(get_defined_vars());\n }\n else {\n drupal_access_denied();\n }//dpm(get_defined_vars());\n}", "title": "" }, { "docid": "85cd2f84c9666456832fd3a4bdc83756", "score": "0.61657953", "text": "function delete_user() {\n global $db, $current_user;\n\n $usr = $current_user['username'];\n if($usr == 'admin') redirect(1); // Can't delete admin account!\n\n // Now we can actually add the new user!\n $query = $db->prepare(\"DELETE FROM users WHERE username = :a\");\n $p = array(':a' => $usr);\n if (!$query->execute($p)) redirect(4); //DB Statement failed\n\n logout();\n}", "title": "" }, { "docid": "ec71b483bb63b2d5c36a164b684abd26", "score": "0.6159199", "text": "public function deleteUser ()\n {\n $rights = \\Factory::getRights();\n\n if ($rights->hasRight(\"admin_delete_user\")) {\n /**\n * Test damit nicht der GastAccount bearbeitet werden kann\n */\n $user_dao = new UserModel();\n\n if (isset($_POST[\"userid\"]) and $user_dao->isGuestAccount($_POST[\"userid\"]) === false ) {\n $user_id = (int) $_POST[\"userid\"];\n\n $user = new UserModel();\n $user->deleteUser($user_id);\n }\n } else {\n echo $this->lang->translate(\"INSUFFICIENT_RIGHTS\");\n }\n }", "title": "" }, { "docid": "ffb1abaa5327339b7cb217f6f1358206", "score": "0.61471134", "text": "public function destroy(Account $account)\n {\n $account->delete();\n\n return redirect()\n ->route('accounts.index')\n ->with('success','Account deleted successfully');\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.61357147", "text": "public function delete();", "title": "" }, { "docid": "4341cc62edd4ff4f2d7692f50371db15", "score": "0.61340207", "text": "public function accountCLose($id)\n {\n $account = Account::find($id);\n $account->deleted_at == Carbon::now();\n $account->delete();\n return redirect()\n ->route('accounts.users', auth()->user()->id);\n }", "title": "" }, { "docid": "59c5efad5ed981feda1f0e5c6d6db1fb", "score": "0.6132666", "text": "public function delete()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "a7044ab193cb579d96aaf9fe763d64bc", "score": "0.6128218", "text": "public function delete(User $user, Persona $persona)\n {\n //\n }", "title": "" }, { "docid": "6e435f19ec58ed6a611a0c5be4181b6f", "score": "0.6126805", "text": "private function deleteProvisionedLdapEntry(UserInterface $account) {\n if ($this->provisionsLdapEntriesFromDrupalUsers()\n && LdapConfiguration::provisionAvailableToLdap(self::PROVISION_LDAP_ENTRY_ON_USER_ON_USER_DELETE)\n ) {\n $ldapProcessor = new LdapUserProcessor();\n $ldapProcessor->deleteProvisionedLdapEntries($account);\n }\n }", "title": "" }, { "docid": "27b269436c3fd3478ce1d83c79276c55", "score": "0.612589", "text": "public function delete(){\n $query = \"delete from users where id = ?\";\n $stmt = $this->db_handle->prepare($query);\n $stmt->execute(array($this->getID()));\n }", "title": "" }, { "docid": "9a921932a44c7e0aeb467cf70bb4a1b3", "score": "0.61234397", "text": "function Excluir()\n\t\t{\n\t\t\t$sql = \"delete from usuario\t\n\t\t\t\t\twhere codusuario = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array($this->codusuario));\n\t\t}", "title": "" }, { "docid": "33d708da50093ae11b2cc0288d33ad60", "score": "0.6122435", "text": "public function deleting(): void;", "title": "" }, { "docid": "2573ec44366ca23db29d6ff7999f0df6", "score": "0.6122011", "text": "public function destroy(GoogleAccount $googleAccount)\n {\n //\n }", "title": "" }, { "docid": "325a48d0abf84464b197e9917213a916", "score": "0.6120984", "text": "public function deleteUserAccount(Request $request): void \n {\n $flashMessage = new FlashRepository; \n\n if ($this->validateRequest($request->confirmation) && $this->delete()) {\n $this->logActivity(\"Heeft de gebruiker {$this->name} verwijderd in de applicatie.\", 'Admins & Leiding');\n\n // Confirmation is valid && User has been deleted in the system.\n $undoLink = '<a href=\"'. route('admins.delete.undo', $this) .'\" class=\"ml-2 no-underline\">Undo</a>';\n\n $flashMessage->success(\"Het account voor {$this->name} is verwijderd uit de applicatie. {$undoLink}\")->important();\n } else {\n $flashMessage->warning(\"Het gebruikers account voor {$this->name} kon niet worden verwijderd.\")->important();\n }\n }", "title": "" }, { "docid": "9f97c9078ac4346170b812ac1f7a8e16", "score": "0.61178064", "text": "public function delete()\n {}", "title": "" }, { "docid": "9f97c9078ac4346170b812ac1f7a8e16", "score": "0.61178064", "text": "public function delete()\n {}", "title": "" }, { "docid": "e9c3e846af6690c096a37373b1513db5", "score": "0.6107749", "text": "function delete( $id = -1 )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n if ( $id == -1 )\r\n {\r\n $db->query( \"DELETE FROM eZMail_Account WHERE ID='$this->ID'\" );\r\n }\r\n else\r\n {\r\n $db->query( \"DELETE FROM eZMail_Account WHERE ID='$id'\" );\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "df08715e817e712c728971cbb33a9095", "score": "0.61073947", "text": "public function deleteAccount(UserAccountDeletionRequest $request)\n {\n $user = User::find(Auth::id());\n\n if(Hash::check($request->delete_password,$user->password))\n {\n\n //first, since we use soft deletes, purge the user data.\n //we'll do that by first deleting any references to their email in the password_resets table\n DB::table('password_resets')\n ->where('email',$user->email)\n ->delete();\n //next, we'll delete their PII on the user model\n $user->name = md5(time());//just to prevent non-null errors\n $user->email = md5(time());//just to prevent non-null errors\n $user->remember_token =null;\n $user->password ='DELETED PASSWORD';\n $user->save();\n //\n //next, let's log the user out\n Auth::logout();\n //\n //and finally, let's delete the user's model\n $user->delete();\n return response(null,204);\n }\n return response()->json(['message'=>'The given data was invalid', 'errors'=>['delete_password'=>['Password is incorrect.']]],422);\n }", "title": "" }, { "docid": "be984d46cead5c203b41eabef0874cbe", "score": "0.61026776", "text": "public function del_user(){\n\t\t\t$sql = \"delete from user where user_id = '$this->user_id'\";\n\t\t\t$this->query($sql);\n\t\t\t\n\t\t}", "title": "" } ]
3697bfeb425d34913fa5d104e33311ce
Destroys this session and removes all data from storage and memory
[ { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.0", "text": "public function destroy();", "title": "" } ]
[ { "docid": "3183dfe6e4c1843d2bb0a87e00d9e905", "score": "0.839983", "text": "public function destroy()\n {\n $_SESSION = array();\n session_destroy();\n }", "title": "" }, { "docid": "56e9a99822912df6632dcd314a72e16d", "score": "0.83444947", "text": "public function destroy() {\n $_SESSION = array();\n $this->regenerate();\n }", "title": "" }, { "docid": "9a0e22e60dd5679e6343689f7f2e385f", "score": "0.8262291", "text": "public function destroy()\r\n\t{\r\n $_SESSION = array();\r\n session_destroy();\r\n session_write_close();\r\n unset($_SESSION);\r\n $this->__construct();\r\n\t}", "title": "" }, { "docid": "e6feddf60660a7ee5b2fcb56b204951b", "score": "0.82225776", "text": "public function destroy(){\n\t\tunset($_SESSION);\n\t}", "title": "" }, { "docid": "6f12f0da37fbb5d381c29028e532b204", "score": "0.8218729", "text": "public static function destroy()\n {\n unset($_SESSION);\n session_destroy();\n }", "title": "" }, { "docid": "b86bd95508a0f30a1add9a48fe972990", "score": "0.81955093", "text": "public static function destroy()\n {\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "6013de15eeb83189637b7672152297c1", "score": "0.8163117", "text": "public static function destroy()\n {\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "cdf2168524775ddbbff626bff7189e7c", "score": "0.8162049", "text": "public function destroy() {\n\t\t// Unset all of the session variables.\n\t\t$_SESSION = array();\n\n\t\t// If it's desired to kill the session, also delete the session cookie.\n\t\t// Note: This will destroy the session, and not just the session data!\n\t\tif (isset($_COOKIE[session_name()])) \n\t\t\tsetcookie(session_name(), '', time()-42000, '/');\n\t\t\t\t\t\n\t\t// Finally, destroy the session.\n\t\tsession_destroy(); \n\t}", "title": "" }, { "docid": "c32fc8fb33253b84739ce50b17fe8cec", "score": "0.802687", "text": "public function delSession() {\n\t\t \n\t\t session_destroy();\n\t }", "title": "" }, { "docid": "fcd13072324d52543508d570ca477d16", "score": "0.79975134", "text": "public function session_destroy() {\n # Remove cookie\n remove_cookie($this->sign($this->session->id, $this->session->salt));\n \n # Remove session from database\n $this->session->delete();\n }", "title": "" }, { "docid": "09c2598e96b0e53f8b33631f7f6fe576", "score": "0.7992128", "text": "public function destroy()\n\t\t{\n\t\t\tsession_destroy();\n\t\t}", "title": "" }, { "docid": "77dd7926de37e8460bb9b9b8ae2b4c7e", "score": "0.79813045", "text": "public function destroy()\n\t{\t\t\t\t\t\n\t\t//clear all session data\n\t\t$this->session->sess_destroy();\n\t\tredirect('backend/login');\n\t}", "title": "" }, { "docid": "debd5a0be4cb105d76adb6973331d2a1", "score": "0.79733115", "text": "public static function destroySession() {\n\t\t\n\t\t//Unset token and user data from session\n\t\tunset($_SESSION['FOXY_userid'], $_SESSION['token']);\n\n\t\tdatabase::query('DELETE FROM `#_sessions` WHERE userid = '.user::$id);\n\t\t$_SESSION = array();\n\t\tsession_destroy();\n\t\t\n\t}", "title": "" }, { "docid": "b153bc719f39d7441b6169c85fab3280", "score": "0.79646784", "text": "public function delete() {\n\t\t// remove session data\n\t\t$sessionDataEditor = new $this->sessionDataEditorClassName($this->sessionData);\n\t\t$sessionDataEditor->delete();\n\t\t\n\t\t// remove session\n\t\t$sessionEditor = new $this->sessionEditorClassName($this->session);\n\t\t$sessionEditor->delete();\n\t\t\n\t\t// clear storage\n\t\tif ($this->user->userID) {\n\t\t\tself::resetSessions(array($this->user->userID));\n\t\t}\n\t\t\n\t\t// disable update\n\t\t$this->disableUpdate();\n\t}", "title": "" }, { "docid": "a9fc1911eaa21eb818d09cfc699f4c7e", "score": "0.7947373", "text": "public function destroy()\n {\n $_SESSION = array();\n unset($_SESSION);\n session_destroy();\n\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n \"\",\n 0, \n $params[\"path\"],\n $params[\"domain\"], \n $params[\"secure\"], \n $params[\"httponly\"]\n );\n }\n }", "title": "" }, { "docid": "8e8798f6057fd614250ac644faf74e98", "score": "0.79388005", "text": "public static function destroySession() {\n\n\t\t$_SESSION = array();\n \tsession_destroy();\n\n\t}", "title": "" }, { "docid": "abf2538b7217277648c68d3b30db993a", "score": "0.7906971", "text": "function destroy()\n {\n unset($_SESSION[$this->_options['sessionVar']]);\n }", "title": "" }, { "docid": "955e624ad809cc75bed7cacfc7b1d78e", "score": "0.7903999", "text": "public function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "955e624ad809cc75bed7cacfc7b1d78e", "score": "0.7903999", "text": "public function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "9f17ff71a3cf0c5c6b1cf8836f56d2ed", "score": "0.7896748", "text": "public static function destroy() {\n session_destroy();\n }", "title": "" }, { "docid": "009cb241add86bfd316e6c3c860a31e1", "score": "0.7891913", "text": "public function destroy()\n {\n $this->truncate();\n session_destroy();\n if (ini_get(\"session.use_cookies\"))\n {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"],\n $params[\"httponly\"]\n );\n }\n }", "title": "" }, { "docid": "0e61b8c53cf0a163b4605954439c7918", "score": "0.7889683", "text": "public function destroy()\n {\n // Kill the session DB row\n $this->CI->db->where('id', $this->id);\n $this->CI->db->delete($this->config['sess_table_name']);\n\n // Kill the cookie\n setcookie(\n $this->config['sess_cookie_name'],\n addslashes(serialize(array())),\n (@NOW - 31500000),\n $this->config['cookie_path'],\n $this->config['cookie_domain'],\n false\n );\n\n // Kill session data\n $this->data = array();\n }", "title": "" }, { "docid": "68fabacf9c69c31997001350e5d179aa", "score": "0.7886863", "text": "public function destroy()\n {\n $_SESSION = array();\n\n if( isset($_COOKIE[session_name()]) ) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', 1, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n }\n\n session_destroy();\n }", "title": "" }, { "docid": "3fdf5f16d8b5654c0c1f756b65465382", "score": "0.78787696", "text": "public static function destroy () {\n session_destroy();\n }", "title": "" }, { "docid": "cfba7c78e9dbe3558e9cc94535096bc4", "score": "0.78785425", "text": "public function destroy()\n {\n Yii::$app->session->remove($this->skeyName);\n }", "title": "" }, { "docid": "cbd9c0d30b41cb26052ae1b10ddafc78", "score": "0.7875756", "text": "public static function destroy() {\n\t\tsession_start();\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "48d92c593c01951551b04e4b22dc9765", "score": "0.7858484", "text": "public static function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "48d92c593c01951551b04e4b22dc9765", "score": "0.7858484", "text": "public static function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "4ce998486945cac49fa4406da4bc2e65", "score": "0.7852235", "text": "public function logout()\n {\n $this->session->destroy();\n $this->session = null;\n }", "title": "" }, { "docid": "0c59afd4ccee56f2b6a33b9471d0c0f9", "score": "0.78301364", "text": "public static function destroy()\n {\n // Remove all the data from the cart and set some base values\n //\n static::$cart_contents = array(\n 'cart_total' => 0,\n 'total_items' => 0\n );\n\n // Remove the session.\n //\n Session::forget( static::$config['session_name'] );\n }", "title": "" }, { "docid": "f5ddbd16f13dc31be34188f6c1172dc3", "score": "0.7819363", "text": "public function destroy()\n\t{\n\t\t$name = session_name();\n\t\tsession_destroy();\n\t\tunset($_SESSION);\n\n\t\tif (array_key_exists($name, $_COOKIE)) {\n\t\t\tunset($_COOKIE[$name]);\n\t\t\tsetcookie($name, null, -1);\n\t\t}\n\t}", "title": "" }, { "docid": "b420027dde31033c0b715fee64d958e2", "score": "0.78095937", "text": "public function destroySession() {\n\t\t$this->generateNewSessionId();\n\t\t$this->emptySession();\n\t\t$this->setEmptyCookie();\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "5a771c8256a25686e50ee0e4afa179d0", "score": "0.7805502", "text": "public function clean() {\n unset($_SESSION[$this->sessionVariableName]);\n }", "title": "" }, { "docid": "dde00057ae1e50e23a71b823f44f5dac", "score": "0.77934533", "text": "public function destroy()\n {\n if ($this->guest()) {\n return;\n }\n $this->updateRememberToken();\n $this->storage->deleteCredentials('__permanent');\n $this->removeSessionIdentifiers();\n }", "title": "" }, { "docid": "0566c5a3eb990603aac04c9ace4cd5cb", "score": "0.77859986", "text": "public function sess_destroy()\n\t{\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "86bdd1b7d8747a130cb48c16d4fb7fe1", "score": "0.7777503", "text": "public static final function clearSession() {\n //$_SESSION['user'] = null;\n //$_SESSION['locale'] = null;\n unset($_SESSION['compability']);\n unset($_SESSION['navigator']);\n unset($_SESSION['user']);\n\n @session_destroy();\n }", "title": "" }, { "docid": "d01dc738dab51ec48b8c820ee063cf9b", "score": "0.7754645", "text": "public function destroyUserSession() {\n unset($_SESSION['user_id']);\n unset($_SESSION['user_email']);\n unset($_SESSION['user_name']);\n session_destroy();\n }", "title": "" }, { "docid": "7dbd0d681f6c0a71cd37c052b7c3d7a5", "score": "0.77376175", "text": "public function sess_destroy()\n\t{\n\t\t// Cleanup session\n\t\t$_SESSION = array();\n\t\t$name = session_name();\n\t\tif (isset($_COOKIE[$name]))\n\t\t{\n\t\t\t// Clear session cookie\n\t\t\t$params = session_get_cookie_params();\n\t\t\tsetcookie($name, '', time() - 42000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n\t\t\tunset($_COOKIE[$name]);\n\t\t}\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "cefc6e099041edcede3bfe2c25b59792", "score": "0.77204055", "text": "public function destroySession()\n {\n $this->useSession();\n $_SESSION = [];\n\n if (ini_get('session.use_cookies')) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params['path'], $params['domain'],\n $params['secure'], $params['httponly']\n );\n }\n\n session_destroy();\n }", "title": "" }, { "docid": "e9df4f2bfbbbe760dd4c315e72eaba61", "score": "0.77067477", "text": "function destorySession()\r\n\t{\r\n\t\tunset($_SESSION[\"table\"]);\r\n\t\tunset($_SESSION[\"query\"]);\r\n\t\tunset($_SESSION[\"orderBy\"]);\r\n\t\tunset($_SESSION[\"per_page\"]);\r\n\t\tunset($_SESSION[\"total\"]);\r\n\t}", "title": "" }, { "docid": "f87fc16394bec1cecc6c0be8495c450b", "score": "0.7705516", "text": "public static function destroy () {\n\t\t\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "d12c2ae5a40c13e115f8a38a00b675c1", "score": "0.7697159", "text": "private function destroySession()\n\t\t{\n\t\t\t$_SESSION = array();\n\t\t\t// Delete the session cookie.\n\t\t\tif (ini_get(\"session.use_cookies\")) {\n\t\t\t $params = session_get_cookie_params();\n\t\t\t setcookie(session_name(), '', time() - 42000,\n\t\t\t $params[\"path\"], $params[\"domain\"],\n\t\t\t $params[\"secure\"], $params[\"httponly\"]\n\t\t\t );\n\t\t\t}\n\t\t\tsession_destroy();\n\t\t}", "title": "" }, { "docid": "82fddca2adc1bbf4353352cd72ab7f10", "score": "0.76719373", "text": "function destroy(): void\n\t{\n\t\t$_SESSION = array();\n \tif (ini_get(\"session.use_cookies\")) {\n \t$params = session_get_cookie_params();\n \tsetcookie(session_name(), '', time() - 420000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\n \t}\n \tsession_destroy();\t\n\t}", "title": "" }, { "docid": "1cfabfe3a078023668bf2abb8ed46608", "score": "0.7656297", "text": "static function destroy(){\r\n session_destroy();\r\n }", "title": "" }, { "docid": "e53a9f179fcd154804b2997dbc6d37e4", "score": "0.76520956", "text": "function destroisession(){\r\n $this->session->sess_destroy();\r\n }", "title": "" }, { "docid": "a9aaa79fc06ff7f8b73d6b285a25bb19", "score": "0.7646968", "text": "public function destroy() {\r\n \tsession_destroy();\r\n }", "title": "" }, { "docid": "378104823366d03c57253fd3c35577c1", "score": "0.76421857", "text": "public function clear_session()\n {\n session_unset();\n }", "title": "" }, { "docid": "980ca97493efd4d3b0057eff85759c57", "score": "0.76387954", "text": "private function unsetSession()\n {\n $this->session->unsetData(self::DATA_KEY_SESSION_TOKEN);\n $this->session->unsetData(self::DATA_KEY_SESSION_TOKEN_EXPIRY);\n }", "title": "" }, { "docid": "f1c8a848cec2ade93c701aa6b28a43e5", "score": "0.7622256", "text": "public function destroy()\n {\n if ($this->exist && !ServerHelper::isCLI()) {\n session_unset();\n session_destroy();\n session_start();\n }\n }", "title": "" }, { "docid": "ac77057a2f4f49efc81b9b76d6b47abd", "score": "0.7603524", "text": "public function logout() {\n unset($_SESSION[self::SESSION_KEY]);\n unset($_SESSION[self::ERROR_KEY]);\n unset($_SESSION[self::SUCCESS_KEY]);\n session_destroy() ;\n }", "title": "" }, { "docid": "4de3ec68bdb4121479a6e412ec34b661", "score": "0.7570993", "text": "public function clean()\n {\n $this->session->put($this->key, null);\n }", "title": "" }, { "docid": "4b6d7f547d9b1d1069fde50a80191dd4", "score": "0.75604504", "text": "function _session_logout() {\n _session_start();\n @unlink(session_save_path().\"/sess_\".session_id());\n session_unset();\n session_destroy();\n session_write_close();\n}", "title": "" }, { "docid": "a03c70fcb64a142c1479b85595f6a6ec", "score": "0.7524146", "text": "public function clean()\n {\n unset($_SESSION['__CACHE__']);\n }", "title": "" }, { "docid": "b4bf844b4858421013d98b2349953569", "score": "0.7522614", "text": "public static function destroySession(){\n session_destroy();\n }", "title": "" }, { "docid": "b4bf844b4858421013d98b2349953569", "score": "0.7522614", "text": "public static function destroySession(){\n session_destroy();\n }", "title": "" }, { "docid": "2298e6e0a3c59375f82e6f2a352e6f6a", "score": "0.7512518", "text": "function session_destroy() {\n\tSession::destroy();\n}", "title": "" }, { "docid": "716ca9ac77a99c8094ae8a616a836a81", "score": "0.75123256", "text": "public function clear(){\n Service::get('session')->destroy();\n }", "title": "" }, { "docid": "8abaab5e408c7d5fd230e1b34691dab5", "score": "0.74925685", "text": "public function __destruct()\n {\n if ($this->_unlogged) {\n $this->Session->delete($this->sessionKey);\n }\n }", "title": "" }, { "docid": "cdb0baa3e4e99baf69604cc33e0e9ad8", "score": "0.7491938", "text": "public function clearData()\n {\n session()->forget($this->sessionKey);\n }", "title": "" }, { "docid": "4a3f078594c32844e768553048c5c2c3", "score": "0.74886954", "text": "public function clear(): void\n {\n $_SESSION = [];\n session_regenerate_id(true);\n }", "title": "" }, { "docid": "e24e26280e4521dcbd17c4d687a786da", "score": "0.74804044", "text": "private function deleteSession() {\n $_SESSION = array();\n\n if (isset($_COOKIE[session_name()])) {\n @setcookie(session_name(), '', time() - 42000, '/');\n }\n session_destroy();\n }", "title": "" }, { "docid": "97aa433aafc03261050da42b1b651774", "score": "0.74791104", "text": "public function destroy() {\n\t\t\trequire_once PROJECT_ROOT . '/model/main.php';\n\t\t\t$model = new ProjectModelMain();\n\t\t\t$sid = $this->getVar('sid');\n\t\t\t$model->logout($sid);\n\t\t\tsession_destroy();\n\t\t\t$this->sessionVars = null;\n\t\t}", "title": "" }, { "docid": "89196ac79783256a94e806d52c3ea06f", "score": "0.74402237", "text": "public function erase() {\n\t\t$this->clearAll();\n\t\t//we mustn't call session_destroy()\n\t\t//or subsequent calls to session_encode()\n\t\t//will fail.\n\t\t//session_destroy();\n\t\t$this->started = FALSE;\n\t}", "title": "" }, { "docid": "7ca38d8137a535b2ec4522c6ea1ebe26", "score": "0.7438076", "text": "public function logout() {\r\n\r\n $this->_db->delete('users_session', array('user_id', '=', $this->getData()->id));\r\n\r\n Session::delete($this->_sessionName);\r\n Cookie::delete($this->_cookieName);\r\n }", "title": "" }, { "docid": "cda3b4d920f0a00a85bf3cd4b7df0d96", "score": "0.743084", "text": "public static function clear()\n {\n session_unset();\n }", "title": "" }, { "docid": "767a3ba44b304d52d5acb1898f67b24a", "score": "0.7411053", "text": "public function destroyUserSession()\n {\n Session::getInstance()->destroySession();\n }", "title": "" }, { "docid": "8addabbb7a7b86ca5b80a42263a1ec2d", "score": "0.7408743", "text": "public function destroy()\n\t{\n\t\t$this->fb->destroySession();\n\t}", "title": "" }, { "docid": "af00470871558aa98ffe86de8c88a1bb", "score": "0.7402598", "text": "public function endSession () {\n\t\tsession_unset();\n\t\tsession_destroy();\n\t\t$_SESSION = array();\n\t\tsession_regenerate_id();\n\t}", "title": "" }, { "docid": "21bf602e78c518a377b625602d0291b4", "score": "0.74017984", "text": "public function destroyAction()\n {\n $this->session->destroy();\n }", "title": "" }, { "docid": "bf9f882b857d6565dd16436f48133492", "score": "0.7390431", "text": "public function clearSession() {\n session_unset();\n session_destroy();\n unset($_SESSION['glogin']);\n }", "title": "" }, { "docid": "1aab8ced69d6294f53ebfdfab262621d", "score": "0.73835063", "text": "public static function cleanSession() {\n Constants::__setSystemConstant(\"session\", \"cleansession\", null);\n }", "title": "" }, { "docid": "1447ad3ec4eb724a8b2b42b59d532023", "score": "0.73810023", "text": "public function logout() {\n $this->_db->delete('users_session', array('user_id', '=', $this->data()->id));\n\n Session::delete($this->_sessionName);\n Cookie::delete($this->_cookieName);\n }", "title": "" }, { "docid": "b3fd277db77779c9daa5fb72f9921c66", "score": "0.7377273", "text": "public function logout()\r\n\t{\r\n\t\t// Logout just deletes the current session.\r\n\t\tSession::delete($this->_sessionName);\r\n\t}", "title": "" }, { "docid": "3d8e06fa5f0c8b686684f9cd130908de", "score": "0.73656285", "text": "public function clearSessionData()\n {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "efd87624d700b59d95042cf7440063e6", "score": "0.73610044", "text": "public function destructSessions() {\n foreach (array_keys($_SESSION) as $key) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "18ceed2429b6e75f15f7473060d2d605", "score": "0.73601747", "text": "public function disconnect(): void\n {\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "6514f705eeb3ae1d615e8ef47f5229d3", "score": "0.73568535", "text": "function destroy()\n\t{\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "9805247dd1c3ca0e0fdfc536f2583327", "score": "0.7354342", "text": "public function destroyUserSession()\n {\n session_destroy();\n }", "title": "" }, { "docid": "7acf300170eb0386cd87a5980aa3113e", "score": "0.7345108", "text": "public function destroySession()\n {\n $_SESSION = Array(); //Clear the array\n\n $parameters = session_get_cookie_params();\n setcookie(\n session_name(), '',\n (new \\DateTime('now'))->modify(\"-1 day\")->format('U'),\n $parameters['path'], $parameters['domain'],\n $parameters['secure'], $parameters['httponly']\n ); //Clear the user's cookie\n\n session_destroy(); //Destroy the session completely.\n }", "title": "" }, { "docid": "2ebf8c4e721cb3bc2f8a7200416bc429", "score": "0.73415", "text": "public function remove()\n {\n if ($this->cookies->has('RMU')) {\n $this->cookies->get('RMU')->delete();\n }\n if ($this->cookies->has('RMT')) {\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->remove('auth-identity');\n $this->session->remove('temp-sucursales');\n\n }", "title": "" }, { "docid": "70cc169272e6526b1e385e63b02b37a3", "score": "0.733813", "text": "function destroy_session_and_data()\r\n {\r\n $_SESSION = array();\r\n setcookie(session_name(), '', time() - 1, '/');\r\n session_destroy();\r\n }", "title": "" }, { "docid": "888f5ed6a22e9928ec474f58feb68d3c", "score": "0.73332477", "text": "function deconnection() {\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t}", "title": "" }, { "docid": "70cf534c4e5d828078087fa6cd441be9", "score": "0.7317287", "text": "public function destroySession()\n {\n if ( !$this->started )\n return;\n\n if ( isset( $_COOKIE[ session_name() ] ) ) {\n // emit the session cookie with date in the past to delete it\n $params = session_get_cookie_params();\n setrawcookie( session_name(), session_id(), 1, $params[ 'path' ], $params[ 'domain' ], $params[ 'secure' ] );\n }\n\n $_SESSION = array();\n session_destroy();\n\n $this->started = false;\n }", "title": "" }, { "docid": "c25746c6f4a796083358129ae53e8a3c", "score": "0.7310441", "text": "static function destroy_session(){\n \tsession_start();\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "2cdc26b3ae7eaed59fe2cbe3781cf98f", "score": "0.7307522", "text": "public function destroy() {\n try {\n $this->remote_storage->destroy(); \n $this->local_storage->destroy(); \n } catch(SessionRemoteStorageError $e) {\n return \"FAILED TO DESTROY\";\n }\n }", "title": "" }, { "docid": "63ffa112725771f24d308d95435d6c2c", "score": "0.7299057", "text": "public function removeAll()\r\n {\r\n session_unset();\r\n }", "title": "" }, { "docid": "5d9d1a4b6adb0bace8304132f584e499", "score": "0.7284747", "text": "public function logout() : void\n {\n $this->session->clear();\n }", "title": "" }, { "docid": "08c851fdb35a859fcd2d9cefc38c21c9", "score": "0.72796154", "text": "function clearSession()\n {\n session_unset();\n session_regenerate_id();\n return session_destroy();\n }", "title": "" }, { "docid": "ce289882fcc8332cf7001d7d3cb82782", "score": "0.72790253", "text": "public function clear()\n\t{\n\t\t$sessionName = $this->getName();\n\n\t\t/*\n\t\t * In order to kill the session altogether, such as to log the user out, the session id\n\t\t * must also be unset. If a cookie is used to propagate the session id (default behavior),\n\t\t * then the session cookie must be deleted.\n\t\t * We need to use setcookie here or we will get a warning in some session handlers (ex: files).\n\t\t */\n\t\tif (isset($_COOKIE[$sessionName]))\n\t\t{\n\t\t\t$cookie = session_get_cookie_params();\n\n\t\t\tsetcookie($sessionName, '', 1, $cookie['path'], $cookie['domain'], $cookie['secure'], true);\n\t\t}\n\n\t\tparent::clear();\n\t}", "title": "" }, { "docid": "9ce52c963360e0d96cbbd10b313ea5a3", "score": "0.72720987", "text": "public function logout() \n\t{\n\t\t//Remove session data\n\t\t$sess_array = array(\n\t\t\t'user_name' => '',\n\t\t\t'user_id' => '',\n\t\t\t'user_last' => '',\n\t\t\t);\n\t\t$this->native_session->delete($sess_array);\n\t\tsession_destroy();\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "91dcbfd1d745d18e08a11cc367ec3f39", "score": "0.72498196", "text": "public function doUserLogout(){\r\n // delete user session from php server\r\n $_SESSION = array();\r\n session_destory();\r\n }", "title": "" }, { "docid": "ec911eca93c7d593d5c801a342e17903", "score": "0.7245535", "text": "function destroy(){\n $_SESSION = array();\n session_destroy();\n return $this;\n }", "title": "" }, { "docid": "5c49f489c40cd0ee38c9d57b7272100b", "score": "0.72398514", "text": "function session_drop(){\n\t\tsession_unset();\n\t\t$_SESSION = array();\n\t}", "title": "" }, { "docid": "cce827fb83de6533774c6c1e82af535e", "score": "0.72396076", "text": "function destroy_current_session() {\n // TODO destroy the session file completely\n }", "title": "" }, { "docid": "cce827fb83de6533774c6c1e82af535e", "score": "0.72396076", "text": "function destroy_current_session() {\n // TODO destroy the session file completely\n }", "title": "" }, { "docid": "fbe692dcc20382aa39f9eac183ed395c", "score": "0.7233258", "text": "public function logout()\n\t{\n\t\t$this->session->sess_destroy();\n\t}", "title": "" }, { "docid": "dc7b136bb6bd637a7a0f2e0cdc9a8770", "score": "0.72324216", "text": "public function unsetSession() {\r\n\r\n\t\t// General session stuff\r\n\t\tunset($_SESSION['timeout']);\r\n\r\n\t\t// Account stuff\r\n\t\tunset($_SESSION['Username']);\r\n\t\tunset($_SESSION['Useremail']);\r\n\t\tunset($_SESSION['CID']);\r\n\t\tunset($_SESSION['UserType']);\r\n\t\tunset($_SESSION['admin']);\r\n\t\tunset($_SESSION['adminAccount']);\r\n\t\tunset($_SESSION['adminID']);\r\n\r\n\t\t// Checkout stuff\r\n\t\tunset($_SESSION['zipcode']);\r\n\t\tunset($_SESSION['shipping_services']);\r\n\t\tunset($_SESSION['tax_exempt']);\r\n\t\tunset($_SESSION['shipping_charges']);\r\n\t\tunset($_SESSION['shipping_carrier']);\r\n\t\tunset($_SESSION['shipping_arrival_date']);\r\n\t\tunset($_SESSION['checkout_form']);\r\n\t\tunset($_SESSION['coupon']);\r\n\t\tunset($_SESSION['status']);\r\n\t\tunset($_SESSION['sales_tax']);\r\n\t\tunset($_SESSION['coupon_value']);\r\n\t\tunset($_SESSION['coupon_number']);\r\n\t\tunset($_SESSION['total']);\r\n\t}", "title": "" }, { "docid": "1e6227de8ab414e5fc903a8618faf904", "score": "0.7218376", "text": "public function close(){\n $this->_deleteAllSessionData($this->sessionId);\n }", "title": "" }, { "docid": "8b369bd528f77cd2b07e32db3e83fb9a", "score": "0.7215117", "text": "private function session_cleanup() {\n\t\tforeach ($this->sessions as $i => $s) {\n\t\t\tif ($s->is_expired()) {\n\t\t\t\t$this->sessions[$i] = NULL;\n\t\t\t}\n\t\t}\n\t\t$this->sessions = array_values(array_filter($this->sessions));\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "600aa84d6dcd6a70bc7a22198528cad6", "score": "0.72135615", "text": "private function cerrarSesion():void{\n session_unset();\n session_destroy();\n }", "title": "" }, { "docid": "da2da40b5fe1bfb335e0641abc3985cd", "score": "0.721027", "text": "protected function clearData(){\n\t\tunset($_SESSION[$this->session_key]);\n\t}", "title": "" } ]
fccd382ae3782c6396b39758a0125454
Build method for URLs This method is meant to transform the query parameters into a more human readable form. It is only executed when SEF mode is switched on.
[ { "docid": "03151ae53af8f8c5aff91cc9d0296dfe", "score": "0.0", "text": "public function build(&$query);", "title": "" } ]
[ { "docid": "187866338ac03a1d948e2c20ac5a30b8", "score": "0.6949756", "text": "private function build_params()\n {\n if($this->is_rewrite)\n {\n return;\n }\n\n $url_parts = parse_url('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n $split_at_slash = explode(\"/\", trim($url_parts['path']));\n $this->url_segments = array_slice($split_at_slash, 3);\n\n for($i = 3; $i <= count($split_at_slash)-1; $i += 2)\n {\n if(isset($split_at_slash[$i]))\n {\n $param = $split_at_slash[$i];\n\n $value = \"\";\n if(isset($split_at_slash[$i+1]))\n {\n $value = $split_at_slash[$i+1];\n }\n \n if(!isset($_GET[$param]))\n {\n $_GET[$param] = urldecode($value);\n }\n elseif(is_array($_GET[$param]))\n {\n $_GET[$param][] = urldecode($value);\n }\n else\n {\n $_GET[$param] = array($_GET[$param], urldecode($value));\n }\n }\n }\n\n if(count($_POST) > 0)\n {\n foreach($_POST as $var => $val)\n {\n $var_new = str_replace('amp;', '', $var);\n if($var_new != $var)\n {\n $_POST[$var_new] = $val;\n unset($_POST[$var]);\n }\n }\n }\n }", "title": "" }, { "docid": "4b8edb2e7b0030e552b78a288e06d38e", "score": "0.68692553", "text": "protected function _buildUrl()\n {\n $uri = Zend_Uri::factory(absolute_url());\n $uri->setQuery($_GET);\n return $uri->getUri();\n }", "title": "" }, { "docid": "5621f8ab37723f40ace1d6667fb214f0", "score": "0.6850514", "text": "protected function generateQueryString()\n {\n $params = $this->query->all();\n ksort($params);\n\n $this->queryString = http_build_query($params, null, '&', PHP_QUERY_RFC3986);\n }", "title": "" }, { "docid": "98d00fae7716007b61221fb363fae359", "score": "0.680756", "text": "function build_query_string() {\n\t\t$this->query_string = '';\n\t\tforeach ( (array) array_keys($this->query_vars) as $wpvar) {\n\t\t\tif ( '' != $this->query_vars[$wpvar] ) {\n\t\t\t\t$this->query_string .= (strlen($this->query_string) < 1) ? '' : '&';\n\t\t\t\tif ( !is_scalar($this->query_vars[$wpvar]) ) // Discard non-scalars.\n\t\t\t\t\tcontinue;\n\t\t\t\t$this->query_string .= $wpvar . '=' . rawurlencode($this->query_vars[$wpvar]);\n\t\t\t}\n\t\t}\n\n\t\t// query_string filter deprecated. Use request filter instead.\n\t\tif ( has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in.\n\t\t\t$this->query_string = apply_filters('query_string', $this->query_string);\n\t\t\tparse_str($this->query_string, $this->query_vars);\n\t\t}\n\t}", "title": "" }, { "docid": "ea32032afb013793b5b31095866e17f9", "score": "0.67266935", "text": "public function buildUrl();", "title": "" }, { "docid": "ea32032afb013793b5b31095866e17f9", "score": "0.67266935", "text": "public function buildUrl();", "title": "" }, { "docid": "5d13d9dd768f658258b70ad3280d1c67", "score": "0.65667945", "text": "protected function buildQueryUrl()\n {\n /** @var string $sUrl */\n $sBaseUrl = $this->getConfig('url') . $this->getConfig('format');\n\n /** @var array $aParams */\n $aParams = array(\n 'address' => $this->getLocation(),\n 'key' => $this->getConfig('api_key')\n );\n\n return $sBaseUrl . '?' . http_build_query($aParams);\n }", "title": "" }, { "docid": "285de9d42c068bc1841a7780f9ea0d10", "score": "0.6541428", "text": "function build_url(...$args)\n{\n return '?'.collect($args)->map(function ($arg) {\n if (is_array($arg)) {\n $request = key($arg).'='.$arg[key($arg)];\n } else {\n $request = $arg.'='.request($arg);\n }\n\n return $request;\n })->implode('&');\n}", "title": "" }, { "docid": "17412dc0b31356fd65d92b48de961cc2", "score": "0.65205294", "text": "protected function build_query_url() {\n\t\treturn add_query_arg( array( 'post_type' => 'notification', 'payload' => $this->get_payload() ), $this->get_remote_url() );\n\t}", "title": "" }, { "docid": "d00a43e594565a8d5a6f8789e13f2838", "score": "0.64412266", "text": "public function buildUrl()\n {\n $scheme = isset($this->value['scheme']) ? ($this->value['scheme'] . '://') : '';\n\n $host = $this->value['host'] ?? '';\n $port = isset($this->value['port']) ? (':' . $this->value['port']) : '';\n\n $user = $this->value['user'] ?? '';\n\n $pass = isset($this->value['pass']) ? (':' . $this->value['pass']) : '';\n $pass = ($user || $pass) ? ($pass . '@') : '';\n\n $path = $this->value['path'] ?? '';\n $path = $path ? ('/' . ltrim($path, '/')) : '';\n\n $query = isset($this->value['query']) ? ('?' . $this->value['query']) : '';\n $fragment = isset($this->value['fragment']) ? ('#' . $this->value['fragment']) : '';\n\n return implode('', [$scheme, $user, $pass, $host, $port, $path, $query, $fragment]);\n }", "title": "" }, { "docid": "04f73f1ecf280ea93ee51be64e213d78", "score": "0.6426551", "text": "protected function prepareURL()\n\t{\n\t\t$query = array();\n\n\t\tforeach ($this->getfields as $field => $value)\n\t\t{\n\t\t\t$query[] = $field.'='.urlencode($value);\n\t\t}\n\t\t$query = implode('&', $query);\n\n\t\t$url = trim($this->options['CURLOPT_URL'], '&');\n\n\t\tif (stripos($this->options['CURLOPT_URL'], '?') === false)\n\t\t{\n\t\t\t$url .= '?';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = '&' . $query;\n\t\t}\n\n\t\t$this->addOption('URL', $url . $query);\n\t}", "title": "" }, { "docid": "6b3382c9308350fa383d27a0b0040190", "score": "0.6411443", "text": "function _urlString()\n\t{\n\n\t\t$str = 'key=' . $this->api_key;\n\n\t\t//Add key=>values pass to class to url string\n\t\tif( $this->format )\n\t\t\t$str .= '&format=' . $this->format;\n\n\t\tif( $this->animal )\n\t\t\t$str .= '&animal=' . $this->animal;\n\n\t\tif( $this->id )\n\t\t\t$str .= '&id=' . $this->id;\n\n\t\tif( $this->breed )\n\t\t\t$str .= '&breed=' . $this->breed;\n\n\t\tif( $this->size )\n\t\t\t$str .= '&size=' . $this->size;\n\n\t\tif( $this->sex )\n\t\t\t$str .= '&sex=' . $this->sex;\n\n\t\tif( $this->location )\n\t\t\t$str .= '&location=' . $this->location;\n\n\t\tif( $this->shelterid )\n\t\t\t$str .= '&shelterid=' . $this->shelterid;\n\n\t\tif( $this->output )\n\t\t\t$str .= '&output=' . $this->output;\n\n\t\tif( $this->offset)\n\t\t\t$str .= '&offset=' . $this->offset;\n\n\t\tif( $this->count )\n\t\t\t$str .= '&count=' . $this->count;\n\n\t\tif( $this->name )\n\t\t\t$str .= '&name=' . $this->name;\n\n\t\tif( $this->status )\n\t\t\t$str .= '&status=' . $this->status;\n\n $this->cache_url = $str;\n\n\t\tif ($this->cookie->get('petToken') ) {\n\t\t\t$str .= '&token=' . $_COOKIE['petToken'];\n\t\t}\n\n\t\t//Generate signature\n\t\t$sig = $this->_signature($str);\n\n\t\t//Append signature to url\n\t\t$str .= '&sig=' . $sig;\n\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "e3bca38257ea66f8012fd863a3151a0b", "score": "0.6396732", "text": "public function debug_url()\n\t{\n\t\tif ($this->url_begin == '')\n\t\t{\n\t\t\t$request_method = (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : 'GET';\n\t\t\t$request_uri = (isset($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : getenv('PHP_SELF');\n\t\t\tif (!empty($_SERVER['QUERY_STRING']))\n\t\t\t{\n\t\t\t\t$request_uri .= '?' . $_SERVER['QUERY_STRING'];\n\t\t\t}\n\n\t\t\t$this->url_begin = str_replace('&', '&amp;', $request_uri) . ((strpos($request_uri, '?') != false) ? '&amp;' : '?');\n\t\t\t$this->url_end = '&amp;method=' . $request_method . (($request_method == 'POST') ? '&amp;post_ary=' . urlencode(serialize($_POST)) : '');\n\t\t}\n\n\t\treturn ($this->url_begin . 'debug_query=true' . $this->url_end);\n\t}", "title": "" }, { "docid": "b0eebcb89bc2e698349fd6f1a81b8369", "score": "0.63737345", "text": "function build_url($properties)\n\n {\n\n $url = $properties['url'];\n\n $scheme = $properties['scheme'];\n\n $hostname = $properties['hostname'];\n\n $path = $properties['path'];\n\n $parameters = $properties['parameters'];\n\n $fragment = $properties['fragment'];\n\n // Get url parts in order to prepare URL.\n $url_parts = parse_url($url);\n\n $url_scheme = '';\n\n // If a scheme was passed, then use it.\n if ($scheme != '')\n {\n\n $url_scheme = $scheme;\n\n // Otherwise if the passed URL contains a scheme, then use it.\n \n }\n else if (isset($url_parts['scheme']) == true)\n {\n\n $url_scheme = $url_parts['scheme'] . '://';\n\n }\n\n $url_hostname = '';\n\n // If a hostname was passed, then use it.\n if ($hostname != '')\n {\n\n $url_hostname = $hostname;\n\n // Otherwise if the passed URL contains a hostname, then use it.\n \n }\n else if (isset($url_parts['host']) == true)\n {\n\n $url_hostname = $url_parts['host'];\n\n }\n\n $url_path = '';\n\n // If a path was passed, then use it.\n if ($path != '')\n {\n\n $url_path = $path;\n\n // Otherwise if the passed URL contains a path, then use it.\n \n }\n else if (isset($url_parts['path']) == true)\n {\n\n $url_path = $url_parts['path'];\n\n }\n\n $url_query_string = '';\n\n // If the URL contains a query string, then process it.\n if (isset($url_parts['query']) == true)\n {\n\n // Put query string parameters into an array in order to prepare new query string.\n parse_str($url_parts['query'], $query_string_parameters);\n\n // Loop through the query string parameters in order to build query string.\n foreach ($query_string_parameters as $name => $value)\n {\n\n // If this parameter is not one of the parameters that was passed into this function, then add it.\n if (\n\n (is_array($parameters) == false)\n || (array_key_exists($name, $parameters) == false)\n)\n {\n\n // If this is the first item that is being added to the query string, then add question mark.\n if ($url_query_string == '')\n {\n\n $url_query_string = '?';\n\n // Otherwise this is not the first item that is being added to the query string, so add ampersand.\n \n }\n else\n {\n\n $url_query_string .= '&';\n\n }\n\n $url_query_string .= urlencode($name) . '=' . urlencode($value);\n\n }\n\n }\n\n }\n\n // If parameters were passed into this function then loop through them in order to add them to query string.\n if (is_array($parameters) == true)\n {\n\n foreach ($parameters as $name => $value)\n {\n\n // If this is the first item that is being added to the query string, then add question mark.\n if ($url_query_string == '')\n {\n\n $url_query_string = '?';\n\n // Otherwise this is not the first item that is being added to the query string, so add ampersand.\n \n }\n else\n {\n\n $url_query_string .= '&';\n\n }\n\n $url_query_string .= urlencode($name) . '=' . urlencode($value);\n\n }\n\n }\n\n $url_fragment = '';\n\n // If a fragment was passed, then use it.\n if ($fragment != '')\n {\n\n $url_fragment = '#' . urlencode($fragment);\n\n // Otherwise if the passed URL contains a fragment, then use it.\n \n }\n else if (isset($url_parts['fragment']) == true)\n {\n\n $url_fragment = '#' . $url_parts['fragment'];\n\n }\n\n // If the path is blank and there is a query string or a fragment, then set path to slash.\n if (\n\n ($url_path == '')\n &&\n\n (\n\n ($url_query_string != '')\n || ($url_fragment != '')\n)\n)\n {\n\n $url_path = '/';\n\n }\n\n return $url_scheme . $url_hostname . $url_path . $url_query_string . $url_fragment;\n\n }", "title": "" }, { "docid": "f1bca4a7c298875ad17d157028e0e452", "score": "0.6349253", "text": "public function buildQueryString()\n {\n return $this->getPageNumber().\".\".$this->getItemsOnPage();\n }", "title": "" }, { "docid": "11dc61665ad5eca026ba22187177356b", "score": "0.63421124", "text": "private function _buildApiUrl()\n {\n\n $parameter = [\n 'lat' => $this->latitude,\n 'lon' => $this->longitude,\n 'lang' => $this->lang,\n 'units' => $this->units,\n 'appid' => $this->api_key,\n\n ];\n\n return self::API_BASE_URI.$this->type.'?'.http_build_query($parameter);\n }", "title": "" }, { "docid": "b193ed95ae3210fc9ececcdcb4b71d29", "score": "0.6312118", "text": "function _getLinksUrl() {\n // Sort out query string to prevent messy urls\n $querystring = array();\n $qs = array();\n if (!empty($_SERVER['QUERY_STRING'])) {\n $qs = explode('&', $_SERVER['QUERY_STRING']);\n for ($i=0, $cnt=count($qs); $i<$cnt; $i++) {\n list($name, $value) = explode('=', $qs[$i]);\n if ($name != $this->_urlVar) {\n $qs[$name] = $value;\n }\n unset($qs[$i]);\n }\n }\n\n foreach ($qs as $name => $value) {\n $querystring[] = $name . '=' . $value;\n }\n\n return '?' . implode('&', $querystring) . (!empty($querystring) ? '&' : '') . $this->_urlVar .'=';\n }", "title": "" }, { "docid": "b80aba58402a4a2ddc1d7a4ddf5b6df7", "score": "0.6282292", "text": "public function url()\n {\n $url = $this->form->getAction() . '?' . http_build_query($this->data);\n $url = preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $url);\n return $url;\n }", "title": "" }, { "docid": "acfda53986c89b5873116416c15f99be", "score": "0.6227352", "text": "protected function _buildRequestString () {\n\t\treturn http_build_query($this->_fields);\n\t}", "title": "" }, { "docid": "6c4d4a1cfaad9ce86f87dfcf2ad71f45", "score": "0.61969924", "text": "protected function buildUrl()\n {\n $ip = $this->getVisitorIp();\n $tokenString = $this->getTokenString();\n\n if ($this->isCustomFields()) {\n $tokenString .= $this->getReturnFieldsString();\n }\n\n return config('visit_log.free_geo_ip_url') . '/' . $ip . '?' . 'access_key=' . config('visit_log.token') . $tokenString;\n }", "title": "" }, { "docid": "5d103775b19134c41a526f751c3be197", "score": "0.6164828", "text": "private function getURLString() {\n return $this->domain.\"apikey=\".$this->api_key.\"&tags=\".$this->tags;\n }", "title": "" }, { "docid": "8f07c3a4e7a89e04d996c01b74676c80", "score": "0.6164158", "text": "private function buildQueryString($request) {\n\t\treturn http_build_query($request);\n\t}", "title": "" }, { "docid": "68fa93308916173cc698e6b75272ed75", "score": "0.61575085", "text": "function build_geturl()\r\n{\r\n\tglobal $REQUEST_URI, $REQUEST_METHOD, $HTTP_GET_VARS, $HTTP_POST_VARS;\r\n\t\r\n\t$temp = explode(\"?\", $REQUEST_URI);\r\n\t// $temp agora tem altas coisas, na posicao 0 o nome do arquivo\r\n\t\r\n\t$cgi = $REQUEST_METHOD == 'GET' ? $HTTP_GET_VARS : $HTTP_POST_VARS;\r\n\t// $cgi é um array com todas as get_vars ou todas as post_vars\r\n\t\r\n\treset ($cgi);\r\n\t// coloca o ponteiro de array de $cgi no comeco\r\n\t\r\n\twhile (list($key, $value) = each($cgi)) {\r\n\tif ($key != \"pag\")\r\n\t\t$query_string .= \"&\" . $key . \"=\" . $value;\r\n\t}\r\n\treturn $query_string;\r\n}", "title": "" }, { "docid": "9d9bd4016a2a31bf65148c8b0955c522", "score": "0.61431915", "text": "function make_url()\r\n {\r\n $query_url = \"http://\" . $this->server . \"/onca/xml\";\r\n $query_url .= \"?Service=\" . $this->service;\r\n\r\n if (strlen($this->version) > 1)\r\n {\r\n $query_url .= \"&Version=\" . $this->version;\r\n } \r\n\r\n $query_url .= \"&AWSAccessKeyId=\" . $this->access_key;\r\n\r\n if ($this->use_signatureAuth)\r\n {\r\n $query_url .= \"&Signature=\" . $this->make_signature();\r\n $query_url .= \"&Timestamp=\" . urlencode($this->make_timestamp());\r\n } \r\n\r\n if ($this->use_associateTag)\r\n {\r\n $query_url .= \"&AssociateTag=\" . $this->associate_tag;\r\n } \r\n\r\n $query_url .= \"&Operation=\" . $this->operation;\r\n\r\n if (strlen($this->responseGroup) > 1)\r\n {\r\n $query_url .= \"&ResponseGroup=\" . $this->responseGroup;\r\n } \r\n\r\n return $query_url;\r\n }", "title": "" }, { "docid": "2cec6007cebdd6e7925907da0f247e88", "score": "0.6127103", "text": "function mkurl () {\n if ($this->url !== NULL){\n $url = $this->url;\n }else{\n if (!isset($this->maxresults)) $this->maxresults = 20;\n if ($this->maxresults > 0) $query = \";mx=20\";\n if ($this->episode_search) $url = \"http://\".$this->imdbsite.\"/find?q=\".urlencode($this->name).$query.\";s=ep\";\n else {\n switch ($this->searchvariant) {\n case \"moonface\" : $query = \";more=tt;nr=1\"; // @moonface variant (untested)\n case \"sevec\" : $query = \"&restrict=Movies+only&GO.x=0&GO.y=0&GO=search;tt=1\"; // Sevec ori\n default : $query = \";tt=on\"; // Izzy\n }\n $url = \"http://\".$this->imdbsite.\"/find?q=\".urlencode($this->name).$query;\n }\n }\n return $url;\n }", "title": "" }, { "docid": "4237460d384c9c81441f7d75f52a4b1e", "score": "0.6113886", "text": "private function buildQueryString()\n {\n $queryOptions = $this->getQueryOptions();\n if ($queryOptions != null)\n {\n return '?' . http_build_query($queryOptions, null, '&');\n }\n\n return null;\n }", "title": "" }, { "docid": "324c9c0684bca14d944e85699d467956", "score": "0.6084166", "text": "public function buildUrl(array $options = array())\n {\n return \"{$this->options['base_url']}&q={$options['q']}\";\n }", "title": "" }, { "docid": "8dde3b141be6e1946abf9f144f7edd0d", "score": "0.60697776", "text": "function yourls_add_query_arg() {\n\t$ret = '';\n\tif ( is_array( func_get_arg(0) ) ) {\n\t\tif ( @func_num_args() < 2 || false === @func_get_arg( 1 ) )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = @func_get_arg( 1 );\n\t} else {\n\t\tif ( @func_num_args() < 3 || false === @func_get_arg( 2 ) )\n\t\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\telse\n\t\t\t$uri = @func_get_arg( 2 );\n\t}\n\t\n\t$uri = str_replace( '&amp;', '&', $uri );\n\n\t\n\tif ( $frag = strstr( $uri, '#' ) )\n\t\t$uri = substr( $uri, 0, -strlen( $frag ) );\n\telse\n\t\t$frag = '';\n\n\tif ( preg_match( '|^https?://|i', $uri, $matches ) ) {\n\t\t$protocol = $matches[0];\n\t\t$uri = substr( $uri, strlen( $protocol ) );\n\t} else {\n\t\t$protocol = '';\n\t}\n\n\tif ( strpos( $uri, '?' ) !== false ) {\n\t\t$parts = explode( '?', $uri, 2 );\n\t\tif ( 1 == count( $parts ) ) {\n\t\t\t$base = '?';\n\t\t\t$query = $parts[0];\n\t\t} else {\n\t\t\t$base = $parts[0] . '?';\n\t\t\t$query = $parts[1];\n\t\t}\n\t} elseif ( !empty( $protocol ) || strpos( $uri, '=' ) === false ) {\n\t\t$base = $uri . '?';\n\t\t$query = '';\n\t} else {\n\t\t$base = '';\n\t\t$query = $uri;\n\t}\n\n\tparse_str( $query, $qs );\n\t$qs = yourls_urlencode_deep( $qs ); // this re-URL-encodes things that were already in the query string\n\tif ( is_array( func_get_arg( 0 ) ) ) {\n\t\t$kayvees = func_get_arg( 0 );\n\t\t$qs = array_merge( $qs, $kayvees );\n\t} else {\n\t\t$qs[func_get_arg( 0 )] = func_get_arg( 1 );\n\t}\n\n\tforeach ( (array) $qs as $k => $v ) {\n\t\tif ( $v === false )\n\t\t\tunset( $qs[$k] );\n\t}\n\n\t$ret = http_build_query( $qs );\n\t$ret = trim( $ret, '?' );\n\t$ret = preg_replace( '#=(&|$)#', '$1', $ret );\n\t$ret = $protocol . $base . $ret . $frag;\n\t$ret = rtrim( $ret, '?' );\n\treturn $ret;\n}", "title": "" }, { "docid": "9afb5d7408ef80d31f39d284408d0c3c", "score": "0.6061548", "text": "private function buildQuerystring() {\n\t\t$r = '';\n\t\tif(count($this->querystringVariables) == 0) {\n\t\t\t//do nothing\n\t\t} else {\n\t\t\t//go through each and build \"id=5&count=66\" string\n\t\t\t$count = 1;\n\t\t\tforeach($this->querystringVariables as $querystringVariable) {\n\t\t\t\t$r .= $querystringVariable;\n\t\t\t\tif($count != count($this->querystringVariables)) {\n\t\t\t\t\t$r .= '&amp;';\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t//add the \"?\" (there is at least one variable here)\n\t\t\t$r = '?' . $r;\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "47ca21fe4cff1593f1f898dd3974f178", "score": "0.60585684", "text": "private function getQueryString() {\n /**\n * Add vissza szöveggé összefűzve a GET paramétereket!\n */ \n \n $str = \"\";\n \n /*if($this->forceDefault){\n $str .= $this->getEmailHash(str_repeat('0', 32));\n } else {\n $str .= $this->getEmailHash($this->email);\n }\n\n if($this->fileType !== null)\n $str .= \".\" . $this->fileType;*/\n\n $str .= \"r=\" . $this->rating;\n\n $str .= \"&s=\" . $this->size;\n\n if($this->defaultImage !== null)\n $str .= \"&d=\" . $this->defaultImage;\n\n if($this->forceDefault)\n $str .= \"&f=y\";\n\n return $str;\n }", "title": "" }, { "docid": "4c9d1a0e2acf74f46150bc3f42fefe9f", "score": "0.60390157", "text": "private static function prepareRequestUrl()\n {\n return 'https://'.self::$uri.'/'.self::$version.'/?';\n }", "title": "" }, { "docid": "5f0939394a08a60c7bee9380462f440c", "score": "0.6034197", "text": "public function to_url()\n {\n $post_data = $this->to_postdata();\n $out = $this->get_normalized_http_url();\n if ($post_data) {\n $out .= '?'.$post_data;\n }\n return $out;\n }", "title": "" }, { "docid": "3890f8cc06ce66a7346134a0521f2370", "score": "0.60324806", "text": "private function formUrl()\r\n {\r\n $url = $this->params['baseUrl'];\r\n $params = [];\r\n foreach ($this->params as $key => $value) {\r\n $params[] = $key . '=' . $value;\r\n }\r\n return $url . '?' . implode('&', $params);\r\n }", "title": "" }, { "docid": "d8af14de377435460351d8176c7ca4ba", "score": "0.60290575", "text": "function rssc_helper_buildParam($url, $source){\n global $post;\n\t$urlelement = parse_url($url);\n\t$rsscOptions = get_option('rssc');\n\tif($rsscOptions['rssc-'.$source.'-piwik_campaign'])\t $attr[] = \"piwik_campaign=\"\t.urlencode($rsscOptions['rssc-'.$source.'-piwik_campaign']);\n\tif($rsscOptions['rssc-'.$source.'-piwik_kwd']) \t\t\t$attr[] = \"piwik_kwd=\"\t\t\t.urlencode($rsscOptions['rssc-'.$source.'-piwik_kwd']);\n\tif($rsscOptions['rssc-'.$source.'-utm_source']) \t\t$attr[] = \"utm_source=\"\t\t\t.urlencode($rsscOptions['rssc-'.$source.'-utm_source']);\n\tif($rsscOptions['rssc-'.$source.'-utm_medium']) \t\t$attr[] = \"utm_medium=\"\t\t\t.urlencode($rsscOptions['rssc-'.$source.'-utm_medium']);\n\tif($rsscOptions['rssc-'.$source.'-utm_campaign']) \t $attr[] = \"utm_campaign=\"\t\t.urlencode($rsscOptions['rssc-'.$source.'-utm_campaign']);\n\t$attr = str_replace(\"%25POSTID%25\", $post->ID, $attr);\n\t$attr = str_replace(\"%25POSTTITLE%25\", urlencode($post->post_title), $attr);\n\t$ret .= $url;\n\tif($attr && !$urlelement[query]) $ret .= \"?\";\n\telseif($attr)\n\t\t$ret .= \"&\";\n\tif($attr) {\n\t\t$anzattr = count($attr);\n\t\tforeach ($attr as $attribut){\n\t\t\t$ret .= $attribut;\n\t\t\t$i++;\n\t\t\tif($i < $anzattr) $ret .= \"&\";\n\t\t}\n\t}\n\treturn urlencode($ret);\n}", "title": "" }, { "docid": "8fa0ce2ec0977f274c606411e4511dd3", "score": "0.60109454", "text": "static function build_querystring($getArr){\n\t\tif(is_array($getArr))\n\t\t\t$qs = self::ref_build_querystring($getArr, '', '');\n\t\t\t$hash=(isset($getArr['#']) && $getArr['#'])?\"#\".urlencode($getArr['#']):'';\n\t\t\treturn $qs.$hash;\n\t\treturn (string) $getArr;\n\t}", "title": "" }, { "docid": "d1c6d6a22becec0f4a5029c890824a72", "score": "0.59835875", "text": "public function buildHourlyURL() {\n\t\t//\twe need to get a range from the day before yesterday to yesterday\n\t\t$before_yesterday = new Utility_Date('2 days ago');\n\t\t$month1 = $before_yesterday->getMonth();\n\t\t$day1 = $before_yesterday->getDay();\n\t\t$year1 = $before_yesterday->getYear();\n\t\t$month2 = $this->yesterday->getMonth();\n\t\t$day2 = $this->yesterday->getDay();\n\t\t$year2 = $this->yesterday->getYear();\n\t\treturn $this->siteURL .= \"?month1={$month1}&day1={$day1}&year1={$year1}&month2={$month2}&day2\" .\n\t\t\t\"={$day2}&year2={$year2}&raw=generate+raw+data\";\n\t}", "title": "" }, { "docid": "5ac4cbfc54ff24c1040ba559e90b4305", "score": "0.59827584", "text": "public function getQueryString(): string\n {\n return http_build_query($this->params);\n }", "title": "" }, { "docid": "96962199b2308218b1fedafe73cc9420", "score": "0.59580946", "text": "protected function formatQueryString()\n {\n parse_str($_SERVER['QUERY_STRING'], $queryParams);\n\n $rp = new \\Gossamer\\Aset\\Http\\RequestParameters($this->uri, $this->nodeConfig, $queryParams);\n\n $queryString = $rp->getQueryStringParameters($queryParams);\n if(!is_null($queryString)) {\n $this->queryString = $queryString;\n }\n\n unset($rp);\n }", "title": "" }, { "docid": "b31bfaa9511ea84d3447bdd2033c6dac", "score": "0.5938615", "text": "public function buildRequest()\n {\n\n foreach ($this->params as $key => $val) {\n // ommit parameters with empty values\n if (!empty($val)) {\n $this->request[] = $key . '=' . urlencode($val);\n }\n }\n\n $this->requestUrl = $this->url . $this->serviceUrl . $this->requestEndPoint;\n\n\n $this->requestUrl .= implode('&', $this->request);\n\n }", "title": "" }, { "docid": "d86bb2cbfb24a543d12f17719540adf6", "score": "0.5930662", "text": "private function buildURL ()\n {\n $url = new \\r8\\URL;\n\n // Get the url Scheme from the server protocol\n if ( self::hasKey($this->server, \"SERVER_PROTOCOL\") )\n $url->setScheme( strtolower( strstr( $this->server['SERVER_PROTOCOL'], \"/\", TRUE ) ) );\n\n // Pull the server host, if it is set\n if ( self::hasKey($this->server, 'HTTP_HOST') )\n $url->setHost($this->server['HTTP_HOST']);\n\n // If there is no host, pull the IP address\n else if ( self::hasKey($this->server, \"SERVER_ADDR\") )\n $url->setHost($this->server['SERVER_ADDR']);\n\n // Pull the port\n if ( self::hasKey($this->server, \"SERVER_PORT\") )\n $url->setPort( (int) $this->server['SERVER_PORT'] );\n\n // The path and file name\n if ( self::hasKey($this->server, 'SCRIPT_NAME') )\n $url->setPath( $this->server['SCRIPT_NAME'] );\n\n // The faux directories\n if ( self::hasKey( $this->server, 'PATH_INFO' ) )\n $url->setFauxDir( \\r8\\str\\head( $this->server['PATH_INFO'], \"/\" ) );\n\n // Finally, pull the the URL query\n if ( self::hasKey($this->server, 'QUERY_STRING') )\n $url->setQuery($this->server['QUERY_STRING']);\n\n return $url;\n }", "title": "" }, { "docid": "1fbbd59a6c2fbde0daeba0877599691d", "score": "0.5924843", "text": "public function createCallUrl() {\n $url = FREEJE_URL_BASE . $this->method;\n\n foreach ($this->parameters as $parameter) {\n $url .= '/' . $parameter;\n }\n\n return $url;\n }", "title": "" }, { "docid": "6dcf2dfec81cc1f8c482a089d4b3a87c", "score": "0.59217215", "text": "public function add_query_arg() {\n $ret = '';\n $args = func_get_args();\n if ( is_array( $args[0] ) ) {\n if ( count( $args ) < 2 || false === $args[1] )\n $uri = $_SERVER['REQUEST_URI'];\n else\n $uri = $args[1];\n } else {\n if ( count( $args ) < 3 || false === $args[2] )\n $uri = $_SERVER['REQUEST_URI'];\n else\n $uri = $args[2];\n }\n if ( $frag = strstr( $uri, '#' ) )\n $uri = substr( $uri, 0, -strlen( $frag ) );\n else\n $frag = '';\n if ( 0 === stripos( 'http://', $uri ) ) {\n $protocol = 'http://';\n $uri = substr( $uri, 7 );\n } elseif ( 0 === stripos( 'https://', $uri ) ) {\n $protocol = 'https://';\n $uri = substr( $uri, 8 );\n } else {\n $protocol = '';\n }\n if ( strpos( $uri, '?' ) !== false ) {\n $parts = explode( '?', $uri, 2 );\n if ( 1 == count( $parts ) ) {\n $base = '?';\n $query = $parts[0];\n } else {\n $base = $parts[0] . '?';\n $query = $parts[1];\n }\n } elseif ( $protocol || strpos( $uri, '=' ) === false ) {\n $base = $uri . '?';\n $query = '';\n } else {\n $base = '';\n $query = $uri;\n }\n parse_str( $query, $qs );\n if ( is_array( $args[0] ) ) {\n $kayvees = $args[0];\n $qs = array_merge( $qs, $kayvees );\n } else {\n $qs[ $args[0] ] = $args[1];\n }\n foreach ( $qs as $k => $v ) {\n if ( $v === false )\n unset( $qs[$k] );\n }\n $ret = http_build_query( $qs, null, '&' );\n $ret = trim( $ret, '?' );\n $ret = preg_replace( '#=(&|$)#', '$1', $ret );\n $ret = $protocol . $base . $ret . $frag;\n $ret = rtrim( $ret, '?' );\n return $ret;\n }", "title": "" }, { "docid": "51c050f17ce7c41441cb64c340513a42", "score": "0.5913385", "text": "private function buildApiUrl()\n {\n return 'https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key='.$this->apiKey.'&text='.$this->text.'&page='.$this->page.'&per_page='.$this->perPage.'&sort=relevance&format=php_serial'.($this->license ? ('&license='.intval($this->license)) : '');\n }", "title": "" }, { "docid": "d345ff6c0fa8f4e2e9908b58fc61474e", "score": "0.5910367", "text": "function httpBuildQueryUrl(string $url, array $params = []): string\n {\n return Str::httpBuildQueryUrl($url, $params);\n }", "title": "" }, { "docid": "e4fe22134d14058a4f3408f627231d43", "score": "0.59095937", "text": "function generateUrlQuery($params)\n{\n $url = '';\n $keyArray = array_keys($params);\n for($i = 0; $i < count($keyArray);$i++){\n $url = $url . $keyArray[$i] . \"=\" . urlencode($params[$keyArray[$i]]);\n if($i != count($keyArray)-1){\n $url = $url . \"&\";\n }\n }\n\n return $url;\n}", "title": "" }, { "docid": "9f1189f975ac5f29b047813dc4a9a694", "score": "0.5908097", "text": "public function buildUrl() {\n\t\treturn \"http\" . ($this->usessl ? \"s\" : \"\") . \"://\" . $this->hostname . \":\" . $this->port . \"/\";\n\t}", "title": "" }, { "docid": "44b2368526dc8755003b5df30fe98114", "score": "0.590518", "text": "public function url($params = array());", "title": "" }, { "docid": "b4e9022851f75c7277d820482e9a92fb", "score": "0.58967334", "text": "public function getUrlParameters();", "title": "" }, { "docid": "a5fdf23bb41b3c37e9d4a096281c3889", "score": "0.5896549", "text": "static public function toString() {\n\t\t\treturn http_build_query(self::$_parameters);\n\t\t}", "title": "" }, { "docid": "f850e8076d3ac87121f4107ce4213120", "score": "0.58920366", "text": "function buildURLparams($params, $sep='&amp;'){\n $url = '';\n $amp = false;\n foreach($params as $key => $val){\n if($amp) $url .= $sep;\n\n $url .= $key.'=';\n $url .= rawurlencode($val);\n $amp = true;\n }\n return $url;\n}", "title": "" }, { "docid": "7f53fbc62d22a2c26e6ce60928ba75fe", "score": "0.5886467", "text": "function createQueryMash() {\n\t\t// Fetch options for query string\n\t\t$options = array_merge($this->oauth, $this->query);\n\n\t\tasort( $options ); // Secondary sort (value)\n\t\tksort( $options ); // Primary sort (key)\n\n\t\treturn http_build_query( $options, '', '&' );\n\t}", "title": "" }, { "docid": "c3aaa927f45e4d03b28b5778c0643b11", "score": "0.586696", "text": "function __toString()\n {\n $path = $this->getBase();\n\n if (count($this->query)) {\n $path .= \"?\" . http_build_query($this->query);\n }\n\n return $path;\n }", "title": "" }, { "docid": "dcbe327d4d7b2a409067c1009f80a555", "score": "0.58662647", "text": "public function constructUrl()\n {\n $constructedUrl = $this->getProtocol() . '://';\n $constructedUrl .= $this->getBaseUrl();\n $constructedUrl .= $this->getEndpoint() . '/';\n\n foreach($this->getParams() as $k => $v)\n {\n $constructedUrl .= \"&{$k}={$v}\";\n }\n\n $this->setUrl($constructedUrl);\n return $constructedUrl;\n }", "title": "" }, { "docid": "f0fb1f5ab2766bb3bd2abf46768d1cd9", "score": "0.58345646", "text": "private function convertPostFieldsToUrlString() {\n $post = '';\n foreach($this->postFields as $key => $value) {\n $post .= $key . '=' . urlencode($value) . '&';\n }\n\n $this->post = substr($post, 0, -1);\n }", "title": "" }, { "docid": "2327d68bbc5b9cb42b0e2cf38fcba691", "score": "0.58294886", "text": "protected function _generateQueryString($params)\n {\n // than urlencoding all the parts ourselves in a loop\n //\n // because http_build_query treats arrays differently than we want to, correct the query\n // string by changing foo[#]=bar (# being an actual number) parameter strings to just\n // multiple foo=bar strings. This regex should always work since '=' will be urlencoded\n // anywhere else the regex isn't expecting it\n //\n // NOTE: before php 5.1.3 brackets were not url encoded by http_build query - we've checked\n // the php version in the constructor and put the results in the instance variable. Also, before\n // 5.1.2 the arg_separator parameter was not available, so don't use it\n if ($this->_queryBracketsEscaped)\n {\n $queryString = http_build_query($params, null, $this->_queryStringDelimiter);\n return preg_replace('/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', $queryString);\n }\n else\n {\n $queryString = http_build_query($params);\n return preg_replace('/\\\\[(?:[0-9]|[1-9][0-9]+)\\\\]=/', '=', $queryString);\n }\n }", "title": "" }, { "docid": "1a988d11ffce21ebf23e0510bd4bacf0", "score": "0.5818371", "text": "private function buildUrl($queryParams = null)\n {\n $path = '/' . implode('/', $this->path);\n if (isset($queryParams)) {\n // Regex replaces `[0]=`, `[1]=`, etc. with `=`.\n $path .= '?' . preg_replace('/%5B(?:\\d|[1-9]\\d+)%5D=/', '=', http_build_query($queryParams));\n }\n\n return sprintf('%s%s%s', $this->host, $this->version ?: '', $path);\n }", "title": "" }, { "docid": "fe84a176fb6ae4be4537129d76c6fd9f", "score": "0.5807099", "text": "public function getQueryString(): string\n {\n return http_build_query($this->query);\n }", "title": "" }, { "docid": "6049a2ffc4ab3b7fd23500eec45a6492", "score": "0.5802125", "text": "public function buildURI($params_arr, $filter_params = array()) {\t\t\n\n\t\tforeach ($filter_params as $rv) {\n\t\t\tunset($params_arr[ $rv ]);\t\t\n\t\t}\n\n\t\treturn urldecode(http_build_query($params_arr, '', '&'));\n\t}", "title": "" }, { "docid": "ed2a52c5fc8340090ea5ee83813c4eeb", "score": "0.5793419", "text": "function build_url($parts)\n\t{\n\t\t$url = '';\n\t\tif(isset($parts['scheme']))\n\t\t\t$url .= $parts['scheme'];\n\t\t$url .= '://';\n\t\tif(isset($parts['host']))\n\t\t\t$url .= $parts['host'];\n\t\tif(isset($parts['port']))\n\t\t\t$url .= $parts['port'];\n\t\tif(isset($parts['path']))\n\t\t\t$url .= $parts['path'];\n\t\tif(isset($parts['query']))\n\t\t{\n\t\t\t$url .= '?';\n\t\t\t$url .= $parts['query'];\n\t\t}\n\t\tif(isset($parts['fragment']))\n\t\t\t$url .= $parts['fragment'];\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "28b05434016c1f144a7371c44bc5d3a1", "score": "0.57883966", "text": "function buildURL($base, $params = array()) {\n\t\t$params['APPID'] = self::APP_ID;\n\t\t$queryParams = http_build_query($params);\n\n\t\t// Decode url-encoded comma (%2C) into natural comma.\n\t\t// Since OWM API requires city ids delimited by hardcoded comma.\n\t\t// This is a way of hack, but it is due to the informal format\n\t\t// of the API (using commas).\n\t\t$queryParams = str_replace('%2C', ',', $queryParams);\n\n\t\treturn $base .= '?' . $queryParams;\n\t}", "title": "" }, { "docid": "80c64bd87e973cb51a7ceaf242122ee5", "score": "0.5787008", "text": "public function buildURL($bits,$qs='',$admin=0)\n\t{\n\t\t$admin=($admin==1)?$this->registry->getSetting('admin_folder').'/':'';\n\t\t$the_rest='';\n\t\tforeach($bits as $bit)\n\t\t{\n\t\t\t$the_rest.=$bit.'/';\n\t\t}\n\t\t$the_rest.=($qs!='')?'?&'.$qs:'';\n\t\treturn $this->registry->getSetting('siteurl').$admin.$the_rest;\n\t}", "title": "" }, { "docid": "885e6e91c6d3558fe0155f511fb7c902", "score": "0.578587", "text": "public function build_url( $method, $path, $params = array() ) {\n\t\t$url = 'GET' ? $this->cache_base_url : $this->base_url;\n\t\t$url .= $path;\n\t\t$url = add_query_arg( $params, $url );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "063ba81ee0c2504d666a6b8a77d4a57a", "score": "0.5779544", "text": "static function url($name,$options,$value){}", "title": "" }, { "docid": "8618d1206fbd2a400f989356fb3a5d65", "score": "0.5772528", "text": "public function testQuerystringUrlGeneration() {\n\t\t$this->Paginator->request->params['paging']['Article']['paramType'] = 'querystring';\n\t\t$result = $this->Paginator->url(array('page' => '1'));\n\t\t$expected = '/';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->Paginator->url(array('page' => '1', 'limit' => 10, 'something' => 'else'));\n\t\t$expected = '/index/something:else?limit=10';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->Paginator->url(array('page' => '4'));\n\t\t$expected = '/?page=4';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = $this->Paginator->url(array('page' => '4', 'limit' => 10, 'something' => 'else'));\n\t\t$expected = '/index/something:else?page=4&amp;limit=10';\n\t\t$this->assertEquals($expected, $result);\n\t}", "title": "" }, { "docid": "ed89ee83008e4a4a5a78d90a2acb9ece", "score": "0.5770795", "text": "private function _getUrl()\n\t{\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : null;\n\t\t$url = rtrim($url,'/');\n\t\t$url = filter_var($url,FILTER_SANITIZE_URL);\n\t\t//explode the url to get sub sections\n\t\t$this->_url = explode('/', $url);\n\t}", "title": "" }, { "docid": "e911b0c440bdd37c55d833d5c9b8c170", "score": "0.57605976", "text": "public function getUrlArgs() {\n\t\tif ( !empty( $this->urlArgs ) ) {\n\t\t\treturn http_build_query( $this->urlArgs );\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "19bea9b874e0eccb9298807ff27e55ad", "score": "0.57605416", "text": "protected function prepareUrl($params){\n $query = [\n 'from'=>'RUB',\n 'to'=>'PLN',\n 'quantity'=>$this->_helper->formatToFloatNumber($params),\n 'api_key'=>self::API_KEY\n ];\n\n return http_build_query($query);\n }", "title": "" }, { "docid": "2a5b54ad185ba4c2e6eac1c62c8aca41", "score": "0.5759869", "text": "private function build_url($method, $query = \"\", $parameter = \"\")\n\t{\n\n\t\t// Set timestamp parameter to current time\n\t\t$this->params['timestamp'] = $_SERVER['REQUEST_TIME'];\n\n\t\t// Build the URL and append query if we have one\n\t\t$unsignedUrl = $this->baseurl . $method . '?' . http_build_query($this->params);\n\t\tif (!empty($parameter) AND !empty($query)) $unsignedUrl .= '&' . $parameter . '=' . urlencode($query);\n\n\t\t// Generate a signature and append to unsignedUrl to sign it.\n\t\t$sig = hash_hmac('sha1', $unsignedUrl, $this->params['apiKey']);\n\t\t$signedUrl = $unsignedUrl . '&sig=app1-' . $sig;\n\n\n\t\treturn $signedUrl;\n\t}", "title": "" }, { "docid": "12406b1ba03aee67a6ea2b016bd4aca4", "score": "0.57539934", "text": "private function buildUrl( $endpoint , $url_parameters = array() , $special_url = null )\n\t{\n\t\tforeach ( $url_parameters as $key => $value )\n\t\t{\n\t\t\t//@codeCoverageIgnoreStart\n\t\t\t$endpoint = str_replace( '{' . $key . '}' , $value , $endpoint );\n\t\t\t//@codeCoverageIgnoreEnd\n\t\t}\n\n\t\tif ( is_null( $special_url ) )\n\t\t{\n\t\t\t$url = trim( $this->api_base_url , \"/ \\t\\n\\r\\0\\x0B\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url = $special_url;\n\t\t}\n\t\t$url = $url . '/' . trim( $endpoint , \"/ \\t\\n\\r\\0\\x0B\" );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "f944260c12488aee827dcc53174226ec", "score": "0.5753808", "text": "function build_query( $base_url, $params ){\n $url = $base_url . '?';\n\n foreach( $params as $p => $v ){\n $url .= $p . '=';\n if( is_array( $v ) ){\n $v = implode( '|', $v );\n }\n $url .= $v . '&';\n }\n $url = rtrim( $url, '&' );\n\n return $url;\n}", "title": "" }, { "docid": "5af803961f2371205a9bd0b6e740eb69", "score": "0.5752227", "text": "public function as_query_string ()\n {\n $params = $this->as_array ();\n $Result = '';\n \n foreach ($params as $name => $value)\n {\n if (! empty ($Result))\n {\n $Result .= '&';\n }\n $Result .= $name . '=' . $value;\n }\n\n return $Result;\n }", "title": "" }, { "docid": "da01996b6f51aea617076fe06d28e2c4", "score": "0.5748285", "text": "protected function buildUrl($method, &$params = [], $addToQuery = true) : string\n {\n foreach($params as $key => $value) {\n $safeValue = is_array($value) ? implode(',', $value) : $value;\n\n $count = 0;\n $method = str_replace(sprintf('{%s}', $key), $safeValue, $method, $count);\n \n if($count) {\n unset($params[$key]);\n }\n }\n\n $scheme = 'https';\n if($addToQuery) {\n $queryStr = count($params) > 0 ? '?' . http_build_query($params) : '';\n } else {\n $queryStr = '';\n }\n\n\n return sprintf(\"%s://%s%s%s\", $scheme, $this->url, $method, $queryStr);\n }", "title": "" }, { "docid": "5f5c7d6d63df4a21330f727f336529a2", "score": "0.57482535", "text": "function buildURLArray ($filterarray) {\n global $urlfilter;\n global $i;\n // Iterate through each filter in the array\n foreach($filterarray as $itemfilter) {\n // Iterate through each key in the filter\n foreach ($itemfilter as $key =>$value) {\n if(is_array($value)) {\n foreach($value as $j => $content) { // Index the key for each value\n $urlfilter .= \"&itemFilter($i).$key($j)=$content\";\n }\n }\n else {\n if($value != \"\") {\n $urlfilter .= \"&itemFilter($i).$key=$value\";\n }\n }\n }\n $i++;\n }\n return \"$urlfilter\";\n}", "title": "" }, { "docid": "735e145d08b9b6b8172c9b5013268dca", "score": "0.57347715", "text": "protected function compileQueryString()\n\t{\n\t\t$parameters = array();\n\n\t\tif ($this->recipients['cc'])\n\t\t{\n\t\t\t$parameters['cc'] = implode(',', $this->recipients['cc']);\n\t\t}\n\n\t\tif ($this->recipients['bcc'])\n\t\t{\n\t\t\t$parameters['bcc'] = implode(',', $this->recipients['bcc']);\n\t\t}\n\n\t\tif ($this->subject)\n\t\t{\n\t\t\t$parameters['subject'] = $this->subject;\n\t\t}\n\n\t\tif ($this->body)\n\t\t{\n\t\t\t$parameters['body'] = $this->body;\n\t\t}\n\n\t\treturn $this->httpBuildQuery($parameters);\n\t}", "title": "" }, { "docid": "43677f8c9ffe0861b4430e742412d1ab", "score": "0.573118", "text": "function buildURLArray ($filterarray) {\n\t global $urlfilter;\n\t global $i;\n\t // Iterate through each filter in the array\n\t foreach($filterarray as $itemfilter) {\n\t\t// Iterate through each key in the filter\n\t\tforeach ($itemfilter as $key =>$value) {\n\t\t if(is_array($value)) {\n\t\t\tforeach($value as $j => $content) { // Index the key for each value\n\t\t\t $urlfilter .= \"&itemFilter($i).$key($j)=$content\";\n\t\t\t}\n\t\t }\n\t\t else {\n\t\t\tif($value != \"\") {\n\t\t\t $urlfilter .= \"&itemFilter($i).$key=$value\";\n\t\t\t}\n\t\t }\n\t\t}\n\t\t$i++;\n\t }\n\t \n\t return \"$urlfilter\";\n\t}", "title": "" }, { "docid": "43677f8c9ffe0861b4430e742412d1ab", "score": "0.573118", "text": "function buildURLArray ($filterarray) {\n\t global $urlfilter;\n\t global $i;\n\t // Iterate through each filter in the array\n\t foreach($filterarray as $itemfilter) {\n\t\t// Iterate through each key in the filter\n\t\tforeach ($itemfilter as $key =>$value) {\n\t\t if(is_array($value)) {\n\t\t\tforeach($value as $j => $content) { // Index the key for each value\n\t\t\t $urlfilter .= \"&itemFilter($i).$key($j)=$content\";\n\t\t\t}\n\t\t }\n\t\t else {\n\t\t\tif($value != \"\") {\n\t\t\t $urlfilter .= \"&itemFilter($i).$key=$value\";\n\t\t\t}\n\t\t }\n\t\t}\n\t\t$i++;\n\t }\n\t \n\t return \"$urlfilter\";\n\t}", "title": "" }, { "docid": "6e678c8d6636d41839156dd45310959f", "score": "0.5714995", "text": "function CreateUrlVariation($url, $query)\n{\n $newUrl = null;\n $url = trim($url);\n $query = trim($query);\n if( strlen($url) && strlen($query) )\n {\n $newUrl = $url;\n if( strpos($url, '?') === false )\n $newUrl .= '?';\n else\n $newUrl .= '&';\n $newUrl .= $query;\n }\n return $newUrl;\n}", "title": "" }, { "docid": "43f9a8962d7c5375e6178a11b2d08cc7", "score": "0.5714067", "text": "function Wpgcu_build_url()\n{\n $path = get_site_url();\n foreach (func_get_args() as $path_part) {\n $path .= '/' . ltrim($path_part, \"/\");\n }\n\n $path = rtrim($path, \"/\") . \"/\";\n \n return $path;\n}", "title": "" }, { "docid": "61ac86757e0ae70b8aa6e45bae3c66c8", "score": "0.5710836", "text": "private function prepareQueryString()\n {\n $this->addQueryParameter('x_delim_data', 'TRUE');\n $this->addQueryParameter('x_login', $this->getAuthorizeUsername());\n $this->addQueryParameter('x_password', $this->getAuthorizePassword());\n $this->addQueryParameter('x_version', $this->getAuthorizeVersion());\n $this->addQueryParameter('x_type', $this->getAuthorizeType());\n $this->addQueryParameter('x_method', $this->getAuthorizeMethod());\n if ($this->getAuthorizeTestMode()) $this->addQueryParameter('x_test_request', 'TRUE');\n \n // Build Query String\n if ($data = $this->getData())\n {\n foreach ($data as $group)\n {\n foreach ($group as $param => $value)\n {\n $this->addQueryParameter($param, $value);\n }\n }\n }\n \n return $this->cleanQueryString(substr($this->getQueryString(), 0, -1));\n }", "title": "" }, { "docid": "55a32a18cd0b74f3061e88221dbb38f1", "score": "0.5709393", "text": "private function _build_uri($page) {\n if ($this->_properties['method'] == 'url') {\n // see if the current page is already set in the URL\n if (preg_match('/\\b' . $this->_properties['variable_name'] . '([0-9]+)\\b/i', $this->_properties['base_url']) > 0) {\n // build string\n $url = str_replace('//', '/', preg_replace(\n // replace the currently existing value\n '/\\b' . $this->_properties['variable_name'] . '([0-9]+)\\b/i',\n // if on the first page, remove it in order to avoid duplicate content\n ($page == 1 ? '' : $this->_properties['variable_name'] . $page),\n $this->_properties['base_url']\n ));\n // if the current page is not yet in the URL, set it, unless we're on the first page\n // case in which we don't set it in order to avoid duplicate content\n } else $url = rtrim($this->_properties['base_url'], '/') . '/' . ($this->_properties['variable_name'] . $page);\n // handle trailing slash according to preferences\n $url = rtrim($url, '/') . ($this->_properties['trailing_slash'] ? '/' : '');\n // if values in the query string - other than those set through base_url() - are not to be preserved\n // preserve only those set initially\n if (!$this->_properties['preserve_query_string']) $query = implode('&', $this->_properties['base_url_query']);\n // otherwise, get the current query string\n else $query = $_SERVER['QUERY_STRING'];\n // return the built string also appending the query string, if any\n return $url . ($query != '' ? '?' . $query : '');\n // if page propagation is to be done through GET\n } else {\n // if values in the query string - other than those set through base_url() - are not to be preserved\n // preserve only those set initially\n if (!$this->_properties['preserve_query_string']) $query = $this->_properties['base_url_query'];\n // otherwise, get the current query string, if any, and transform it to an array\n else parse_str($_SERVER['QUERY_STRING'], $query);\n // if we are avoiding duplicate content and if not the first/last page (depending on whether the pagination links are shown in natural or reversed order)\n if (!$this->_properties['avoid_duplicate_content'] || ($page != ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1)))\n // add/update the page number\n $query[$this->_properties['variable_name']] = $page;\n // if we are avoiding duplicate content, don't use the \"page\" variable on the first/last page\n elseif ($this->_properties['avoid_duplicate_content'] && $page == ($this->_properties['reverse'] ? $this->_properties['total_pages'] : 1))\n unset($query[$this->_properties['variable_name']]);\n // make sure the returned HTML is W3C compliant\n return htmlspecialchars(html_entity_decode($this->_properties['base_url']) . (!empty($query) ? '?' . urldecode(http_build_query($query)) : ''));\n }\n }", "title": "" }, { "docid": "02c366245d83e8f1e25b950eaaa51fca", "score": "0.569971", "text": "protected function getUrlFormatForPager() {\n\t\t$urlParameters = array(\n\t\t\t'id' => $this->id\n\t\t);\n\t\tif (($searchField = t3lib_div::_GP('search_field'))) {\n\t\t\t$urlParameters['search_field'] = $searchField;\n\t\t}\n\t\tif (($cat = t3lib_div::_GP('cat'))) {\n\t\t\t$urlParameters['cat'] = $cat;\n\t\t}\n\t\tif (($sort = t3lib_div::_GP('sort'))) {\n\t\t\t$urlParameters['sort'] = $sort;\n\t\t}\n\t\tif (($sortDir = t3lib_div::_GP('sortDir'))) {\n\t\t\t$urlParameters['sortDir'] = $sortDir;\n\t\t}\n\t\t$parameters = substr(t3lib_div::implodeArrayForUrl('', $urlParameters), 1);\n\t\t$parameters = str_replace('%', '%%', $parameters);\n\t\treturn 'index.php?' . $parameters . '&curPage=%1$d&search=%1$d';\n\t}", "title": "" }, { "docid": "a5b473b33d361dde90f2ac3139dd2428", "score": "0.5699233", "text": "private function prepareParams() { \n\n $paramString = ''; \n\n // optional parameters\n $paramString .= ($this->getApiKey())?\n '&apiKey=' . urlencode($this->getApiKey()) : '';\n $paramString .= ($this->getId())?\n '&id=' . urlencode($this->getId()) : '';\n $paramString .= ($this->getTags())?\n '&tags=' . urlencode($this->getTags()) : '';\n $paramString .= ($this->getGeoFrame())?\n '&geoFrame=' . urlencode($this->getGeoFrame()) : '';\n $paramString .= ($this->getSortBy())?\n '&sortBy=' . urlencode($this->getSortBy()) : '';\n $paramString .= ($this->getSearchTerm())?\n '&searchTerm=' . urlencode($this->getSearchTerm()) : '';\n $paramString .= ($this->getOffset())?\n '&offset=' . urlencode($this->getOffset()) : '';\n $paramString .= ($this->getLimit())?\n '&limit=' . urlencode($this->getLimit()) : '';\n $paramString .= ($this->getFormat())?\n '&format=' . urlencode($this->getFormat()) : ''; \n\n // strip off the first '&' \n if (strlen($paramString) > 0) {\n $paramString = substr($paramString, 1);\n }\n return $paramString; \n\n }", "title": "" }, { "docid": "2e04a4f7b184e8ea9f0207f76179c814", "score": "0.5698016", "text": "public final function getUrl() {\n\t\t\t$queryString = $this->getParameters()->getQueryString();\n\t\t\tif ($queryString == '') {\n\t\t\t\treturn $this->url;\n\t\t\t}\n\t\t\treturn $this->url . '?' . $queryString;\n\t\t}", "title": "" }, { "docid": "55c7a12a3f7ce0febb8e0875a06165dc", "score": "0.56879985", "text": "public function asUrlParam()\n {\n return http_build_query([\n 'calories' => $this->calories,\n 'intensity' => is_null($this->intensity) ? null : (string) $this->intensity,\n 'personalized' => $this->personalized ? 'true' : 'false',\n ]);\n }", "title": "" }, { "docid": "8f15954a1c61fdbe95d7af00ba5ffc6c", "score": "0.5685414", "text": "function get_url_parameters();", "title": "" }, { "docid": "b5372e16808306d54d4320e22cc0b5e8", "score": "0.567941", "text": "function get_query_values_from_url() {\n helper(['url', 'security']);\n $uri = current_uri(true);\n // Don't trigger an exception if the segment index is too large\n $uri->setSilent();\n\n $p = new General_query_def();\n $p->output_format = $uri->getSegment(3);\n $p->q_name = $uri->getSegment(4);\n $p->config_source = $uri->getSegment(5);\n $p->filter_values = decodeSegments(array_slice($uri->getSegments(), 5));\n\n // Look for custom paging values specified after the question mark\n //\n // For example, with https://dms2.pnl.gov/data/ax/table/list_report/dataset/-/-/-/VOrbi05/QC_Shew_13?Offset=25&Rows=50&SortCol=ID&SortDir=ASC\n // we are filtering on:\n // Instrument: VOrbi05\n // Experiment: QC_Shew_13\n // And paging with:\n // Offset: 25\n // RowsToDisplay: 50\n // Sort column: ID\n // Sort directtion: Ascending\n\n $request = \\Config\\Services::request();\n $offset = xss_clean($request->getGet('Offset'));\n $rows = xss_clean($request->getGet('Rows'));\n $sortCol = xss_clean($request->getGet('SortCol'));\n $sortDir = xss_clean($request->getGet('SortDir'));\n\n // Validate that the offset is an integer\n if (filter_var($offset, FILTER_VALIDATE_INT) !== false) {\n $p->offset = (int) $offset;\n } else {\n $p->offset = 1;\n }\n\n // Validate that rows is an integer\n if (filter_var($rows, FILTER_VALIDATE_INT) !== false) {\n $p->rows = (int) $rows;\n } else {\n $p->rows = 100;\n }\n\n // Possibly override the sort column\n if ($sortCol) {\n $p->sort_col = $sortCol;\n }\n\n if ($sortDir) {\n // Check whether $sortDir starts with Asc or Desc\n\n if (strncmp(strtolower($sortDir), \"asc\", 3) === 0) {\n $p->sort_direction = 'ASC';\n }\n\n if (strncmp(strtolower($sortDir), \"desc\", 4) === 0) {\n $p->sort_direction = 'DESC';\n }\n }\n\n return $p;\n }", "title": "" }, { "docid": "a72ace6f9cce2fe9a6c369d13b7d57d1", "score": "0.5669821", "text": "private function _getQueryString()\n\t{\n\t\t$this->set('comment_content', $this->getValue());\n\n\t\tforeach ($_SERVER as $key => $value)\n\t\t{\n\t\t\tif (!in_array($key, $this->_ignore['server']))\n\t\t\t{\n\t\t\t\tif ($key == 'REMOTE_ADDR')\n\t\t\t\t{\n\t\t\t\t\t$this->set($key, $this->get('user_ip'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->set($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$query_string = '';\n\n\t\tforeach ($this->getProperties() as $key => $data)\n\t\t{\n\t\t\tif (!is_array($data) && !in_array($key, $this->_ignore['querystring']))\n\t\t\t{\n\t\t\t\t$query_string .= $key . '=' . urlencode(stripslashes($data)) . '&';\n\t\t\t}\n\t\t}\n\n\t\treturn $query_string;\n\t}", "title": "" }, { "docid": "4b513960d6f8641e0a9658078da00159", "score": "0.5669407", "text": "public function testBuildQueryString()\n {\n $expected = \"param1=value1&param2=value2&param2=value3&param2=value4\";\n $sourceData = [\n \"param1\" => \"value1\",\n \"param2\" => [\n \"value2\",\n \"value3\",\n \"value4\"\n ]\n ];\n\n $helix = new Helix(self::$tokenProvider);\n $result = $helix->buildQueryString($sourceData);\n\n $this->assertEquals($expected, $result);\n }", "title": "" }, { "docid": "0a53f3c325ebd740c7b36ee3fca889e5", "score": "0.5664064", "text": "protected function _build_url($query_key, $start_time = false, $end_time = false) {\n\n $this->_search_key = $query_key;\n\n if ($end_time) {\n $this->end_timestamp = $end_time - $this->opentsdb_query_trim;\n } else {\n $this->end_timestamp = time() - $this->opentsdb_query_trim;\n }\n $this->_query_end = date(self::OPENTSDB_DATE_FORMAT, $this->end_timestamp);\n\n if ($start_time) {\n $this->start_timestamp = $start_time;\n } else {\n $this->start_timestamp = $this->end_timestamp - (HOUR * 4);\n }\n $this->_query_start = date(self::OPENTSDB_DATE_FORMAT, $this->start_timestamp);\n\n $this->opentsdb_query_url = sprintf($this->_opentsdb_base_url, $this->_query_start, $this->_query_end, $this->_search_key, 'ascii');\n\n return $this->opentsdb_query_url;\n\n }", "title": "" }, { "docid": "2e6ab0ae40edd9adf5c294fc35f7fc3f", "score": "0.56621236", "text": "public function getQueryString();", "title": "" }, { "docid": "2e6ab0ae40edd9adf5c294fc35f7fc3f", "score": "0.56621236", "text": "public function getQueryString();", "title": "" }, { "docid": "aecce1a9cf36de3375fa7acc165883bf", "score": "0.56582767", "text": "private function processQueryString(): void\n {\n $queryString = filter_var(trim(Model::getRequest()->getPathInfo(), '/'), FILTER_SANITIZE_URL);\n\n $hasMultiLanguages = $this->getContainer()->getParameter('site.multilanguage');\n $language = $this->determineLanguage($queryString);\n\n // define the language\n defined('FRONTEND_LANGUAGE') || define('FRONTEND_LANGUAGE', $language);\n defined('LANGUAGE') || define('LANGUAGE', $language);\n\n // sets the locale file\n Language::setLocale($language);\n\n // remove language from query string\n if ($hasMultiLanguages) {\n $queryString = trim(mb_substr($queryString, mb_strlen($language)), '/');\n }\n\n $url = $this->determineUrl($queryString, $language);\n\n // currently not in the homepage\n if ($url !== '') {\n $this->setPages(explode('/', $url));\n }\n\n $parameters = $this->extractParametersFromQueryString($queryString, $url);\n\n // pageId, parentId & depth\n $pageId = Navigation::getPageId(implode('/', $this->getPages()));\n $pageInfo = Navigation::getPageInfo($pageId);\n\n // invalid page, or parameters but no extra\n if ($pageInfo === false || (!empty($parameters) && !$pageInfo['has_extra'])) {\n // get 404 URL\n $url = Navigation::getUrl(Model::ERROR_PAGE_ID);\n\n // remove language\n if ($hasMultiLanguages) {\n $url = str_replace('/' . $language, '', $url);\n }\n\n // remove the first slash\n $url = trim($url, '/');\n\n // currently not in the homepage\n if ($url !== '') {\n $this->setPages(explode('/', $url));\n }\n }\n\n if ($pageInfo !== false) {\n $this->handleRedirects($pageInfo);\n }\n }", "title": "" }, { "docid": "2f6721baff0784f149b35dc29f287c1f", "score": "0.564974", "text": "private function http_build_query($params = array()) {\n\n return self::METHOD_URL . '?' . http_build_query($params);\n }", "title": "" }, { "docid": "9314cb1d9b56309df38a2bf1886f5cad", "score": "0.56473327", "text": "function classifieds_append_query_string( $permalink, $include = array(), $exclude = array( 'coupon' ) ) {\r\n\tglobal $classifieds_slugs;\r\n\tglobal $wp;\r\n\tif ( ! $permalink ) {\r\n\t\t$permalink = get_permalink();\r\n\t}\r\n\r\n\t// Map endpoint to options\r\n\tif ( get_option( 'permalink_structure' ) ) {\r\n\t\tif ( strstr( $permalink, '?' ) ) {\r\n\t\t\t$query_string = '?' . parse_url( $permalink, PHP_URL_QUERY );\r\n\t\t\t$permalink = current( explode( '?', $permalink ) );\r\n\t\t} else {\r\n\t\t\t$query_string = '';\r\n\t\t}\r\n\r\n\t\t$permalink = trailingslashit( $permalink );\r\n\t\tif ( ! empty( $include ) ) {\r\n\t\t\tforeach ( $include as $arg => $value ) {\r\n\t\t\t\t$permalink .= $classifieds_slugs[ $arg ] . '/' . $value . '/';\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ( $classifieds_slugs as $slug => $trans_slug ) {\r\n\t\t\tif ( isset( $wp->query_vars[ $trans_slug ] ) && ! isset( $include[ $slug ] ) && ! in_array( $slug, $exclude ) && ! in_array( 'all', $exclude ) ) {\r\n\t\t\t\t$permalink .= $trans_slug . '/' . $wp->query_vars[ $trans_slug ] . '/';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$permalink .= $query_string;\r\n\t} else {\r\n\t\tif ( ! empty( $include ) ) {\r\n\t\t\tforeach ( $include as $arg => $value ) {\r\n\t\t\t\t$permalink = esc_url( add_query_arg( array( $classifieds_slugs[ $arg ] => $value ), $permalink ) );\r\n\t\t\t}\r\n\t\t}\r\n\t\tforeach ( $classifieds_slugs as $slug => $trans_slug ) {\r\n\t\t\tif ( isset( $wp->query_vars[ $trans_slug ] ) && ! isset( $include[ $slug ] ) && ! in_array( $slug, $exclude ) && ! in_array( 'all', $exclude ) ) {\r\n\t\t\t\t$permalink = esc_url( add_query_arg( array( $trans_slug => $wp->query_vars[ $trans_slug ] ), $permalink ) );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\treturn $permalink;\r\n}", "title": "" }, { "docid": "42c7289e001dffb3fb4a4d3d207e3ec4", "score": "0.5640339", "text": "public function __toString() {\n\t\t$url = array(\n\t\t\t'scheme' => $this->scheme,\n\t\t\t'schemepart' => '://',\n\t\t\t'host' => $this->getHost()\n\t\t);\n\n\t\tif ($this->port) {\n\t\t\t$url['port']\t= ':' . $this->getPort();\n\t\t}\n\n\t\t$url['path']\t= $this->getPath();\n\n\t\tif ($this->hasQuery()) {\n\t\t\t$url['query']\t= '?' . $this->getQueryStr();\n\t\t}\n\n\t\tif ($this->hasFragment()) {\n\t\t\t$url['fragment']\t= '#' . $this->getFragment();\n\t\t}\n\n\t\treturn implode('', $url);\n\t}", "title": "" }, { "docid": "31a1428f3b24b97cbefb9dca094645ad", "score": "0.5635719", "text": "private function buildParams($params){\n \n $output = $params[\"api_output\"];\n \n if($output != 'xml' || 'serialize' || 'json'){\n $output = 'serialize';\n }\n \n foreach($params as $key => $value){\n $this->url_params[$key] = urlencode($value);\n }\n \n $this->queryString = '';\n \n foreach($this->url_params as $key => $value){\n $this->queryString .= $key . '=' . $value . '&';\n }\n \n $this->queryString = rtrim($this->queryString, '& ');\n \n $this->requestURL = self::$apiURL . \"?\" . $this->queryString;\n }", "title": "" }, { "docid": "2e010a90ea35bfaca31c28136a0ccf7e", "score": "0.56320757", "text": "public function getQueryString() {\n\t\t//These three are required no matter what\n\t\t$cs = urlencode($this->CampaignSource);\n\t\t$cm = urlencode($this->CampaignMedium);\n\t\t$cn = urlencode($this->CampaignName);\n\t\t$ret = \"utm_source=$cs&utm_medium=$cm&utm_campaign=$cn\";\n\t\t\n\t\t//The next two are optional so let's only set them if there's a value there.\n\t\tif($this->CampaignTerm){\n\t\t\t$ct = urlencode($this->CampaignTerm);\n\t\t\t$ret .= \"&utm_term=$ct\";\n\t\t}\n\t\tif($this->CampaignContent){\n\t\t\t$cc = urlencode($this->CampaignContent);\n\t\t\t$ret .= \"&utm_content=$cc\";\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "a7b0e367cc116a2b67bff71656520f64", "score": "0.5624219", "text": "abstract protected function url();", "title": "" }, { "docid": "249e33cf0a510922c15049b463c7cec5", "score": "0.5617775", "text": "function parseUrl () {\n if ( isset($_GET['url']) ) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n \n $this->controller = ( isset($url[0]) ) ? $url[0] : 'main';\n $this->action = ( isset($url[1]) ) ? $url[1] : 'index';\n \n if ( count($url) > 2 ) {\n $this->parameters = array();\n for ( $i = 2; $i < count($url); $i++ ) {\n array_push($this->parameters, $url[$i]);\n }\n }\n \n /* debug *\n echo 'Controller: ' . $this->controller . '<br />';\n echo 'Action: ' . $this->action . '<br />';\n if ( is_array($this->parameters) ) {\n foreach ( $this->parameters as $parameter ) {\n echo 'Parameter: ' . $parameter . '<br />';\n }\n }\n /* */\n }\n }", "title": "" }, { "docid": "4d71ccbe3676805671bc85349f8b558d", "score": "0.5605872", "text": "protected function parseUrl() {\n\t\t\t$arrSegments = explode('/', ($this->strRoutedUrl ? $this->strRoutedUrl : $this->strUrl));\n\t\t\t$arrFilters = array();\n\t\t\t\n\t\t\tforeach ($arrSegments as $intKey=>$strSegment) {\n\t\t\t\tif ($intPos = strpos($strSegment, $this->strFilterDelimiter)) {\n\t\t\t\t\t$strFilter = substr($strSegment, 0, $intPos);\n\t\t\t\t\t$strValue = substr($strSegment, $intPos + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (array_key_exists($strFilter, $arrFilters)) {\n\t\t\t\t\t\tif (!is_array($arrFilters[$strFilter])) {\n\t\t\t\t\t\t\t$arrFilters[$strFilter] = array($arrFilters[$strFilter]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$arrFilters[$strFilter][] = $strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arrFilters[$strFilter] = $strValue;\n\t\t\t\t\t}\n\t\t\t\t\t$strSegment = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$strSegment) {\n\t\t\t\t\tunset($arrSegments[$intKey]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$this->arrSegments = array_values($arrSegments);\n\t\t\t$this->arrFilters = $arrFilters;\n\t\t\t\n\t\t\tif (strpos($this->strUrl, '.')) {\n\t\t\t\t$arrExtSegments = explode('.', $this->strUrl);\n\t\t\t\t$this->strExtension = end($arrExtSegments);\n\t\t\t} else {\n\t\t\t\t$this->strExtension = null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "15a494891f1f080f2664e8826768cd65", "score": "0.5604416", "text": "function appendQueryString($params)\n{\n $query = Request::all();\n foreach ($params as $key => $value) {\n $query[$key] = $value;\n }\n return Request::url() . '?' . http_build_query($query);\n}", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "23a2ab1b330edc2327f9486d76fe537f", "score": "0.0", "text": "public function boot()\n {\n //\n Schema::defaultStringLength(191);\n // view()->composer('layout.user.groups', function($view){\n // $view->with('groups', \\App\\Group::archives());\n // });\n // view()->composer('layout.user.payments', function($view){\n // $view->with('groups', \\App\\Payment::archives());\n // });\n }", "title": "" } ]
[ { "docid": "dd827255a6e69b004782c9f976252ee1", "score": "0.7510709", "text": "public function boot()\n {\n //\n $this->applicationService();\n $this->processService();\n $this->roleService();\n }", "title": "" }, { "docid": "7b69f34798c3586d32aa17c5cda0b563", "score": "0.71703327", "text": "public function boot()\n {\n $this->bootConsole();\n $this->bootMiddleware();\n }", "title": "" }, { "docid": "0222e45ff37ec56f4282cd11a63bdc08", "score": "0.7161944", "text": "public function boot()\n {\n // Service providers\n $this->app->singleton(BaseServiceInterface::class, BaseService::class);\n $this->app->singleton(ServerServiceInterface::class, ServerService::class);\n $this->app->singleton(VideoGeneratorServiceInterface::class, VideoGeneratorService::class);\n }", "title": "" }, { "docid": "e8922e0dc4074586dd038b76030c900c", "score": "0.71614426", "text": "public function boot()\n {\n $this->app->bind(CustomerService::class, CustomerServiceImpl::class);\n $this->app->bind(ProductService::class, ProductServiceImpl::class);\n $this->app->bind(SalesOrderService::class, SalesOrderServiceImpl::class);\n $this->app->bind(SalesOrderDetailService::class, SalesOrderDetailServiceImpl::class);\n }", "title": "" }, { "docid": "c1f3309ef9152cdc6ef46c0416a04497", "score": "0.7143074", "text": "public function boot()\n {\n $providers = $this->make('config')->get('app.providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }", "title": "" }, { "docid": "3f2288ed4b558e1eb43a705462ec4186", "score": "0.7142287", "text": "public function boot()\n {\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "f289725381b7215ee55af9bbfc88d96e", "score": "0.7120041", "text": "public function boot()\n {\n $this->registerClient();\n $this->registerService();\n }", "title": "" }, { "docid": "d63f3046d614a88005f19db7d6faad0d", "score": "0.7089451", "text": "protected function bootstrapApp()\n {\n $folder = $this->paths->getUserlandPath();\n if (!$this->files->has($folder)) {\n return;\n }\n\n $namespace = ucfirst($this->config->get('application_name'));\n\n // Load main namespace\n $classloader = new Psr4ClassLoader();\n $classloader->addPrefix($namespace.'\\\\', $folder);\n $classloader->register();\n\n // Load service provider\n $serviceProvider = $namespace.'\\\\'.$namespace.'ServiceProvider';\n if (class_exists($serviceProvider)) {\n $this->container->addServiceProvider($serviceProvider);\n }\n }", "title": "" }, { "docid": "70be1a8bf8ef6553f9ec50181db83ed2", "score": "0.7086447", "text": "public function boot()\n {\n $this->app->bind(ProductServiceInterface::class, ProductService::class);\n $this->app->bind(CategoryServiceInterface::class, CategoryService::class);\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "288f7b0e4163bf27dfab226e680153e9", "score": "0.70743567", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n app()->bind(ICurrencyService::class, function () {\n $repository = app(ICurrencyRepository::class);\n return new CurrencyService($repository);\n });\n app()->bind(IWalletService::class, function () {\n $walletRepository = app(IWalletRepository::class);\n $moneyRepository = app(IMoneyRepository::class);\n return new WalletService($walletRepository, $moneyRepository);\n });\n app()->bind(IMarketService::class, function () {\n return new MarketService(\n app(ILotRepository::class),\n app(IUserRepository::class),\n app(ICurrencyRepository::class),\n app(ITradeRepository::class),\n app(IMoneyRepository::class),\n app(IWalletService::class)\n );\n });\n }", "title": "" }, { "docid": "56074654293118aebbf85b9164b724ce", "score": "0.7057721", "text": "public function boot()\r\n {\r\n // $this->package('eggdigital/service');\r\n }", "title": "" }, { "docid": "bd16e8c86d9a07f8df3a045334f2531b", "score": "0.705366", "text": "public function boot()\n {\n $this->bootPublishes();\n $this->bootMiddlewares();\n $this->bootEventSubscriber();\n $this->bootLocale();\n }", "title": "" }, { "docid": "58e193638b3eb0c7854bc6798a372865", "score": "0.7042046", "text": "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', ':lc:vendor');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', ':lc:vendor');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "56e14a436b3098780c4a9e4f5bcd839b", "score": "0.7035113", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n\n if (! $this->commandsLoaded) {\n $this->commands();\n\n $this->commandsLoaded = true;\n }\n }", "title": "" }, { "docid": "7dcb6d117ca5d60de717d00772273f39", "score": "0.70209366", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->setupFacebook();\n $this->setupGoogle();\n }", "title": "" }, { "docid": "2ffc4878f1f9275439c74b8db20c762f", "score": "0.7007885", "text": "public function boot()\n {\n // $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'api-wrapper');\n\n // $this->app['router']->namespace('VelocityArtisans\\\\ApiWrapper\\\\Controllers')\n // ->middleware(['web'])\n // ->group(function () {\n // $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n // });\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "ca422a326014acca008fe264c265a5c7", "score": "0.69839454", "text": "public function boot() {\n // Events\n define(\"EVENTS_KEY_CONNECTION\", \"http://localhost/simple-micro-services-lumen/services-layer/events-service/\");\n define(\"EVENTS_TOKEN\", '$2y$10$a7wUVW.94SWE6XdxfAj5sOep9XIctRbLlx2m7Jci8E//hgv4.Ebwm');\n\n // Posts\n define(\"POSTS_KEY_CONNECTION\", \"http://localhost/simple-micro-services-lumen/services-layer/posts-service/\");\n define(\"POSTS_TOKEN\", '$2y$10$wBhncqHEiWn4uBwkxeFyR.jfANryL3lmi5tf13fRxUkw.MAmn2L2y');\n }", "title": "" }, { "docid": "97da4f81c31a6aa53517601db42bd695", "score": "0.6983374", "text": "public function boot()\n {\n $path = realpath(__DIR__.'/../../');\n\n $this->package('orchestra/foundation', 'orchestra/foundation', $path);\n\n $this->app['orchestra.app']->boot();\n\n include \"{$path}/start.php\";\n\n $this->app['events']->fire('orchestra.ready');\n }", "title": "" }, { "docid": "fb771b09f944cb5385e3908080930c71", "score": "0.6981528", "text": "public function boot()\n {\n $path = realpath(__DIR__.'/../');\n\n $this->package('orchestra/foundation', 'orchestra/foundation', $path);\n\n $this->app['orchestra.app']->boot();\n\n include \"{$path}/start.php\";\n\n $this->app['events']->fire('orchestra.ready');\n }", "title": "" }, { "docid": "5556211021d765b48444fd68f24d0071", "score": "0.6974634", "text": "public function boot()\n {\n /*Load Config*/\n $this->publishConfig('base', 'base');\n $this->publishConfig('base', 'cache');\n $this->publishConfig('base', 'mail');\n $this->publishConfig('base', 'available_locales');\n \n /*Load view composer*/\n $this->registerViewComposer(['layouts.master'], TranslationsBackendComposer::class);\n \n /*Register middleware*/\n $this->registerMiddleware();\n \n /*Load Service on Vendor*/\n $this->app->register(VendorProvider::class);\n \n /*Load Services on Lucky*/\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(MenuServiceProvider::class);\n $this->app->register(NotificationServiceProvider::class);\n $this->app->register(PageServiceProvider::class);\n $this->app->register(PostServiceProvider::class);\n $this->app->register(SettingServiceProvider::class);\n $this->app->register(ThemeServiceProvider::class);\n $this->app->register(TranslationServiceProvider::class);\n $this->app->register(UserServiceProvider::class);\n $this->setLocalesConfigurations();\n $this->setHideLocaleAtUrl();\n \n /*Load translations*/\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'base');\n \n if (app()->runningInConsole()) {\n /*Load migrations*/\n $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');\n \n $this->publishes([__DIR__ . '/../../resources/assets' => resource_path('assets')], 'assets');\n $this->publishes([__DIR__ . '/../../resources/views' => config('view.paths')[0] . '/vendor/base'], 'views');\n $this->publishes([__DIR__ . '/../../resources/lang' => base_path('resources/lang/vendor/base')], 'lang');\n $this->publishes([__DIR__ . '/../../database' => base_path('database'),], 'migrations');\n }\n }", "title": "" }, { "docid": "ff14e9d731772cdfe67837174e9538d0", "score": "0.69652736", "text": "public function boot()\n {\n $this->app->bind(UserRepositoryInterface::class, EloquentUserRepository::class);\n\n $this->app->singleton('OpenWeatherService', function ($app) {\n return new OpenWeatherService(env('OPEN_WEATHER_API_KEY'));\n });\n\n $this->app->singleton('IpstackService', function ($app) {\n return new IpstackService(env('IPSTACK_API_KEY'));\n });\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "8716f9e57c87c8987504dba12077a62f", "score": "0.69453996", "text": "public function boot(): void\n {\n $this->registerModelBindings();\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "2e05b52afb195e361ff8a2c546c1f094", "score": "0.69420147", "text": "public function boot(Application $app){}", "title": "" }, { "docid": "596aff9aed96faf118f0cf7168401fa8", "score": "0.6940456", "text": "public function boot()\n {\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n $this->loadRoutesFrom(__DIR__ . '/routes.php');\n\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "6c8000280f000de657e5406958f6128a", "score": "0.6939223", "text": "public function boot(): void\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'ibis117');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'ibis117');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "3a5797c741dcfa66ec758d218ca96e80", "score": "0.6936082", "text": "public function boot(Application $app) {}", "title": "" }, { "docid": "22678dbf6a81c39314371a20e4d9585e", "score": "0.69302917", "text": "public function boot()\n {\n //\n $this->app->bind(ArticlesRepository::class, ElasticsearchArticlesRepository::class);\n $this->app->bind(Client::class, function () {\n return ClientBuilder::create()\n ->setHosts(config('services.search.hosts'))\n ->build();\n });\n }", "title": "" }, { "docid": "ca2341d2be00911e2e49b48eabe9f777", "score": "0.6922429", "text": "public function boot()\n {\n require __DIR__ . '/../vendor/autoload.php';\n }", "title": "" }, { "docid": "d6b848567e74006c937881c94bf98439", "score": "0.6921325", "text": "public function boot()\n {\n if (SocialPassport::$runsMigrations) {\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n }\n\n if (SocialPassport::$bindRoutes) {\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n }\n\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'allan-christian');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'allan-christian');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "43d6aa2719db32702b956c73032efbeb", "score": "0.6919412", "text": "public function boot()\n {\n require __DIR__.'/../composers.php';\n require __DIR__.'/../listeners.php';\n require __DIR__.'/../routes.php';\n require __DIR__.'/../helpers.php';\n }", "title": "" }, { "docid": "398f7b05fc6461618376ff24954f85eb", "score": "0.69179803", "text": "public function boot()\n {\n $this->app->register(AclServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(MediaServiceProvider::class);\n $this->app->register(MenuServiceProvider::class);\n $this->app->register(MenuLeftHandServiceProvider::class);\n $this->app->register(PageServiceProvider::class);\n $this->app->register(BlogServiceProvider::class);\n $this->app->register(SeoHelperServiceProvider::class);\n $this->app->register(ThemeServiceProvider::class);\n $this->app->register(WidgetServiceProvider::class);\n\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(EventServiceProvider::class);\n $this->app->register(CommandServiceProvider::class);\n $this->app->register(ThemeManagementServiceProvider::class);\n $this->app->register(BreadcrumbsServiceProvider::class);\n $this->app->register(ComposerServiceProvider::class);\n\n if ($this->app->environment() == 'local') {\n if (env('ENABLE_DEBUG_BAR') == true) {\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n }\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../../config/cms.php', 'cms');\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bases');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bases');\n\n if (app()->runningInConsole()) {\n $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');\n\n $this->publishes([__DIR__ . '/../../resources/views' => resource_path('views/vendor/bases')], 'views');\n $this->publishes([__DIR__ . '/../../resources/lang' => resource_path('lang/vendor/bases')], 'lang');\n $this->publishes([__DIR__ . '/../../config/cms.php' => config_path('cms.php')], 'config');\n $this->publishes([__DIR__ . '/../../resources/assets' => resource_path('assets/core')], 'resources');\n $this->publishes([__DIR__ . '/../../public/assets' => public_path('vendor/core'),], 'assets');\n }\n\n add_action(BASE_ACTION_META_BOXES, [MetaBox::class, 'doMetaBoxes'], 99, 3);\n\n Schema::defaultStringLength(191);\n\n $this->app->register(FormServiceProvider::class);\n\n do_action('init');\n }", "title": "" }, { "docid": "14d2f148651596d0087366a64f5ce63a", "score": "0.6913687", "text": "public function boot()\n {\n $this->bootComponents();\n\n $this->bootConfiguration();\n }", "title": "" }, { "docid": "56096db17ec70b016f6badc6d22ab86a", "score": "0.68933886", "text": "public function boot()\n {\n\n Route::middleware(['web', 'setguard:web'])->group(function () {\n\n foreach (Config::get(\"service\") as $route) {\n $reflect = new \\ReflectionClass($route[\"class\"]);\n $serviceName = $reflect->getShortName();\n $this->app->singleton($serviceName, $route[\"class\"]);\n if (!isset($route[\"end_point\"]) && !isset($route[\"type\"])) continue;\n\n if ($route[\"type\"] == \"POST\") {\n Route::post($route[\"end_point\"], function () use ($serviceName) {\n $input = request()->all();\n return CallService::execute($serviceName, $input);\n });\n } else if ($route[\"type\"] == \"GET\") {\n Route::get($route[\"end_point\"], function () use ($serviceName) {\n $input = request()->all();\n return CallService::execute($serviceName, $input);\n });\n }\n };\n });\n require __DIR__ . \"../../helpers/function.php\";\n }", "title": "" }, { "docid": "4879f5989749968080b56509a8508c22", "score": "0.68804985", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'daemswibowo');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'daemswibowo');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "169cd9a074521d29c1e8a40fb747a4a8", "score": "0.68639183", "text": "public function boot(): void\n {\n $this->bootMigrations();\n $this->bootFactories();\n $this->bootMiddlewareAliases();\n $this->bootRoutes();\n $this->bootEvents();\n $this->bootTranslations();\n $this->bootTokens();\n }", "title": "" }, { "docid": "688996ab52f68d34c1cb98202ec4fdfd", "score": "0.6848784", "text": "public function boot()\n {\n $this->app->singleton(UsersServicesInterface::class,UserService::class);\n $this->app->singleton(UserRepositoryInterface::class,UserRepository::class);\n }", "title": "" }, { "docid": "3418aab61d9242563328ea6d614caee4", "score": "0.6848588", "text": "public function boot()\n {\n $router = $this->app->make(Router::class);\n $router->aliasMiddleware('valid_tenant', IsAValidTenant::class);\n\n $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'hydra');\n\n $this->app->booted(function () {\n $this->routes();\n });\n\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'hydra');\n\n Nova::serving(function (ServingNova $event) {\n Nova::script('hydra', __DIR__.'/../../dist/js/tool.js');\n Nova::style('hydra', __DIR__.'/../../dist/css/tool.css');\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n \\Benborla\\Hydra\\Console\\Commands\\SyncPermissions::class\n ]);\n }\n\n $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');\n\n $this->observers();\n\n $this->resolvers();\n }", "title": "" }, { "docid": "e5e706b78448954ad6ea5e06f6dba844", "score": "0.684661", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'longnd');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'longnd');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n // AUTO PUBLISH\n // if (\\App::environment('local')) {\n // if ($this->shouldAutoPublishPublic()) {\n // \\Artisan::call('vendor:publish', [\n // '--provider' => 'LongND\\BackpackSplit\\BackpackSplitProvider',\n // '--tag' => 'public',\n // ]);\n // }\n // }\n }", "title": "" }, { "docid": "87f4e5b2644b1c5f288732c055766499", "score": "0.68459266", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n $this->loadMigrationsFrom(__DIR__.'/../migrations');\n }", "title": "" }, { "docid": "cfc70a05eae36eef39a60d92e25fab9d", "score": "0.6840489", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands($this->commands);\n }\n }", "title": "" }, { "docid": "e79a00861c0a757f792a40ca5e80830d", "score": "0.68362474", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n \\SquareBoat\\Baker\\Commands\\RepositoryContractBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\RepositoryBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\ModelBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\ControllerBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\ServiceBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\ValidatorBakeCommand::class,\n \\SquareBoat\\Baker\\Commands\\BakeCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "52b0a0928a6133632f85f0e111b975c3", "score": "0.6833075", "text": "public function boot()\n {\n $this->loadViewsFrom(EASEL_BASE_PATH.'/resources/views', 'easel');\n // Load language files\n $this->loadTranslationsFrom(EASEL_BASE_PATH.'/resources/lang', 'easel');\n\n $this->defineRoutes();\n\n if ($this->app->runningInConsole()) {\n $this->defineResources();\n $this->defineMigrations();\n }\n }", "title": "" }, { "docid": "ff04231b2933f0fbf81a64bbc0cfaf9e", "score": "0.6831067", "text": "public function boot()\n {\n $this->bootstrap();\n }", "title": "" }, { "docid": "4cc2d07fc3bb8c4ff05c3674b6d7d365", "score": "0.68184763", "text": "public function boot()\n {\n PresetCommand::macro('bulma', function ($command) {\n BulmaPreset::install(false);\n $command->info('Bulma scaffolding installed successfully.');\n $command->comment('Please run \"npm install && npm run dev\" to compile your fresh scaffolding.');\n });\n\n PresetCommand::macro('bulma-auth', function ($command) {\n BulmaPreset::install(true);\n $command->info('Bulma scaffolding with Auth views installed successfully.');\n $command->comment('Please run \"npm install && npm run dev\" to compile your fresh scaffolding.');\n });\n }", "title": "" }, { "docid": "0a3e2852e51c3c20ea5f2112cdda35b2", "score": "0.68131244", "text": "public function boot()\n {\n $this->loadContainersInternalProviders();\n }", "title": "" }, { "docid": "106a31cf8ae7c3336048f447b81fd861", "score": "0.67967594", "text": "public function boot()\n {\n $app = $this->app;\n if (!$this->app->routesAreCached()) {\n require realpath(__DIR__.'/../Http/web.php');\n }\n $this->commands([\n SearchModelsCommand::class\n ]);\n\n // model list service\n $this->app->bind(ModelListService::class, function () {\n return new ModelListService(\n new ClassFinder(app_path(), Model::class)\n );\n });\n $this->app->make(ModelListService::class);\n\n // request handler\n $this->app->bind(RequestHandler::class, function ($app) {\n return new RequestHandler($app->make(ModelListService::class));\n });\n $this->app->make(RequestHandler::class);\n\n // register route middle-ware so we can validate authentication\n $app['router']->matched(function (RouteMatched $routeMatched) {\n if ($routeMatched->route->getName() === static::APPLICATION_IDENTIFIER) {\n $routeMatched->route->middleware(['before' => RouteMiddleware::class]);\n }\n });\n }", "title": "" }, { "docid": "0a9ad92b8ff13b60cd91de862ba86c09", "score": "0.67928", "text": "public function boot()\n {\n $this->app->singleton(\n IEnrollmentService::class,\n EnrollmentService::class\n );\n\n $this->app->singleton(\n ICourseService::class,\n CourseService::class\n );\n\n $this->app->singleton(\n ILessonsService::class,\n LessonsService::class\n );\n\n $this->app->singleton(\n IUsersService::class,\n UsersService::class\n );\n\n $this->app->singleton(\n IUsersService::class,\n UsersService::class\n );\n\n $this->app->singleton(\n IPaymentsService::class,\n PaymentsService::class\n );\n\n $this->app->singleton(\n ITeachersService::class,\n TeachersService::class\n );\n\n $this->app->singleton(\n IUploadService::class,\n UploadService::class\n );\n\n $this->app->singleton(\n IAuditService::class,\n AuditService::class\n );\n\n $this->app->bind(User::class, function (Application $app) {\n return $app->make(AuthenticatedRequest::class)->user();\n });\n\n\n $this->app->bind(Teacher::class, function (Application $app) {\n return $app->make(User::class)->teacher;\n });\n }", "title": "" }, { "docid": "fecafa676819ff2cc16f08f4b33954cf", "score": "0.6789661", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n\t $this->commands([\n\t ModelBuildCommand::class,\n\t ControllerBuildCommand::class,\n\t ]);\n\t }\n }", "title": "" }, { "docid": "63a44189ada28028f343b80dceea9630", "score": "0.6787004", "text": "public function boot()\n {\n $this->loadAutoloader(base_path('packages'));\n// require __DIR__ . '/../vendor/autoload.php';\n }", "title": "" }, { "docid": "c9633141adc645d0227499cd1bf92374", "score": "0.6780412", "text": "public function boot()\n {\n if($this->app->runningInConsole()) {\n $this->commands([\n Init::class,\n\t\t\t\tMakeCrud::class,\n MakeCrm::class,\n ]);\n }\n }", "title": "" }, { "docid": "5be69501854a86b759bd8fef9a5348f6", "score": "0.6779655", "text": "public function boot(): void\n {\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'filament-companies');\n\n $this->loadTranslationsFrom(__DIR__.'/../lang', 'filament-companies');\n\n // $this->configureComponents();\n $this->configurePublishing();\n $this->configureRoutes();\n $this->configureCommands();\n }", "title": "" }, { "docid": "cb4f01ddc6ea154c60fe5bf97414577d", "score": "0.67788523", "text": "public function boot()\n {\n $this->registerObservers();\n $this->registerMiddleware();\n $this->registerExpansionsFrom(__DIR__ . '/../Expansions');\n $this->loadRoutesFrom(__DIR__ . '/../routes.php');\n $this->loadMigrationsFrom(__DIR__ . '/../../migrations');\n $this->mergeConfigFrom(__DIR__ . '/../../config/database.connections.php', 'database.connections');\n $this->mergeConfigFrom(__DIR__ . '/../../config/storefront.php', 'storefront');\n $this->mergeConfigFrom(__DIR__ . '/../../config/api.php', 'storefront.api');\n $this->mergeConfigFrom(__DIR__ . '/../../config/twilio-notification-channel.php', 'twilio-notification-channel');\n }", "title": "" }, { "docid": "23bca452b8f9d8f50a3d06a467be94f8", "score": "0.67765033", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n $this->app->singleton('Maclof\\Kubernetes\\Client', function ($app) {\n return new Client([\n 'master' => config('services.kubernetes.api'),\n 'ca_cert' => config('services.kubernetes.ca-path'),\n 'token' => config('services.kubernetes.token'),\n 'namespace' => config('services.kubernetes.namespace')\n ]);\n });\n }", "title": "" }, { "docid": "e06fba7fb709d59e817788111e64b453", "score": "0.6775749", "text": "public function boot()\n { \n Nova::serving(function() {\n Nova::resources([\n Recaptcha::class,\n ]); \n });\n\n $this->app->booted(function($app) { \n $config = require __DIR__.'/config.php';\n\n foreach ($config as $key => $value) {\n $app['config']->set($key, $value);\n } \n });\n }", "title": "" }, { "docid": "528c9b0ca31c799f19b6a62ae46cb1d4", "score": "0.6774084", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands(\n [\n ]\n );\n }\n }", "title": "" }, { "docid": "b47c9c90d49819a85b2c65b66864a107", "score": "0.6772647", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'nerdbrygg');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'nerdbrygg');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n $this->loadViewComponentsAs('simplesms', [\n Form::class,\n Messages::class,\n ]);\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "9781d177a64a81a8dd58a3a2d2a0500d", "score": "0.6770745", "text": "public function boot()\n {\n $this->app->singleton(OpenWeatherMapContract::class, function ($app) {\n\n $config = $this->app->make('config')\n ->get('services.openweathermap');\n\n return new Client($config['key']);\n });\n }", "title": "" }, { "docid": "f38f966f8cb528badb9eb3141dac5670", "score": "0.67634714", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('all-dressed.php'),\n ], 'config');\n }\n\n $this->app->bind(Client::class, static function () {\n $key = config('all-dressed.api.key');\n\n throw_unless($key, MissingApiKeyException::class);\n\n return new Client(\n config('all-dressed.api.key'),\n config('all-dressed.account')\n );\n });\n }", "title": "" }, { "docid": "93a51613b3376bb70b51a46975761c05", "score": "0.67619437", "text": "public function boot()\n\t{\n\t\t$this->package('gufy/bootstrap');\n\t}", "title": "" }, { "docid": "df58a473a82708a34651e1034b89e4df", "score": "0.6761669", "text": "public function boot()\n {\n $rootDir = $this->getRootDir();\n $baseRoutesFolder = $rootDir . '/Http/Routes/';\n\n if ($this->loadWebRoutes) {\n $this->loadRoutesFrom($baseRoutesFolder . 'web.php');\n }\n\n if ($this->loadApiRoutes) {\n $this->loadRoutesFrom($baseRoutesFolder . 'api.php');\n }\n\n $this->loadMigrationsFrom($rootDir . '/Migrations');\n $this->loadViewsFrom($rootDir . '/Views', $this->getName());\n\n $this->commands($this->commands);\n }", "title": "" }, { "docid": "8fd6fde78a977d978fd76e71937f8fad", "score": "0.6761149", "text": "public function boot()\n {\n $this->app->instance(TimelineServiceInterface::class, $this->app->make(TimelineService::class));\n }", "title": "" }, { "docid": "a5a4191f6a19262184b2ba2dc453fca6", "score": "0.6759224", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerConsoleCommands();\n }\n }", "title": "" }, { "docid": "bf27f182fda279de82c001135182450f", "score": "0.6752353", "text": "public function boot()\n {\n $this->app->bind(AuthServiceInterface::class, AuthService::class);\n }", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.6751015", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.6751015", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "a30de3331460aec6c2c34643346593b2", "score": "0.6747727", "text": "public function boot()\n\t{\n $this->app->bind('xero', XeroService::class);\n\t}", "title": "" }, { "docid": "d0f19497caee90fb52497a0d8cb01215", "score": "0.674393", "text": "public function boot()\n {\n if (! $this->app->runningInConsole()) {\n return;\n }\n\n $this->registerConfigPublishing();\n }", "title": "" }, { "docid": "88d4dd44b7bc054516830dfb9b8dbf88", "score": "0.67431587", "text": "public function boot()\n {\n Carbon::setLocale(config('app.locale'));\n\n Passport::routes();\n Passport::cookie(str_slug(env('APP_NAME', 'laravel'), '_').'_token');\n\n app()->singleton(NavigationHelper::class, function () {\n return new NavigationHelper();\n });\n\n \\View::composer('*', ProjectComposer::class);\n \\View::composer('*', ImageComposer::class);\n \\View::composer('*', UserComposer::class);\n\n \\Validator::extend('semver', Semver::class);\n }", "title": "" }, { "docid": "b7f58e11aa1583e789c7bae5c0ec2305", "score": "0.6740614", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Commands\\ClearCommand::class,\n Commands\\ConfigCommand::class,\n Commands\\StatusCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "d852fc44228360d9392154790eb398a3", "score": "0.67374164", "text": "public function boot (Application $app) {\n\n }", "title": "" }, { "docid": "f4df1698e1276dbb5f35490907a75810", "score": "0.6733467", "text": "public function boot()\n {\n if (isset($this->options['config'])) {\n $this->options->add($this->options['config']);\n }\n\n // Lets setup exception handlers to catch anything that fails during boot as well.\n $exceptionHandler = new ExceptionHandler();\n $exceptionHandler->addHandler(new \\PPI\\Exception\\Log());\n set_exception_handler(array($exceptionHandler, 'handle'));\n\n if ($this->getEnv() !== 'production') {\n set_error_handler(array($exceptionHandler, 'handleError'));\n }\n\n if (!$this->options->has('moduleconfig') || empty($this->options['moduleconfig']['listenerOptions'])) {\n throw new \\Exception('Missing moduleConfig: listenerOptions');\n }\n\n // all user and app configuration must be set up to this point\n $this->serviceManager = new ServiceManager($this->options, array(\n new HttpConfig(),\n new SessionConfig(),\n new ModuleConfig(),\n new RouterConfig(),\n new TemplatingConfig()\n ));\n\n // resolve options placeholders\n $this->serviceManager->compile();\n\n $this->_request = $this->serviceManager->get('request');\n $this->_response = $this->serviceManager->get('response');\n\n // Loading our Modules\n $defaultListener = $this->serviceManager->get('module.defaultListener');\n $this->_moduleManager = $this->serviceManager->get('module.manager');\n $this->_moduleManager->loadModules();\n\n // CONFIG - Merge the app config with the config from all the modules\n $this->serviceManager->set('config', $defaultListener->getConfigListener()->getMergedConfig(false));\n\n // SERVICES - Lets get all the services our of our modules and start setting them in the ServiceManager\n $moduleServices = $defaultListener->getServices();\n\n foreach ($moduleServices as $serviceKey => $serviceVal) {\n $this->serviceManager->setFactory($serviceKey, $serviceVal);\n }\n\n // ROUTING\n $this->_router = $this->serviceManager->get('router');\n $this->handleRouting();\n\n // DATASOURCE - If the user wants DataSource available in their application, lets instantiate it and set up their connections\n $dsConnections = $this->options->get('datasource.connections');\n\n if ($this->options['useDataSource'] === true && $dsConnections !== null) {\n $this->serviceManager->set('datasource', new \\PPI\\DataSource\\DataSource($dsConnections));\n }\n\n // Fluent Interface\n return $this;\n }", "title": "" }, { "docid": "4e75d850601de956f06130d413622a20", "score": "0.67263514", "text": "public function boot()\n {\n\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'katzsimon');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n \\Katzsimon\\Base\\Console\\Commands\\SetupCommand::class,\n ]);\n }\n\n }", "title": "" }, { "docid": "067e41db3a0890fe7ffcddbe8122504e", "score": "0.67245466", "text": "public function boot(): void\n {\n // Menu directive\n Blade::directive('menu', function ($expression) {\n return \"<?= (new Atthakasem\\LaravelJsonMenu\\LaravelJsonMenu($expression))->generateMenu(); ?>\";\n });\n\n // Breadcrumb directive\n Blade::directive('breadcrumb', function ($expression) {\n return \"<?= (new Atthakasem\\LaravelJsonMenu\\LaravelJsonMenu($expression))->generateBreadcrumb(); ?>\";\n });\n\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'atthakasem');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'atthakasem');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "f2b871b84916bac3ac528117c1c3a498", "score": "0.6723343", "text": "public function boot()\n {\n ApiDocsGenerator::registerEndpoints([\n ActionsEndpoint::class, CustomBonusActionsEndpoint::class, ActionItemEndpoint::class,\n CodesEndpoint::class, CodeItemEndpoint::class,\n RewardsEndpoint::class, RewardItemEndpoint::class, RewardAcquireEndpoint::class,\n TransactionsEndpoint::class, TransactionItemEndpoint::class, TransactionCancelPromocodeEndpoint::class,\n ChargeCouponEndpoint::class, PartnerEndpoint::class,\n UsersEndpoint::class, UserItemEndpoint::class,\n UserBonusEndpoint::class, UserCardsEndpoint::class, UserCardItemEndpoint::class, UserTransactionsEndpoint::class,\n UserBonusExtendedEndpoint::class, UserCardsEndpoint::class, UserCardItemEndpoint::class, UserTransactionsEndpoint::class,\n UserSmsSendEndpoint::class, UserSmsVerifyEndpoint::class,\n CheckCouponEndpoint::class, UsersSearchEndpoint::class,\n OrderEventEndpoint::class, CustomEventEndpoint::class,\n ]);\n\n ApiDocsGenerator::registerDefinitions([\n ActionDefinition::class, CouponDefinition::class,\n CodeDefinition::class, PartnerDefinition::class,\n RewardDefinition::class, TransactionDefinition::class,\n UserDefinition::class, SmsVerificationResultDefinition::class,\n ]);\n }", "title": "" }, { "docid": "6eb36fba5960162b08c557673fca43dc", "score": "0.67183316", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n ResponseFactory::macro('api', function ($data = null, $errorCode = 0, $errorDescription = '') {\n return response()->json([\n 'data' => $data,\n 'errorCode' => $errorCode,\n 'errorDescription' => $errorDescription,\n ]);\n });\n\n Paginator::useBootstrap();\n\n }", "title": "" }, { "docid": "ab139d18badc16db9ab49bf803adab0d", "score": "0.6717725", "text": "public function boot()\n {\n // publishes\n if ($this->app->runningInConsole()) {\n $this->registerPublishesResources();\n }\n\n // other booting ...\n $this->registerBlueprintMacro();\n }", "title": "" }, { "docid": "949ab2622f51674174d4e004bdb97fbc", "score": "0.67156804", "text": "public function boot()\n {\n $registryServiceName = 'service_provider_registry_'.$this->id;\n $this->container->set($registryServiceName, $this->getRegistry($this->container));\n }", "title": "" }, { "docid": "c3a945057d8802d8f982e499f070925e", "score": "0.67153436", "text": "public function boot()\n {\n //注册中间件\n foreach ($this->middlewares as $name => $middleware) {\n $this->app['router']->aliasMiddleware($name, \"App\\\\Modules\\\\Middleware\\\\{$middleware}\");\n }\n\n // 启动全部模块\n $this->app->register(BootstrapServiceProvider::class);\n }", "title": "" }, { "docid": "3e91f34377272a140eeaf6aa9a409583", "score": "0.67137307", "text": "public function boot()\n {\n $this->app->when(ZenviaChannel::class)\n ->needs(Zenvia::class)\n ->give(function () {\n $config = config('services.zenvia');\n return new Zenvia(\n $config['conta'],\n $config['senha'],\n isset($config['from']) ? $config['from'] : null,\n isset($config['pretend']) ? $config['pretend'] : false,\n isset($config['aggregateId']) ? $config['aggregateId'] : null\n );\n });\n }", "title": "" }, { "docid": "da0b1231d0d215a5c71fcf1c7e772733", "score": "0.67117065", "text": "public function boot()\n {\n $this->bootInConsole();\n }", "title": "" }, { "docid": "7c93c9793e5d0a88a25547f1fed1c0bc", "score": "0.66948193", "text": "public function boot()\n {\n $this->bootMacros();\n $this->bootResources();\n $this->bootDirectives();\n $this->bootComponents();\n $this->bootCommands();\n $this->bootPublishing();\n $this->bootCloudinaryDriver();\n }", "title": "" }, { "docid": "639813338d422f702de91ba1b39d4476", "score": "0.66934985", "text": "public function boot()\n {\n\n //TODO : This need to be up don't know why it is not working. :(\n // TODO: @Rizwan\n $this->app->singleton(RouteRegistry::class, function () {\n return RouteRegistry::initFromCache();\n });\n\n $this->app->singleton(Request::class, function () {\n return $this->prepareRequest(Request::capture());\n });\n\n $this->app->bind(ServiceRegistryContract::class, DNSRegistry::class);\n\n $this->app->singleton(Client::class, function () {\n return new Client([\n 'timeout' => Config::get('gateway.global.timeout'),\n 'connect_timeout' => Config::get('gateway.global.connect_timeout', Config::get('gateway.global.timeout'))\n ]);\n });\n\n $this->app->alias('request', Request::class);\n $this->registerRoutes();\n }", "title": "" }, { "docid": "c7212b0ea698139a888f0471cc51adc3", "score": "0.6690939", "text": "public function boot() {\n }", "title": "" }, { "docid": "b6b71c5a40f7190e24e0aae5197d4605", "score": "0.6682094", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n TabManager::register('currency_rates', CurrencyRateTabs::class);\n\n $this->addAdminAssets('admin.currency_rates.index', ['admin.currency.js']);\n\n if ($this->app->runningInConsole() && setting('auto_refresh_currency_rates', false)) {\n $this->commands(RefreshCurrencyRatesCommand::class);\n\n $this->registerScheduler();\n }\n }", "title": "" }, { "docid": "3c8d8e536d7e149698455a8754f533fd", "score": "0.66801816", "text": "public function boot()\n {\n // ..\n }", "title": "" }, { "docid": "5764c2b40ed6748d799d84133ee542b8", "score": "0.6679545", "text": "public function boot() {\n }", "title": "" }, { "docid": "f71c81d9161da0729ac6658e367eb9a9", "score": "0.66794336", "text": "public function boot(): void\n {\n $this->bootPublishableFiles();\n $this->bootBladeDirectives();\n }", "title": "" }, { "docid": "3597e882666c6398c704efb611d8e774", "score": "0.66779256", "text": "public function boot()\n {\n $this->app['XeroPrivate'] = function ($app) {\n return $app[PrivateApplication::class];\n };\n\n $this->app['XeroPublic'] = function ($app) {\n return $app[PublicApplication::class];\n };\n\n $this->app['XeroPartner'] = function ($app) {\n return $app[PartnerApplication::class];\n };\n\n if (function_exists('config_path')) {\n $this->publishes([\n __DIR__.'/config/config.php' => config_path('xero.php'),\n ], 'config');\n }\n }", "title": "" }, { "docid": "784324da5e3d9e4f2be6cba16da942cf", "score": "0.6675016", "text": "public function boot()\n {\n // Loading the routes\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Setting proxy vars\n if (config('saml.proxy_vars')) {\n OneLogin_Saml2_Utils::setProxyVars(true);\n }\n\n if ($this->app->runningInConsole()) {\n // Publishing the config\n $this->publishes([\n __DIR__.'/../config/saml.php' => config_path('saml.php'),\n ], 'config');\n // Registering the package commands\n $this->commands([\n SamlSetupCommand::class,\n ]);\n }\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
9162ee4a7cb50bab1cabdf617058061f
Email login credentials to a newlyregistered user Overwriters the function in wpincludes/pluggable.php
[ { "docid": "688e09c333c674b4e81a15a40ae2d71a", "score": "0.7106098", "text": "function wp_new_user_notification($user_id, $plaintext_pass = '') {\n\t$user = get_userdata( $user_id );\n\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\n\t// we want to reverse this for the plain text arena of emails.\n\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n\t$message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('Username: %s'), $user->user_login) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('E-mail: %s'), $user->user_email) . \"\\r\\n\";\n\n\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\n\n\tif ( empty($plaintext_pass) )\n\t\treturn;\n\n\t$message = \"\\r\\n\" . sprintf( __( 'Please login here: %s' ), get_permalink( WALS_PAGE_ID_MEMBERS ) ) . \"\\r\\n\";\n\t$message .= \"\\r\\n\";\n\t$message .= sprintf( __( 'Please login using this email address (%s) and the password you chose when you registered.' ), $user->user_email ) . \"\\r\\n\";\n\t$message .= \"\\r\\n\";\n\t$message .= sprintf( __( 'If you\\'ve lost your password, you can reset it here: %s' ), wp_lostpassword_url() ) . \"\\r\\n\";\n\n\twp_mail($user->user_email, sprintf(__('[%s] Your account is now activated'), $blogname), $message);\n\n}", "title": "" } ]
[ { "docid": "84a8fd8f5bf47589ed6e9a1f99b3298b", "score": "0.71549916", "text": "function wp_new_user_notification($user_id, $plaintext_pass = '') {\n $user = get_userdata( $user_id );\n $user_login = stripslashes($user->user_login);\n $user_email = stripslashes($user->user_email);\n\n // The blogname option is escaped with esc_html on the way into the database in sanitize_option\n // we want to reverse this for the plain text arena of emails.\n $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n $message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('Username: %s'), $user_login) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('E-mail: %s'), $user_email) . \"\\r\\n\";\n\n @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\n if ( empty($plaintext_pass) )\n return;\n\n $message = sprintf(__('Username: %s'), $user_login) . \"\\r\\n\";\n $message .= sprintf(__('Password: %s'), $plaintext_pass) . \"\\r\\n\";\n $message .= wp_login_url() . \"\\r\\n\";\n\n wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);\n\t\n }", "title": "" }, { "docid": "681f53920451302282735fd9b5fab8bd", "score": "0.7134781", "text": "function wp_new_user_notification($user_id, $plaintext_pass = '') {\n $user = get_userdata( $user_id );\n $user_login = stripslashes($user->user_login);\n $user_email = stripslashes($user->user_email);\n\n // The blogname option is escaped with esc_html on the way into the database in sanitize_option\n // we want to reverse this for the plain text arena of emails.\n $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n $message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('Username: %s'), $user_login) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('E-mail: %s'), $user_email) . \"\\r\\n\";\n\n @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\n if ( empty($plaintext_pass) )\n return;\n\n $message = sprintf(__('Username: %s'), $user_login) . \"\\r\\n\";\n $message .= sprintf(__('Password: %s'), $plaintext_pass) . \"\\r\\n\";\n $message .= wp_login_url() . \"\\r\\n\";\n $message .= __('Your Custom Message');\n wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);\n \n }", "title": "" }, { "docid": "1d29a7b1ae0c15293cbe05742f6b67a9", "score": "0.69404435", "text": "function wpwebapp_send_new_user_welcome_email( $user_login, $user_email ) {\n\n\tif ( wpwebapp_get_send_new_user_email_user() === 'on' ) {\n\n\t\t// Email Info\n\t\t$from = wpwebapp_get_new_user_email_from();\n\t\t$site_name = get_bloginfo('name');\n\t\t$domain = wpwebapp_get_site_domain();\n\t\t$headers = 'From: ' . $site_name . ' <' . $from . '@' . $domain . '>' . \"\\r\\n\";\n\t\t$subject = wpwebapp_get_new_user_email_subject( $site_name );\n\t\t$custom_message = wpwebapp_get_send_new_user_email_message();\n\n\t\tif ( $custom_message === '' ) {\n\t\t\t$message =\n\t\t\t\tsprintf( __( 'Welcome to %s. ', 'wpwebapp' ), get_option('blogname') ) .\n\t\t\t\tsprintf( __( 'Your username is %s. ', 'wpwebapp' ), $user_login ) .\n\t\t\t\tsprintf( __( 'Login at %s.', 'wpwebapp' ), site_url() );\n\t\t} else {\n\t\t\t$add_content = array(\n\t\t\t\t'%username' => $user_login,\n\t\t\t\t'%email' => $user_email,\n\t\t\t);\n\t\t\t$custom_message = strtr( $custom_message, $add_content );\n\t\t\t$message = $custom_message;\n\t\t}\n\n\t\twp_mail( $user_email, $subject, $message, $headers );\n\n\t}\n\n}", "title": "" }, { "docid": "62e885e34c5e3d9a7507281bedff4e9a", "score": "0.68592465", "text": "function wp_new_user_notification($user_id, $plaintext_pass = '') \n{\n $user \t = get_userdata( $user_id );\n $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n $message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('Username: %s'), $user->user_login) . \"\\r\\n\\r\\n\";\n $message .= sprintf(__('E-mail: %s'), $user->user_email) . \"\\r\\n\";\n\n @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\n\n if(empty($plaintext_pass)) return;\n\n $plugins_url = plugins_url();\n $message = '<img src=\"'.get_bloginfo('template_url').'/images/email_logo.png\" alt=\"Badge green\"><br>';\n $message .= 'Thank you for signing up for the Role Models Matter toolkit. This toolkit provides fun, online training and resources for role models to develop the skills to engage youth in STEM (science, technology, engineering, and math). Please be sure to sign in each time you visit the site so that you can save and share responses to questions within each tool.'.\"<br><br>\\r\\n\\n\";\n $message .= sprintf('Username: %s', $user->user_login).\"<br>\\r\\n\";\n $message .= sprintf('Link to Role Models Matter Toolkit: %s', wp_login_url()).\"<br>\\r\\n\";\n \n $headers = \"Content-Type: text/html; charset=UTF-8\";\n\n wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message, $headers);\n\n}", "title": "" }, { "docid": "43d2b9eafa540d1aa45484b18b3ee40b", "score": "0.67608356", "text": "function wp_new_user_notification($user_id, $plaintext_pass = '') {\n\t$user = new WP_User($user_id);\n\t$user_login = stripslashes($user->user_login);\n\t$user_email = stripslashes($user->user_email);\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\n\t// we want to reverse this for the plain text arena of emails.\n\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\t$message = sprintf(__('New user registration on your site %s:'), $blogname) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('Username: %s'), $user_login) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('E-mail: %s'), $user_email) . \"\\r\\n\";\n\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);\n\tif ( empty($plaintext_pass) )\n\t\treturn;\n\t$options = get_option( 'is_sm_options' );\n\tif ( '1' == $options['registration_email'] ) {\n\t\t$message = sprintf(__('Username: %s'), $user_login) . \"\\r\\n\";\n\t\t$message .= sprintf(__('Password: %s'), $plaintext_pass) . \"\\r\\n\";\n\t\t$message .= wp_login_url() . \"\\r\\n\";\n\t\twp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);\n\t}\n\tIS_SM_Sms_Framework::send_registration_sms( $user_id );\n}", "title": "" }, { "docid": "b0409930cfd96103337d0fc3e4ed4890", "score": "0.6707235", "text": "function wpwebapp_send_new_user_admin_notification_email( $user_login, $user_email ) {\n\tif ( wpwebapp_get_send_new_user_email_admin() === 'on' ) {\n\t\t$message =\n\t\t\tsprintf( __( 'New user registration on %s:', 'wpwebapp' ), get_option('blogname') ) . \"\\r\\n\\r\\n\" .\n\t\t\tsprintf( __( 'Username: %s', 'wpwebapp' ), $user_login ) . \"\\r\\n\\r\\n\" .\n\t\t\tsprintf( __( 'E-mail: %s', 'wpwebapp' ), $user_email ) . \"\\r\\n\";\n\t\t@wp_mail( get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname') ), $message );\n\t}\n}", "title": "" }, { "docid": "86c59d1c8d7a03064516467fb77c6658", "score": "0.6694374", "text": "function wpb_admin_account(){\n$user = 'Username';\n$pass = 'Password';\n$email = '[email protected]';\nif ( !username_exists( $user ) && !email_exists( $email ) ) {\n$user_id = wp_create_user( $user, $pass, $email );\n$user = new WP_User( $user_id );\n$user->set_role( 'administrator' );\n} }", "title": "" }, { "docid": "730147c79e772704198df1eed7dde13f", "score": "0.66933185", "text": "function plugin_init_loginbyemail() {\n global $PLUGIN_HOOKS;\n\n $PLUGIN_HOOKS['csrf_compliant']['loginbyemail'] = true;\n\n $login = false;\n\n if (isset($_POST['login_name'])) {\n //For GLPI <= 0.90\n $login = $_POST['login_name'];\n } elseif (isset($_SESSION['namfield']) && isset($_POST[$_SESSION['namfield']])) {\n //For GLPI >= 9.1\n $login = $_POST[$_SESSION['namfield']];\n }\n\n //If not setted, skip\n if ($login === false) {\n return;\n }\n\n //If is not a e-mail, skip\n if (!filter_var($login, FILTER_VALIDATE_EMAIL)) {\n return;\n }\n\n $user = new User();\n\n //If exists a user with name is a e-email, skip\n if ($user->getFromDBbyName(addslashes($login))) {\n return;\n }\n\n //If not exists a user with email, skip\n if (!$user->getFromDBbyEmail(addslashes($login))) {\n return;\n }\n\n $new_login_name = $user->fields['name'];\n\n if (isset($_POST['login_name'])) {\n $_POST['login_name'] = $new_login_name;\n } elseif (isset($_SESSION['namfield']) && isset($_POST[$_SESSION['namfield']])) {\n $_POST[$_SESSION['namfield']] = $new_login_name;\n }\n}", "title": "" }, { "docid": "8f4b6430d6cf5e7165430dd59513d5b4", "score": "0.66803837", "text": "function _sf_process_user_registration($return, $email, $username) {\n\t\t\n\t\t\t//// CHECKS IF USERNAME EXISTS\n\t\t\t$user = new WP_User('', $username);\n\t\t\tif(!$user->exists()) {\n\t\t\t\t\n\t\t\t\t//// CHECK FOR USERNAMES EMAIL\n\t\t\t\t$user = get_user_by('email', $email);\n\t\t\t\tif(!$user) {\n\t\t\t\t\t\n\t\t\t\t\t$password = wp_generate_password();\n\t\t\t\t\t\n\t\t\t\t\t//// NOW WE CAN FINALLY REGISTER THE USER\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\n\t\t\t\t\t\t'user_login' => esc_attr($username),\n\t\t\t\t\t\t'user_email' => $email,\n\t\t\t\t\t\t'user_pass' => $password,\n\t\t\t\t\t\t'role' => 'submitter',\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t//// CREATES THE USER\n\t\t\t\t\t$user = wp_insert_user($args);\n\t\t\t\t\t\t\n\t\t\t\t\tif(!is_object($user)) {\n\t\t\t\t\t\n\t\t\t\t\t\t//// MAKES SURE HE CAN\"T SEE THE ADMIN BAR\n\t\t\t\t\t\tupdate_user_meta($user, 'show_admin_bar_front', 'false');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$user = new WP_User($user);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//// MAKES UP THE EMAIL WE SEND THE USER\n\t\t\t\t\t\t$message = sprintf2(__(\"Welcome to %site_name,\n\nHere are your credentials ready for use:\nUsername: %username\nPassword: %password\n\nKind regards,\nThe %site_name team.\", 'btoa'), array(\n\n\t\t\t\t\t\t\t'site_name' => get_bloginfo('name'),\n\t\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t\t'password' => $password,\n\n\t\t\t\t\t\t));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$subject = sprintf2(__('Your %site_name credentials', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t///// SENDS THE EMAIL\n\t\t\t\t\t\tif(!wp_mail($email, $subject, $message, $headers)) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$return['error'] = true; $return['message'] = sprintf2(__('Unfortunately an error occurred sending you the email. Your credentials are %username and %password', 'btoa'), array(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t\t\t'password' => $password,\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t///// SENDS THE EMAIL TO THE ADMINISTRATOR\n\t\t\t\t\t\t$message = sprintf2(__('Dear Admin,\n\nA new user has signed up to your website.\n\nUsername: %username\nEmail Address: %email', 'btoa'), array(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t\t'email' => $email,\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$return['message2'] = $message;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$subject = sprintf2(__('New user registration at %site_name.', 'btoa'), array('site_name' => get_bloginfo('name')));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$headers = \"From: \".get_bloginfo('name').\" <\".get_option('admin_email').\">\";\n\t\t\t\t\t\t\n\t\t\t\t\t\twp_mail(get_option('admin_email'), $subject, $message, $headers);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//// SENDS SUCCESS MESSAGE\n\t\t\t\t\t\tif($return['error'] == false) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$return['message'] = __('All Done! Check your email inbox for your password.', 'btoa');\n\t\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} else { $return['error'] = true; $return['message'] = __('There was an error creating your user. Please contact the site administrator. (Error Code 23).', 'btoa'); }\n\t\t\t\t\t\n\t\t\t\t} else { $return['error'] = true; $return['message'] = __('Email address already in use.', 'btoa'); }\n\t\t\t\t\n\t\t\t} else { $return['error'] = true; $return['message'] = __('Username already in use.', 'btoa'); }\n\t\t\t\n\t\t\treturn $return;\n\t\t\n\t}", "title": "" }, { "docid": "d0e5f2ff85047c554738692cd5c1b850", "score": "0.66659296", "text": "function emarket_custom_login_user_callback(){\n\n\t// Nonce is checked, get the POST data and sign user on\n\t$info = array();\n\t$info['user_login'] = $_POST['username'];\n\t$info['user_password'] = $_POST['password'];\n\t$info['remember'] = true;\n\n\t$user_signon = wp_signon( $info, false );\n\tif ( is_wp_error($user_signon) ){\n\t\techo json_encode(array('loggedin'=>false, 'message'=> $user_signon->get_error_message()));\n\t} else {\n\t\t$redirect_url = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) );\n\t\t$user_by \t = ( is_email( $info['user_login'] ) ) ? 'email' : 'login';\n\t\t$user \t\t = get_user_by( $user_by, $info['user_login'] );\n\t\twp_set_current_user( $user->ID, $info['user_login'] ); \n\t\twp_set_auth_cookie( $user->ID, TRUE );\n\t\t$user_role \t = ( is_array( $user->roles ) ) ? $user->roles : array() ;\n\t\tif( in_array( 'vendor', $user_role ) ){\n\t\t\t$vendor_option = get_option( 'wc_prd_vendor_options' );\n\t\t\t$vendor_page = ( array_key_exists( 'vendor_dashboard_page', $vendor_option ) ) ? $vendor_option['vendor_dashboard_page'] : get_option( 'woocommerce_myaccount_page_id' );\n\t\t\t$redirect_url = get_permalink( $vendor_page );\n\t\t}\n\t\telseif( in_array( 'seller', $user_role ) ){\n\t\t\t$vendor_option = get_option( 'dokan_pages' );\n\t\t\t$vendor_page = ( array_key_exists( 'dashboard', $vendor_option ) ) ? $vendor_option['dashboard'] : get_option( 'woocommerce_myaccount_page_id' );\n\t\t\t$redirect_url = get_permalink( $vendor_page );\n\t\t}\n\t\telseif( in_array( 'dc_vendor', $user_role ) ){\n\t\t\t$vendor_option = get_option( 'wcmp_vendor_general_settings_name' );\n\t\t\t$vendor_page = ( array_key_exists( 'wcmp_vendor', $vendor_option ) ) ? $vendor_option['wcmp_vendor'] : get_option( 'woocommerce_myaccount_page_id' );\n\t\t\t$redirect_url = get_permalink( $vendor_page );\n\t\t}\n\t\telseif( in_array( 'wcfm_vendor', $user_role ) ){\n\t\t\t$vendor_option = get_option( 'wcfm_page_options' );\n\t\t\t$vendor_page = ( array_key_exists( 'wc_frontend_manager_page_id', $vendor_option ) ) ? $vendor_option['wc_frontend_manager_page_id'] : get_option( 'woocommerce_myaccount_page_id' );\n\t\t\t$redirect_url = get_permalink( $vendor_page );\n\t\t}\n\t\techo json_encode(array('loggedin'=>true, 'message'=>esc_html__('Login Successful, redirecting...', 'emarket'), 'redirect' => esc_url( $redirect_url ) ));\n\t}\n\n\tdie();\n}", "title": "" }, { "docid": "d1e040a0183313244154654c389ed02d", "score": "0.6658686", "text": "function popup_userlogin() {\n $pd_email = trim($_POST['pdemail']);\n $pd_pass = trim($_POST['pdpass']);\n\n // $user_ = get_user_by('email', $pd_email);\n $user = wp_authenticate($pd_email, $pd_pass);\n\n if (is_wp_error($user)) {\n $msg = \"<div class='alert alert-error alert-box' style='padding: 10px 45px 10px 5px;font-size:12px'> <button type='button' class='close' data-dismiss='alert'>&times;</button>Invalid email/password</div>\";\n $response = array('success' => false, 'user' => $user_->user_login . $pd_pass, 'msg' => $msg);\n wp_send_json($response);\n } else {\n wp_set_auth_cookie($user->ID);\n\n $user_data = array(\n \"user_id\" => $user->ID,\n \"user_login\" => $user->user_login,\n \"user_email\" => $user->user_email,\n \"user_role\" => $user->roles,\n \"logged_in\" => true\n );\n\n $response = array(\"success\" => true, 'user' => $user_->user_login, 'userdata' => $user_data,'user_role'=>$user->roles);\n wp_send_json($response);\n }\n}", "title": "" }, { "docid": "f6f391b9f8b620015d2e29c3e1a43cdb", "score": "0.6587479", "text": "function sendfb_user_register_mail($arg){\n\n global $wpdb;\n\n //update user meta\n\n global $temp_fbuser;\n update_user_meta($arg['WP_ID'],'facebook_link',$temp_fbuser['link']);\n \n\n\n send_register_welcome_email($arg['WP_UserData']);\n\n\n wp_new_user_notification($arg['WP_ID'], $arg['WP_UserData']['user_pass']);\n\n return ;\n\n}", "title": "" }, { "docid": "f34985ee7d92602e1a9e9a70c0245dbb", "score": "0.6586201", "text": "function lnn_allow_email_login( $user, $username, $password ) {\n if ( is_email( $username ) ) {\n $user = get_user_by('email', $username );\n if( $user ) $username = $user->user_login;\n }\n return wp_authenticate_username_password(null, $username, $password );\n}", "title": "" }, { "docid": "7762576d3df08b5049e65b4d3bb6e0d8", "score": "0.65593195", "text": "function shapeSpace_first_user_login($user_login, $user) {\n\t$new_user = get_user_meta($user->ID, '_new_user', true);\n\tif ($new_user) {\n\t\tupdate_user_meta($user->ID, '_new_user', '0');\n\n\t\t// do something for first login.. e.g., send a custom email\n $inscription_information = home_url('/inscription-information/');\n wp_redirect($inscription_information);\n exit;\n\n echo '<script>console.log(\"what?\")</script>';\n\n\t}\n}", "title": "" }, { "docid": "9a622985dce4c6e36b066f5b6e156aa6", "score": "0.65375847", "text": "function internet_allow_email_login( $user, $username, $password ) {\n if ( is_email( $username ) ) {\n $user = get_user_by_email( $username );\n if ( $user ) $username = $user->user_login;\n }\n return wp_authenticate_username_password( null, $username, $password );\n}", "title": "" }, { "docid": "c4bd7f9c5a9b22c795f5b85ead11d9e3", "score": "0.6458945", "text": "function mardiio_add_user_email( $post ) {\n // Generate security nonce for User Email input\n wp_nonce_field( 'mardiio_save_user_email_data', 'mardiio_user_email_meta_box_nonce' );\n\n // Collect User Email value\n $value = get_post_meta( $post->ID, '_user_email_value_key', true );\n\n // Create form for User Email custom meta box\n echo '<label for=\"mardiio_user_email_field\">User Email Address: </label>';\n echo '<input type=\"email\" id=\"mardiio_user_email_field\" name=\"mardiio_user_email_field\" value=\"' . esc_attr( $value ) . '\" size=\"25\" />';\n}", "title": "" }, { "docid": "5a0d5403d17a1b841bb43ec088f5c1ff", "score": "0.6448177", "text": "function prgen_ajax_frontend_user_register() {\n check_ajax_referer('prgen_frontend_register', 'security');\n $creds = [];\n $username = isset($_POST['username']) ? $_POST['username'] : '';\n $password = isset($_POST['password']) ? $_POST['password'] : '';\n $email = isset($_POST['email']) ? $_POST['email'] : '';\n\n if (empty($username)) {\n return wp_send_json_error([\n 'message' => 'Username is required.'\n ]);\n }\n\n if (empty($password)) {\n return wp_send_json_error([\n 'message' => 'password is required.'\n ]);\n }\n\n if (empty($email)) {\n return wp_send_json_error([\n 'message' => 'email is required.'\n ]);\n }\n \n $password = base64_decode($password);\n $new_user = prgen_create_new_user(sanitize_email($email), $username, $password);\n\n if (is_wp_error($new_user)) {\n return wp_send_json_error([\n 'message' => $new_user->get_error_message()\n ]);\n }\n\n\n $creds['user_login'] = $username;\n $creds['user_password'] = $password;\n\n $user = wp_signon($creds, is_ssl());\n if (is_wp_error($user)) {\n return wp_send_json_error([\n 'message' => $user->get_error_message()\n ]);\n } else {\n return wp_send_json_success([\n 'user' => $user->ID\n ]);\n }\n\n}", "title": "" }, { "docid": "9bb05b2f3a57f47aafc2209135d4a3b0", "score": "0.6427491", "text": "function custom_social_login($data) {\n // Collect data.\n $email = strtolower($data['email']);\n\n // Check if email does exists. If does, do login.\n $uid = db_query(\"SELECT uid FROM {users} WHERE LOWER(mail)=:mail\", array(':mail' => $email))->fetchColumn();\n if (!$uid) {\n // Register this user with the email.\n $result = custom_user_create_by_data($data);\n if ($result['uid']) {\n $uid = $result['uid'];\n \n // Send the username / password to user via email for keeping.\n $account = user_load($uid);\n $account->plain_pass = $result['pass'];\n drupal_mail('custom', 'custom_user_create_social_confirm', $account->mail, language_default(), array('account' => $account), variable_get('site_mail', '[email protected]'));\n }\n }\n\n if (!$uid) {return false;}\n\n // Auto login this user.\n global $user;\n $user = isset($account) ? $account : user_load($uid);\n drupal_session_regenerate();\n\n if (isset($user->roles[4]) or isset($user->roles[5])) {\n module_load_include('inc', 'custom', 'custom');\n custom_user_log_activity('Bạn đã ĐĂNG NHẬP vào hệ thống bằng tài khoản mạng xã hội.', 'user');\n }\n\n return $user;\n}", "title": "" }, { "docid": "f7285904d8440585ef54f633ee1dcf5a", "score": "0.6426281", "text": "function vicode_add_new_user() {\n if (isset( $_POST[\"micode_user_login\"] ) && wp_verify_nonce($_POST['micode_csrf'], 'micode-csrf')) {\n $user_login\t\t= $_POST[\"micode_user_login\"];\t\n $user_email\t\t= $_POST[\"micode_user_email\"];\n $user_first \t = $_POST[\"micode_user_first\"];\n $user_last\t \t= $_POST[\"micode_user_last\"];\n $user_pass\t\t= $_POST[\"micode_user_pass\"];\n $pass_confirm \t= $_POST[\"micode_user_pass_confirm\"];\n \n // this is required for username checks\n require_once(ABSPATH . WPINC . '/registration.php');\n \n if(username_exists($user_login)) {\n // Username already registered\n micode_errors()->add('username_unavailable', __('Username already taken'));\n }\n if(!validate_username($user_login)) {\n // invalid username\n micode_errors()->add('username_invalid', __('Invalid username'));\n }\n if($user_login == '') {\n // empty username\n micode_errors()->add('username_empty', __('Please enter a username'));\n }\n if(!is_email($user_email)) {\n //invalid email\n micode_errors()->add('email_invalid', __('Invalid email'));\n }\n if(email_exists($user_email)) {\n //Email address already registered\n micode_errors()->add('email_used', __('Email already registered'));\n }\n if($user_pass == '') {\n // passwords do not match\n micode_errors()->add('password_empty', __('Please enter a password'));\n }\n if($user_pass != $pass_confirm) {\n // passwords do not match\n micode_errors()->add('password_mismatch', __('Passwords do not match'));\n }\n \n $errors = micode_errors()->get_error_messages();\n \n // if no errors then cretate user\n if(empty($errors)) {\n \n $new_user_id = wp_insert_user(array(\n 'user_login'\t\t=> $user_login,\n 'user_pass'\t \t\t=> $user_pass,\n 'user_email'\t\t=> $user_email,\n 'first_name'\t\t=> $user_first,\n 'last_name'\t\t\t=> $user_last,\n 'user_registered'\t=> date('Y-m-d H:i:s'),\n 'role'\t\t\t\t=> 'subscriber'\n )\n );\n if($new_user_id) {\n // send an email to the admin\n wp_new_user_notification($new_user_id);\n \n // log the new user in\n wp_setcookie($user_login, $user_pass, true);\n wp_set_current_user($new_user_id, $user_login);\t\n do_action('wp_login', $user_login);\n \n // send the newly created user to the home page after logging them in\n wp_redirect(home_url()); exit;\n }\n \n }\n \n }\n}", "title": "" }, { "docid": "0591172cde4986f69e53ef977aec6a09", "score": "0.6393731", "text": "function sijaishaku_plugin_autologin( $user_id, $config, $entry, $password ) {\n\n wp_set_auth_cookie( $user_id, false, '' );\n\t\n}", "title": "" }, { "docid": "03aab127c72465a350e83ff38144e817", "score": "0.6378518", "text": "function ash_login_member() {\n \n if(isset($_POST['ash_user_login']) && wp_verify_nonce($_POST['ash_login_nonce'], 'ash-login-nonce')) {\n \n // this returns the user ID and other info from the user name\n $user = get_userdatabylogin($_POST['ash_user_login']);\n \n if(!$user) {\n // if the user name doesn't exist\n ash_errors()->add('empty_username', __('Invalid username'));\n }\n \n if(!isset($_POST['ash_user_pass']) || $_POST['ash_user_pass'] == '') {\n // if no password was entered\n ash_errors()->add('empty_password', __('Please enter a password'));\n }\n \n // check the user's login with their password\n if(!wp_check_password($_POST['ash_user_pass'], $user->user_pass, $user->ID)) {\n // if the password is incorrect for the specified user\n ash_errors()->add('empty_password', __('Incorrect password'));\n }\n \n // retrieve all error messages\n $errors = ash_errors()->get_error_messages();\n \n // only log the user in if there are no errors\n if(empty($errors)) {\n \n wp_setcookie($_POST['ash_user_login'], $_POST['ash_user_pass'], true);\n wp_set_current_user($user->ID, $_POST['ash_user_login']); \n do_action('wp_login', $_POST['ash_user_login']);\n \n wp_redirect(home_url()); exit;\n }\n }\n}", "title": "" }, { "docid": "0937ec0a76be7e2c2aaf5594c7fb20b4", "score": "0.63332105", "text": "function allonsy_allow_email_login( $user, $username, $password ) {\n\n\tif ( is_email( $username ) ) {\n\t\t$user = get_user_by( 'email', $username );\n\t\tif ( $user ) {\n\t\t\t$username = $user->user_login;\n\t\t}\n\t}\n\n\treturn wp_authenticate_username_password( NULL, $username, $password );\n}", "title": "" }, { "docid": "a6a8831ca7eb9ef3fdcb72b63b0f835f", "score": "0.63242", "text": "function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {\n\t$user = new WP_User( $user_id );\n\t$email = $user->user_email;\n\t$name = $user->user_login;\n\t$login_url = wp_login_url();\n\t$message = sprintf( __( \"Your new WordPress site has been successfully set up at:\n\n%1\\$s\n\nYou can log in to the administrator account with the following information:\n\nUsername: %2\\$s\nPassword: %3\\$s\nLog in here: %4\\$s\n\nWe hope you enjoy your new site. Thanks!\n\n--The WordPress Team\nhttps://wordpress.org/\n\"), $blog_url, $name, $password, $login_url );\n\n\t@wp_mail($email, __('New WordPress Site'), $message);\n}", "title": "" }, { "docid": "28f2ad142c48e10429909ff4d5cf24a7", "score": "0.632145", "text": "function attempt_login($wp) {\n $username = $wp->query_vars['username'];\n // $user assignment done on purpose\n if ($wp->query_vars['action'] == 'logmein' && $user = get_userdatabylogin($username)) {\n wp_set_current_user($user->ID);\n wp_set_auth_cookie($user->ID);\n wp_redirect(admin_url());\n }\n}", "title": "" }, { "docid": "c94d6b2b72f20b62fe346839a8ee42b7", "score": "0.6317141", "text": "function apply_during_activation( $user_id, $password, $meta ) {\n\t//if password was provided, use that\n\tif ( strlen( $meta['password'] ) > 0 ) {\n\t\twp_set_password( $meta['password'], $user_id );\n\t}\n}", "title": "" }, { "docid": "d7e5e63a4de8fc0f7f72daf476049698", "score": "0.626242", "text": "function virtu_custom_registration_function() {\r\n if (isset($_POST['submit'])) {\r\n registration_validation(\r\n $_POST['username'],\r\n $_POST['password'],\r\n $_POST['email'],\r\n $_POST['website'],\r\n $_POST['fname'],\r\n $_POST['lname'],\r\n $_POST['nickname'],\r\n $_POST['bio'],\r\n\t\t$_POST['password_repeat'],\r\n $_POST['zipCode'],\r\n $_POST['phoneNumber'],\r\n $_POST['email']\r\n );\r\n \r\n // sanitize user form input\r\n global $username, $password, $email, $website, $first_name, $last_name, $nickname, $bio,$role, $phoneNumber, $zipCode, $password_repeat;\r\n $username = sanitize_user($_POST['username']);\r\n $password = esc_attr($_POST['password']);\r\n $email = sanitize_email($_POST['email']);\r\n $website = esc_url($_POST['website']);\r\n $first_name = sanitize_text_field($_POST['fname']);\r\n $last_name = sanitize_text_field($_POST['lname']);\r\n $nickname = sanitize_text_field($_POST['nickname']);\r\n $phoneNumber = sanitize_text_field($_POST['phoneNumber']);\r\n $zipCode \t\t= sanitize_text_field($_POST['zipCode']);\r\n $bio = esc_textarea($_POST['bio']);\r\n $role = $_POST['role'];\r\n $password_repeat = esc_attr($_POST['password_repeat']);\r\n $phoneNumber = esc_attr($_POST['phoneNumber']);\r\n $email = esc_attr($_POST['email']);\r\n // call @function complete_registration to create the user\r\n // only when no WP_error is found\r\n complete_registration(\r\n $username,\r\n $password,\r\n $email,\r\n $website,\r\n $first_name,\r\n $last_name,\r\n $nickname,\r\n $bio,\r\n $zipCode,\r\n $phoneNumber,\r\n $email\r\n );\r\n }\r\n\r\n registration_form(\r\n $username,\r\n $password,\r\n $email,\r\n $website,\r\n $first_name,\r\n $last_name,\r\n $nickname,\r\n $bio,\r\n\t\t$phoneNumber,\r\n\t\t$zipCode,\r\n\t\t$password_repeat,\r\n $phoneNumber,\r\n $email\r\n );\r\n}", "title": "" }, { "docid": "20d2e8512bd4ffb19284dc5fba969ebd", "score": "0.6259002", "text": "function ppo_authenticate_username_password($user, $username, $password) {\n // then look up the matching username and authenticate as per normal, using that.\n if(is_email($username)){\n if (!empty($username))\n $user = get_user_by('email', $username);\n\n if (isset($user->user_login, $user))\n $username = $user->user_login;\n }\n\n // using the username found when looking up via email\n return wp_authenticate_username_password(NULL, $username, $password);\n}", "title": "" }, { "docid": "ac1590331c39695f4e07d8687c94804d", "score": "0.61908346", "text": "function prgen_create_new_user($email, $username = '', $password = '')\n{\n if (empty($email) || !is_email($email)) {\n return new WP_Error('registration-error-invalid-email', __('Please provide a valid email address.', 'prgen'));\n }\n\n if (email_exists($email)) {\n return new WP_Error('registration-error-email-exists', __('An account is already registered with your email address. Please login.', 'prgen'));\n }\n\n // Handle username creation\n if (!empty($username)) {\n\n $username = sanitize_user($username);\n\n if (empty($username) || !validate_username($username)) {\n return new WP_Error('registration-error-invalid-username', __('Please enter a valid account username.', 'prgen'));\n }\n\n if (username_exists($username))\n return new WP_Error('registration-error-username-exists', __('An account is already registered with that username. Please choose another.', 'prgen'));\n } else {\n\n $username = sanitize_user(current(explode('@', $email)), true);\n\n // Ensure username is unique\n $append = 1;\n $o_username = $username;\n\n while (username_exists($username)) {\n $username = $o_username . $append;\n $append++;\n }\n }\n\n // Handle password creation\n\n if (empty($password)) {\n return new WP_Error('registration-error-missing-password', __('Please enter an account password.', 'prgen'));\n } else {\n $password_generated = false;\n }\n\n // WP Validation\n $validation_errors = new WP_Error();\n\n if ($validation_errors->get_error_code())\n return $validation_errors;\n\n $new_user_data = array(\n 'user_login' => $username,\n 'user_pass' => $password,\n 'user_email' => $email,\n 'role' => get_option('default_role')\n );\n\n $user_id = wp_insert_user($new_user_data);\n\n if (is_wp_error($user_id)) {\n return new WP_Error('registration-error', '<strong>' . __('ERROR', 'prgen') . '</strong>: ' . __('Couldn&#8217;t register you&hellip; please contact us if you continue to have problems.', 'prgen'));\n }\n return $user_id;\n}", "title": "" }, { "docid": "73723b3ece336efa860b98e1dae6088a", "score": "0.61855435", "text": "function shaph_activate() {\n\t$shaph_anonymous_user = get_option( 'shaph_anonymous_user', false );\n\n\tif ( ! $shaph_anonymous_user ) {\n\t\t$args = array(\n\t\t\t'user_pass' => wp_generate_password(),\n\t\t\t'user_login' => 'anonymous',\n\t\t\t'display_name' => 'Anonymous Sharer',\n\t\t);\n\n\t\t$id = wp_insert_user( $args );\n\n\t\tif ( ! is_wp_error( $id ) ) {\n\t\t\tupdate_option( 'shaph_anonymous_user', $id );\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "148fb385e94369247faa06d1346a42e6", "score": "0.6184519", "text": "function get_email(){\n\n\t$user = wp_get_current_user();\n\treturn $user->user_email;\n\n}", "title": "" }, { "docid": "20066d985cdf3414f7efe49867feaa31", "score": "0.615611", "text": "function admin_default_page_register() {\n if (!empty($_GET['registered'])) {\n if($_GET['registered']){\n $user = wp_get_current_user();\n $roles = $user->roles;\n if(in_array(\"owner\",$roles)){\n /** check if user logged first time **/\n $track_user_login_status = get_user_meta($user->ID,\"track_user_login_status\", true);\n if($track_user_login_status){\n $useurl = home_url().'/dashboard/';\n wp_redirect($useurl);\n exit;\n }else{\n $useurl = home_url().'/signup-flow'; \n update_user_meta($user->ID,\"track_user_login_status\", 1);\n wp_redirect($useurl);\n exit;\n }\n }else{\n $useurl = home_url().'/dashboard/';\n wp_redirect($useurl);\n exit;\n }\n }\n }\n}", "title": "" }, { "docid": "a8605d927d22af38d288234cc7d2ea90", "score": "0.6141325", "text": "function wptool_login()\n{\n $creds = array();\n $creds['user_login'] = $_GET['username'];\n $creds['user_password'] = $_GET['password'];\n $creds['remember'] = true;\n $user = wp_signon( $creds, true);\n if ( is_wp_error($user) ) {\n $loginInfo = array(\n 'authenticated' => false,\n 'response' => $user->get_error_message()\n );\n } elseif (!in_array('administrator', $user->roles)) {\n $loginInfo = array(\n 'authenticated' => false,\n 'response' => 'Not an administrator'\n );\n } else {\n $loginInfo = array(\n 'authenticated' => true,\n 'response' => $user\n );\n }\n return $loginInfo;\n}", "title": "" }, { "docid": "d71e80441689e8d6b94428e658489dda", "score": "0.6139054", "text": "public function login() {\n\t\tWP_CLI::runcommand('plugin activate wp-cli-login-server');\n\t\tWP_CLI::log( 'Attempting to log you in...' );\n\t\t$username = Config::get( 'auth.username' );\n\t\tWP_CLI::runcommand( \"login create $username --launch\" );\n\t}", "title": "" }, { "docid": "b808f9ad20d5a8f350614413e186246d", "score": "0.6117651", "text": "public function doForgotPassword(){\n\t\t \n\t\t\t// First check the nonce, if it fails the function will break\n\t\t check_ajax_referer( 'ajax-opal-lostpassword-nonce', 'security' );\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$account = $_POST['user_login'];\n\t\t\t\n\t\t\tif( empty( $account ) ) {\n\t\t\t\t$error = esc_html__( 'Enter an username or e-mail address.', 'wpopal-themer' );\n\t\t\t} else {\n\t\t\t\tif(is_email( $account )) {\n\t\t\t\t\tif( email_exists($account) ) \n\t\t\t\t\t\t$get_by = 'email';\n\t\t\t\t\telse\t\n\t\t\t\t\t\t$error = esc_html__( 'There is no user registered with that email address.', 'wpopal-themer' );\t\t\t\n\t\t\t\t}\n\t\t\t\telse if (validate_username( $account )) {\n\t\t\t\t\tif( username_exists($account) ) \n\t\t\t\t\t\t$get_by = 'login';\n\t\t\t\t\telse\t\n\t\t\t\t\t\t$error = esc_html__( 'There is no user registered with that username.', 'wpopal-themer' );\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$error = esc_html__( 'Invalid username or e-mail address.', 'wpopal-themer' );\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\tif(empty ($error)) {\n\t\t\t\t$random_password = wp_generate_password();\n\n\t\t\t\t$user = get_user_by( $get_by, $account );\n\t\t\t\t\t\n\t\t\t\t$update_user = wp_update_user( array ( 'ID' => $user->ID, 'user_pass' => $random_password ) );\n\t\t\t\t\t\n\t\t\t\tif( $update_user ) {\n\t\t\t\t\t\n\t\t\t\t\t$from = get_option('admin_email'); // Set whatever you want like [email protected]\n\t\t\t\t\t\n\t\t\t\t\tif(!(isset($from) && is_email($from))) {\t\t\n\t\t\t\t\t\t$sitename = strtolower( $_SERVER['SERVER_NAME'] );\n\t\t\t\t\t\tif ( substr( $sitename, 0, 4 ) == 'www.' ) {\n\t\t\t\t\t\t\t$sitename = substr( $sitename, 4 );\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$from = 'do-not-reply@'.$sitename; \n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$to = $user->user_email;\n\t\t\t\t\t$subject = esc_html__( 'Your new password', 'wpopal-themer' );\n\t\t\t\t\t$sender = 'From: '.get_option('name').' <'.$from.'>' . \"\\r\\n\";\n\t\t\t\t\t\n\t\t\t\t\t$message = esc_html__( 'Your new password is: ', 'wpopal-themer' ) .$random_password;\n\t\t\t\t\t\t\n\t\t\t\t\t$headers[] = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t\t\t\t$headers[] = 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t\t\t\t$headers[] = \"X-Mailer: PHP \\r\\n\";\n\t\t\t\t\t$headers[] = $sender;\n\t\t\t\t\t\t\n\t\t\t\t\t$mail = wp_mail( $to, $subject, $message, $headers );\n\t\t\t\t\tif( $mail ) \n\t\t\t\t\t\t$success = esc_html__( 'Check your email address for you new password.', 'wpopal-themer' );\n\t\t\t\t\telse\n\t\t\t\t\t\t$error = esc_html__( 'System is unable to send you mail containg your new password.', 'wpopal-themer' );\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$error = esc_html__( 'Oops! Something went wrong while updating your account.', 'wpopal-themer' );\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif( ! empty( $error ) )\n\t\t\t\techo json_encode(array('loggedin'=>false, 'message'=> ($error)));\n\t\t\t\t\t\n\t\t\tif( ! empty( $success ) )\n\t\t\t\techo json_encode(array('loggedin'=>false, 'message'=> $success ));\t\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "561c5f003e20058b0e4fa1af9df617f1", "score": "0.6097802", "text": "function custom_registration_function_author() {\n if ( isset($_POST['maj_form'] ) ) {\n registration_validation_author(\n $_POST['nicename'],\n $_POST['password'],\n $_POST['email'],\n $_POST['description']\n \n\n );\n \n global $nicename, $password, $email, $description;\n\n $nicename = sanitize_user( $_POST['nicename'] );\n $password = esc_attr( $_POST['password'] );\n $email = sanitize_email( $_POST['email'] );\n $description = sanitize_text_field( $_POST['description'] );\n\n\n registration_completion(\n $nicename,\n $password,\n $email,\n $description\n \n );\n\n}\n}", "title": "" }, { "docid": "cd973ab5292401e4a9bb7c92f40e2c4f", "score": "0.6096072", "text": "public function login_notification() {\n\t\t$email = $this->args[0];\n\t\t$user_id = $this->args[1];\n\t\t$client_id = $this->args[2];\n\n\t\t$this->Send = new SendController();\n\t\t// returns id, username, name\n\t\t$user = $this->Send->notify_login($email,$user_id, $client_id);\n\n\t\t// Update JobID\n\t\t$this->status['status'] = 'Finished';\n\t\t$this->status['description'] = 'Notify '.$email.' that a user logged in. Username: '.$user['User']['username'];\n\t\t$this->status['finished'] = date('Y-m-d H:i:s');\n\t\t$jobId = end($this->args);\n\t\t$this->JobQueue->updateJob($jobId,$this->status);\n\t}", "title": "" }, { "docid": "2c936919a9467bff9ad957a09d3d6a85", "score": "0.6095252", "text": "function add_agency_admin($username,$name,$password,$email,$contact_num='',$reg_code,$action='',$note='') \n\t{\n\t\t \n\t\t// Create the new user\n\t\t$user_id = wp_create_user( $username, $password, $email );\n\n\t\t// Get current user object\n\t\t$user = get_user_by( 'id', $user_id );\n\t\t\n\t\t// add Name in user meta\n\t\tupdate_user_meta( $user_id, 'first_name', $name );\n\t\t// add contact number in user meta\n\t\tupdate_user_meta( $user_id, 'contact_number', $contact_num );\n\t\t// add contact number in user meta\n\t\tupdate_user_meta( $user_id, 'reg_code', $reg_code );\n\t\t// add action in user meta\n\t\tupdate_user_meta( $user_id, 'action', $action );\n\t\t// add action in user meta\n\t\tupdate_user_meta( $user_id, 'note', $note );\n // conditional check if user already exist or not\n\t\tif($user){\n\t\t\t//call this function for display suceess message if any aggency will created.\n\t\t\tadd_agency_message($user_id,$u_action='add',$message_type='success');\n\n\t\t\tadd_filter( 'wp_mail_content_type', 'fellow_mail_content_type' );\n\t\t\t \n\t\t\t$to = $user->user_email;\n\t\t\t$subject = 'New agency created';\n\t\t\t$body = '<p>Your agency has been created successfully. Following are your login credentials.</p><br>\n\t\t\t<b>Login :</b> http://lockedsandbox.com/fellow/wp-login.php<br>\n\t\t\t<b>Username :</b> '.$username. ' <br><b>Password :</b> '.$password;\n\t\t\t \n\t\t\twp_mail( $to, $subject, $body );\n\t\t\t \n\t\t\t// Reset content-type to avoid conflicts -- https://core.trac.wordpress.org/ticket/23578\n\t\t\tremove_filter( 'wp_mail_content_type', 'fellow_mail_content_type' );\n\t\t\t \n\t\t\tfunction fellow_mail_content_type() {\n\t\t\t return 'text/html';\n\t\t\t}\n\t\t\techo '<br>';\n\t\t\t/**\n\t\t\t* wp_create_user function set default subscriber role \n\t\t\t*\n\t\t\t* remove_role() function remove subscriber role of new create user;\n\t\t\t*/\n\t\t\t$user->remove_role( 'subscriber' );\n\t\t\t// add_role() function Add administrator role of new create user;\n\t\t\t$user->add_role( 'agencyadmin' );\n\n\t\t}else{\n\t\t\t//call this function for display error message if any aggency will already exist.\n\t\t\tadd_agency_message($user_id,$u_action='add',$message_type='error');\n\t\t}\n\t }", "title": "" }, { "docid": "8aff20fd351c5630b46b162232ecb4ee", "score": "0.60830575", "text": "function add_new_member() {\r\n \tif (isset( $_POST[\"user_login\"] ) && wp_verify_nonce($_POST['register_nonce'], 'register-nonce')) {\r\n\t\t$user_login\t\t= $_POST[\"user_login\"];\r\n\t\t$user_email\t\t= $_POST[\"user_email\"];\r\n\t\t$user_first \t= $_POST[\"user_first\"];\r\n\t\t$user_last\t \t= $_POST[\"user_last\"];\r\n\t\t$user_pass\t\t= $_POST[\"user_pass\"];\r\n\t\t$pass_confirm \t= $_POST[\"user_pass_confirm\"];\r\n\r\n\t\t// this is required for username checks\r\n\t\trequire_once(ABSPATH . WPINC . '/registration.php');\r\n\r\n\t\tif(username_exists($user_login)) {\r\n\t\t\t// Username already registered\r\n\t\t\terrors()->add('username_unavailable', __('Username already taken'));\r\n\t\t}\r\n\t\tif(!validate_username($user_login)) {\r\n\t\t\t// invalid username\r\n\t\t\terrors()->add('username_invalid', __('Invalid username'));\r\n\t\t}\r\n\t\tif($user_login == '') {\r\n\t\t\t// empty username\r\n\t\t\terrors()->add('username_empty', __('Please enter a username'));\r\n\t\t}\r\n\t\tif(!is_email($user_email)) {\r\n\t\t\t//invalid email\r\n\t\t\terrors()->add('email_invalid', __('Invalid email'));\r\n\t\t}\r\n\t\tif(email_exists($user_email)) {\r\n\t\t\t//Email address already registered\r\n\t\t\terrors()->add('email_used', __('Email already registered'));\r\n\t\t}\r\n\t\tif($user_pass == '') {\r\n\t\t\t// passwords do not match\r\n\t\t\terrors()->add('password_empty', __('Please enter a password'));\r\n\t\t}\r\n\t\tif($user_pass != $pass_confirm) {\r\n\t\t\t// passwords do not match\r\n\t\t\terrors()->add('password_mismatch', __('Passwords do not match'));\r\n\t\t}\r\n\r\n\t\t$errors = errors()->get_error_messages();\r\n\r\n\t\t// only create the user in if there are no errors\r\n\t\tif(empty($errors)) {\r\n\r\n\t\t\t$new_user_id = wp_insert_user(array(\r\n\t\t\t\t\t'user_login'\t\t=> $user_login,\r\n\t\t\t\t\t'user_pass'\t \t\t=> $user_pass,\r\n\t\t\t\t\t'user_email'\t\t=> $user_email,\r\n\t\t\t\t\t'first_name'\t\t=> $user_first,\r\n\t\t\t\t\t'last_name'\t\t\t=> $user_last,\r\n\t\t\t\t\t'user_registered'\t=> date('Y-m-d H:i:s'),\r\n\t\t\t\t\t'role'\t\t\t\t=> 'subscriber'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tif($new_user_id) {\r\n\t\t\t\t// send an email to the admin alerting them of the registration\r\n\t\t\t\twp_new_user_notification($new_user_id);\r\n\r\n\t\t\t\t// log the new user in\r\n\t\t\t\twp_setcookie($user_login, $user_pass, true);\r\n\t\t\t\twp_set_current_user($new_user_id, $user_login);\r\n\t\t\t\tdo_action('wp_login', $user_login);\r\n\r\n\t\t\t\t// send the newly created user to the home page after logging them in\r\n\t\t\t\twp_redirect(home_url()); exit;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "dd19d590e8f1ac34711442f27d3d3e5f", "score": "0.6079578", "text": "function wp_signon1( $credentials = '', $secure_cookie = '' ) {\tdo_action_ref_array('wp_authenticate', array(&$credentials['user_login'], &$credentials['user_password']));\r\n\r\n\tif ( '' === $secure_cookie )\r\n\t\t$secure_cookie = is_ssl();\r\n\r\n\t$secure_cookie = apply_filters('secure_signon_cookie', $secure_cookie, $credentials);\r\n\r\n\tglobal $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie\r\n\t$auth_secure_cookie = $secure_cookie;\r\n\r\n\tadd_filter('authenticate', 'wp_authenticate_cookie', 30, 3);\r\n\tremove_action('authenticate', 'wp_authenticate_username_password', 20);\r\nadd_filter( 'authenticate', 'my_custom_function', 10, 3 );\r\n\t$user = wp_authenticatenew($credentials['user_login'], $credentials['user_password']);\r\n\r\n\tif ( is_wp_error($user) ) {\r\n\t\tif ( $user->get_error_codes() == array('empty_username', 'empty_password') ) {\r\n\t\t\t$user = new WP_Error('', '');\r\n\t\t}\r\n\r\n\t\treturn $user;\r\n\t}\r\n\r\n\twp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);\r\n\tdo_action('wp_login', $credentials['user_login']);\r\n\treturn $user;\r\n}", "title": "" }, { "docid": "d9b559fc6fa2ba50c9a7a25c6d76e6e2", "score": "0.60749334", "text": "function wds_ogn_add_login_button_to_activation_page() {\n ?>\n <a class=\"wds-login-button\" href=\"<?php echo esc_url( wp_login_url() ); ?>\">\n <?php esc_html_e( 'Login Now', 'ourgreennation' ); ?>\n </a>\n <?php\n}", "title": "" }, { "docid": "4f8c4fa7ae8a19ec52182c73ea57458e", "score": "0.60651344", "text": "function sendNewUserEmail($email, $username, $name, $password)\n{\n $link_to_login = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]\".ROOT_PATH.\"/admin/admin_createuser.php\";\n\n // email subject and message\n $email_subject = 'New Account Created - LRG';\n $email_message_template = \"\nHello %s,\n\nYour account has been created successfully. To log in please visit:\n%s\n\nTo log in please use the following information:\n\nUsername: %s\nPassword: %s\n\nSincerly, \nThe London Referee Group\n\";\n\n // Prepare mesaage\n $email_message = sprintf($email_message_template, $name, $link_to_login, $username, $password);\n // Email headers\n $email_headers = array(\n 'From'=>'[email protected]',\n);\n // return result of email\n return mail($email, $email_subject, $email_message, $email_headers);\n}", "title": "" }, { "docid": "5c3125f1cd211db5f866dc45b5a6fff2", "score": "0.6064148", "text": "function wp_authenticate_user( $userdata ) {\n\t\t$isActivated = get_user_meta( $userdata->ID, 'is_activated', true );\n\t\tif ( ! $isActivated ) {\n\t\t\t$userdata = new WP_Error(\n\t\t\t\t'betta_confirmation_error',\n\t\t\t\tLang::get( \"Attention: Your account is inactive.\" ) .\n\t\t\t\t' <a href=\"/my-account/?u=' . $userdata->ID . '\">' . Lang::get( 'Send_again' ) . $userdata->user_email . '</a>'\n\t\t\t);\n\t\t}\n\n\t\treturn $userdata;\n\t}", "title": "" }, { "docid": "93643f32353a3d31d75adff4baa76acc", "score": "0.60532284", "text": "function tenup_pass_user_data($user_login, $user) { \n $current_user = wp_get_current_user();\n echo '<div id=\"name\">' . $user->user_firstname . '</div>'; \n echo '<div id=\"username\">' . $user->user_login . '</div>'; \n exit;\n}", "title": "" }, { "docid": "608e9f094337ce8efc5ed185fbab9d2f", "score": "0.6047094", "text": "function login_member() {\r\n\r\n\tif(isset($_POST['user_login']) && wp_verify_nonce($_POST['login_nonce'], 'login-nonce')) {\r\n\r\n\t\t// this returns the user ID and other info from the user name\r\n\t\t$user = get_userdatabylogin($_POST['user_login']);\r\n\r\n\t\tif(!$user) {\r\n\t\t\t// if the user name doesn't exist\r\n\t\t\terrors()->add('empty_username', __('Invalid username'));\r\n\t\t}\r\n\r\n\t\tif(!isset($_POST['user_pass']) || $_POST['user_pass'] == '') {\r\n\t\t\t// if no password was entered\r\n\t\t\terrors()->add('empty_password', __('Please enter a password'));\r\n\t\t}\r\n\r\n\t\t// check the user's login with their password\r\n\t\tif(!wp_check_password($_POST['user_pass'], $user->user_pass, $user->ID)) {\r\n\t\t\t// if the password is incorrect for the specified user\r\n\t\t\terrors()->add('empty_password', __('Incorrect password'));\r\n\t\t}\r\n\r\n\t\t// retrieve all error messages\r\n\t\t$errors = errors()->get_error_messages();\r\n\r\n\t\t// only log the user in if there are no errors\r\n\t\tif(empty($errors)) {\r\n\r\n\t\t\twp_setcookie($_POST['user_login'], $_POST['user_pass'], true);\r\n\t\t\twp_set_current_user($user->ID, $_POST['user_login']);\r\n\t\t\tdo_action('wp_login', $_POST['user_login']);\r\n\r\n\t\t\twp_redirect(home_url()); exit;\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "db6e6c4a380db2676e6ff29594b08c04", "score": "0.60462636", "text": "public function do_register_user()\n {\n if ('POST' == $_SERVER['REQUEST_METHOD']) {\n $redirect_url = $_POST['source_url'];\n\n if (!get_option('users_can_register')) {\n // Registration closed, display error\n $redirect_url = add_query_arg('register-errors', 'closed', $redirect_url);\n } elseif (!$this->verify_recaptcha() && $_POST['recaptcha_required'] === 'true') {\n // Recaptcha check failed, display error\n $redirect_url = add_query_arg('register-errors', 'captcha', $redirect_url);\n } else {\n $email = $_POST['email'];\n $first_name = sanitize_text_field($_POST['first_name']);\n $last_name = sanitize_text_field($_POST['last_name']);\n\n $result = $this->register_user($email, $first_name, $last_name);\n\n if (is_wp_error($result)) {\n $form_data = array(\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email\n );\n // Parse errors into a string and append as parameter to redirect\n $errors = join(',', $result->get_error_codes());\n $redirect_url = add_query_arg(array('register-errors' => $errors, 'form-data' => $form_data), $redirect_url);\n } else {\n // Success, redirect to login page.\n $redirect_url = add_query_arg('registered', $email, $redirect_url);\n }\n }\n\n wp_redirect($redirect_url);\n exit;\n }\n }", "title": "" }, { "docid": "6656b47280cbc4b03a9f9bfb6d4ab51c", "score": "0.6041708", "text": "function cmw_login_screen_activation() {\n if ( ! get_option( 'cmw_login_screen_options' ) ) {\n $options = array(\n 'logo' => '',\n\t\t\t'logo_url' => '',\n 'logo_image_title' => '',\n 'logo_message' => '',\n\t\t\t'footer_message' => '',\n );\n update_option( 'cmw_login_screen_options', $options );\n } \n}", "title": "" }, { "docid": "6938b98f6e3d568a5a6e332d534cbc7d", "score": "0.603898", "text": "public static function do_activation_link() {\n\t\t$login_url = FrmRegLoginController::login_page_url( 'wordpress' );\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\twp_redirect( esc_url_raw( $login_url ) );\n\t\t\texit();\n\t\t}\n\n\t\t$user_from_link = self::get_user_from_activation_link();\n\n\t\tif ( $user_from_link ) {\n\n\t\t\tif ( in_array( 'pending', (array) $user_from_link->roles ) ) {\n\n\t\t\t\tif ( self::is_activation_key_match_for_user( $user_from_link ) ) {\n\n\t\t\t\t\t// Activate user\n\t\t\t\t\t$moderate = self::activate_user( 'email', $user_from_link->ID );\n\t\t\t\t\tself::log_user_in_without_password( $user_from_link->ID );\n\t\t\t\t\t$redirect = self::get_redirect_for_activated_user( $user_from_link->ID, $moderate );\n\n\t\t\t\t} else {\n\t\t\t\t\t$redirect = add_query_arg( 'frmreg_error', 'invalid_key', $login_url );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$redirect = add_query_arg( 'frmreg_msg', 'clicked', $login_url );\n\t\t\t}\n\t\t} else {\n\t\t\t$redirect = add_query_arg( 'frmreg_error', 'invalid_key', $login_url );\n\t\t}\n\n\t\twp_redirect( esc_url_raw( $redirect ) );\n\t\texit();\n\t}", "title": "" }, { "docid": "562f6fa3d3ddb664923f2411dca1822d", "score": "0.6030187", "text": "function wpse_lost_password_redirect_after_mail() {\r\r\r\n\r\r\r\n // Check if have submitted \r\r\r\n $confirm = ( isset($_GET['checkemail'] ) ? $_GET['checkemail'] : '' );\r\r\r\n\r\r\r\n if( $confirm ) {\r\r\r\n wp_redirect( 'https://'.$_SERVER['HTTP_HOST'].'/sign-in/?mail=sent' ); \r\r\r\n exit;\r\r\r\n }\r\r\r\n}", "title": "" }, { "docid": "230b5c87191df35d5d9b8ac544d1ad2c", "score": "0.59809256", "text": "public static function process_login() {\n\n\t\t// Custom error messages.\n\t\t$messages = array(\n\t\t\t'username_is_required' => get_option( 'user_registration_message_username_required', __( 'Username is required.', 'user-registration' ) ),\n\t\t\t'empty_password' => get_option( 'user_registration_message_empty_password', null ),\n\t\t\t'invalid_username' => get_option( 'user_registration_message_invalid_username', null ),\n\t\t\t'unknown_email' => get_option( 'user_registration_message_unknown_email', __( 'A user could not be found with this email address.', 'user-registration' ) ),\n\t\t\t'pending_approval' => get_option( 'user_registration_message_pending_approval', null ),\n\t\t\t'denied_access' => get_option( 'user_registration_message_denied_account', null ),\n\t\t);\n\n\t\t$nonce_value = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';\n\t\t$nonce_value = isset( $_POST['user-registration-login-nonce'] ) ? $_POST['user-registration-login-nonce'] : $nonce_value;\n\t\t$recaptcha_value = isset( $_POST['g-recaptcha-response'] ) ? $_POST['g-recaptcha-response'] : '';\n\n\t\t$recaptcha_enabled = get_option( 'user_registration_login_options_enable_recaptcha', 'no' );\n\t\t$recaptcha_version = get_option( 'user_registration_integration_setting_recaptcha_version' );\n\t\t$secret_key = 'v3' === $recaptcha_version ? get_option( 'user_registration_integration_setting_recaptcha_site_secret_v3' ) : get_option( 'user_registration_integration_setting_recaptcha_site_secret' );\n\n\t\tif ( ! empty( $_POST['login'] ) && wp_verify_nonce( $nonce_value, 'user-registration-login' ) ) {\n\n\t\t\ttry {\n\t\t\t\t$creds = array(\n\t\t\t\t\t'user_password' => $_POST['password'],\n\t\t\t\t\t'remember' => isset( $_POST['rememberme'] ),\n\t\t\t\t);\n\n\t\t\t\t$username = trim( $_POST['username'] );\n\t\t\t\t$validation_error = new WP_Error();\n\t\t\t\t$validation_error = apply_filters( 'user_registration_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );\n\n\t\t\t\tif ( 'yes' == $recaptcha_enabled || '1' == $recaptcha_enabled ) {\n\t\t\t\t\tif ( ! empty( $recaptcha_value ) ) {\n\n\t\t\t\t\t\t$data = wp_remote_get( 'https://www.google.com/recaptcha/api/siteverify?secret=' . $secret_key . '&response=' . $recaptcha_value );\n\t\t\t\t\t\t$data = json_decode( wp_remote_retrieve_body( $data ) );\n\n\t\t\t\t\t\tif ( empty( $data->success ) || ( isset( $data->score ) && $data->score < apply_filters( 'user_registration_recaptcha_v3_threshold', 0.5 ) ) ) {\n\t\t\t\t\t\t\tthrow new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong>' . __( 'Error on google reCaptcha. Contact your site administrator.', 'user-registration' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong>' . get_option( 'user_registration_form_submission_error_message_recaptcha', __( 'Captcha code error, please try again.', 'user-registration' ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( $validation_error->get_error_code() ) {\n\t\t\t\t\tthrow new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong>' . $validation_error->get_error_message() );\n\t\t\t\t}\n\n\t\t\t\tif ( empty( $username ) ) {\n\t\t\t\t\tthrow new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong>' . $messages['username_is_required'] );\n\t\t\t\t}\n\n\t\t\t\tif ( is_email( $username ) && apply_filters( 'user_registration_get_username_from_email', true ) ) {\n\t\t\t\t\t$user = get_user_by( 'email', $username );\n\n\t\t\t\t\tif ( isset( $user->user_login ) ) {\n\t\t\t\t\t\t$creds['user_login'] = $user->user_login;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception( '<strong>' . __( 'ERROR:', 'user-registration' ) . '</strong>' . $messages['unknown_email'] );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$creds['user_login'] = $username;\n\t\t\t\t}\n\n\t\t\t\t// On multisite, ensure user exists on current site, if not add them before allowing login.\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\t$user_data = get_user_by( 'login', $username );\n\n\t\t\t\t\tif ( $user_data && ! is_user_member_of_blog( $user_data->ID, get_current_blog_id() ) ) {\n\t\t\t\t\t\tadd_user_to_blog( get_current_blog_id(), $user_data->ID, 'customer' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Perform the login\n\t\t\t\t$user = wp_signon( apply_filters( 'user_registration_login_credentials', $creds ), is_ssl() );\n\n\t\t\t\tif ( is_wp_error( $user ) ) {\n\t\t\t\t\t// Set custom error messages.\n\t\t\t\t\tif ( ! empty( $user->errors['empty_password'] ) && ! empty( $messages['empty_password'] ) ) {\n\t\t\t\t\t\t$user->errors['empty_password'][0] = sprintf( '<strong>%s:</strong> %s', __( 'ERROR', 'user-registration' ), $messages['empty_password'] );\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! empty( $user->errors['invalid_username'] ) && ! empty( $messages['invalid_username'] ) ) {\n\t\t\t\t\t\t$user->errors['invalid_username'][0] = $messages['invalid_username'];\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! empty( $user->errors['pending_approval'] ) && ! empty( $messages['pending_approval'] ) ) {\n\t\t\t\t\t\t$user->errors['pending_approval'][0] = sprintf( '<strong>%s:</strong> %s', __( 'ERROR', 'user-registration' ), $messages['pending_approval'] );\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! empty( $user->errors['denied_access'] ) && ! empty( $messages['denied_access'] ) ) {\n\t\t\t\t\t\t$user->errors['denied_access'][0] = sprintf( '<strong>%s:</strong> %s', __( 'ERROR', 'user-registration' ), $messages['denied_access'] );\n\t\t\t\t\t}\n\n\t\t\t\t\t$message = $user->get_error_message();\n\t\t\t\t\t$message = str_replace( '<strong>' . esc_html( $creds['user_login'] ) . '</strong>', '<strong>' . esc_html( $username ) . '</strong>', $message );\n\t\t\t\t\tthrow new Exception( $message );\n\t\t\t\t} else {\n\t\t\t\t\tif ( in_array( 'administrator', $user->roles ) && 'yes' === get_option( 'user_registration_login_options_prevent_core_login', 'no' ) ) {\n\t\t\t\t\t\t$redirect = admin_url();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( ! empty( $_POST['redirect'] ) ) {\n\t\t\t\t\t\t\t$redirect = $_POST['redirect'];\n\t\t\t\t\t\t} elseif ( wp_get_raw_referer() ) {\n\t\t\t\t\t\t\t$redirect = wp_get_raw_referer();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$redirect = get_home_url();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twp_redirect( wp_validate_redirect( apply_filters( 'user_registration_login_redirect', $redirect, $user ), $redirect ) );\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\tur_add_notice( apply_filters( 'login_errors', $e->getMessage() ), 'error' );\n\t\t\t\tdo_action( 'user_registration_login_failed' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9fad62cd6c7c039dfe71755cc0eb49f2", "score": "0.5967783", "text": "function plugin_version_loginbyemail() {\n return array(\n 'name' => 'Login By E-mail',\n 'version' => '1.0.0',\n 'author' => 'Edgard Lorraine Messias',\n 'homepage' => 'https://github.com/edgardmessias/loginbyemail',\n 'license' => 'BSD-3-Clause',\n 'minGlpiVersion' => '0.80'\n );\n}", "title": "" }, { "docid": "4b8316b8f2728c1d7dcbc25ab0f82cef", "score": "0.5963359", "text": "function create_program_member($args) {\n\n $user_id = wp_insert_user(array(\n 'user_login' => $args['program_member_email'],\n 'display_name' => $args['program_member_name'],\n 'user_email' => $args['program_member_email'],\n 'role' => 'Programmember'\n ));\n\n\n //add_user_meta($user_id, 'customer', $args['customer']);\n\n add_user_meta($user_id, 'contactno', $args['program_member_phone']);\n\n $hash_value = md5($args['program_member_email']);\n\n add_user_meta($user_id, 'hash', $hash_value);\n\n check_customer($args['program_member_email'],$args['program_member_phone'],$user_id);\n\n return $user_id;\n}", "title": "" }, { "docid": "cb368ad62cf4753898e39c08709232ad", "score": "0.5962741", "text": "function retrieve_password_ajx() {\n global $wpdb, $current_site;\n\n $errors = new WP_Error();\n\n if (empty($_POST['user_login'])) {\n //$errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));\n $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>Enter a username or e-mail address.</div>\";\n $success_val = false;\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n } else if (strpos($_POST['user_login'], '@')) {\n $user_data = get_user_by('email', trim($_POST['user_login']));\n if (empty($user_data)) { //$errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.'));\n $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>There is no user registered with that email address.</div>\";\n $success_val = false;\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n }\n } else {\n $login = trim($_POST['user_login']);\n $user_data = get_user_by('login', $login);\n }\n\n do_action('lostpassword_post');\n\n if ($errors->get_error_code()) {\n //\treturn $errors;\n $success_val = false;\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n }\n\n if (!$user_data) {\n //$errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or e-mail.'));\n $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>Invalid username or e-mail.</div>\";\n $success_val = false;\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n //return $errors;\n }\n\n // redefining user_login ensures we return the right case in the email\n $user_login = $user_data->user_login;\n $user_email = $user_data->user_email;\n\n do_action('retreive_password', $user_login); // Misspelled and deprecated\n do_action('retrieve_password', $user_login);\n\n $allow = apply_filters('allow_password_reset', true, $user_data->ID);\n\n if (!$allow) {\n //return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));\n $success_val = false;\n $msg = 'Password reset is not allowed for this user';\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n } else if (is_wp_error($allow))\n return $allow;\n\n $key = $wpdb->get_var($wpdb->prepare(\"SELECT user_activation_key FROM $wpdb->users WHERE user_login = %s\", $user_login));\n if (empty($key)) {\n // Generate something random for a key...\n $key = wp_generate_password(20, false);\n do_action('retrieve_password_key', $user_login, $key);\n // Now insert the new md5 key into the db\n $wpdb->update($wpdb->users, array('user_activation_key' => $key), array('user_login' => $user_login));\n }\n $message = 'Hi, <br/><br/>Someone requested that the password be reset for the following account on <a href=\"' . site_url() . '\">' . site_url() . '</a>';\n\n $message .= '<br/>Username: ' . $user_login;\n $message .= '<br/><br/>If this was a mistake, just ignore this email and nothing will happen.';\n $message .= '<br/>To reset your password, visit the following address:';\n //$message .= '<' . network_site_url(\"reset-password.php?action=rp&key=$key&login=\" . rawurlencode($user_login), 'login') . \">\\r\\n\";\n $message .=\" <br/><a href='\" . site_url() . \"/change-password/?action=rp&key=\" . $key . \"&login=\" . rawurlencode($user_login) . \"'>\" . site_url() . \"/change-password/?action=ver&key=\" . $user_activation_key . \"&login=\" . rawurlencode($user_login) . \"</a>\\r\\n\";\n if (is_multisite())\n $blogname = $GLOBALS['current_site']->site_name;\n else\n // The blogname option is escaped with esc_html on the way into the database in sanitize_option\n // we want to reverse this for the plain text arena of emails.\n $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n $title = sprintf(__('[%s] Password Reset'), $blogname);\n\n $title = apply_filters('retrieve_password_title', $title);\n $message = apply_filters('retrieve_password_message', $message, $key);\n\n add_filter('wp_mail_content_type', create_function('', 'return \"text/html\";'));\n $headers = 'From: Minyawns <[email protected]>' . \"\\r\\n\";\n\n if ($message && !wp_mail($user_email, $title, email_header() . $message . email_signature(), $headers)) {\n $msg = '<div class=\"alert alert-success alert-box \"> <button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>The e-mail could not be sent.' . \"<br />\\n\" . 'Possible reason: your host may have disabled the mail() function.</div>';\n $success_val = false;\n } else {\n //wp_die( __('The e-mail could not be sent.') . \"<br />\\n\" . __('Possible reason: your host may have disabled the mail() function.') );\n $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>Check your e-mail for the confirmation link.</div>\";\n $success_val = true;\n }\n\n $response = array('success' => $success_val, 'msg' => $msg);\n wp_send_json($response);\n\n return true;\n}", "title": "" }, { "docid": "75496e15d195689a1c7d859b48abd914", "score": "0.5955219", "text": "function wp_insert_user_customs( $userdata ) {\n\tglobal $wpdb;\n\n\tif ( $userdata instanceof stdClass ) {\n\t\t$userdata = get_object_vars( $userdata );\n\t} elseif ( $userdata instanceof WP_User ) {\n\t\t$userdata = $userdata->to_array();\n\t}\n\n\t// Are we updating or creating?\n\tif ( ! empty( $userdata['ID'] ) ) {\n\t\t$ID = (int) $userdata['ID'];\n\t\t$update = true;\n\t\t$old_user_data = get_userdata( $ID );\n\n\t\tif ( ! $old_user_data ) {\n\t\t\treturn new WP_Error( 'invalid_user_id', __( 'Invalid user ID.' ) );\n\t\t}\n\n\t\t// hashed in wp_update_user(), plaintext if called directly\n\t\t$user_pass = ! empty( $userdata['user_pass'] ) ? $userdata['user_pass'] : $old_user_data->user_pass;\n\t} else {\n\t\t$update = false;\n\t\t// Hash the password\n\t\t$user_pass = wp_hash_password( $userdata['user_pass'] );\n\t}\n\n\t$sanitized_user_login = sanitize_user( $userdata['user_login'], true );\n\n\t/**\n\t * Filters a username after it has been sanitized.\n\t *\n\t * This filter is called before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $sanitized_user_login Username after it has been sanitized.\n\t */\n\t$pre_user_login = apply_filters( 'pre_user_login', $sanitized_user_login );\n\n\t//Remove any non-printable chars from the login string to see if we have ended up with an empty username\n\t$user_login = trim( $pre_user_login );\n\n\t// user_login must be between 0 and 60 characters.\n\tif ( empty( $user_login ) ) {\n\t\treturn new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') );\n\t} elseif ( mb_strlen( $user_login ) > 60 ) {\n\t\treturn new WP_Error( 'user_login_too_long', __( 'Username may not be longer than 60 characters.' ) );\n\t}\n\n\tif ( ! $update && username_exists( $user_login ) ) {\n\t\treturn new WP_Error( 'existing_user_login', __( 'Sorry, that username already exists!' ) );\n\t}\n\n\t/**\n\t * Filters the list of blacklisted usernames.\n\t *\n\t * @since 4.4.0\n\t *\n\t * @param array $usernames Array of blacklisted usernames.\n\t */\n\t$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );\n\n\tif ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ) ) ) {\n\t\treturn new WP_Error( 'invalid_username', __( 'Sorry, that username is not allowed.' ) );\n\t}\n\n\t/*\n\t * If a nicename is provided, remove unsafe user characters before using it.\n\t * Otherwise build a nicename from the user_login.\n\t */\n\tif ( ! empty( $userdata['user_nicename'] ) ) {\n\t\t$user_nicename = sanitize_user( $userdata['user_nicename'], true );\n\t\tif ( mb_strlen( $user_nicename ) > 50 ) {\n\t\t\treturn new WP_Error( 'user_nicename_too_long', __( 'Nicename may not be longer than 50 characters.' ) );\n\t\t}\n\t} else {\n\t\t$user_nicename = mb_substr( $user_login, 0, 50 );\n\t}\n\n\t$user_nicename = sanitize_title( $user_nicename );\n\n\t// Store values to save in user meta.\n\t$meta = array();\n\n\t/**\n\t * Filters a user's nicename before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $user_nicename The user's nicename.\n\t */\n\t$user_nicename = apply_filters( 'pre_user_nicename', $user_nicename );\n\n\t$raw_user_url = empty( $userdata['user_url'] ) ? '' : $userdata['user_url'];\n\n\t/**\n\t * Filters a user's URL before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $raw_user_url The user's URL.\n\t */\n\t$user_url = apply_filters( 'pre_user_url', $raw_user_url );\n\n\t$raw_user_email = empty( $userdata['user_email'] ) ? '' : $userdata['user_email'];\n\n\t/**\n\t * Filters a user's email before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $raw_user_email The user's email.\n\t */\n\t$user_email = apply_filters( 'pre_user_email', $raw_user_email );\n\n\t/*\n\t * If there is no update, just check for `email_exists`. If there is an update,\n\t * check if current email and new email are the same, or not, and check `email_exists`\n\t * accordingly.\n\t */\n\tif ( ( ! $update || ( ! empty( $old_user_data ) && 0 !== strcasecmp( $user_email, $old_user_data->user_email ) ) )\n\t && ! defined( 'WP_IMPORTING' )\n\t && email_exists( $user_email )\n\t) {\n\t\treturn new WP_Error( 'existing_user_email', __( 'Sorry, that email address is already used!' ) );\n\t}\n\t$nickname = empty( $userdata['nickname'] ) ? $user_login : $userdata['nickname'];\n\n\t/**\n\t * Filters a user's nickname before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $nickname The user's nickname.\n\t */\n\t$meta['nickname'] = apply_filters( 'pre_user_nickname', $nickname );\n\n\t$first_name = empty( $userdata['first_name'] ) ? '' : $userdata['first_name'];\n\n\t/**\n\t * Filters a user's first name before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $first_name The user's first name.\n\t */\n\t$meta['first_name'] = apply_filters( 'pre_user_first_name', $first_name );\n\n\t$last_name = empty( $userdata['last_name'] ) ? '' : $userdata['last_name'];\n\n\t/**\n\t * Filters a user's last name before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $last_name The user's last name.\n\t */\n\t$meta['last_name'] = apply_filters( 'pre_user_last_name', $last_name );\n\n\tif ( empty( $userdata['display_name'] ) ) {\n\t\tif ( $update ) {\n\t\t\t$display_name = $user_login;\n\t\t} elseif ( $meta['first_name'] && $meta['last_name'] ) {\n\t\t\t/* translators: 1: first name, 2: last name */\n\t\t\t$display_name = sprintf( _x( '%1$s %2$s', 'Display name based on first name and last name' ), $meta['first_name'], $meta['last_name'] );\n\t\t} elseif ( $meta['first_name'] ) {\n\t\t\t$display_name = $meta['first_name'];\n\t\t} elseif ( $meta['last_name'] ) {\n\t\t\t$display_name = $meta['last_name'];\n\t\t} else {\n\t\t\t$display_name = $user_login;\n\t\t}\n\t} else {\n\t\t$display_name = $userdata['display_name'];\n\t}\n\n\t/**\n\t * Filters a user's display name before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $display_name The user's display name.\n\t */\n\t$display_name = apply_filters( 'pre_user_display_name', $display_name );\n\n\t$description = empty( $userdata['description'] ) ? '' : $userdata['description'];\n\n\t/**\n\t * Filters a user's description before the user is created or updated.\n\t *\n\t * @since 2.0.3\n\t *\n\t * @param string $description The user's description.\n\t */\n\t$meta['description'] = apply_filters( 'pre_user_description', $description );\n\n\t$meta['rich_editing'] = empty( $userdata['rich_editing'] ) ? 'true' : $userdata['rich_editing'];\n\n\t$meta['comment_shortcuts'] = empty( $userdata['comment_shortcuts'] ) || 'false' === $userdata['comment_shortcuts'] ? 'false' : 'true';\n\n\t$admin_color = empty( $userdata['admin_color'] ) ? 'fresh' : $userdata['admin_color'];\n\t$meta['admin_color'] = preg_replace( '|[^a-z0-9 _.\\-@]|i', '', $admin_color );\n\n\t$meta['use_ssl'] = empty( $userdata['use_ssl'] ) ? 0 : $userdata['use_ssl'];\n\n\t$user_registered = empty( $userdata['user_registered'] ) ? gmdate( 'Y-m-d H:i:s' ) : $userdata['user_registered'];\n\n\t$meta['show_admin_bar_front'] = empty( $userdata['show_admin_bar_front'] ) ? 'true' : $userdata['show_admin_bar_front'];\n\n\t$meta['locale'] = isset( $userdata['locale'] ) ? $userdata['locale'] : '';\n\n\t$user_nicename_check = $wpdb->get_var( $wpdb->prepare(\"SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1\" , $user_nicename, $user_login));\n\n\tif ( $user_nicename_check ) {\n\t\t$suffix = 2;\n\t\twhile ($user_nicename_check) {\n\t\t\t// user_nicename allows 50 chars. Subtract one for a hyphen, plus the length of the suffix.\n\t\t\t$base_length = 49 - mb_strlen( $suffix );\n\t\t\t$alt_user_nicename = mb_substr( $user_nicename, 0, $base_length ) . \"-$suffix\";\n\t\t\t$user_nicename_check = $wpdb->get_var( $wpdb->prepare(\"SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1\" , $alt_user_nicename, $user_login));\n\t\t\t$suffix++;\n\t\t}\n\t\t$user_nicename = $alt_user_nicename;\n\t}\n\n\t$compacted = compact( 'user_pass', 'user_email', 'user_url', 'user_nicename', 'display_name', 'user_registered' );\n\t$data = wp_unslash( $compacted );\n\n\tif ( $update ) {\n\t\tif ( $user_email !== $old_user_data->user_email ) {\n\t\t\t$data['user_activation_key'] = '';\n\t\t}\n\t\t$wpdb->update( $wpdb->users, $data, compact( 'ID' ) );\n\t\t$user_id = (int) $ID;\n\t} else {\n\t\t$wpdb->insert( $wpdb->users, $data + compact( 'user_login' ) );\n\t\t$user_id = (int) $wpdb->insert_id;\n\t}\n\n\t$user = new WP_User( $user_id );\n\n\t/**\n\t * Filters a user's meta values and keys before the user is created or updated.\n\t *\n\t * Does not include contact methods. These are added using `wp_get_user_contact_methods( $user )`.\n\t *\n\t * @since 4.4.0\n\t *\n\t * @param array $meta {\n\t * Default meta values and keys for the user.\n\t *\n\t * @type string $nickname The user's nickname. Default is the user's username.\n\t * @type string $first_name The user's first name.\n\t * @type string $last_name The user's last name.\n\t * @type string $description The user's description.\n\t * @type bool $rich_editing Whether to enable the rich-editor for the user. False if not empty.\n\t * @type bool $comment_shortcuts Whether to enable keyboard shortcuts for the user. Default false.\n\t * @type string $admin_color The color scheme for a user's admin screen. Default 'fresh'.\n\t * @type int|bool $use_ssl Whether to force SSL on the user's admin area. 0|false if SSL is\n\t * not forced.\n\t * @type bool $show_admin_bar_front Whether to show the admin bar on the front end for the user.\n\t * Default true.\n\t * }\n\t * @param WP_User $user User object.\n\t * @param bool $update Whether the user is being updated rather than created.\n\t */\n\t$meta = apply_filters( 'insert_user_meta', $meta, $user, $update );\n\n\t// Update user meta.\n\tforeach ( $meta as $key => $value ) {\n\t\tupdate_user_meta( $user_id, $key, $value );\n\t}\n\n\tforeach ( wp_get_user_contact_methods( $user ) as $key => $value ) {\n\t\tif ( isset( $userdata[ $key ] ) ) {\n\t\t\tupdate_user_meta( $user_id, $key, $userdata[ $key ] );\n\t\t}\n\t}\n\n\tif ( isset( $userdata['role'] ) ) {\n\t\t$user->set_role( $userdata['role'] );\n\t} elseif ( ! $update ) {\n\t\t$user->set_role(get_option('default_role'));\n\t}\n\twp_cache_delete( $user_id, 'users' );\n\twp_cache_delete( $user_login, 'userlogins' );\n\n//\tif ( $update ) {\n//\t\t/**\n//\t\t * Fires immediately after an existing user is updated.\n//\t\t *\n//\t\t * @since 2.0.0\n//\t\t *\n//\t\t * @param int $user_id User ID.\n//\t\t * @param object $old_user_data Object containing user's data prior to update.\n//\t\t */\n//\t\tdo_action( 'profile_update', $user_id, $old_user_data );\n//\t} else {\n//\t\t/**\n//\t\t * Fires immediately after a new user is registered.\n//\t\t *\n//\t\t * @since 1.5.0\n//\t\t *\n//\t\t * @param int $user_id User ID.\n//\t\t */\n//\t\tdo_action( 'user_register', $user_id );\n//\t}\n\n\treturn $user_id;\n}", "title": "" }, { "docid": "f6419b41cd1106f9a596efe0721d71bc", "score": "0.594402", "text": "function wpll_activate() {\n\t$user_ids = get_users(\n\t\tarray(\n\t\t\t'blog_id' => '',\n\t\t\t'fields' => 'ID',\n\t\t)\n\t);\n\n\tforeach ( $user_ids as $user_id ) {\n\t\tupdate_user_meta( $user_id, 'wp-last-login', 0 );\n\t}\n}", "title": "" }, { "docid": "1cce273ee3cb7046adaab9c0d8c77390", "score": "0.5935402", "text": "function addthis_check_user_exists(){\r\n\r\n\tif ( empty( $_REQUEST['at_custom_userlogin'] ) || trim( $_REQUEST['at_custom_userlogin'] ) == \"\" || !validate_username( $_REQUEST['at_custom_userlogin'] ) )\r\n\t\techo '<div class=\"error-alert\">Invalid Username</div>';\t\r\n\t\r\n\tif ( isset( $_REQUEST['at_custom_userlogin'] ) && username_exists( $_REQUEST['at_custom_userlogin'] ) )\t\r\n\t\techo '<div class=\"error-alert\">Username exists</div>';\t\r\n\t\r\n\tif( email_exists( $_REQUEST['at_custom_email'] ) ) {\r\n\t\t\r\n\t\tsetcookie( \"at_ssi_exist_userdata\", serialize( $_REQUEST ), time()+900, \"/\" );\r\n\t\techo '<div class=\"email-exist-alert\">The given emailid is already exists. Do you want to connect that account with this social authentication? If so please \r\n\t\t<a href=\"'.wp_login_url().'?action=at_email_exist\">login</a> to your account with the credentials you already have, we will automatically connect this authentication to your existing account. </div>';\r\n\t}\t\r\n\t\t\r\n\t if( !eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}(\\.[a-zA-Z]{2,3})?(\\.[a-zA-Z]{2,3})?$', $_REQUEST['at_custom_email'])) {\r\n \techo '<div class=\"error-alert\">Invalid Email</div>';\r\n\t}\t\r\n\r\n\tdie();\r\n}", "title": "" }, { "docid": "432b59adc919b3e45b60dd2d41b2f0b9", "score": "0.5931532", "text": "function ajax_login() {\r\n\t\t// check_ajax_referer( 'ajax-login-nonce', 'security' );\r\n\r\n\t\t// Nonce is checked, get the POST data and sign user on\r\n\t\t$info = array();\r\n\t\t$info['user_login'] = $_POST['username'];\r\n\t\t$info['user_password'] = $_POST['password'];\r\n\t\t$info['remember'] = true;\r\n\r\n\t // Login with email address enabled by Improved User Experience plugin isn't working\r\n\t if ( is_email($info['user_login']) ) {\r\n\t\t if ( $user = get_user_by( 'email', $info['user_login'] ) ) {\r\n\t\t\t $info['user_login'] = $user->user_login;\r\n\t\t }\r\n\t }\r\n\r\n\t\t$user_signon = wp_signon( $info, force_ssl_admin() );\r\n\r\n\t\tif ( is_wp_error($user_signon) ){\r\n\t\t\techo json_encode(array('loggedin'=>false, 'message'=>__('ERROR: Your email address or password is incorrect.')));\r\n\t\t} else {\r\n\t\t\techo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, one second please...')));\r\n\t\t}\r\n\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "f4a2a4a9e72cf221881f156810164025", "score": "0.5921575", "text": "public function authregistrationAction()\n {\n if (isset($_POST['email']) && isset($_POST['password'])) {\n $customer = Mage::getModel('customer/customer');\n //$customer = new Mage_Customer_Model_Customer();\n $email = $_POST['email'];\n $firstname = $_POST['firstname'];\n $lastname = $_POST['lastname'];\n $password = $_POST['password'];\n\n\n $customer->setWebsiteId(Mage::app()->getWebsite()->getId());\n $customer->loadByEmail($email);\n //Zend_Debug::dump($customer->debug()); exit;\n\n if (!$customer->getId()) {\n\n $customer->setEmail($email);\n $customer->setFirstname($firstname);\n $customer->setLastname($lastname);\n $customer->setPassword($password);\n }\n\n try {\n $customer->save();\n $customer->setConfirmation(null);\n $customer->save();\n\n //Make a \"login\" of new customer\n Mage::getSingleton('customer/session')->loginById($customer->getId());\n $url = Mage::getBaseUrl() . 'awesomebox/index';\n $this->_redirectUrl($url);\n } catch (Exception $ex) {\n $msg = array('message' => 'Failed to create user.');\n Mage::getSingleton('core/session')->setCauthmessage($msg);\n }\n } else {\n Mage::getSingleton('core/session')->unsCauthmessage();\n }\n $this->loadLayout();\n $this->_initLayoutMessages('customer/session');\n $this->renderLayout();\n }", "title": "" }, { "docid": "f85ac0f6e6b5ebf3a228dc00878d3be0", "score": "0.59163064", "text": "public function generate_auth_cookie_by_email() {\n global $json_api;\n global $wpdb;\n\n $nonce_id = $json_api->get_nonce_id('rest', 'generate_auth_cookie_by_email');\n if (!wp_verify_nonce($json_api->query->nonce, $nonce_id)) {\n $json_api->error(\"Your 'nonce' value was incorrect. Use the 'get_nonce' API method.\");\n }\n\n if (!$json_api->query->email) {\n $json_api->error(\"You must include a 'username' var in your request.\");\n }\n\n if (!$json_api->query->password) {\n $json_api->error(\"You must include a 'password' var in your request.\");\n }\n\n $user = wp_authenticate_using_email($json_api->query->email, $json_api->query->password);\n if (is_wp_error($user)) {\n $json_api->error(\"Invalid username and/or password.\", 'error', '401');\n remove_action('wp_login_failed', $json_api->query->username);\n }\n\n // Get additional user metadata_\n $user_first_name = get_user_meta($user->ID, 'user_first_name' , false);\n if (is_wp_error($user_meta_data)) {\n $json_api->error(\"No additional user metadata.\", 'error', '401');\n }\n\n $user_last_name = get_user_meta($user->ID, 'user_last_name' , false);\n if (is_wp_error($user_meta_data)) {\n $json_api->error(\"No additional user metadata.\", 'error', '401');\n }\n\n $args = array(\"user_id\" =>$user->ID);\n\n // The Query\n $user_query = new WP_User_Query( $args );\n\n\n // A cookie will expire after 1 month - 60*60*24*30\n $expiration = time() + apply_filters('auth_cookie_expiration', 2678400, $user->ID, true);\n\n $cookie = wp_generate_auth_cookie($user->ID, $expiration, 'logged_in');\n $time = gmdate(\"Y-m-d H:i:s\", $expiration);\n return array(\n \"cookie\" => $cookie,\n \"expiration\" => $time,\n \"id\" => $user->ID,\n \"user\" => array(\n \"username\" => $user->user_login,\n \"nicename\" => $user->user_nicename,\n \"email\" => $user->user_email,\n \"displayname\" => $user->display_name,\n \"firstname\" => $user_first_name,\n \"lastname\" => $user_last_name,\n \"meta\" => $user_meta_data,\n ),\n );\n }", "title": "" }, { "docid": "980cdc22bfb9f8943248fb56ae81158d", "score": "0.59097266", "text": "function tm_mbr_log_in(){\r\n\r\n\tglobal $wpdb;\r\n\t$mail = $_POST['mail'];\r\n\t$pwd = $_POST['pwd'];\r\n\t$user_table = $wpdb->prefix.'tm_mbr_team_members';\r\n\r\n\t$select_users = $wpdb->get_results(\"SELECT * FROM $user_table WHERE EMAIL='\".$mail.\"' AND PASSWORD='\".$pwd.\"'\", ARRAY_A);\r\n\r\n\tif($select_users){\r\n\t\t$_SESSION['ID'] = $select_users[0]['ID'];\r\n\t\techo \"<span class='success_flag' style='display: none'>1</span><span class='home_url' style='display: none'>\".get_permalink(get_page_by_path('member-home')->ID).\"</span><span class='user_id' style='display: none'>\".$select_users[0]['ID'].\"</span>\";\r\n\t}else{\r\n\t\techo \"Sorry! User Name And Password Not Match.\";\r\n\t}\r\n\r\n\twp_die();\r\n}", "title": "" }, { "docid": "ee441ff4d4905f155a0740346f5d9cde", "score": "0.5896389", "text": "function first_hook()\n\t{\n\t\tadd_action('register_post', 'prevent_registration', 10, 3 );\n\t\tfunction prevent_registration($sanitized_user_login, $user_email, $errors)\n\t\t{\n\t\t\tif (get_option('au_register_switch') === '1')\n\t\t\t{\n\t\t\t\t$errors->add('demo_error', \"<strong>ERROR</strong>:This site does not accept new users\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f72dd0854bc3762b891cf598cb2c6c3c", "score": "0.58943933", "text": "function Auth_remoteuser() {\n // load. Its purpose is to automatically log the user in, if necessary.\n if ( strlen($_SERVER['REMOTE_USER']) ) {\n global $wgExtensionFunctions;\n if (!isset($wgExtensionFunctions)) {\n $wgExtensionFunctions = array();\n }\n else if (!is_array($wgExtensionFunctions)) {\n $wgExtensionFunctions = array( $wgExtensionFunctions );\n }\n array_push($wgExtensionFunctions, 'Auth_remote_user_hook');\n }\n return;\n }", "title": "" }, { "docid": "fa4d0e008622c69b45b9b335b37b3c44", "score": "0.5886353", "text": "function popup_usersignup() {\n global $wpdb;\n\n $user_activation_key = generate_user_activation_key($userdata_['user_email']);\n\n $userdata_['user_login'] = $_REQUEST['pdemail_'];\n $userdata_['user_email'] = $_REQUEST['pdemail_'];\n $userdata_['user_pass'] = $_REQUEST['pdpass_'];\n $userdata_['first_name'] = $_REQUEST['pdfname_'];\n\n $userdata_['role'] = $_REQUEST['pdrole_'];\n $userdata_['user_status'] = 2;\n $userdata_['user_activation_key'] = $user_activation_key;\n // if ($_REQUEST['pdrole_'] == \"minyawn\") {\n $userdata_['last_name'] = $_REQUEST['pdlname_'];\n //}\n\n\n\n\n $user_ = get_user_by('email', $userdata_['user_email']);\n if ($user_) {\n\n $msg = \"<div class='alert alert-error alert-box'> <button type='button' class='close' data-dismiss='alert'>&times;</button>User with the email Id provided already exists</div>\";\n $response = array('success' => false, 'msg' => $msg);\n wp_send_json($response);\n } else {\n $user_id = wp_insert_user($userdata_);\n\n if (!is_numeric($user_id)) {\n $msg = \"Error occured while creating a new user. Please try again.\";\n $success = false;\n $response = array(\"success\" => true, 'msg' => $msg);\n wp_send_json($response);\n } else {\n\n if ($_REQUEST['pdrole_'] == \"employer\")\n add_user_meta($user_id, 'company_name', $_REQUEST['pdcompany_']);\n\n\n /* $msg = \"Error occured while creating a new user. Please try again.\";\t\t\t\n $response = array('success' => true,'user'=>$user_->user_login.$pd_pass );\n wp_send_json($response);\n $success = true; */\n // commented on 19june2014 $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>You have successfully registered.<a href='#mylogin' class='signin-text' id='sign-in-link' data-dismiss='modal' aria-hidden='true' data-toggle='modal'> Sign in here</a></div>\";\n $msg = \"<div class='alert alert-success alert-box '> <button type='button' class='close' data-dismiss='alert'>&times;</button>You have successfully registered. Redirecting to your profile....</div>\";\n\n $wpdb->update($wpdb->users, array('user_activation_key' => $user_activation_key), array('user_login' => $userdata_['user_email']));\n $wpdb->update($wpdb->users, array('user_status' => 0), array('user_login' => $userdata_['user_email']));\n\n\n send_register_welcome_email($userdata_);\n\n /* $subject = \"You have successfully registered on Minyawns\";\n \n add_filter('wp_mail_content_type', create_function('', 'return \"text/html\";'));\n $headers = 'From: Minyawns <[email protected]>' . \"\\r\\n\";\n \n if ($_REQUEST['pdrole_'] == \"employer\"){\n \t$message = \"Hi, <br/><br/>You have successfully registered on <a href='\" . site_url() . \"' >Minyawns</a>.<br/><br/>\";\n \twp_mail($userdata_['user_email'], $subject, email_header() . $message . email_signature(), $headers);\n \t\n }\n else {\n \t$message = \"<img src='\".site_url().\"/wp-content/themes/minyawns/images/first_minyawn_job.jpg' />\";\n \twp_mail($userdata_['user_email'], $subject, $message, $headers);\n \t\n }\n */\n \n \n //To verify your account visit the following address\";\n //$message.=\" <a href='\" . site_url() . \"/newuser-verification/?action=ver&key=\" . $user_activation_key . \"&email=\" . $userdata_['user_email'] . \"'>\" . site_url() . \"/newuser-verification/?action=ver&key=\" . $user_activation_key . \"&email=\" . $userdata_['user_email'] . \"</a>\\r\\n\";\n //$message.= '<' . network_site_url(\"activate/?action=ver&key=$user_activation_key&email=\" . $userdata_['user_email']) . \">\\r\\n\";\n /* $message.=\"<br/><br/> Regards,\n <br/>Minyawns Team<br/> \";\n */\n \n \n\n wp_new_user_notification($user_id, $userdata_['user_pass']);\n //auto login the user\n $creds['user_login'] = $userdata_['user_login'];\n\n $creds['user_password'] = $userdata_['user_pass'];\n\n $creds['remember'] = false;\n\n $user = wp_signon( $creds, false ); \n\n wp_set_current_user( $user_id, $user->data->user_login );\n\n wp_set_auth_cookie( $user_id );\n\n $response = array(\"success\" => true, 'msg' => $msg, 'user' => $user_->user_login, 'userdata' => $userdata_, 'ret_userid' => $user_id);\n wp_send_json($response);\n }\n }\n}", "title": "" }, { "docid": "57b99a16e7a25f6001fd6d2e0869ccd7", "score": "0.588574", "text": "function new_user_with_metadata( $username, $password, $email ) {\r\n $meta = array(\r\n 'life_style' => $_POST['your_style'],\r\n 'skin_tone' => $_POST['skin_tone'],\r\n 'skin_face' => $_POST['skin_face'],\r\n 'skin_repair' => $_POST['skin_repair'],\r\n 'skin_care' => $_POST['skin_care'],\r\n 'age' => $_POST['age'],\r\n 'gender' => $_POST['gender'],\r\n 'salary' => $_POST['salary']\r\n );\r\n \r\n //let's create our user\r\n $user = wp_create_user( $username, $password, $email );\r\n \r\n //check if there are no errors\r\n if ( ! is_wp_error( $user ) ) {\r\n foreach( $meta as $key => $val ) {\r\n update_user_meta( $user, $key, $val ); \r\n }\r\n }\r\n \r\n return $user;\r\n }", "title": "" }, { "docid": "252485062eab03a65a43dc35e7145590", "score": "0.58778185", "text": "function mardiio_save_user_email_data( $post_id ) {\n // Check if nonce of User Email is exist\n if( ! isset( $_POST['mardiio_user_email_meta_box_nonce'] ) ){\n return;\n }\n\n // Check if nonce of User Email is valide\n if( ! wp_verify_nonce( $_POST['mardiio_user_email_meta_box_nonce'], 'mardiio_save_user_email_data' ) ) {\n return;\n }\n\n // Check if you would like to save the metabox data on Autosave\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n // Check user manage permission\n if ( !current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n\n if ( !isset( $_POST['mardiio_user_email_field'] ) ) {\n return;\n }\n\n $user_email = sanitize_text_field( $_POST['mardiio_user_email_field'] );\n\n update_post_meta( $post_id, '_user_email_value_key', $user_email );\n}", "title": "" }, { "docid": "3998b31ce0b1ae52c7239d9a663d64b8", "score": "0.5873182", "text": "function validate_validate_email_duplicate_callback()\n{\n $email = iwitness_get_submit_value('email');\n if (empty($email)) {\n echo \"false\";\n die;\n }\n\n $login_user = get_user_by('email', $email);\n if ($login_user instanceof WP_User) {\n echo \"false\";\n die;\n }\n echo \"true\";\n die;\n}", "title": "" }, { "docid": "c57452eba932b2741307922bdbf47277", "score": "0.5871606", "text": "public function do_register_user() {\n\n\t\t// Captcha check, if good, then continue\n\t\t$error = apply_filters( 'cptch_verify', true );\n\t\tif ( true === $error ) { \n\n\t\t\tif ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {\n\t\t\t\t$redirect_url = home_url( 'account' );\n\n\t\t\t\tif ( ! get_option( 'users_can_register' ) ) {\n\t\t\t\t\t// Registration closed, display error\n\t\t\t\t\t$redirect_url = add_query_arg( 'register-errors', 'closed', $redirect_url );\n\n\t\t\t\t} else {\n\t\t\t\t\t$email = $_POST['email'];\n\n\t\t\t\t\t$result = $this->register_user( $email );\n\n\t\t\t\t\tif ( is_wp_error( $result ) ) {\n\t\t\t\t\t\t// Parse errors into a string and append as parameter to redirect\n\t\t\t\t\t\t$errors = join( ',', $result->get_error_codes() );\n\t\t\t\t\t\t$redirect_url = add_query_arg( 'register-errors', $errors, $redirect_url );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Success, redirect to login page.\n\t\t\t\t\t\t$redirect_url = home_url() . \"/account/#registered\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twp_redirect( $redirect_url );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}\n\t\telse {\t\t// Captcha check failed, display error\n\t\t\t\t\t$redirect_url = home_url( 'account' );\n\t\t\t\t\t$redirect_url = add_query_arg( 'register-errors', 'captcha', $redirect_url );\n\t\t\t\t\twp_redirect( $redirect_url );\n\t\t\t\t\t\t\n\t\t\t\t\texit;\n\t\t}\n\n\t}", "title": "" }, { "docid": "d7fcd26206a19516f4956f9db2f19444", "score": "0.58668876", "text": "function custom_user_store($uid, $account_fields) {\n // Create a new user if 0 is given.\n $is_new = $uid > 0 ? false : true;\n if ($is_new) {\n $result = custom_user_create_by_data($account_fields);\n if (!$result['uid']) {\n $result['is_error'] = true;\n return $result;\n }\n \n $uid = $result['uid'];\n }\n \n // Load the account for adding more field values.\n $account = user_load($uid);\n $edit = array();\n \n // By default, set user to be inactive.\n if ($is_new) {\n $edit['status'] = 0;\n\n // Generate pass code to send to user via either email or SMS.\n $pass_code = custom_user_password(6, '0123456789');\n $edit['field_otp_code'][LANGUAGE_NONE][0]['value'] = $pass_code;\n $edit['field_otp_stored_timestamp'][LANGUAGE_NONE][0]['value'] = time();\n $edit['field_otp_code_resend'][LANGUAGE_NONE][0]['value'] = time(); // spam protector.\n }\n\n // Validate inputs.\n if (!$account or !$account->uid) {\n return array('is_error' => true, 'uid' => 0, 'message' => t('Cannot retrieve user data.'));\n }\n \n // Lower username / email for validation purpose.\n if (isset($account_fields['name'])) {\n $account_fields['name'] = strtolower($account_fields['name']);\n }\n if (isset($account_fields['email'])) {\n $account_fields['email'] = strtolower($account_fields['email']);\n }\n\n // If username changed, validate existance.\n if (!$is_new and isset($account_fields['name']) and $account->name != $account_fields['name']) {\n $uid = db_query(\"SELECT uid FROM {users} WHERE name=:name\", array(':name' => $account_fields['name']))->fetchColumn();\n if ($uid) {\n return array('is_error' => true, 'uid' => 0, 'message' => 'Tên truy nhập mới đã tồn tại rồi.');\n }\n }\n\n if (!$is_new and isset($account_fields['email']) and $account->mail != $account_fields['email']) {\n $uid = db_query(\"SELECT uid FROM {users} WHERE mail=:mail\", array(':mail' => $account_fields['email']))->fetchColumn();\n if ($uid) {\n return array('is_error' => true, 'uid' => 0, 'message' => 'Địa chỉ e-mail mới đã tồn tại rồi.');\n }\n }\n\n foreach ($account_fields as $field_name => $field_value) {\n // Handle special fields for updated cases.\n if ($field_name == 'email' and !$is_new) {\n if ($account->mail != $account_fields['email'] and filter_var($account_fields['email'], FILTER_VALIDATE_EMAIL)) {\n // Update user e-mail.\n $edit['mail'] = $field_value;\n }\n }\n else if ($field_name == 'field_admin_permission') {\n if ($field_value['target_id'] == 0) {\n $edit['field_admin_permission'][LANGUAGE_NONE] = array();\n }\n else{\n $edit['field_admin_permission'][LANGUAGE_NONE][0] = $field_value;\n }\n }\n else if ($field_name == 'field_subdomain') {\n // Validate, make sure this subdomain is valid.\n if (module_exists('subdomain')) {\n $field_value['value'] = _subdomain_clean_up_name($field_value['value']);\n $subdomain = _subdomain_load_record_by_subdomain($field_value['value']);\n\n if ($subdomain and $subdomain->uid != $uid) {\n return array('is_error' => true, 'message' => 'Sub-domain này đã tồn tại rồi. Xin vui lòng chọn một tên khác.');\n }\n else if ($subdomain and $subdomain->subdomain != $field_value['value']) {\n // Store to user account.\n $edit['field_subdomain'][LANGUAGE_NONE][0] = $field_value;\n\n // Update the subdomain URL.\n _subdomain_subdomain_save($uid, $field_value['value']);\n }\n else{\n // Store to user account.\n $edit['field_subdomain'][LANGUAGE_NONE][0] = $field_value;\n\n // Create a new subdomain URL.\n _subdomain_subdomain_save($uid, $field_value['value']); \n }\n }\n }\n else if ($field_name == 'password' and !$is_new) {\n // Update user password.\n $edit['pass'] = $field_value;\n }\n else if ($field_name == 'field_birthdate') {\n //$field_value['value'] = strtotime($field_value['value']);\n $edit['field_birthdate'][LANGUAGE_NONE][0] = $field_value;\n }\n else if ($field_name == 'field_address') {\n $profile = custom_profile_load($uid);\n $profile->field_address[LANGUAGE_NONE][0] = $field_value;\n node_save($profile);\n }\n else if ($field_name == 'field_current_address') {\n $profile = custom_profile_load($uid);\n $profile->field_current_address[LANGUAGE_NONE][0] = $field_value;\n node_save($profile);\n }\n else if ($field_name == 'facebook_page') {\n $profile = custom_profile_load($uid);\n $profile->field_social_address[LANGUAGE_NONE][0] = array(\n 'service' => 'facebook',\n 'url' => $field_value,\n 'weight' => -10,\n );\n node_save($profile);\n }\n else if ($field_name == 'field_skype_id') {\n $profile = custom_profile_load($uid);\n $profile->field_skype_id[LANGUAGE_NONE][0] = $field_value;\n node_save($profile);\n }\n else if ($field_name == 'field_cover_picture') {\n $profile = custom_profile_load($uid);\n\n // Load image file.\n $file = file_load($field_value);\n if ($file) {\n $file->status = 1;\n file_save($file);\n\n // Remove current file if exist.\n if (!empty($profile->field_cover_picture[LANGUAGE_NONE])) {\n drupal_unlink($profile->field_cover_picture[LANGUAGE_NONE][0]['uri']);\n }\n\n $profile->field_cover_picture[LANGUAGE_NONE][0] = (array) $file;\n node_save($profile);\n }\n }\n else if ($field_name == 'field_full_name') {\n // Update both account and profile field - same value.\n $profile = custom_profile_load($uid);\n $profile->title = $field_value['value'];\n node_save($profile);\n \n $edit['field_full_name'][LANGUAGE_NONE][0] = $field_value;\n }\n \n // Go through and take only fields those exist in user account fields.\n else if (isset($account->{$field_name})) {\n if (is_array($field_value)) {\n $edit[$field_name][LANGUAGE_NONE][0] = $field_value; // $field_value['value']\n }\n else if ($field_name == 'field_photo') {\n $file = file_load($field_value);\n if ($file) {\n $file->status = 1;\n file_save($file);\n\n // Remove current file if exist.\n if (!empty($account->field_photo[LANGUAGE_NONE])) {\n drupal_unlink($account->field_photo[LANGUAGE_NONE][0]['uri']);\n }\n\n $edit['field_photo'][LANGUAGE_NONE][0] = (array) $file;\n }\n }\n else{\n $edit[$field_name] = $field_value;\n }\n }\n }\n\n // Save the changes and return new account.\n user_save($account, $edit);\n \n // Update image link.\n $account->field_photo[LANGUAGE_NONE][0]['url'] = image_style_url('cut_480x480', $account->field_photo[LANGUAGE_NONE][0]['uri']);\n \n // Send the passcode to user for account activation.\n if ($is_new and $account->uid) {\n if (isset($account_fields['register_from']) and $account_fields['register_from'] == 'mobile') {\n // Send SMS.\n custom_pass_code_mobile_activate($account);\n }\n else{\n // Send email.\n drupal_mail('custom', 'custom_user_create_activation_required', $account->mail, language_default(), array('account' => $account), variable_get('site_mail', '[email protected]'));\n }\n }\n\n return array('is_error' => false, 'uid' => $account->uid, 'message' => 'Thông tin tài khoản của bạn đã được cập nhật.', 'account' => $account);\n}", "title": "" }, { "docid": "88724da4b23a6ec9222d400b55bd0a32", "score": "0.5850227", "text": "public function onUserLogin()\n {\n try {\n\n // Update wordpress passwords if necessary\n WordpressAuth::verifyFromEmail(post('email'), post('password'));\n\n $data = [\n 'login' => post('login'),\n 'password' => post('password'),\n ];\n\n AuthManager::auth($data);\n\n $authRedirect = Session::pull('authRedirect');\n\n // Allow plugins to override the redirect with a session variable\n if (!empty($authRedirect)) {\n $redirectUrl = $this->pageUrl($authRedirect);\n } else {\n $redirectUrl = $this->pageUrl($this->property('redirect'));\n $redirectUrl = post('redirect', $redirectUrl);\n }\n\n return Redirect::intended($redirectUrl);\n \n \n } catch(\\Exception $e) {\n\n // Catch all exceptions producced by RainLab User or DMA authentication\n // and update error block message using OctoberCMS Ajax framework\n $message = Lang::get('dma.friends::lang.userLogin.failCredentials');\n \n // Bit doggy but if the exception message contains the login\n // is because the account is been suspend or banned by RainLab user plugin\n // This usually because the user has atent to loging multiple times with a \n // wrong password.\n if(preg_match(\"/\\[\" . $data['login'] . \"\\]/\", $e->getMessage())){ \n $message = $message = Lang::get('dma.friends::lang.userLogin.throttleUser', $data);\n }\n \n return [\n '.modal-content #errorBlock' => $message\n ];\n \n }\n \n }", "title": "" }, { "docid": "70554db9bd63ac70f96b0158bfbe3023", "score": "0.5839034", "text": "function affwp_email_tag_login_url() {\n\treturn esc_url( affiliate_wp()->login->get_login_url() );\n}", "title": "" }, { "docid": "009347eda4540d545001576e2fa5f337", "score": "0.5829199", "text": "function EmailWelcomeMessage() //SD343\n{\n global $DB, $SD_EMAIL_ERROR, $isajax, $mainsettings_websitetitle_original, $sdlanguage, $sdurl;\n\n if(!CheckFormToken())\n {\n RedirectPage(SELF_USERS_PHP,'<strong>'.$sdlanguage['error_invalid_token'].'</strong>',2,true);\n return;\n }\n\n $errors_arr = array();\n $DB->result_type = MYSQL_ASSOC;\n if(!$userid = GetVar('email_userid', 0, 'whole_number'))\n {\n $errors_arr[] = AdminPhrase('users_user_not_found');\n }\n else\n if($user = $DB->query_first('SELECT username, email, joindate FROM {users} WHERE userid = %d', $userid))\n {\n $p12_settings = GetPluginSettings(12);\n\n $subject = trim($p12_settings['welcome_message_subject']);\n $message = trim($p12_settings['welcome_message_text']);\n if(strlen($subject) && strlen($message))\n {\n $subject = str_replace(array('[username]', '[date]', '[joindate]', '[email]', '[siteurl]', '[sitename]'),\n array($user['username'], DisplayDate(TIME_NOW), DisplayDate($user['joindate']), $user['email'], $sdurl, $mainsettings_websitetitle_original), $subject);\n $message = str_replace(array('[username]', '[date]', '[joindate]', '[email]', '[siteurl]', '[sitename]'),\n array($user['username'], DisplayDate(TIME_NOW), DisplayDate($user['joindate']), $user['email'], $sdurl, $mainsettings_websitetitle_original), $message);\n $sent = SendEmail($user['email'], $subject, $message,\n $p12_settings['welcome_message_email_from'], $p12_settings['welcome_message_email_sender'],\n null, null, true);\n if(!$sent || !empty($GLOBALS['SD_EMAIL_ERROR']))\n {\n $errors_arr = isset($SD_EMAIL_ERROR) ? $SD_EMAIL_ERROR : array();\n $errors_arr[] = AdminPhrase('users_send_welcome_failed');\n }\n }\n }\n else\n {\n $errors_arr[] = AdminPhrase('users_user_not_found');\n }\n\n //SD332: support for ajax'ed display: show \"close\" button\n if($isajax)\n {\n\t \n if(count($errors_arr))\n {\n $msg = implode('<br />', $errors_arr);\n $time = 0;\n }\n else\n {\n $msg = AdminPhrase('users_welcome_email_sent') . $user['email'];//AdminPhrase('users_activation_link_sent');\n $time = 4;\n }\n echo '<script>\n \t\t \tjDialog.close();\n\t\t\tvar n = noty({\n\t\t\t\t\t\ttext: \\''.$msg.'\\',\n\t\t\t\t\t\tlayout: \\'top\\',\n\t\t\t\t\t\ttype: '.(count($errors_arr) ? '\\'error\\'' : '\\'success\\'').',\t\n\t\t\t\t\t\ttimeout: 5000,\t\n\t\t\t\t\t\t});</script>';\n\t\t\t\t\t\t\n sd_CloseCeebox($time);\n\n return;\n }\n\n if(count($errors_arr))\n {\n DisplayMessage($errors_arr, true);\n DisplayUsers();\n }\n else\n {\n RedirectPage(SELF_USERS_PHP, AdminPhrase('users_activation_link_sent'));\n }\n\n}", "title": "" }, { "docid": "d255a23541c884ec2c8246102b29c713", "score": "0.58284706", "text": "public function do_register_user() {\n\n if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {\n\n $redirect_url = home_url( 'member-register' );\n\n \n\n if ( ! get_option( 'users_can_register' ) ) {\n\n // Registration closed, display error\n\n $redirect_url = add_query_arg( 'register-errors', 'closed', $redirect_url );\n\n } elseif ( ! $this->verify_recaptcha() && false) { // TODO add recaptcha details from google recaptcha\n\n // Recaptcha check failed, display error\n\n $redirect_url = add_query_arg( 'register-errors', 'captcha', $redirect_url );\n\n } else {\n\n $email = $_POST['email'];\n\n $first_name = sanitize_text_field( $_POST['first_name'] );\n\n $last_name = sanitize_text_field( $_POST['last_name'] );\n\n $country_id = sanitize_text_field( $_POST['country_id'] );\n\n $login_name = sanitize_text_field( $_POST['login_name'] );\n\n $date_of_birth = sanitize_text_field( $_POST['date_of_birth'] );\n\n $nic_passport = sanitize_text_field( $_POST['nic_passport'] );\n\n $street_address = sanitize_text_field( $_POST['street_address'] );\n\n $telephone = sanitize_text_field( $_POST['telephone'] );\n\n \n\n $result = $this->register_user( $email, $first_name, $last_name,$country_id,\n\n $login_name,\n\n $date_of_birth,\n\n $nic_passport,\n\n $street_address,\n\n $telephone );\n\n \n\n if ( is_wp_error( $result ) ) {\n\n // Parse errors into a string and append as parameter to redirect\n\n $errors = join( ',', $result->get_error_codes() );\n\n $redirect_url = add_query_arg( 'register-errors', $errors, $redirect_url );\n\n } else {\n\n // Success, redirect to login page.\n\n $redirect_url = home_url( 'member-login' );\n\n $redirect_url = add_query_arg( 'registered', $email, $redirect_url );\n\n }\n\n }\n\n \n\n wp_redirect( $redirect_url );\n\n exit;\n\n }\n\n }", "title": "" }, { "docid": "601ab3aea69d1a3126e96b69daa2fbdc", "score": "0.58271885", "text": "function gf_authenticate_username_password($user, $username, $password)\n{\n if (is_a($user, 'WP_User')) {\n return $user;\n }\n\n if (empty($username) || empty($password)) {\n if (is_wp_error($user)) {\n return $user;\n }\n $error = new WP_Error();\n\n if (empty($username)) {\n return new WP_Error('invalid_username',\n sprintf(__('<strong>GREŠKA</strong>: Polje korisničko ime ne može biti prazno.'),\n wp_lostpassword_url()));\n }\n\n if (empty($password)) {\n return new WP_Error('invalid_username',\n sprintf(__('<strong>GREŠKA</strong>: Polje lozinka ne može biti prazno.'), wp_lostpassword_url()));\n }\n\n return $error;\n }\n $user = get_user_by('email', $username);\n\n if (!$user) {\n return new WP_Error('invalid_username',\n sprintf(__('<strong>GREŠKA</strong>: Nepostojeće korisničko ime ili email. <a href=\"%s\" title=\"Lozinka izgubljena\">Izgubili ste lozinku</a>?'),\n wp_lostpassword_url()));\n }\n\n if (get_user_meta($user->ID, 'migrated', true) == 1) {\n return gf_migrate_user_password($user, $password);\n } else {\n if (!wp_check_password($password, $user->user_pass, $user->ID)) {\n return new WP_Error('incorrect_password',\n sprintf(__('<strong>GREŠKA</strong>: Lozinka koju ste uneli za korisničko ime <strong>%1$s</strong> nije ispravna. <a href=\"%2$s\" title=\"Lozinka izgubljena\">Izgubili ste lozinku</a>?'),\n $user->user_login, wp_lostpassword_url()));\n }\n\n $user = apply_filters('wp_authenticate_user', $user, $password);\n }\n\n if (is_wp_error($user)) {\n return $user;\n }\n\n return $user;\n}", "title": "" }, { "docid": "935d610eb93e5f589e68298481a0fb12", "score": "0.58127016", "text": "function user_notification_email($email,$user) {\r\n$module= new sociallogin();\r\n\t$protocol_content = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';\r\n\t$link=$protocol_content.$_SERVER['HTTP_HOST'];\r\n\t$sub=$module->all_messages('Thank You For Registration');\r\n\t$vars = array(\r\n\t '{firstname}' => $user['fname'], \r\n\t\t\t'{lastname}' => $user['lname'], \r\n\t\t\t'{email}' => $email,\r\n\t\t\t'{passwd}'=> $user['pass']\r\n\t);\r\n $id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\r\n\t\tMail::Send($id_lang, 'account',$sub, $vars, $email);\r\n}", "title": "" }, { "docid": "f4f3f40b1aa25d99c98d0eebae70935c", "score": "0.578566", "text": "static function register_account(){\n\t\n\t\t$request_url = self::$server_url.'?action=aw2_register_subscriber';\n\t\n\t\t$args = array(\n\t\t'timeout' => 10,\n\t\t'redirection' => 5,\n\t\t'headers' => array(),\n\t\t'body' => array( 'name' => $_POST['name'], 'email' => sanitize_email($_POST['email']),'url' => site_url() ),\n\t\t'cookies' => array()\n\t\t);\n\t\t$response = wp_remote_post($request_url,$args); \n\t\t$data = array();\n\t\tif(!is_wp_error($response)){ \n\t\t\t$data['status']=\"pass\";\n\t\t\tupdate_option('awesome-studio-api-key',$response['body'],false);\n\t\t}\n\t\telse {\n\t\t\t$data['status']=\"fail\";\n\t\t\t$data['msg']=$response->get_error_message();\t\n\t\t}\n\t\techo json_encode($data);\n\t\twp_die();\n\t}", "title": "" }, { "docid": "14b06d19826293531885aa02b7555e1d", "score": "0.5783734", "text": "function learn_press_checkout_user_form_login() {\n\t\tlearn_press_get_template( 'checkout/form-login.php' );\n\t}", "title": "" }, { "docid": "5c2d03f446e7763f5b8223eeb2c6a7af", "score": "0.5783078", "text": "public static function create_wp_user($wp_user_data) {\n $wp_user_id = email_exists($wp_user_data['user_email']);\n if ($wp_user_id) {\n //A wp user account exist with this email.\n \n //Check if the user has admin role.\n $admin_user = SwpmMemberUtils::wp_user_has_admin_role($wp_user_id);\n if($admin_user){\n //This email belongs to an admin user. Update is not allowed on admin users. Show error message then exit.\n $error_msg = '<p>This email address ('.$wp_user_data['user_email'].') belongs to an admin user. This email cannot be used to register a new account on this site.</p>';\n wp_die($error_msg); \n }\n }\n\n //At this point 1) A WP User with this email doesn't exist. Or 2) The associated wp user doesn't have admin role\n //Lets create a new wp user record or attach the SWPM profile to an existing user accordingly.\n \n if (self::is_multisite_install()) {\n //WP Multi-Sit install\n global $blog_id;\n if ($wp_user_id) {\n //If user exists then just add him to current blog.\n add_existing_user_to_blog(array('user_id' => $wp_user_id, 'role' => 'subscriber'));\n return $wp_user_id;\n }\n $wp_user_id = wpmu_create_user($wp_user_data['user_login'], $wp_user_data['password'], $wp_user_data['user_email']);\n $role = 'subscriber'; //TODO - add user as a subscriber first. The subsequent update user role function to update the role to the correct one\n add_user_to_blog($blog_id, $wp_user_id, $role);\n } else {\n //WP Single site install\n if ($wp_user_id) {\n return $wp_user_id;\n }\n $wp_user_id = wp_create_user($wp_user_data['user_login'], $wp_user_data['password'], $wp_user_data['user_email']);\n }\n $wp_user_data['ID'] = $wp_user_id;\n wp_update_user($wp_user_data);//Core WP function. Updates the user info and role.\n\n return $wp_user_id;\n }", "title": "" }, { "docid": "f6ec237896dfe18e0ec7ed06c83d3f61", "score": "0.57798177", "text": "function login_error_override() {return 'Incorrect login details... <a href=\"wp-login.php?action=lostpassword\">lost your password?</a>';}", "title": "" }, { "docid": "dc919345e91a3acef2289d32bc5b38e8", "score": "0.5779049", "text": "function user_role_update( $user_id, $new_role ) {\n $site_url = get_bloginfo( 'wpurl' );\n $user_info = get_userdata( $user_id );\n $to = $user_info->user_email;\n $subject = \"Role changed: {$site_url}\";\n $message = \"Hello {$user_info->display_name} your role has changed on {$site_url} congratulations you are now an {$new_role}.\";\n wp_mail( $to, $subject, $message );\n}", "title": "" }, { "docid": "a4dce985355824cc1e9620a444b892c9", "score": "0.5778567", "text": "function reset_password_($user, $new_pass) {\n do_action('password_reset', $user, $new_pass);\n\n wp_set_password($new_pass, $user->ID);\n\n wp_password_change_notification($user);\n}", "title": "" }, { "docid": "cd7e822ccefb8259c007bb03306ee511", "score": "0.57755524", "text": "function custom_registration_function() {\r\r\n if ( isset( $_POST['submit'] ) ) {\r\r\n registration_validation(\r\r\n $_POST['username'],\r\r\n $_POST['password'],\r\r\n $_POST['password_confirm'],\r\r\n $_POST['email'],\r\r\n $_POST['fname'],\r\r\n $_POST['lname'],\r\r\n $_POST['nickname'],\r\r\n $_POST['website'],\r\r\n $_POST['code']\r\r\n\r\r\n );\r\r\n\r\r\n // sanitize user form input\r\r\n global $fullname, $password, $password_confirm, $email, $brand, $carnumber, $phonenumber, $website, $code, $pn;\r\r\n $code = $_POST['code'];\r\r\n $pn = $_POST['nickname'];\r\r\n $fullname = sanitize_user( $_POST['username'] );\r\r\n $password = esc_attr( $_POST['password'] );\r\r\n $password_confirm = esc_attr( $_POST['password_confirm'] );\r\r\n $email = sanitize_email( $_POST['email'] );\r\r\n $brand = sanitize_text_field( $_POST['fname'] );\r\r\n $carnumber = sanitize_text_field( $_POST['lname'] );\r\r\n $phonenumber = sanitize_text_field( $code. $pn );\r\r\n $website = $_POST['website'];\r\r\n\r\r\n\r\r\n // call @function complete_registration to create the user\r\r\n // only when no WP_error is found\r\r\n complete_registration(\r\r\n $fullname,\r\r\n $password,\r\r\n $password_confirm,\r\r\n $email,\r\r\n $brand,\r\r\n $carnumber,\r\r\n $phonenumber,\r\r\n $website,\r\r\n $code\r\r\n );\r\r\n }\r\r\n\r\r\n registration_form(\r\r\n\t $fullname,\r\r\n\t $password,\r\r\n $password_confirm,\r\r\n\t $email,\r\r\n\t $website,\r\r\n\t $brand,\r\r\n\t $carnumber,\r\r\n\t $phonenumber,\r\r\n\t $code\r\r\n );\r\r\n}", "title": "" }, { "docid": "adb5c2b6fdb04328be8b23008d4f8fa1", "score": "0.5773722", "text": "function wooc_extra_login_fields() {\n\t?>\n\n\t<p class=\"form-row form-row-wide\">\n\t<label for=\"reg_billing_first_name\">New customer? <a href=\"javascript:void(0);\" id=\"show_register\">Click here to create an account</a></label>\n <input type=\"hidden\" name=\"for_whome_text\" id=\"for_whome_text\" value=\"0\">\n\t<input type=\"hidden\" name=\"client_f_name\" id=\"client_f_name\" value=\"<?php if ( ! empty( $_POST['client_f_name'] ) ) esc_attr_e( $_POST['client_f_name'] ); ?>\">\n\t<input type=\"hidden\" name=\"client_l_name\" id=\"client_l_name\" value=\"<?php if ( ! empty( $_POST['client_l_name'] ) ) esc_attr_e( $_POST['client_l_name'] ); ?>\">\n\t</p>\n\n\n\t<?php\n}", "title": "" }, { "docid": "1b6370d27425e7ce0946d650c3051c6f", "score": "0.57721657", "text": "function jnpr_eFrontWPI_update_sso($user_id) {\n\t\n\techo \"jnpr_eFrontWPI_update_sso invoked!\";\n\t//this if block came from http://plugins.svn.wordpress.org/wp-http-digest/trunk/wp-http-digest.php \n\tif ( isset( $_POST['pass1'] ) && $_POST['pass1'] != '' && $_POST['pass1'] == $_POST['pass2']) {\n\t\t$newpass_plain = $_POST['pass1'];\n\t\t$current_user = wp_get_current_user();\n\t\t\n\t\t$user = get_user_by('id', $user_id);\n\t\twp_set_password( $newpass_plain, $user_id );\n\t\t\n\t\t//use the existing code to invoke the eFront API.\n\t\teFrontWPI_perform_action (\"update_user&login=\".$user->user_login.\"&password=\".$newpass_plain.\"&name=\".($user->first_name).\"&surname=\".($user->last_name).\"&email=\".($user->user_email).\"&languages=english\");\n\t\t//if the user making the password change is the same as the logged in user, update the cookie values.\n\t\tif($user_id == $current_user->id) { //handle the case where the admin changes someone's profile.\n\t\t\teFrontWPI_set_cookie($user->user_login, $newpass_plain);\n\t\t\techo \"You should have different eFront cookies now... :-)\";\n\t\t} else {\n\t\t\techo \"An admin changed the password for the user... do nothing.\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c72b5ae8490a3f7878ef49b07f8c7f75", "score": "0.5765772", "text": "function ARTEMIS_SWP_login() {\r\n $nonce_value = isset( $_POST['_wpnonce'] ) ? $_POST['_wpnonce'] : '';\r\n $nonce_value = isset( $_POST['artemis-swp-login-nonce'] ) ? $_POST['artemis-swp-login-nonce'] : $nonce_value;\r\n\r\n if ( ! empty( $_POST['login'] ) ) {\r\n if ( wp_verify_nonce( $nonce_value, 'artemis_swp-login' ) ) {\r\n\r\n try {\r\n $creds = array();\r\n $username = trim( $_POST['username'] );\r\n\r\n $validation_error = new WP_Error();\r\n $validation_error = apply_filters( 'artemis_swp_process_login_errors', $validation_error, $_POST['username'], $_POST['password'] );\r\n\r\n if ( $validation_error->get_error_code() ) {\r\n throw new Exception( '<strong>' . esc_html__( 'Error', 'artemis-swp' ) . ':</strong> ' . $validation_error->get_error_message() );\r\n }\r\n\r\n if ( empty( $username ) ) {\r\n throw new Exception( '<strong>' . esc_html__( 'Error', 'artemis-swp' ) . ':</strong> ' . esc_html__( 'Username is required.', 'artemis-swp' ) );\r\n }\r\n\r\n if ( empty( $_POST['password'] ) ) {\r\n throw new Exception( '<strong>' . esc_html__( 'Error', 'artemis-swp' ) . ':</strong> ' . esc_html__( 'Password is required.', 'artemis-swp' ) );\r\n }\r\n\r\n if ( is_email( $username ) && apply_filters( 'artemis_swp_get_username_from_email', true ) ) {\r\n $user = get_user_by( 'email', $username );\r\n\r\n if ( isset( $user->user_login ) ) {\r\n $creds['user_login'] = $user->user_login;\r\n } else {\r\n throw new Exception( '<strong>' . esc_html__( 'Error', 'artemis-swp' ) . ':</strong> ' . esc_html__( 'No user could be found with this email address.', 'artemis-swp' ) );\r\n }\r\n\r\n } else {\r\n $creds['user_login'] = $username;\r\n }\r\n\r\n $creds['user_password'] = $_POST['password'];\r\n $creds['remember'] = isset( $_POST['rememberme'] );\r\n $secure_cookie = is_ssl() ? true : false;\r\n $user = wp_signon( apply_filters( 'artemis_swp_login_credentials', $creds ), $secure_cookie );\r\n\r\n if ( is_wp_error( $user ) ) {\r\n $message = $user->get_error_message();\r\n $message = str_replace( '<strong>' . esc_html( $creds['user_login'] ) . '</strong>', '<strong>' . esc_html( $username ) . '</strong>', $message );\r\n throw new Exception( $message );\r\n } else {\r\n\r\n if ( ! empty( $_POST['redirect'] ) ) {\r\n $redirect = $_POST['redirect'];\r\n } elseif ( wp_get_referer() ) {\r\n $redirect = wp_get_referer();\r\n } else {\r\n $redirect = wc_get_page_permalink( 'myaccount' );\r\n }\r\n if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\r\n echo json_encode( array( 'success' => true ) );\r\n } else {\r\n wp_redirect( apply_filters( 'artemis_swp_login_redirect', $redirect, $user ) );\r\n }\r\n }\r\n } catch ( Exception $e ) {\r\n if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\r\n echo json_encode( array( 'success' => false, 'message' => $e->getMessage() ) );\r\n } else {\r\n wc_add_notice( apply_filters( 'login_errors', $e->getMessage() ), 'error' );\r\n }\r\n }\r\n exit;\r\n } else {\r\n if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\r\n echo json_encode( array( 'success' => false, 'message' => esc_html__( 'Bad Request', 'artemis-swp' ) ) );\r\n exit;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "60d3ee0b481360e577ebdc98b7d2c0b0", "score": "0.5754542", "text": "public function ajax_reset() {\n\n\t\t// First check the nonce, if it fails the function will break\n check_ajax_referer( 'vr-ajax-forgot-nonce', 'vr-secure-reset' );\n\n $account = $_POST['reset_username_or_email'];\n $error = \"\";\n $get_by = \"\";\n\n if( empty( $account ) ) {\n $error = __( 'Provide a valid username or email address!', 'EM' );\n } else {\n if( is_email( $account ) ) {\n if( email_exists( $account ) ) {\n $get_by = 'email';\n } else {\n $error = __( 'No user found for given email!', 'EM' );\n }\n } elseif( validate_username( $account ) ) {\n if( username_exists( $account ) ) {\n $get_by = 'login';\n } else {\n $error = __( 'No user found for given username!', 'EM' );\n }\n } else {\n $error = __( 'Invalid username or email!', 'EM' );\n }\n }\n\n if( empty( $error ) ) {\n\n // Generate new random password\n $random_password = wp_generate_password();\n\n // Get user data by field( fields are id, slug, email or login )\n $target_user = get_user_by( $get_by, $account );\n\n $update_user = wp_update_user( array(\n 'ID' => $target_user->ID,\n 'user_pass' => $random_password\n ) );\n\n // if update_user return true then send user an email containing the new password\n if( $update_user ) {\n\n $from = get_option( 'admin_email' ); // Set whatever you want like [email protected]\n\n if( !isset( $from ) || !is_email( $from ) ) {\n $site_name = strtolower( $_SERVER['SERVER_NAME'] );\n if( substr( $site_name, 0, 4 ) == 'www.' ) {\n $site_name = substr( $site_name, 4 );\n }\n $from = 'admin@' . $site_name;\n }\n\n $to = $target_user->user_email;\n $website_name = get_bloginfo( 'name' );\n $subject = sprintf( __('Your New Password For %s', 'EM'), $website_name );\n $sender = sprintf( __( 'From: %s <%s>', 'EM' ), $website_name , $from ) . \"\\r\\n\";\n $message = sprintf( __( 'Your new password is: %s', 'EM' ), $random_password );\n\n // email header\n $header = 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n $header = apply_filters( \"inspiry_password_reset_header\", $header );\n $header .= $sender;\n\n $mail = wp_mail( $to, $subject, $message, $header );\n\n if( $mail ) {\n $success = __( 'Check your email for new password', 'EM' );\n } else {\n $error = __( 'Failed to send you new password email!', 'EM' );\n }\n\n } else {\n $error = __( 'Oops! Something went wrong while resetting your password!', 'EM' );\n }\n }\n\n if( ! empty( $error ) ){\n echo json_encode(\n array(\n 'success' => false,\n 'message' => $error\n )\n );\n } elseif( ! empty( $success ) ) {\n echo json_encode(\n array(\n 'success' => true,\n 'message' => $success\n )\n );\n }\n\n die();\n\n\t}", "title": "" }, { "docid": "694d36fa557781bc013b97b42db6eb3c", "score": "0.57510924", "text": "function ajaxSetActiveUser(){\r\r\r\n\t$user = wp_get_current_user();\r\r\r\n\tupdate_user_meta($user->ID, 'asdb-loggedin', true);\r\r\r\n\tdie();\r\r\r\n}", "title": "" }, { "docid": "08f0dae0aaaaf1c5b195c416c026f12d", "score": "0.57487226", "text": "function ash_login_form_fields() {\n \n ob_start(); ?>\n \n <?php\n // show any error messages after form submission\n ash_show_error_messages(); ?>\n <div class=\"mainwrapper\">\n <div class=\"aaa_login\">\n <div class=\"aaa_regter\">\n <form id=\"ash_login_form\" class=\"ash_form\" action=\"\" method=\"post\">\n <div class=\"aaa_reg_rgt\">\n <p>User Name:</p>\n <input name=\"ash_user_login\" id=\"ash_user_login\" class=\"required\" type=\"text\" value=\"\" placeholder=\"User Name\">\n </div>\n \n <div class=\"aaa_reg_rgt\">\n <p>Password:</p>\n <input name=\"ash_user_pass\" id=\"ash_user_pass\" class=\"required\" type=\"password\" value=\"\" placeholder=\"Password\">\n </div> \n \n <div class=\"aaa_reg_rgt\">\n <?php\n $user_ID = get_current_user_id();\n\n $user_data = get_userdata( $user_ID );\n\n $pw_user_status = get_user_meta( $user_ID, 'pw_user_status', true );\n\n ?> \n <?php if($pw_user_status != 'pending'):?>\n <input type=\"hidden\" name=\"ash_login_nonce\" value=\"<?php echo wp_create_nonce('ash-login-nonce'); ?>\"/>\n <?php endif;?> \n <input id=\"ash_login_submit\" class=\"aaa_btn\" type=\"submit\" value=\"Login\">\n </div>\n </form> \n </div>\n </div>\n </div> \n <?php\n return ob_get_clean();\n}", "title": "" }, { "docid": "444a41363008dc464097b12f25cc919b", "score": "0.5747802", "text": "public function onUserRegistered($event) {\n $this->sendActivationMail($event);\n }", "title": "" }, { "docid": "51728f3f68d413707413ef061d7556e9", "score": "0.5744179", "text": "function send_register_welcome_email($data){\n\n $email = $data['user_email'];\n $role = $data['role'];\n\n\n $subject = \"You have successfully registered on Minyawns\";\n\n add_filter('wp_mail_content_type', create_function('', 'return \"text/html\";'));\n $headers = 'From: Minyawns <[email protected]>' . \"\\r\\n\";\n\n if ($role == \"employer\"){\n $message = \"Hi, <br/><br/>You have successfully registered on <a href='\" . site_url() . \"' >Minyawns</a>.<br/><br/>\";\n wp_mail($email, $subject, email_header() . $message . email_signature(), $headers);\n\n }\n else {\n $message = \"<img src='\".site_url().\"/wp-content/themes/minyawns/images/first_minyawn_job.jpg' />\";\n wp_mail($email, $subject, $message, $headers);\n\n }\n\n\n}", "title": "" }, { "docid": "c1ecac84faf4faaf12d485c4a25f5dd2", "score": "0.5742898", "text": "public function employee_login()\n\t\t{\n\t\t\tglobal $nypizza;\n\n\t\t\tif (isset($_POST['pos-user-login'])) {\n\n\t\t\t\t$username = $_POST['username'];\n\t\t\t\t$password = $_POST['password'];\n\n\t\t $login_data = array();\n\t\t $login_data['user_login'] = sanitize_user($username);\n\t\t $login_data['user_password'] = esc_attr($password);\t\t \n\n\t\t $user = wp_signon( $login_data, false );\n\t\t \t\n\t\t \ttry {\n\n\t\t\t if ( is_wp_error($user) ) {\n\n\t\t\t $nypizza->employee->error = '<div class=\"pos-login-error\">'. $user->get_error_message() .'</div>';\n\t\t\t } else { \n\t\t\t wp_set_current_user($user->ID, $user->user_login);\n\t\t\t\t wp_set_auth_cookie($user->ID, true);\t\t\t\t \n\t\t\t ?>\n\t\t\t\t\t\t<script>window.location = '?trn=<?php echo time() ?>';</script>\n\t\t\t <?php\t\t\t \n\t\t\t }\n\n\t\t\t } catch (Exception $e) {\n\n\t\t\t }\n\t\t }\n\n\n\t\t if (isset($_GET['logout'])) {\n\t\t \twp_destroy_current_session();\n \t\t\twp_clear_auth_cookie();\n \t\t\t?>\n\t\t\t\t<script>window.location = '?user=logout';</script>\n \t\t\t<?php\n\t\t }\n\t\t}", "title": "" }, { "docid": "b9eec878b9c21fc5c634bdf83a876da9", "score": "0.57419205", "text": "function yv_login_head() {\n function yv_username_label( $translated_text, $text, $domain ) {\n if ( 'Username or Email Address' === $text || 'Username' === $text ) {\n $translated_text = __( 'Email' , 'youveda' );\n }\n\t\t\n\t\tif ( 'Lost your password?' === $text ) {\n $translated_text = __( 'Forgot your password?' , 'youveda' );\n }\n\t\t\n return $translated_text;\n }\n add_filter( 'gettext', 'yv_username_label', 20, 3 );\n}", "title": "" }, { "docid": "ba1f4732781d202db61b76bfe13d7c00", "score": "0.5740832", "text": "public function LoggedInEmail()\n {\n return \"\";\n }", "title": "" }, { "docid": "c30db4c08a8feaba5109fdf64dff0dc5", "score": "0.57396597", "text": "function ash_add_new_member() {\n if (isset( $_POST[\"ash_user_login\"] ) && wp_verify_nonce($_POST['ash_register_nonce'], 'ash-register-nonce')) {\n\n $user_login = $_POST[\"ash_user_login\"]; \n $user_email = $_POST[\"ash_user_email\"];\n $ash_personality = $_POST[\"ash_personality\"];\n $ash_first_date = $_POST[\"ash_first_date\"];\n $ash_gender = $_POST[\"ash_gender\"];\n $ash_partner_gender = $_POST[\"ash_partner_gender\"];\n $ash_age_group = $_POST[\"ash_age_group\"];\n $ash_partner_age_group = $_POST[\"ash_partner_age_group\"];\n $ash_relationship_time = $_POST[\"ash_relationship_time\"];\n $ash_your_budget = $_POST[\"your_budget\"];\n $ash_not_interested = $_POST[\"not_interested\"];\n $ash_zip_code = $_POST[\"zip_code\"];\n $ash_how_far = $_POST[\"how_far\"];\n $ash_car_service = $_POST[\"car_service\"];\n \n \n \n $user_pass = $_POST[\"ash_user_pass\"];\n $pass_confirm = $_POST[\"ash_user_pass_confirm\"];\n \n // this is required for username checks\n require_once(ABSPATH . WPINC . '/registration.php');\n \n if(username_exists($user_login)) {\n // Username already registered\n ash_errors()->add('username_unavailable', __('Username already taken'));\n }\n if(!validate_username($user_login)) {\n // invalid username\n ash_errors()->add('username_invalid', __('Invalid username'));\n }\n if($user_login == '') {\n // empty username\n ash_errors()->add('username_empty', __('Please enter a username'));\n }\n if(!is_email($user_email)) {\n //invalid email\n ash_errors()->add('email_invalid', __('Invalid email'));\n }\n if(email_exists($user_email)) {\n //Email address already registered\n ash_errors()->add('email_used', __('Email already registered'));\n }\n if($user_pass == '') {\n // passwords do not match\n ash_errors()->add('password_empty', __('Please enter a password'));\n }\n if($user_pass != $pass_confirm) {\n // passwords do not match\n ash_errors()->add('password_mismatch', __('Passwords do not match'));\n }\n \n $errors = ash_errors()->get_error_messages();\n \n // only create the user in if there are no errors\n if(empty($errors)) {\n \n $new_user_id = wp_insert_user(array(\n 'user_login' => $user_login,\n 'user_pass' => $user_pass,\n 'user_email' => $user_email,\n 'user_registered' => date('Y-m-d H:i:s'),\n 'role' => 'subscriber'\n )\n );\n\n add_user_meta( $new_user_id,'ash_personality', $ash_personality ); \n add_user_meta( $new_user_id,'ash_first_date', $ash_first_date );\n add_user_meta( $new_user_id,'ash_gender', $ash_gender );\n add_user_meta( $new_user_id,'ash_partner_gender', $ash_partner_gender );\n add_user_meta( $new_user_id,'ash_age_group', $ash_age_group );\n add_user_meta( $new_user_id,'ash_partner_age_group', $ash_partner_age_group );\n add_user_meta( $new_user_id,'ash_relationship_time', $ash_relationship_time );\n add_user_meta( $new_user_id,'ash_your_budget', $ash_your_budget );\n add_user_meta( $new_user_id,'ash_not_interested', $ash_not_interested );\n add_user_meta( $new_user_id,'ash_zip_code', $ash_zip_code );\n add_user_meta( $new_user_id,'ash_how_far', $ash_how_far );\n add_user_meta( $new_user_id,'ash_car_service', $ash_car_service );\n \n\n if($new_user_id) {\n // send an email to the admin alerting them of the registration\n wp_new_user_notification($new_user_id);\n \n // log the new user in\n // wp_setcookie($user_login, $user_pass, true);\n // wp_set_current_user($new_user_id, $user_login); \n // do_action('wp_login', $user_login);\n \n // send the newly created user to the home page after logging them in\n wp_redirect(site_url('/membership/')); exit;\n }\n \n }\n \n }\n}", "title": "" }, { "docid": "964d4fb13bad2b6ea70ab8c0a80f13aa", "score": "0.5722858", "text": "public function sendAuthEmail(): bool {\n $args = [\n 'site_name' => SiteInfo::NAME,\n 'email' => $this->email,\n 'password' => $this->password\n ];\n\n $text = View::getTemplate( 'ProfileShop/admin_registration_email.txt', $args );\n $html = View::getTemplate( 'ProfileShop/admin_registration_email.html', $args );\n\n if ( ! Mail::send( $this->email, 'Данные для авторизации в системе ' . SiteInfo::NAME, $text, $html ) ) {\n $this->errors[] = 'Не удалось отправить Email. Обратитесь к администратору сайта.';\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "512ec1b6c88f14a33a94d8ee82469c3b", "score": "0.5715807", "text": "function admin_register_new_user_notification( $user_id ) {\r\n\t\t$user = get_userdata( $user_id );\r\n\t\t$user_role = $this->get_user_role( $user );\r\n\t\tif ( ! $user_role || $user_role == 'administrator' )\r\n\t\t\treturn;\r\n\r\n\t\t$users = $this->get_users( [ 'Administrator' ] );\r\n\t\tif ( $users ) {\r\n\t\t\t$keyboard = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'text' => '📝',\r\n\t\t\t\t\t\t'url' => admin_url( 'user-edit.php?user_id=' . $user->ID )\r\n\t\t\t\t\t),\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'text' => '📂',\r\n\t\t\t\t\t\t'url' => admin_url( 'users.php' )\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t$keyboards = $this->telegram->keyboard( $keyboard, 'inline_keyboard' );\r\n\t\t\t$userIP = HelpersWPTP::getUserIP();\r\n\t\t\t$user_roles = $this->wp_user_roles();\r\n\t\t\t$user_role = $user_roles[ $user_role ];\r\n\t\t\t$text = \"*\" . __( 'Register a new user', $this->plugin_key ) . \"*\\n\\n\";\r\n\r\n\t\t\t$text .= __( 'User name', $this->plugin_key ) . ': ' . $user->user_login . \"\\n\";\r\n\t\t\t$text .= __( 'Name', $this->plugin_key ) . ': ' . $user->display_name . \"\\n\";\r\n\t\t\t$text .= __( 'User role', $this->plugin_key ) . ': ' . $user_role . \"\\n\";\r\n\r\n\t\t\t$current_user_role = $this->get_user_role();\r\n\t\t\tif ( ! $current_user_role || $current_user_role != 'administrator' )\r\n\t\t\t\t$text .= __( 'User IP',\r\n\t\t\t\t\t\t$this->plugin_key ) . ': ' . \"[{$userIP}](http://{$userIP}.ipaddress.com)\" . \"\\n\";\r\n\r\n\t\t\t$text .= __( 'Date', $this->plugin_key ) . ': ' . HelpersWPTP::localeDate() . \"\\n\";\r\n\r\n\t\t\t$text = apply_filters( 'wptelegrampro_admin_register_new_user_notification_text', $text, $user_id, $user );\r\n\r\n\t\t\tif ( $text ) {\r\n\t\t\t\t$this->telegram->disable_web_page_preview( true );\r\n\t\t\t\tforeach ( $users as $user ) {\r\n\t\t\t\t\t$this->telegram->sendMessage( $text, $keyboards, $user['user_id'], 'Markdown' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e8fd5824e59ea75de35249fd8ccc5044", "score": "0.5713751", "text": "public function set_user_cookie() {\n\t\tif ( ( isset( $GLOBALS['pagenow'] ) && 'wp-login.php' === $GLOBALS['pagenow'] ) || is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tHelpers\\User::set_user();\n\t}", "title": "" }, { "docid": "88f48a30de5447c029b0bbcc954e1f87", "score": "0.5704862", "text": "function check_custom_authentication ( $username ) {\n \n \n $redirect_to = $_REQUEST['redirect_to']; //echo '<br>';\n \n if(isset($redirect_to)){ \n \n \twp_redirect($redirect_to);\n exit;\n \n }\n \n return $username;\n \n /*else{\n \n $userinfo = get_user_by( 'login', $username );\n\n \tif($userinfo)\n \t{\n \t \n \t \tif ( in_array( 'wholesale_customer', $userinfo->roles, true ) ) { \n \t \t \n \t \t //echo 'wholesale_customer__';\n \t \t \n \t \t $url = home_url().'/wholesale-ordering';\n \twp_redirect($url);\n exit;\n }else if(in_array( 'customer', $userinfo->roles, true )){\n $url = home_url().'/my-account';\n \twp_redirect($url);\n exit;\n }\n \t \t\n \t \t\n \t}\n \n }\n \n\treturn $username;*/\n}", "title": "" }, { "docid": "3285c0ecda68f5141f113c6542d351ed", "score": "0.57028997", "text": "function please_log_in() {\n $wpcc_state = md5( mt_rand() );\n $_SESSION[ 'wpcc_state' ] = $wpcc_state;\n\n $params = array(\n 'response_type' => 'code',\n 'client_id' => CLIENT_ID,\n 'state' => $wpcc_state,\n 'redirect_uri' => REDIRECT_URL\n );\n\n $url_to = AUTHENTICATE_URL . '?' . http_build_query( $params );\n\n echo \"<h3>Log in with your WordPress account</h3>\";\n echo '<a href=\"' . $url_to . '\"><img src=\"//s0.wp.com/i/wpcc-button.png\" width=\"231\" /></a>';\n die();\n}", "title": "" }, { "docid": "f7b7c62ea16ccb1c60e2ab304740ea37", "score": "0.5702685", "text": "function insertNewUser () {\n global $myDbgateway;\n\n $replyCode = validateNewLoginName($_REQUEST['lname'], $myDbgateway);\n if ($replyCode != 'ok') {return $replyCode;}\n if (!(preg_match(\"/.+@.+\\..+/\", $_REQUEST['curr_email_addr']))) {\n return \"Invalid email address\";\n }\n\n // we have cleared input checking of login name, we can now validate password to rules\n $newpwd;\n if (!trim($_REQUEST['pwd']) and !trim($_REQUEST['pwd2'])) {\n // if no passwords entered, generate a random password\n $newpwd = substr(generateGUID(),0,8); \n $_REQUEST['pwd'] = $newpwd;\n $_REQUEST['pwd2'] = $newpwd;\n } else {\n $replyCode = validateNewPassword(trim($_REQUEST['pwd']),trim($_REQUEST['pwd2']),trim($_REQUEST['lname']));\n if ($replyCode != 'ok') {return $replyCode;}\n }\n $entity_typ_flg = trim($_REQUEST['add_entity_typ']);\n if (! $entity_typ_flg) {$entity_typ_flg = 'user';}\n // we have cleared input checking of the password, we can now create new login\n $replyCode = createNewUser(trim($_REQUEST['lname']),trim($_REQUEST['pwd']),\n trim($_REQUEST['firstname']),trim($_REQUEST['lastname']),\n trim($_REQUEST['curr_email_addr']),$entity_typ_flg,\n trim($_REQUEST['add_admin_flg']),$myDbgateway);\n if ($_REQUEST['curr_email_addr']) {\n $pfw_email_to = $_REQUEST['curr_email_addr'];\n $pfw_header = \"Login Id Created\";\n $pfw_subject = \"Your login id is ready\";\n $pfw_message = \"Your logon id have been created with a login name of \"\n . $_REQUEST['lname'] . \" and a password of \"\n . $_REQUEST['pwd'] . \". Please change you password the first time you log on.\";\n\n if ($loginmailflg == 'y'){\n @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;\n } \n \n }\n \n if ($newpwd) {$replyCode .= \" with randomly generated password of $newpwd\";}\n unset ($_REQUEST['lname'],$_REQUEST['pwd'],$_REQUEST['pwd2'],$_REQUEST['firstname'],\n $_REQUEST['lastname'],$_REQUEST['curr_email_addr'],\n $_REQUEST['add_admin_flg']);\n return $replyCode; \n}", "title": "" }, { "docid": "b8069420d997b701c4250014f5832a23", "score": "0.5696", "text": "function function_new_user($user_id) {\r\n\r\n add_user_meta($user_id, '_new_user', '1');\r\n}", "title": "" }, { "docid": "8b0de74fe365d4980b5c76b9b2bdc64b", "score": "0.5688152", "text": "function email_login_authenticate( $user, $username, $password ) {\n\t\tif ( ! empty( $username ) )\n\t\t\t$user = get_user_by( 'email', $username );\n\n\t\tif ( isset( $user, $user->user_login ) )\n\t\t\t$username = $user->user_login;\n\n\t\treturn wp_authenticate_username_password( null, $username, $password );\n\t}", "title": "" } ]
f245b4901e2f609e966851723e918152
/ unset login regenerate session id
[ { "docid": "2ada34ef6fc4f29c62055f789d296b6e", "score": "0.7362478", "text": "public function logout() : void\n {\n unset($_SESSION['login']);\n session_regenerate_id(true);\n }", "title": "" } ]
[ { "docid": "41912fa352ed709414b98dc99e20eaec", "score": "0.7943995", "text": "private function removeLoginUserInfo()\n {\n session_regenerate_id(true);\n http()->removeSession('login_user');\n }", "title": "" }, { "docid": "71be70dc7f831e17376395fe9fa22834", "score": "0.7820998", "text": "public function unsetLoginToken(){\n\t\t\n\t\t//unset Login token\n\t\tunset($_SESSION['login']);\t\n\t\t\n\t\t//Destroy All Other Session Data\n\t\tsession_destroy();\n\t\t\n\t\t//Logout - change ID\n\t\tsession_regenerate_id();\n\t}", "title": "" }, { "docid": "7e0d9f103e4686b78dbf8fbce8cdddf7", "score": "0.7442011", "text": "function session_regenerate_id ($delete_old_session = null) {}", "title": "" }, { "docid": "98173649137a9f2244d2c9a4e689f035", "score": "0.7161238", "text": "public function resetSessionId()\n {\n $this->sessionId = $this->randomGenerator->generateString(12);\n }", "title": "" }, { "docid": "f2d3e1586b59c04b104ade9d93d08a8d", "score": "0.7143327", "text": "public function log_out()\n\t{\n\t\t\\Session::set(static::$session_key, false);\n\t}", "title": "" }, { "docid": "7f601396fc68699480b0188df8ab934b", "score": "0.70989484", "text": "function session_unset () {}", "title": "" }, { "docid": "a2e19b73e3502c6a0287c88a4fa93a94", "score": "0.7072688", "text": "public function clearIdentity() {\n unset($_SESSION['identity']);\n }", "title": "" }, { "docid": "20303603010de986436df382b78402b4", "score": "0.6991966", "text": "public function logOut() {\n if ($this->cookies->has('RMU')) {\n $this->cookies->get('RMU')->delete();\n }\n\n if ($this->cookies->has('RMT')) {\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->remove(Auth::AUTH_IDENT_KEY);\n $this->session->remove(Auth::AUTH_IMPERSONATE_USER_KEY); \n $this->session->remove(Auth::AUTH_IMPERSONATE_CLIENT_KEY); \n }", "title": "" }, { "docid": "2f820439bff664572f495dce5b073c0f", "score": "0.6967699", "text": "function regenerate_session(){\r\n\t\tif (function_exists('session_regenerate_id')){\r\n\t\t\tsession_regenerate_id();\r\n\t\t} // if it doesn't exist, oh well... you probably have other issues anyways. :)\r\n\t\t\r\n\t\t$this->last_session_id = $this->session_id;\r\n\t\t$this->session_id = session_id();\r\n\t}", "title": "" }, { "docid": "3375716445ae291701c2d651cddfd445", "score": "0.69674337", "text": "private static function sessionRegenerate() {\n\t\tself::initialize();\n\t\tsession_regenerate_id(true);\n\t}", "title": "" }, { "docid": "c43792e6ccabce5a23fbbabecebbe752", "score": "0.69442517", "text": "public static final function InvalidateLogin(){\n unset($_SESSION['validated']);\n }", "title": "" }, { "docid": "6ff0839ed6d1c51d0ec30e6d4b74a93c", "score": "0.69145036", "text": "private function destroiLogon()\n\t{\n\t\t// removendo o id do usuario logado na sessao\n\t\tself::removeRegistroIdLoginUsuarioSessao();\n\n\t\t// removendo o ip do usuario logado na sessao\n\t\tBasico_OPController_SessionOPController::removeIpUsuarioAutenticadoSessaoUsuario();\n\n\t\t// limpando a autenticacao existente\n\t\tZend_Auth::getInstance()->clearIdentity();\n\n\t\t// limpando o cookie\n\t\tZend_Session::forgetMe();\n\n\t\t// destruindo a sessao\n\t\tBasico_OPController_SessionOPController::destroiTodasAsSessoes();\n\t}", "title": "" }, { "docid": "068e3f2b1b2eba238bd695562f645ea6", "score": "0.69013476", "text": "function session_logout() {\n\t\tstart_session();\n\t\tsession_unset();\n\t\tsession_regenerate_id();\n\n\t\theader(\"Location: https://swapitg.com\");\n\t}", "title": "" }, { "docid": "a7097b077dfdc71a407a9950e94fc1e8", "score": "0.68977433", "text": "static function logout() {\n\n session::set(User::KEY_USER_AUTH, null);\n\n }", "title": "" }, { "docid": "7a975febb421a051029562bff8610b57", "score": "0.68228066", "text": "function logOff() {\n\n\t\t$this->addLog(\"Logoff: \".$user_id);\n\t\t//$this->user_id = \"\";\n\n\t\tsession()->reset(\"user_id\");\n\t\tsession()->reset(\"user_group_id\");\n\t\tsession()->reset(\"user_group_permissions\");\n\n\t\tsession()->reset();\n\n\t\theader(\"Location: /index.php\");\n\t\texit();\n\t}", "title": "" }, { "docid": "0a1396ccd527a393ac27a825a361510e", "score": "0.6814489", "text": "function clear_login()\n\t{\n\t\t$this->CI->session->unset_userdata('user');\n\t}", "title": "" }, { "docid": "e6ab545ef85a8589bb8cb792dec1fdef", "score": "0.681063", "text": "function logout()\n{\n \tsession_unset(); //clears the session\n \tsession_regenerate_id(true); //destroys the data & erasing the session data from server\n \tsession_destroy(); //stops the session from running\n \tsession_start(); //start a new session\n}", "title": "" }, { "docid": "79566f5b7652173d1c35684b0af00c0c", "score": "0.67892325", "text": "public function autoLogout()\n\t{\n\t\t$this->sessionReset();\n\n\t\t$this->userSession_remove();\n\t}", "title": "" }, { "docid": "52d46781901c598d714817ee75c96005", "score": "0.67821795", "text": "public function do_internal_logout() {\n // remove session variable\n unset($_SESSION['user_login']);\n }", "title": "" }, { "docid": "dc585f395cb704dac1529347bc59264e", "score": "0.67651886", "text": "public function logout(){\n unset($_SESSION['user_id']);\n unset($this->user_id);\n $this->signed_in = false;\n}", "title": "" }, { "docid": "16f2ae6b568905cfab8e07c9dabef6ef", "score": "0.6741", "text": "function xoops_session_regenerate()\n{\n $root =& XCube_Root::getSingleton();\n if (!isset($_SESSION)) {\n $root->mSession->regenerate();\n }\n}", "title": "" }, { "docid": "2e34814accd2e18d0743cde9be462da5", "score": "0.67404777", "text": "protected function session_regenerate_id() {\n\t\t// Mark the current session as destroyed to avoid other clients from hi-jacking it.\n\t\t$_SESSION['destroyed'] = time();\n\n\t\t// Store the new session id, to handle unstable network from the authenticated client.\n\t\t$_SESSION['new_session_id'] = session_create_id();\n\n\t\t// Close the old session.\n\t\tsession_write_close();\n\n\t\t// Disable strict mode for the rest of this request, to allow setting custom session_id.\n\t\tini_set('session.use_strict_mode', 0);\n\t\tsession_id($_SESSION['new_session_id']);\n\t\tsession_start();\n\n\t\t// The new session doesn't need these:\n\t\tunset($_SESSION['destroyed']);\n\t\tunset($_SESSION['new_session_id']);\n\t}", "title": "" }, { "docid": "24e7dac4c4da5569be1c0325eba79d07", "score": "0.67366517", "text": "public function sessionUnset();", "title": "" }, { "docid": "c35de1dee470d437e7f61e119348ebe2", "score": "0.66990864", "text": "public static function Logout() {\n\t\t\t// Simply unset the user id from session which is used to track login state.\n\t\t\tif (isset($_SESSION['user_id']))\n\t\t\t\tunset($_SESSION['user_id']);\n\t\t}", "title": "" }, { "docid": "c4b2fc939be6821f8ed314e576d7e063", "score": "0.66855985", "text": "function setLoggedOut($session) {\n $session->loginId = null;\n }", "title": "" }, { "docid": "3c3435df34ab40803fb63b24d1a62d61", "score": "0.66815645", "text": "function genNewSessionIdentifier() {\n if (!isset($_SESSION['TIME_LOGGED_IN'])) {\n $_SESSION['TIME_LOGGED_IN'] = time();\n } elseif (time() - $_SESSION['TIME_LOGGED_IN'] > MINS30) {\n session_regenerate_id();\n $_SESSION['TIME_LOGGED_IN'] = time();\n }\n }", "title": "" }, { "docid": "b9ddcaa3d2b072dbf1df1b869bc25fd4", "score": "0.6678882", "text": "function secureSessionTeardown()\n{\n # destroys the session so that it is recreated next page load\n\n $_SESSION[\"logged_in\"] = false;\n\n # shotgun programming\n session_regenerate_id(true); # hopefully destroys the data in the session and the session id\n session_unset(); # hopefully destroys the data in the session if the above didn't work\n session_destroy(); # hopefully destroys the session id if the above didn't work\n}", "title": "" }, { "docid": "ff17f9e0a4ca28f533f2765c593893c5", "score": "0.66745424", "text": "protected function regenerateSessionId()\n {\n if( $this->regenerate === true )\n {\n session_regenerate_id();\n }\n }", "title": "" }, { "docid": "a4962f2fb9bc0b1bc153b30555e08d82", "score": "0.66734636", "text": "public function setLoginToken(){\n\t\t\n\t\t//Change ID after logging in.\n\t\tsession_regenerate_id();\n\t\t\n\t\t//Login token\n\t\t$_SESSION['login'] = true;\t\n\t}", "title": "" }, { "docid": "9efaebcfc7a7cc57c1de2862cec53c86", "score": "0.6668761", "text": "public static function logOut(){\n self::setAuth(NULL);\n self::setAPIKey(NULL);\n }", "title": "" }, { "docid": "314d5f04117413129097fc7f909fb774", "score": "0.66527265", "text": "public static function logout(){\n\t\tCurrentUser::$account\t= NULL;\n\t\tCurrentUser::$token \t= NULL;\n\t\tCurrentUser::$admin \t= false;\n\t\tCurrentUser::$uploader \t= false;\n\t\tsession_unset();\n\t}", "title": "" }, { "docid": "ad1685c6f709e7a30c05c331f6d10a70", "score": "0.6648898", "text": "static public function log_out_user()\n{\n if( array_key_exists('user_id', $_SESSION ) )\n {\n unset( $_SESSION['user_id'] );\n session_regenerate_id();\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f425784a2132ed3798793a759ed16f5a", "score": "0.6646208", "text": "function log_out() {\n $_SESSION['sid'] = '';\n $_SESSION['logged_in'] = false;\n}", "title": "" }, { "docid": "b062a5add3ab8fefd4a83b2aecdabf29", "score": "0.6624208", "text": "function reset_id() {\n $this->generate_id();\n $this->write_cookie();\n }", "title": "" }, { "docid": "4cd5b136aa23e251d7ea6302a170f091", "score": "0.661556", "text": "private function logOut()\n {\n $this->client->getContainer()->get('security.context')->setToken(null);\n $this->client->getContainer()->get('request')->getSession()->invalidate();\n }", "title": "" }, { "docid": "6eb00e5dd40dac265e8f2c62e5854c53", "score": "0.6589881", "text": "function ResetLogin() {\r\n global $_defmnux;\r\n $_SESSION['mnux'] = $_defmnux;\r\n $_SESSION['mdlid'] = 0;\r\n $_SESSION['_Login'] = '';\r\n $_SESSION['_Nama'] = '';\r\n $_SESSION['_TabelUser'] = '';\r\n $_SESSION['_LevelID'] = 0;\r\n $_SESSION['_Session'] = '';\r\n $_SESSION['_Superuser'] = 'N';\r\n $_SESSION['_KodeID'] = '';\r\n $_SESSION['_ProdiID'] = '';\r\n \r\n}", "title": "" }, { "docid": "729e19574dedcabfce2a34f756da0a56", "score": "0.6581068", "text": "public static function logout () {\n // Unset users id session\n unset($_SESSION['user_id']);\n }", "title": "" }, { "docid": "a60a9da8cd235fd9d007af69be1ced76", "score": "0.657643", "text": "public function changeSessionIdentifier()\n {\n return session_regenerate_id(true);\n }", "title": "" }, { "docid": "7cab5259fb8d3ca363cadb430512f7cb", "score": "0.65560794", "text": "public function unsetAuthenticatedWebid() {\n $_SESSION[self::IS_AUTHENTICATED] = 0;\n $_SESSION[self::AGENT] = NULL;\n $_SESSION[self::WEBID] = NULL;\n\n $this->isAuthenticated = 0;\n $this->webid = NULL;\n $this->agent = NULL;\n }", "title": "" }, { "docid": "ec7094fb221fb27ec2301674c3ee8f61", "score": "0.65514666", "text": "public function logout() {\n\t\t$this->session = null;\n\t\tsetcookie('conductorsessid', '', time() - 3600, _P('/'));\n\t}", "title": "" }, { "docid": "ffd61ec4c695677fbfa12c9531e853f0", "score": "0.6545002", "text": "protected function userSession_login()\n\t{\n\t\t($user_id = $this->userID()) or trigger_error('Invalid call of '.__METHOD__.' : $this->userID() is missing !');\n\t\t$this->backend_login ? $backend = '1' : $backend = '0';\n\n\t\tglobal $db;\n\t\t$db->delete(\"user_session; where: user_id=$user_id AND backend=$backend\"); # Remove this user from any browser\n\n\t\t$this->userSession_update(); # Set this user on that browser\n\t}", "title": "" }, { "docid": "e163ddb477e23872442edeb16bf25454", "score": "0.6540107", "text": "function ses_reset() {\n session_destroy();\n}", "title": "" }, { "docid": "91143733232941d38f38c5349383a253", "score": "0.6539848", "text": "public static function logout()\n {\n \\Session::delete('user_id');\n }", "title": "" }, { "docid": "b4bb69ca4baf13f3bdec08038dd53552", "score": "0.65311915", "text": "public function userLogout() {\n $this->userId = null;\n unset($_SESSION['user_id']);\n }", "title": "" }, { "docid": "053a00eb060a7be66f3042b646cc2f29", "score": "0.6507595", "text": "public function deAuthenticateUser()\n\t{\n\t\tsession_regenerate_id( true );\n\n\t\t$this->authenticationSession->removeSessionData();\n\n\t\t$this->deleteCookie();\n\t}", "title": "" }, { "docid": "38fb1cec1a19f7ec0b4a45bfb7c6b514", "score": "0.6496766", "text": "function logoutPerson() {\n // Reset the session \n $_SESSION['loggedin'] = FALSE; // indicate the person is logged in\n unset($_SESSION['loggedin']);\n unset($_SESSION['personid']);\n unset($_SESSION['personfirst']);\n unset($_SESSION['personlast']);\n unset($_SESSION['persontype']);\n session_regenerate_id(TRUE); // copies old session data to a new session (security)\n return TRUE;\n}", "title": "" }, { "docid": "a78a31566a272b5946456953943311b2", "score": "0.6487599", "text": "public static function regenerateToken(){\n\t\t\\Illuminate\\Session\\Store::regenerateToken();\n\t}", "title": "" }, { "docid": "b26850aabb0dc7a11b7d0bc9f738ced8", "score": "0.64807254", "text": "public static function login() {\n session_regenerate_id(true);\n $_SESSION['is_logged_in'] = true;\n }", "title": "" }, { "docid": "ba6491f1412751d0cc44895b0b92b326", "score": "0.64784324", "text": "public function logout(){\n unset($_SESSION['user_id']);\n unset($this->user_id);\n $this->logged_in = false ;\n }", "title": "" }, { "docid": "f0c5f43b6be496c512fe6aabeb57f362", "score": "0.6476226", "text": "private function removeUserIdFromSession() {\n unset($_SESSION['user']['user_id']);\n }", "title": "" }, { "docid": "0b3a5dc0f55eb5ace585a4590fac3cae", "score": "0.64702296", "text": "public function regenerate_id() {\n if ($this->CLI_Mode) {\n return false;\n }\n // Make sure we have an open session\n $this->start();\n $return = session_regenerate_id();\n $this->session_id = session_id();\n\n return $return;\n }", "title": "" }, { "docid": "83e3d08288820b1bae3e19e76339a62f", "score": "0.64642495", "text": "public function unsetLogged()\n {\n $this->_session->set('logged', false); \n }", "title": "" }, { "docid": "e8db942935f0455c48ac2687d4e16968", "score": "0.64599174", "text": "function log_out() {\n\t\t// Eliminamos la cookie de isotrol por si ha entrado por mi portal uva\n\t\t$pastdate = mktime(0,0,0,1,1,1970);\n\t\t//setcookie(\"isotrol_sso_cookie\",\"\",$pastdate);\n\t\tsetcookie(\"isotrol_sso_cookie\",\"\",time()-3600);\n\t\tsetcookie(\"JSESSIONID\",\"\",time()-3600);\n\t\t// Eliminamos (vaciamos, NUNCA hacer un unset) el array de la sesion\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "dd8fe9daa0ac32004688f1f1c8992826", "score": "0.645137", "text": "function destruirTemporario(){\n\n $CI = get_instance();\n\n $CI->nativesession->delete('user');\n $CI->nativesession->delete('email');\n $CI->nativesession->delete('pass');\n $CI->nativesession->delete('autenticadoTemporariamente');\n\n }", "title": "" }, { "docid": "144d58a6120b697b82233d4690c76824", "score": "0.64441615", "text": "public static function regenerateSessionId()\n {\n return session_regenerate_id();\n }", "title": "" }, { "docid": "db2d909fe6c5471ad2c40e9333a54968", "score": "0.6443351", "text": "function resetSession() {\n if (isset($_SESSION['requestToken'])) {\n unset($_SESSION['requestToken']);\n }\n if (isset($_SESSION['requestTokenSecret'])) {\n unset($_SESSION['requestTokenSecret']);\n }\n if (isset($_SESSION['oauthVerifier'])) {\n unset($_SESSION['oauthVerifier']);\n }\n if (isset($_SESSION['accessToken'])) {\n unset($_SESSION['accessToken']);\n }\n if (isset($_SESSION['accessTokenSecret'])) {\n unset($_SESSION['accessTokenSecret']);\n }\n if (isset($_SESSION['noteStoreUrl'])) {\n unset($_SESSION['noteStoreUrl']);\n }\n if (isset($_SESSION['webApiUrlPrefix'])) {\n unset($_SESSION['webApiUrlPrefix']);\n }\n if (isset($_SESSION['tokenExpires'])) {\n \tunset($_SESSION['tokenExpires']);\n }\n if (isset($_SESSION['userId'])) {\n \tunset($_SESSION['userId']);\n }\n if (isset($_SESSION['notebooks'])) {\n unset($_SESSION['notebooks']);\n }\n }", "title": "" }, { "docid": "a563c3df4b1d0c25dd812e38404588dd", "score": "0.64413816", "text": "public static function invalidate()\n {\n self::$user = null;\n unset($_SESSION['uid']);\n }", "title": "" }, { "docid": "33aa675c3a806a7add7667745f77efa4", "score": "0.6437942", "text": "function signout(){\r\n\t\t$_SESSION = Array();\r\n\t\tsession_destroy();\r\n\t\t\r\n\t\tsetcookie(\"rem_username\", null, time()+7776000);\r\n\t\tsetcookie(\"rem_password\", null, time()+7776000);\r\n\t}", "title": "" }, { "docid": "784992d686a3acb15d2d774cd3ee34d2", "score": "0.6437161", "text": "public function logOut() {\r\n\r\n if($this->isLoggedIn()){\r\n session_unset();\r\n }\r\n }", "title": "" }, { "docid": "0977db9186db493cf85b9d457afda468", "score": "0.6429338", "text": "private function delete_autologin()\n\t{\n\t\t$this->ci->load->helper('cookie');\n\t\tif ($cookie = get_cookie($this->ci->config->item('autologin_cookie_name', 'tank_auth'), TRUE)) {\n\n\t\t\t$data = unserialize($cookie);\n\n\t\t\t$this->ci->load->model('auth/user_autologin');\n\t\t\t$this->ci->user_autologin->delete($data['user_id'], md5($data['key']));\n\n\t\t\tdelete_cookie($this->ci->config->item('autologin_cookie_name', 'tank_auth'));\n\t\t}\n\t}", "title": "" }, { "docid": "5d24152802b10ca95eec16e954bd166a", "score": "0.6408434", "text": "public function regenerateId()\n\t{\n\t\tglobal $CONFIGVAR;\n\n\t\t// If session regeneration is not enabled, the just return.\n\t\tif ($CONFIGVAR['session_regen_enable']['value'] == 0) return;\n\n\t\t$currentTime = time();\n\t\tif ($currentTime > $_SESSION['regenTimeLast'])\n\t\t{\n\t\t\t// Current session to expire at configured time\n\t\t\t// (usually 60 seconds).\n\t\t\t$_SESSION['OBSOLETE'] = true;\n\t\t\t$_SESSION['EXPIRES'] = $currentTime +\n\t\t\t\t$CONFIGVAR['session_expire_time']['value'];\n\n\t\t\t// Regenerate session ID and keep old one.\n\t\t\t$result = session_regenerate_id();\n\t\t\tif (!$result) printErrorImmediate('Security Error: Regenerate session ID failed.');\n\n\t\t\t// Set next session regenerate time.\n\t\t\t$_SESSION['regenTimeLast'] = $currentTime +\n\t\t\t\t$CONFIGVAR['session_regen_time']['value'];\n\n\t\t\t// Get new session ID and close both so scripts can use them.\n\t\t\t$sessionNewId = session_id();\n\t\t\tif (!$sessionNewId) printErrorImmediate('Security Error: Unable to obtain new session ID.');\n\t\t\t$result = session_write_close();\n\t\t\tif (!$result) printErrorImmediate('Security Error: Unable to close session.');\n\n\t\t\t// Set new session ID and open it back up.\n\t\t\t$result = session_id($sessionNewId);\n\t\t\tif (!$result) printErrorImmediate('Security Error: Unable to set new session ID.');\n\t\t\t$result = session_start();\n\t\t\tif (!$result) printErrorImmediate('Security Error: Unable to open new session.');\n\n\t\t\t// Prevent new session from expiring.\n\t\t\tunset($_SESSION['OBSOLETE']);\n\t\t\tunset($_SESSION['EXPIRES']);\n\t\t}\n\t}", "title": "" }, { "docid": "2129b48dbb7b4d4052f5451f5eaca59a", "score": "0.64071274", "text": "public function logout() {\r\n\t\t$this->userData = null;\r\n\t\tif(self::SESSION) {\r\n\t\t\tunset($_SESSION['_thetoken']);\r\n\t\t} else {\r\n\t\t\tsetcookie('_thetoken', '', time() - 18000, '/', self::getServerName(), getHTTPS(), true);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8a6e7d23201be8347749385c8f62bd1a", "score": "0.64064085", "text": "public function logout () {\n\t\t$session = SessionManager::getInstance();\n\t\t$session->set(\"sp_logged_in\", \"false\");\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "a44535aef2cb1627664203a76ddaa2db", "score": "0.64063525", "text": "function xoops_session_regenerate() {\n $old_sessid = session_id();\n session_regenerate_id();\n $new_sessid = session_id();\n session_id($old_sessid);\n session_destroy();\n $old_session = $_SESSION;\n session_id($new_sessid);\n $sess_handler =& xoops_gethandler('session');\n session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));\n session_start();\n $_SESSION = array();\n foreach (array_keys($old_session) as $key) {\n $_SESSION[$key] = $old_session[$key];\n }\n}", "title": "" }, { "docid": "74e51d47cd5f78603a13f0c95d151c33", "score": "0.6400957", "text": "protected function resetSession()\n {\n $info = $this->loadRemoteAccessInfo();\n $this->getSession()->unsetAll();\n $this->storeRemoteAccess($info);\n }", "title": "" }, { "docid": "0d26382ee0e7e0b374dd38193f8efa49", "score": "0.63992596", "text": "public static function logout()\n {\n //delete authUser and apiUser form session\n if(Session::has('authUser'))\n {\n Session::forget('authUser');\n }\n if(Session::has('apiUser'))\n {\n Session::forget('apiUser');\n }\n }", "title": "" }, { "docid": "3df9e32c39b2560a43159774590611c3", "score": "0.6397984", "text": "public static function unsetUserId()\n\t{\n\t\t(new Container(Session::USER_NAMESPACE))->offsetUnset(Session::USER_KEY_ID);\n\t}", "title": "" }, { "docid": "387f92c0c95837d5a5f09876aa418b3b", "score": "0.6395974", "text": "public function logoutAction(){\n $this->sessionContainer->offsetUnset('authenticated');\n $this->sessionContainer->offsetUnset('Name');\n $this->sessionContainer->offsetUnset('userId');\n }", "title": "" }, { "docid": "eaac807fc0a8478cc91033c02cb27866", "score": "0.6394254", "text": "public function do_logout () {\n $this->_CI->session->unset_userdata( 'admin_id' );\n }", "title": "" }, { "docid": "831b09fe22bb5067fc115fd3c4ae68cf", "score": "0.63925135", "text": "public function logout() {\r\n\t\t// multiple request on same session can fail to destroy session, but not an issue : the session is destroyed by one request\r\n\t\t// without @ we have annoying and useless \"Session object destruction failed\" messages\r\n\t\t@session_destroy();\r\n\t\tsession_start();\r\n\t\tsession_regenerate_id(TRUE);\r\n\t\t$this->data =& $_SESSION;\r\n\t}", "title": "" }, { "docid": "d22efdbf42349dc872d1d784c7515d8f", "score": "0.6390307", "text": "public static final function dzcp_session_destroy() {\n $_SESSION['id'] = '';\n $_SESSION['pwd'] = '';\n $_SESSION['ip'] = '';\n $_SESSION['lastvisit'] = '';\n $_SESSION['akl_id'] = 0;\n session_unset();\n session_destroy();\n session_regenerate_id();\n cookie::clear();\n }", "title": "" }, { "docid": "01210456db0145cb8d398fcfa4b8a82c", "score": "0.63883543", "text": "public function deauthenticate() { $this->authenticated = false; $this->userID = ''; }", "title": "" }, { "docid": "a18af0e13321bbc28e9a845e10dd34c7", "score": "0.6382385", "text": "public function logoutuser()\n {\n unset($_SESSION['IS_CLIENT_AUTH']);\n unset($_SESSION['userId']);\n unset($_SESSION['user']);\n }", "title": "" }, { "docid": "ab2be15fbf4e300a94dcfed34c74460a", "score": "0.6379654", "text": "public function logout() {\n unset($_SESSION[\"id\"]);\n unset($this->userId);\n $this->_loggedIn = FALSE;\n header(\"location:index.php?id=\" . LOGIN_MODULE_ID);\n }", "title": "" }, { "docid": "17bd469a8b39ffeb0f41b1c02518b0f5", "score": "0.63785726", "text": "public function logout() {\n\t\tunset($_COOKIE['uniqid']);\n\t\tunset($_SESSION['uniqid']);\n\t}", "title": "" }, { "docid": "9186da8e2e6cc36bf08f54d2a991e4ea", "score": "0.6371715", "text": "function LogoutUser()\n{\n session_start();\n session_unset();\n session_destroy();\n}", "title": "" }, { "docid": "abb8272cb8d23441eb93a659d5808863", "score": "0.6368848", "text": "static function logout()\r\n {\r\n\t global $con;\r\n\t\tif(isset($_SESSION['agentid']))\r\n\t\tunset($_SESSION['agentid']);\r\n\t\t\r\n\t\treturn \"logout\";\r\n\t}", "title": "" }, { "docid": "f83983895723eb01d1ed5356ccda7c36", "score": "0.6366037", "text": "function resetSession()\r\n {\r\n if (isset($_SESSION['requestToken'])) {\r\n unset($_SESSION['requestToken']);\r\n }\r\n if (isset($_SESSION['requestTokenSecret'])) {\r\n unset($_SESSION['requestTokenSecret']);\r\n }\r\n if (isset($_SESSION['oauthVerifier'])) {\r\n unset($_SESSION['oauthVerifier']);\r\n }\r\n if (isset($_SESSION['accessToken'])) {\r\n unset($_SESSION['accessToken']);\r\n }\r\n if (isset($_SESSION['accessTokenSecret'])) {\r\n unset($_SESSION['accessTokenSecret']);\r\n }\r\n if (isset($_SESSION['noteStoreUrl'])) {\r\n unset($_SESSION['noteStoreUrl']);\r\n }\r\n if (isset($_SESSION['webApiUrlPrefix'])) {\r\n unset($_SESSION['webApiUrlPrefix']);\r\n }\r\n if (isset($_SESSION['tokenExpires'])) {\r\n unset($_SESSION['tokenExpires']);\r\n }\r\n if (isset($_SESSION['userId'])) {\r\n unset($_SESSION['userId']);\r\n }\r\n if (isset($_SESSION['notebooks'])) {\r\n unset($_SESSION['notebooks']);\r\n }\r\n }", "title": "" }, { "docid": "42b4651b6f1d441840846d70b0f45b5e", "score": "0.63609403", "text": "function reset_login_keys($user_id = false)\n\t{\n\t\tglobal $config, $db;\n\n\t\t$user_id = ($user_id === false) ? (int) $this->data['user_id'] : (int) $user_id;\n\n\t\t$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '\n\t\t\tWHERE user_id = ' . (int) $user_id;\n\t\t$db->sql_query($sql);\n\n\t\t// If the user is logged in, update last visit info first before deleting sessions\n\t\t$sql = 'SELECT session_time, session_page\n\t\t\tFROM ' . SESSIONS_TABLE . '\n\t\t\tWHERE session_user_id = ' . (int) $user_id . '\n\t\t\tORDER BY session_time DESC';\n\t\t$result = $db->sql_query_limit($sql, 1);\n\t\t$row = $db->sql_fetchrow($result);\n\t\t$db->sql_freeresult($result);\n\n\t\tif ($row)\n\t\t{\n\t\t\t$sql = 'UPDATE ' . USERS_TABLE . '\n\t\t\t\tSET user_lastvisit = ' . (int) $row['session_time'] . \", user_lastpage = '\" . $db->sql_escape($row['session_page']) . \"'\n\t\t\t\tWHERE user_id = \" . (int) $user_id;\n\t\t\t$db->sql_query($sql);\n\t\t}\n\n\t\t// Let's also clear any current sessions for the specified user_id\n\t\t// If it's the current user then we'll leave this session intact\n\t\t$sql_where = 'session_user_id = ' . (int) $user_id;\n\t\t$sql_where .= ($user_id === (int) $this->data['user_id']) ? \" AND session_id <> '\" . $db->sql_escape($this->session_id) . \"'\" : '';\n\n\t\t$sql = 'DELETE FROM ' . SESSIONS_TABLE . \"\n\t\t\tWHERE $sql_where\";\n\t\t$db->sql_query($sql);\n\n\t\t// We're changing the password of the current user and they have a key\n\t\t// Lets regenerate it to be safe\n\t\tif ($user_id === (int) $this->data['user_id'] && $this->cookie_data['k'])\n\t\t{\n\t\t\t$this->set_login_key($user_id);\n\t\t}\n\t}", "title": "" }, { "docid": "07248007cba3e6a791dcdd957c59552d", "score": "0.6360579", "text": "private function removeCredentialsFromSession(): void\n {\n $this->session->remove('Reset-Password-Token-URl');\n $this->session->remove('Reset-Password-User-Email');\n }", "title": "" }, { "docid": "067658d8461f1377cc57ef0b2650517e", "score": "0.63593656", "text": "protected function userSession_remove()\n\t{\n\t\tglobal $db;\n\n\t\t// Alias\n\t\t$session_id\t\t= $db->str_encode(session_id());\n\t\t$this->backend_login ? $backend = '1' : $backend = '0';\n\n\t\t$db->delete(\"user_session; where: session_id=$session_id AND backend=$backend\");\n\t}", "title": "" }, { "docid": "19ab4aeac22addff093d671bf5f016e9", "score": "0.6358876", "text": "function doLogout(){\n\t\tunset($_SESSION['userauth']);\n\t\tunset($_SESSION['userid']);\n\t\tunset($_SESSION['refer']);\n\t\t//unset();\n\t\t//unset();\n\t}", "title": "" }, { "docid": "e425cbf0e1461db71531a53763ca1fb2", "score": "0.63517445", "text": "public function logout(){\n unset($_SESSION['user_id']);\n unset($_SESSION['user_username']);\n unset($_SESSION['user_role']);\n unset($this->user_id);\n $this->signed_in = false;\n }", "title": "" }, { "docid": "d27275f7c9e6d0099f71d4c32ab5e19d", "score": "0.6351672", "text": "private function setNewSessionid(){\n\t\t$this->sessionData['sessionId'] = md5(time().$_SERVER['HTTP_USER_AGENT']);\n\t\t$this->sessionData['joker'] = 0;\n\t\t$GLOBALS['TSFE']->fe_user->setKey('ses', 'wx_lottery', $this->sessionData);\n\t\t$GLOBALS['TSFE']->storeSessionData();\n\t}", "title": "" }, { "docid": "670defe3ac3e6feae3d941ac3e12feef", "score": "0.6348525", "text": "function my_session_start() {\n session_start();\n // Do not allow to use too old session ID\n if (!empty($_SESSION['deleted_time']) && $_SESSION['deleted_time'] < time() - 180) {\n session_destroy();\n session_start();\n }\n}", "title": "" }, { "docid": "c34ed013606232e25f6b39fb582903c1", "score": "0.63431", "text": "public function logout()\n {\n print \"logged out\";\n unset($this->user_id);\n $_SESSION = Array();\n $this->signed_in = false;\n }", "title": "" }, { "docid": "24b2912cfd87843e34a37efa8688dec2", "score": "0.6338666", "text": "public static function logout(){\n\t\tself::set(LOGGEDIN, false);\n\t\tself::set(USER, null);\n\t\tself::set(FAILEDLOGINS, 0);\n\t}", "title": "" }, { "docid": "c199eab3c7d9390943fb9b4e2932c4d6", "score": "0.6336041", "text": "function delete_session(){\n unset($_SESSION['app_session']);\n }", "title": "" }, { "docid": "09dce6a4814f68c909525459b84ecb32", "score": "0.6335751", "text": "public function logout() {\n $_SESSION['auth'] = null;\n }", "title": "" }, { "docid": "dd3a5c6a590008a85dd48e1f70d78771", "score": "0.63349706", "text": "public function logout()\n\t{\n\t\t$this->cookie->deleteCookies('id', 60*60*24*30*2);\n\t\t$this->cookie->deleteCookies('hash', 60*60*24*30*2);\n\t\t$this->login = '';\n\t\t$this->pass ='';\n\t\t$this->id ='';\n\t}", "title": "" }, { "docid": "f0f7d027b7057690ae441a5e2a88c594", "score": "0.63345665", "text": "function logout(){\n unset($_SESSION['userid']);\n}", "title": "" }, { "docid": "98bf8b194541652b5a3b0dd0ec71b60b", "score": "0.6328075", "text": "public function signOutLocalLogin(){\r\r\n\t\t(new LoginFilter($this->session))->setLogOut();\r\r\n\t\tredirect(base_url());\r\r\n\t}", "title": "" }, { "docid": "5c351f52eb7db42d1e5def0800f058cc", "score": "0.63267326", "text": "static function logout() {\n unset($_SESSION[static::SESSION_KEY]);\n }", "title": "" }, { "docid": "536560f91a19f4838e4da9c0f200ab50", "score": "0.63140553", "text": "function logout() {\n\t\t$session =& $this->_session;\n\n\t\t$session->guest = 1;\n\t\t$session->username = '';\n\t\t$session->userid = '';\n\t\t$session->usertype = '';\n\t\t$session->gid = 0;\n\n\t\t$session->update();\n\n\t\t// this is daggy??\n\t\t$lifetime = time() - 1800;\n\t\tsetcookie( \"usercookie\", \"\", $lifetime, \"/\" );\n\t\t@session_destroy();\n\t}", "title": "" }, { "docid": "7fab83272de87a01bf856ae6ea4da984", "score": "0.6308197", "text": "public static function restore_session()\n {\n global $message;\n $id = $_COOKIE['user'];\n $token = $_COOKIE['token'];\n\n if (Token::validate($token, $id, \"remember\"))\n {\n $year = strtotime('+356 days', time());\n unset($_COOKIE['token']);\n $_SESSION['user'] = $id;\n $new_token = Token::add($id, 'remember', $year);\n setcookie('token', $new_token, $year, \"/\");\n setcookie('user', $id, $year, \"/\");\n }\n else\n {\n unset($_COOKIE['user']);\n unset($_COOKIE['token']);\n setcookie('user', null, -1, '/');\n setcookie('token', null, -1, '/');\n $message = _(\"Invalid token detected, please login again!\");\n }\n \n Token::delete($token);\n }", "title": "" }, { "docid": "fa7a1e9ab0185472479f3bfb34602e43", "score": "0.63062435", "text": "public function signout(){\n $_SESSION = Array();\n }", "title": "" }, { "docid": "597838f4fa2fc227961dd257bb248ddc", "score": "0.63056517", "text": "function authentication_logoff($db) {\n $query = \"DELETE FROM auth_session WHERE id=?\";\n $stmt = build_query($db, $query, array(AUTH_SESSION_ID));\n $stmt->close();\n\n // Store session variables/data before logging out\n //store_session_data(USER['user'], $_SESSION);\n\n // Destroy the current session information (force logoff)\n session_destroy();\n session_start();\n\n // Blank out the query_string assuming a login redirect...\n $_SERVER['QUERY_STRING'] = '';\n }", "title": "" }, { "docid": "c49c652a5556829d0b44376437e17903", "score": "0.6303066", "text": "public function logout() {\n\t\tZend_Auth::getInstance()->clearIdentity();\n\t}", "title": "" }, { "docid": "60dc5af53373e13af6808dbf847b6253", "score": "0.63016105", "text": "function logout()\n {\n unset($_SESSION['userid']);\n unset($_SESSION['user']);\n unset($_SESSION['pass']);\n unset($_SESSION['name']);\n unset($_SESSION['groups']);\n unset($_SESSION['last_login']);\n unset($_SESSION['expired']);\n session_destroy();\n Debug::get()->addMessage('Logged out user', false);\n session_start();\n $this->logged_in = false;\n }", "title": "" }, { "docid": "9773e00d9152c962bc836b457b75e7fc", "score": "0.63014287", "text": "function session_reset()\n{\n}", "title": "" } ]
00143a0037cc0bdc1f005d07d2627597
Clears out the collFriendsRelatedByFriendId collection This does not modify the database; however, it will remove any associated objects, causing them to be refetched by subsequent calls to accessor method.
[ { "docid": "4c5c15a9c4859f2b0db5eaf52e5c86bd", "score": "0.8549436", "text": "public function clearFriendsRelatedByFriendId()\n {\n $this->collFriendsRelatedByFriendId = null; // important to set this to null since that means it is uninitialized\n $this->collFriendsRelatedByFriendIdPartial = null;\n }", "title": "" } ]
[ { "docid": "e8c27569ffc6a3ccefe89c89906a0201", "score": "0.769683", "text": "public function clearFriendsRelatedByUserId()\n {\n $this->collFriendsRelatedByUserId = null; // important to set this to null since that means it is uninitialized\n $this->collFriendsRelatedByUserIdPartial = null;\n }", "title": "" }, { "docid": "de3bc1f40161f5cf62cf64986b7051b6", "score": "0.5848938", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collFriendsRelatedByUserId) {\n foreach ($this->collFriendsRelatedByUserId as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collFriendsRelatedByFriendId) {\n foreach ($this->collFriendsRelatedByFriendId as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPages) {\n foreach ($this->collPages as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUserEvents) {\n foreach ($this->collUserEvents as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n if ($this->collFriendsRelatedByUserId instanceof PropelCollection) {\n $this->collFriendsRelatedByUserId->clearIterator();\n }\n $this->collFriendsRelatedByUserId = null;\n if ($this->collFriendsRelatedByFriendId instanceof PropelCollection) {\n $this->collFriendsRelatedByFriendId->clearIterator();\n }\n $this->collFriendsRelatedByFriendId = null;\n if ($this->collPages instanceof PropelCollection) {\n $this->collPages->clearIterator();\n }\n $this->collPages = null;\n if ($this->collUserEvents instanceof PropelCollection) {\n $this->collUserEvents->clearIterator();\n }\n $this->collUserEvents = null;\n }", "title": "" }, { "docid": "6682d07ed70454a30cd56e8b7acdfac7", "score": "0.57443017", "text": "public function clearMissionsRelatedByRequesterId()\n\t{\n\t\t$this->collMissionsRelatedByRequesterId = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "6a6ebc147ded447134786c4cecd55247", "score": "0.5629362", "text": "public function setFriendsRelatedByFriendId(PropelCollection $friendsRelatedByFriendId, PropelPDO $con = null)\n {\n $this->friendsRelatedByFriendIdScheduledForDeletion = $this->getFriendsRelatedByFriendId(new Criteria(), $con)->diff($friendsRelatedByFriendId);\n\n foreach ($this->friendsRelatedByFriendIdScheduledForDeletion as $friendRelatedByFriendIdRemoved) {\n $friendRelatedByFriendIdRemoved->setUserRelatedByFriendId(null);\n }\n\n $this->collFriendsRelatedByFriendId = null;\n foreach ($friendsRelatedByFriendId as $friendRelatedByFriendId) {\n $this->addFriendRelatedByFriendId($friendRelatedByFriendId);\n }\n\n $this->collFriendsRelatedByFriendId = $friendsRelatedByFriendId;\n $this->collFriendsRelatedByFriendIdPartial = false;\n }", "title": "" }, { "docid": "47c7b38bf346f31d2b24aa4e5a9cb10f", "score": "0.5540819", "text": "public function removeFriend($friends)\n {\n if(!is_array($friends))\n {\n $friends = explode(',', $friends);\n }\n\n if(is_array($friends))\n {\n foreach($friends as $friend)\n {\n $sql = \"DELETE FROM friends WHERE (user_id = ? AND friend_id = ?) OR (user_id = ? AND friend_id = ?) AND status = 'accepted'\";\n App::get('database')->query($sql, [$this->id, $friend, $friend, $this->id]);\n \n //Remove all activities where user invited friend or friend invited user.\n $sql = \"SELECT user_id, activity_id FROM user_activity JOIN (SELECT * FROM activities WHERE owner_id = ? OR owner_id = ?) AS ACT ON user_activity.activity_id = ACT.id WHERE user_id = ? OR user_id = ?\";\n $deleteElements = App::get('database')->query($sql, [$this->id, $friend, $this->id, $friend])->fetch();\n foreach($deleteElements as $element) {\n $sql = \"DELETE FROM user_activity WHERE user_id = ? AND activity_id = ?\";\n App::get('database')->query($sql, [$element[\"user_id\"], $element[\"activity_id\"]]);\n }\n \n //Remove notifications related to the user-friend relationship\n $sql = \"DELETE FROM notifications WHERE (initiator = ? AND receiver = ?) OR (initiator = ? AND receiver = ?)\";\n App::get('database')->query($sql, [$this->id, $friend, $friend, $this->id]);\n }\n }\n }", "title": "" }, { "docid": "0fc42afc77d5d2a67399927ab72547f0", "score": "0.55288553", "text": "public function removeRemovedFriend($idUser, $friendId);", "title": "" }, { "docid": "a73496625601f3dd7589724e11ec240f", "score": "0.54716337", "text": "public function clearIngredientssRelatedByItems()\n\t{\n\t\t$this->collIngredientssRelatedByItems = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "261a0c5c17efc0cff82f5084a0f4641a", "score": "0.54344165", "text": "public function resetPartialFriendsRelatedByFriendId($v = true)\n {\n $this->collFriendsRelatedByFriendIdPartial = $v;\n }", "title": "" }, { "docid": "63c746e83e4810da00eb276176f9c1b8", "score": "0.5398113", "text": "public function clear(): void\n {\n try {\n $this->collection->remove($this->id, $this->options->removeOptions());\n } catch (DocumentNotFoundException $ex) {\n return;\n }\n }", "title": "" }, { "docid": "a7825ed143d96373c7df5b7a72c41620", "score": "0.53703946", "text": "public function clearwpPostsRelatedById()\n {\n $this->collwpPostsRelatedById = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "6ddced0ca6b186592afd48434872a4fb", "score": "0.52945334", "text": "public function clearAddonssRelatedByItems()\n\t{\n\t\t$this->collAddonssRelatedByItems = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "0d9a3e5ab4bd35035103933be7b87698", "score": "0.5241904", "text": "public function clearMissionsRelatedByOtherRequesterId()\n\t{\n\t\t$this->collMissionsRelatedByOtherRequesterId = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "53a9d6d79e4cfa7feaa787dc5d476f3d", "score": "0.5209518", "text": "private function clearRelatedProducts()\n {\n ShopRelatedProduct::model()->deleteAll('product_id=:id', array('id' => $this->id));\n }", "title": "" }, { "docid": "bc7f0414213ce1ca0cb53cae2dffc565", "score": "0.51681", "text": "public function clearRelated($name = null)\n {\n if (is_null($name)) {\n $this->_references = array();\n } else {\n unset($this->_references[$name]);\n }\n }", "title": "" }, { "docid": "760912f93ef005c7789587e73585a9fc", "score": "0.51412153", "text": "public function clearRelatedCache()\n {\n $users = $this->users;\n foreach ($users as $user) {\n $user->clearCachedRoles();\n $user->clearCachedPermissions();\n }\n }", "title": "" }, { "docid": "77fdb87c8ac1b2a66d9d5c5e9191cb29", "score": "0.5126147", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collMissionsRelatedByRequesterId) {\n\t\t\t\tforeach ((array) $this->collMissionsRelatedByRequesterId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collMissionsRelatedByOtherRequesterId) {\n\t\t\t\tforeach ((array) $this->collMissionsRelatedByOtherRequesterId as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collPassengers) {\n\t\t\t\tforeach ((array) $this->collPassengers as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collMissionsRelatedByRequesterId = null;\n\t\t$this->collMissionsRelatedByOtherRequesterId = null;\n\t\t$this->collPassengers = null;\n\t\t\t$this->aPerson = null;\n\t\t\t$this->aAgency = null;\n\t}", "title": "" }, { "docid": "d6c256c12076f5b60a072d474b938165", "score": "0.51230997", "text": "public function destroy(Friend $friend)\n {\n //proceed to deletion only if the input is not null\n if($friend !== null) {\n //check if logged in user is authorized to remove a friendship\n $this->authorize('destroy', $friend);\n\n $friend->delete();\n\n //retrieve the other corresponding record in the two way friendship if applicable\n $otherRecord = User::find($friend->receiver_id)\n ->friends()\n ->where(\"receiver_id\", Auth::user()->id)\n ->first();\n\n //delete other record only if it exists\n if($otherRecord !== null) {\n $otherRecord->delete();\n }\n\n //redirect with a message for the user\n $user_friend = User::find($friend->receiver_id);\n return Redirect::to('/friends')->with('messages', \"$user_friend->firstname $user_friend->lastname is no longer your friend\");\n }\n return redirect('friends');\n }", "title": "" }, { "docid": "89c93cb450bef1e4a059c20328057ccf", "score": "0.507543", "text": "public function removeFriendshipLink($idUser, $idFriend);", "title": "" }, { "docid": "4bf6def90505e44ec6153dce4b96894f", "score": "0.5034219", "text": "public function removeMyFriend($friend)\n\t{\n\t\t$this->myFriends->removeElement($friend);\n\t}", "title": "" }, { "docid": "4b334c8761e1a74ee13daac28a77043f", "score": "0.49403748", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collMembers) {\n\t\t\t\tforeach ((array) $this->collMembers as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collMembers = null;\n\t}", "title": "" }, { "docid": "ffb458b879e0683cd858233f767d96dc", "score": "0.49041533", "text": "public function deleteAllByRelatedTableId($relatedTable, $relatedId){\n\t\t$files = $this->getAllByRelatedTableId($relatedTable, $relatedId);\n\t\tforeach($files as &$file){\n\t\t\t$this->delete($file['id']);\n\t\t}\n\t\tunset($file);\n\t}", "title": "" }, { "docid": "67855708af3353ddf6a065689f182b2c", "score": "0.49033555", "text": "public function clear()\n {\n $this->id = null;\n $this->facebook_id = null;\n $this->first_name = null;\n $this->last_name = null;\n $this->gender = null;\n $this->email = null;\n $this->birthsday = null;\n $this->phone = null;\n $this->last_ip = null;\n $this->is_secured = null;\n $this->long_token = null;\n $this->updated_at = null;\n $this->created_at = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "20b8ad9911e0dad3ba36af3cb5aedf25", "score": "0.4902591", "text": "public function resetPartialFriendsRelatedByUserId($v = true)\n {\n $this->collFriendsRelatedByUserIdPartial = $v;\n }", "title": "" }, { "docid": "e609916187672be18d24240dacec052a", "score": "0.48865363", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collFeaturedSkills) {\n foreach ($this->collFeaturedSkills as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collFeaturedTutorialSkills) {\n foreach ($this->collFeaturedTutorialSkills as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collFeaturedSkills = null;\n $this->collFeaturedTutorialSkills = null;\n $this->aSkill = null;\n $this->aReference = null;\n }", "title": "" }, { "docid": "f2638fe193d1dc35eabd950c4ded3dd7", "score": "0.48840374", "text": "public function setFriendsRelatedByUserId(PropelCollection $friendsRelatedByUserId, PropelPDO $con = null)\n {\n $this->friendsRelatedByUserIdScheduledForDeletion = $this->getFriendsRelatedByUserId(new Criteria(), $con)->diff($friendsRelatedByUserId);\n\n foreach ($this->friendsRelatedByUserIdScheduledForDeletion as $friendRelatedByUserIdRemoved) {\n $friendRelatedByUserIdRemoved->setUserRelatedByUserId(null);\n }\n\n $this->collFriendsRelatedByUserId = null;\n foreach ($friendsRelatedByUserId as $friendRelatedByUserId) {\n $this->addFriendRelatedByUserId($friendRelatedByUserId);\n }\n\n $this->collFriendsRelatedByUserId = $friendsRelatedByUserId;\n $this->collFriendsRelatedByUserIdPartial = false;\n }", "title": "" }, { "docid": "54c8a91f1449355d4d3eb3dd59b63ef3", "score": "0.48399732", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep)\n {\n if ($this->collwpPostsRelatedById)\n {\n foreach ($this->collwpPostsRelatedById as $o)\n {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collwpPostMetas)\n {\n foreach ($this->collwpPostMetas as $o)\n {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collwpComments)\n {\n foreach ($this->collwpComments as $o)\n {\n $o->clearAllReferences($deep);\n }\n }\n }\n\n if ($this->collwpPostsRelatedById instanceof PropelCollection)\n {\n $this->collwpPostsRelatedById->clearIterator();\n }\n $this->collwpPostsRelatedById = null;\n if ($this->collwpPostMetas instanceof PropelCollection)\n {\n $this->collwpPostMetas->clearIterator();\n }\n $this->collwpPostMetas = null;\n if ($this->collwpComments instanceof PropelCollection)\n {\n $this->collwpComments->clearIterator();\n }\n $this->collwpComments = null;\n $this->awpUser = null;\n $this->awpPostRelatedByPostParent = null;\n }", "title": "" }, { "docid": "873652c8c22fc0e8dabd86f97547a485", "score": "0.48237202", "text": "public function destroy($id)\n {\n $friendRelation = Friend::where('user_id_actual',session('user_id'))->where('user_id_friend',$id)\n ->orWhere('user_id_friend',session('user_id'))->where('user_id_actual',$id)->get();\n $friendRelation = $friendRelation[0];\n $friendRelation->delete();\n return redirect(\"/userDetails/$id\");\n }", "title": "" }, { "docid": "1d5d326c29716908da85cb7a338f2f8d", "score": "0.48224977", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collHbfComandass) {\n foreach ($this->collHbfComandass as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collHbfIngresoss) {\n foreach ($this->collHbfIngresoss as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collHbfComandass = null;\n $this->collHbfIngresoss = null;\n $this->aCiUsuariosRelatedByIdCliente = null;\n $this->aCiUsuariosRelatedByIdUserCreated = null;\n $this->aCiUsuariosRelatedByIdUserModified = null;\n $this->aHbfSesiones = null;\n $this->aCiOptions = null;\n $this->aHbfTurnos = null;\n }", "title": "" }, { "docid": "392b2f557ee034e6992f76fc73a31eec", "score": "0.4818592", "text": "public function clearIngredientssRelatedByMain()\n\t{\n\t\t$this->collIngredientssRelatedByMain = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "4965896dc6ed428e233cc8e1007ccf31", "score": "0.48101678", "text": "public function clearMembers()\n\t{\n\t\t$this->collMembers = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "b22efc10b6c3c13d27a404c5cbefa882", "score": "0.48046303", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collPedidos) {\n foreach ($this->collPedidos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProdutoRepresentadas) {\n foreach ($this->collProdutoRepresentadas as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRepresentadaColaboradors) {\n foreach ($this->collRepresentadaColaboradors as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aPessoa instanceof Persistent) {\n $this->aPessoa->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collPedidos instanceof PropelCollection) {\n $this->collPedidos->clearIterator();\n }\n $this->collPedidos = null;\n if ($this->collProdutoRepresentadas instanceof PropelCollection) {\n $this->collProdutoRepresentadas->clearIterator();\n }\n $this->collProdutoRepresentadas = null;\n if ($this->collRepresentadaColaboradors instanceof PropelCollection) {\n $this->collRepresentadaColaboradors->clearIterator();\n }\n $this->collRepresentadaColaboradors = null;\n $this->aPessoa = null;\n }", "title": "" }, { "docid": "30954151d012a454467478ddc0351fb4", "score": "0.48037678", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collWhyCames) {\n foreach ($this->collWhyCames as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->singlePersonCustom) {\n $this->singlePersonCustom->clearAllReferences($deep);\n }\n if ($this->collNotes) {\n foreach ($this->collNotes as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPerson2group2roleP2g2rs) {\n foreach ($this->collPerson2group2roleP2g2rs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collEventAttends) {\n foreach ($this->collEventAttends as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPrimaryContactpeople) {\n foreach ($this->collPrimaryContactpeople as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collSecondaryContactpeople) {\n foreach ($this->collSecondaryContactpeople as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPledges) {\n foreach ($this->collPledges as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->singleUser) {\n $this->singleUser->clearAllReferences($deep);\n }\n } // if ($deep)\n\n $this->collWhyCames = null;\n $this->singlePersonCustom = null;\n $this->collNotes = null;\n $this->collPerson2group2roleP2g2rs = null;\n $this->collEventAttends = null;\n $this->collPrimaryContactpeople = null;\n $this->collSecondaryContactpeople = null;\n $this->collPledges = null;\n $this->singleUser = null;\n $this->aFamily = null;\n }", "title": "" }, { "docid": "9b1cb5c2cc982f29b9577dcb4f09da84", "score": "0.47975564", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collMissions) {\n\t\t\t\tforeach ((array) $this->collMissions as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collMissionRequests) {\n\t\t\t\tforeach ((array) $this->collMissionRequests as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collMissionTypeWingStatss) {\n\t\t\t\tforeach ((array) $this->collMissionTypeWingStatss as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUserFilterMissionTypess) {\n\t\t\t\tforeach ((array) $this->collUserFilterMissionTypess as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collMissions = null;\n\t\t$this->collMissionRequests = null;\n\t\t$this->collMissionTypeWingStatss = null;\n\t\t$this->collUserFilterMissionTypess = null;\n\t}", "title": "" }, { "docid": "4dfadcff9ac1115d04c1b08f2c49fb34", "score": "0.47743884", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collIngredientssRelatedByMain) {\n\t\t\t\tforeach ((array) $this->collIngredientssRelatedByMain as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collIngredientssRelatedByItems) {\n\t\t\t\tforeach ((array) $this->collIngredientssRelatedByItems as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collAddonssRelatedByMain) {\n\t\t\t\tforeach ((array) $this->collAddonssRelatedByMain as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collAddonssRelatedByItems) {\n\t\t\t\tforeach ((array) $this->collAddonssRelatedByItems as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collIngredientssRelatedByMain = null;\n\t\t$this->collIngredientssRelatedByItems = null;\n\t\t$this->collAddonssRelatedByMain = null;\n\t\t$this->collAddonssRelatedByItems = null;\n\t}", "title": "" }, { "docid": "2c9672e0ff2c58c17173d7657f05c240", "score": "0.47663406", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n MetaTableMap::clearInstancePool();\n ModuleAuthorizationTableMap::clearInstancePool();\n UserWebsiteTableMap::clearInstancePool();\n WebsiteRedirectionTableMap::clearInstancePool();\n WebsiteCultureTableMap::clearInstancePool();\n WebsiteDomainTableMap::clearInstancePool();\n WebsiteParameterTableMap::clearInstancePool();\n WebsiteRoutingTableMap::clearInstancePool();\n WebsiteModuleTableMap::clearInstancePool();\n WebsiteZoneTableMap::clearInstancePool();\n }", "title": "" }, { "docid": "2ad0dca86d33281b15316ddc20116e0d", "score": "0.47565654", "text": "protected function resetCollection()\n {\n $this->getCollection()->remove();\n }", "title": "" }, { "docid": "2d2c223f0dd308d022a666f86a1606b6", "score": "0.47545186", "text": "public function clearFtesalaryadvances()\n {\n $this->collFtesalaryadvances = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "cc56f5b4023344d9db09d1f474666110", "score": "0.47396627", "text": "function clear() {\r\n\t\tforeach($this->children as $c) {\r\n\t\t\t$c->parent = null;\r\n\t\t\t$c->delete();\r\n\t\t}\r\n\t\t$this->children = array();\r\n\t}", "title": "" }, { "docid": "09cc3435906f35255a58aceea1617be8", "score": "0.47290403", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collUserFilterMissionTypess) {\n\t\t\t\tforeach ((array) $this->collUserFilterMissionTypess as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collUserFilterMissionTypess = null;\n\t}", "title": "" }, { "docid": "f1ac14412627d70509526ea038144f9a", "score": "0.47261906", "text": "public function clear()\n {\n $this->co_representada = null;\n $this->ds_razao_social = null;\n $this->dt_cadastro = null;\n $this->nu_comissao = null;\n $this->ds_info_adicionais = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "32b62a3f99bd84412d5221fd5ea0699f", "score": "0.47259188", "text": "public function clear()\n {\n $this->id = null;\n $this->bsn = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "a1ec290ea8d65ebcbe58ebe6afac15c9", "score": "0.47244373", "text": "public function clear()\n {\n if (null !== $this->aFamily) {\n $this->aFamily->removePerson($this);\n }\n $this->per_id = null;\n $this->per_title = null;\n $this->per_firstname = null;\n $this->per_middlename = null;\n $this->per_lastname = null;\n $this->per_suffix = null;\n $this->per_address1 = null;\n $this->per_address2 = null;\n $this->per_city = null;\n $this->per_state = null;\n $this->per_zip = null;\n $this->per_country = null;\n $this->per_homephone = null;\n $this->per_workphone = null;\n $this->per_cellphone = null;\n $this->per_email = null;\n $this->per_workemail = null;\n $this->per_birthmonth = null;\n $this->per_birthday = null;\n $this->per_birthyear = null;\n $this->per_membershipdate = null;\n $this->per_gender = null;\n $this->per_fmr_id = null;\n $this->per_cls_id = null;\n $this->per_fam_id = null;\n $this->per_envelope = null;\n $this->per_datelastedited = null;\n $this->per_dateentered = null;\n $this->per_enteredby = null;\n $this->per_editedby = null;\n $this->per_frienddate = null;\n $this->per_flags = null;\n $this->per_facebookid = null;\n $this->per_twitter = null;\n $this->per_linkedin = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "fc26a217d3dfefee3d409f2b9cfb30df", "score": "0.47139305", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collAows) {\n foreach ($this->collAows as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAios) {\n foreach ($this->collAios as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAkws) {\n foreach ($this->collAkws as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collAnws) {\n foreach ($this->collAnws as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collOrbs) {\n foreach ($this->collOrbs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRbbs) {\n foreach ($this->collRbbs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collTass) {\n foreach ($this->collTass as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRems) {\n foreach ($this->collRems as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRemAanvraags) {\n foreach ($this->collRemAanvraags as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collTogs) {\n foreach ($this->collTogs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collWkbs) {\n foreach ($this->collWkbs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collAows = null;\n $this->collAios = null;\n $this->collAkws = null;\n $this->collAnws = null;\n $this->collOrbs = null;\n $this->collRbbs = null;\n $this->collTass = null;\n $this->collRems = null;\n $this->collRemAanvraags = null;\n $this->collTogs = null;\n $this->collWkbs = null;\n }", "title": "" }, { "docid": "5a72d92471bcd1a02b2a3020f30531c9", "score": "0.47133753", "text": "public function removeInvitation($idUser, $idFriend);", "title": "" }, { "docid": "d4f8129d3a15b09f60d25af38d38e453", "score": "0.47050408", "text": "public function clear()\n {\n $this->id = null;\n $this->mcode = null;\n $this->name_f = null;\n $this->name_t = null;\n $this->rcode = null;\n $this->smallbig = null;\n $this->point = null;\n $this->seats = null;\n $this->fdate = null;\n $this->tdate = null;\n $this->locationbase = null;\n $this->firstseatpoint = null;\n $this->secondseatpoint = null;\n $this->function_count = null;\n $this->groupvp = null;\n $this->couple = null;\n $this->pos_cur = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "7010460ec53428d8564eb92827d53231", "score": "0.46934333", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collTbofertasRelatedByIdMatriculaProf) {\n\t\t\t\tforeach ((array) $this->collTbofertasRelatedByIdMatriculaProf as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbofertasRelatedByIdMatriculaProf2) {\n\t\t\t\tforeach ((array) $this->collTbofertasRelatedByIdMatriculaProf2 as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbofertacoordenadors) {\n\t\t\t\tforeach ((array) $this->collTbofertacoordenadors as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbcoordenadorcursos) {\n\t\t\t\tforeach ((array) $this->collTbcoordenadorcursos as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbprofessorsenhas) {\n\t\t\t\tforeach ((array) $this->collTbprofessorsenhas as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbprofessortickets) {\n\t\t\t\tforeach ((array) $this->collTbprofessortickets as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collTbturmaProfessors) {\n\t\t\t\tforeach ((array) $this->collTbturmaProfessors as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collTbofertasRelatedByIdMatriculaProf = null;\n\t\t$this->collTbofertasRelatedByIdMatriculaProf2 = null;\n\t\t$this->collTbofertacoordenadors = null;\n\t\t$this->collTbcoordenadorcursos = null;\n\t\t$this->collTbprofessorsenhas = null;\n\t\t$this->collTbprofessortickets = null;\n\t\t$this->collTbturmaProfessors = null;\n\t\t\t$this->aTbnecesespecial = null;\n\t\t\t$this->aTbcurso = null;\n\t\t\t$this->aTbproftipovinculo = null;\n\t\t\t$this->aTbformacao = null;\n\t\t\t$this->aTbprofessorsituacao = null;\n\t\t\t$this->aTbsetor = null;\n\t}", "title": "" }, { "docid": "154ee0d6ae4fb2e4d71175bda8f2630d", "score": "0.4687291", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n } // if ($deep)\n\n $this->aSkill = null;\n }", "title": "" }, { "docid": "432e8118f21f648c21cf28ffd365360b", "score": "0.46838364", "text": "public function addRemovedFriend($idUser, $idFriend);", "title": "" }, { "docid": "3e918935fc0693fac39a414c51622f04", "score": "0.46835172", "text": "public static function clearRelatedInstancePool()\n\t{\n\t\t// invalidate objects in FilmLinksPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmLinksPeer::clearInstancePool();\n\n\t\t// invalidate objects in FilmRaitingPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmRaitingPeer::clearInstancePool();\n\n\t\t// invalidate objects in FilmTotalRatingPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmTotalRatingPeer::clearInstancePool();\n\n\t\t// invalidate objects in FilmGalleryPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmGalleryPeer::clearInstancePool();\n\n\t\t// invalidate objects in FilmFilmTypesPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmFilmTypesPeer::clearInstancePool();\n\n\t\t// invalidate objects in FilmTrailerPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tFilmTrailerPeer::clearInstancePool();\n\n\t\t// invalidate objects in CommentsPeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tCommentsPeer::clearInstancePool();\n\n\t}", "title": "" }, { "docid": "4bd55b203a4108dc5cb02671fcae3ac7", "score": "0.46809125", "text": "public function clear()\n {\n foreach ($this->keys() as $key) {\n unset($this->_store[$key]);\n }\n $frozenKeys = \\array_keys($this->_frozen);\n foreach ($frozenKeys as $key) {\n unset($this->_frozen[$key]);\n }\n }", "title": "" }, { "docid": "9379c4fccc5c6cf3f2937d58095c3c2f", "score": "0.4679486", "text": "public function clear(): void\n {\n $sm = $this->connection->createSchemaManager();\n $collections = $this->listCollections();\n foreach ($collections as $collection) {\n $this->dropCollection($collection);\n }\n }", "title": "" }, { "docid": "f04807e9b7656ff85ead819e2839e3ff", "score": "0.46653605", "text": "public function clear()\n {\n $this->id = null;\n $this->idusuario = null;\n $this->nombre = null;\n $this->direccion = null;\n $this->ciudad = null;\n $this->correo = null;\n $this->telefono = null;\n $this->tipo = null;\n $this->tamano = null;\n $this->actividad1 = null;\n $this->actividad2 = null;\n $this->actividad3 = null;\n $this->actividad4 = null;\n $this->actividad5 = null;\n $this->actividad6 = null;\n $this->actividad7 = null;\n $this->actividad8 = null;\n $this->actividad9 = null;\n $this->actividad10 = null;\n $this->actividad11 = null;\n $this->actividad12 = null;\n $this->actividad13 = null;\n $this->actividad14 = null;\n $this->actividad15 = null;\n $this->actividad16 = null;\n $this->actividad17 = null;\n $this->actividad18 = null;\n $this->actividad19 = null;\n $this->actividad20 = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "8feeadfb94abbaf03badeaba2b035c8d", "score": "0.46649888", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collCompras) {\n foreach ($this->collCompras as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDevolucions) {\n foreach ($this->collDevolucions as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProductos) {\n foreach ($this->collProductos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collProveedormarcas) {\n foreach ($this->collProveedormarcas as $o) {\n $o->clearAllReferences($deep);\n }\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collCompras instanceof PropelCollection) {\n $this->collCompras->clearIterator();\n }\n $this->collCompras = null;\n if ($this->collDevolucions instanceof PropelCollection) {\n $this->collDevolucions->clearIterator();\n }\n $this->collDevolucions = null;\n if ($this->collProductos instanceof PropelCollection) {\n $this->collProductos->clearIterator();\n }\n $this->collProductos = null;\n if ($this->collProveedormarcas instanceof PropelCollection) {\n $this->collProveedormarcas->clearIterator();\n }\n $this->collProveedormarcas = null;\n }", "title": "" }, { "docid": "d6834e6369637e0721dd5926170b39dd", "score": "0.46639696", "text": "public function clear( )\n {\n $this->collection = array( );\n }", "title": "" }, { "docid": "256b2279099a15cc790dcf722ad0ed95", "score": "0.4662446", "text": "public function clearSecondaryContactpeople()\n {\n $this->collSecondaryContactpeople = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "9acd710f45ac6bbae9b4337a5c2df082", "score": "0.4642255", "text": "public function clearAds()\n {\n $this->collAds = null; // important to set this to null since that means it is uninitialized\n $this->collAdsPartial = null;\n }", "title": "" }, { "docid": "5954dd32da7f8a730457f4a0681b496e", "score": "0.4641946", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collUserBikess) {\n\t\t\t\tforeach ((array) $this->collUserBikess as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collUserEquipements) {\n\t\t\t\tforeach ((array) $this->collUserEquipements as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->singleUserInformation) {\n\t\t\t\t$this->singleUserInformation->clearAllReferences($deep);\n\t\t\t}\n\t\t\tif ($this->singleUserProfile) {\n\t\t\t\t$this->singleUserProfile->clearAllReferences($deep);\n\t\t\t}\n\t\t\tif ($this->collUserRidess) {\n\t\t\t\tforeach ((array) $this->collUserRidess as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collUserBikess = null;\n\t\t$this->collUserEquipements = null;\n\t\t$this->singleUserInformation = null;\n\t\t$this->singleUserProfile = null;\n\t\t$this->collUserRidess = null;\n\t}", "title": "" }, { "docid": "9ea646611191e3ca182aa11e0068384b", "score": "0.4637858", "text": "public function purge()\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "title": "" }, { "docid": "8a983e8001cec601cd0f7aed150ad337", "score": "0.46327558", "text": "function removeFriend()\n {\n $user_id = $_POST['user_id'];\n $friendName = $this->getString('friend_name', self::MAX_USERNAME_LENGTH);\n \n // search for friend\n $sql = \"SELECT user_id FROM users WHERE user_name = ?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute(array($friendName));\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $friend_id;\n if(sizeof($row) <= 0) \n exitWithErrorMessage(\"Username not found\");\n \n $friend_id = $row['user_id'];\n\n // delete friendship one way\n $sql = \"DELETE FROM friends WHERE user_1 = ? AND user_2 = ?\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute(array($user_id, $friend_id));\n\n if($stmt->rowCount() == 0) {\n exitWithErrorMessage(\"friendship not found\");\n } else {\n // otherwise friend deleted\n echo json_encode(array('success' => 1));\n }\n }", "title": "" }, { "docid": "f4885b8dcebaf8de1b48e9067965461b", "score": "0.4627834", "text": "public function clear()\n {\n if (null !== $this->aSkill) {\n $this->aSkill->removeVideo($this);\n }\n if (null !== $this->aReference) {\n $this->aReference->removeVideo($this);\n }\n $this->id = null;\n $this->title = null;\n $this->description = null;\n $this->url = null;\n $this->is_tutorial = null;\n $this->athlete = null;\n $this->athlete_id = null;\n $this->uploader_id = null;\n $this->skill_id = null;\n $this->reference_id = null;\n $this->poster_url = null;\n $this->provider = null;\n $this->provider_id = null;\n $this->player_url = null;\n $this->width = null;\n $this->height = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "ee61ebe3f740f3af78a909c3a7b11c5e", "score": "0.46268684", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collsfGuardUserPermissions) {\n foreach ($this->collsfGuardUserPermissions as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collsfGuardUserGroups) {\n foreach ($this->collsfGuardUserGroups as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collsfGuardRememberKeys) {\n foreach ($this->collsfGuardRememberKeys as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUserLicenses) {\n foreach ($this->collUserLicenses as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPressContacts) {\n foreach ($this->collPressContacts as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collPressGroups) {\n foreach ($this->collPressGroups as $o) {\n $o->clearAllReferences($deep);\n }\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collsfGuardUserPermissions instanceof PropelCollection) {\n $this->collsfGuardUserPermissions->clearIterator();\n }\n $this->collsfGuardUserPermissions = null;\n if ($this->collsfGuardUserGroups instanceof PropelCollection) {\n $this->collsfGuardUserGroups->clearIterator();\n }\n $this->collsfGuardUserGroups = null;\n if ($this->collsfGuardRememberKeys instanceof PropelCollection) {\n $this->collsfGuardRememberKeys->clearIterator();\n }\n $this->collsfGuardRememberKeys = null;\n if ($this->collUserLicenses instanceof PropelCollection) {\n $this->collUserLicenses->clearIterator();\n }\n $this->collUserLicenses = null;\n if ($this->collPressContacts instanceof PropelCollection) {\n $this->collPressContacts->clearIterator();\n }\n $this->collPressContacts = null;\n if ($this->collPressGroups instanceof PropelCollection) {\n $this->collPressGroups->clearIterator();\n }\n $this->collPressGroups = null;\n }", "title": "" }, { "docid": "b93fc743e817cd240ac15d8aad753df5", "score": "0.46230748", "text": "function delete($id, $related_id='') {\n if (empty($this->focus->id))\n $this->focus = BeanFactory::getBean($this->focus->module_name, $id);\n if (!empty($related_id))\n {\n if (!($related_id instanceof SugarBean)) {\n $related_id = $this->getRelatedBean($related_id);\n }\n if ($this->getSide() == REL_LHS) {\n return $this->relationship->remove($this->focus, $related_id);\n }\n else {\n return $this->relationship->remove($related_id, $this->focus);\n }\n }\n else\n {\n return $this->relationship->removeAll($this);\n }\n }", "title": "" }, { "docid": "d2853770c95b038fccb304b98ea837d9", "score": "0.46208674", "text": "public function clearAows()\n {\n $this->collAows = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "1e4faf6a74004e1d9f4760094dcbb666", "score": "0.46122247", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collEtaps) {\n foreach ($this->collEtaps as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collUlubiones) {\n foreach ($this->collUlubiones as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collLubie_tos) {\n foreach ($this->collLubie_tos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collNalezies) {\n foreach ($this->collNalezies as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collZawieras) {\n foreach ($this->collZawieras as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collEtaps = null;\n $this->collUlubiones = null;\n $this->collLubie_tos = null;\n $this->collNalezies = null;\n $this->collZawieras = null;\n $this->aUzytkownik = null;\n }", "title": "" }, { "docid": "df8f74eb16e9fe205ba8f12d1fbc7ba2", "score": "0.4608767", "text": "public function clearFeaturedSkills()\n {\n $this->collFeaturedSkills = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "faf0ac05865ad5bc2258533222778dd8", "score": "0.46065477", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in LugarinventarioPeer instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n LugarinventarioPeer::clearInstancePool();\n }", "title": "" }, { "docid": "de2e7c1513b21e6443ee4d3be7c87f0a", "score": "0.45997876", "text": "public function clearFotos()\n {\n $this->collFotos = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "505e239f65b90da622998eef4760090f", "score": "0.45937058", "text": "public function unFriend($id) {\n DB::table('friends')->where('host_id', $id)->where('guest_id', Auth::user()->id)->delete();\n DB::table('friends')->where('guest_id', $id)->where('host_id', Auth::user()->id)->delete();\n echo 'true';\n }", "title": "" }, { "docid": "75db738faad86d1560514ffe90b6a07b", "score": "0.45777383", "text": "public function clearPrimaryContactpeople()\n {\n $this->collPrimaryContactpeople = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "de36ed7beb91f7df37558d6fbda2ac6e", "score": "0.45764795", "text": "public function clearAkws()\n {\n $this->collAkws = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "fb72c67015ab8d44dc6776ec841b53ac", "score": "0.45676216", "text": "public function delete()\n {\n $this->myCollection->remove(['_id' => $this->myData['_id']]);\n }", "title": "" }, { "docid": "139fe256109e593103b8237d15bf2924", "score": "0.45675668", "text": "public function destroy($id)\n {\n // echo $id;\n if ($id) {\n /*查询构造器*/\n $res = DB::table('friend')->where('id',$id)->delete();\n // $res = DB::table('user')->delete($id); //适用于主键字段是id的\n\n /* ORM */\n // $res = Users::destroy($id);\n // $res = Users::where('id',$id)->destroy($id);\n if ($res) {\n return redirect('link/list');\n }\n }\n }", "title": "" }, { "docid": "fcc014a9d1af882c7e647fe89bb43cb1", "score": "0.45619863", "text": "public function destroy(){\n $id = $this->id();\n if($id){\n $this->_rest->deleteObject($this->objectClass,$id);\n $this->clearDirtyKeys();\n $this->attributes($this->resetAttributes($this->attributes()));\n }\n }", "title": "" }, { "docid": "6fe479239cca5ff53ee5d0e3de19033e", "score": "0.45600832", "text": "public function addFriendRelatedByFriendId(Friend $l)\n {\n if ($this->collFriendsRelatedByFriendId === null) {\n $this->initFriendsRelatedByFriendId();\n $this->collFriendsRelatedByFriendIdPartial = true;\n }\n if (!$this->collFriendsRelatedByFriendId->contains($l)) { // only add it if the **same** object is not already associated\n $this->doAddFriendRelatedByFriendId($l);\n }\n\n return $this;\n }", "title": "" }, { "docid": "d26d30f90e902aea32c30ec2b8d8f9ae", "score": "0.45444173", "text": "function remove_friend($user, $friend) {\n $db = pdo_from_configuration(CONFIGURATION_JSON);\n $friend_id = check_user($friend);\n if (!$friend_id) {\n return false;\n }\n $delete = $db->prepare('DELETE FROM friends WHERE user = :user AND friend = :friend');\n $delete->bindValue(':user', $user);\n $delete->bindValue(':friend', $friend_id);\n if (!$delete->execute()) {\n return false;\n }\n $delete = $db->prepare('DELETE FROM friends WHERE user = :friend AND friend = :user');\n $delete->bindValue(':user', $user);\n $delete->bindValue(':friend', $friend_id);\n if (!$delete->execute()) {\n return false;\n }\n $delete = $db->prepare('DELETE FROM friend_requests WHERE sender = :sender AND receiver = :receiver');\n $delete->bindValue(':sender', $user);\n $delete->bindValue(':receiver', $friend_id);\n if (!$delete->execute()) {\n return false;\n }\n $delete = $db->prepare('DELETE FROM friend_requests WHERE sender = :receiver AND receiver = :sender');\n $delete->bindValue(':sender', $user);\n $delete->bindValue(':receiver', $friend_id);\n if (!$delete->execute()) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "2b7945bd941d7c7fa832c92e9ccab353", "score": "0.4536024", "text": "public function destroy() {\n $this->clear();\n }", "title": "" }, { "docid": "849fe1d233ea5c8fcfa609d4b4e878ce", "score": "0.45302722", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->aUsuario instanceof Persistent) {\n $this->aUsuario->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n $this->aUsuario = null;\n }", "title": "" }, { "docid": "5ed6d26a48476cffe0cb2f1eb6e2a8f2", "score": "0.4529892", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collFotos) {\n foreach ($this->collFotos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collGeotags) {\n foreach ($this->collGeotags as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collFotos = null;\n $this->collGeotags = null;\n $this->aSekolah = null;\n }", "title": "" }, { "docid": "04e0939b792ed1535048c4fdae8b5c20", "score": "0.4526163", "text": "public function clearTbofertasRelatedByIdMatriculaProf()\n\t{\n\t\t$this->collTbofertasRelatedByIdMatriculaProf = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "d589df1260804f7ef955846d8eefaed3", "score": "0.45211107", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collActionPropertys) {\n foreach ($this->collActionPropertys as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDrugCharts) {\n foreach ($this->collDrugCharts as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDrugComponents) {\n foreach ($this->collDrugComponents as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aEvent instanceof Persistent) {\n $this->aEvent->clearAllReferences($deep);\n }\n if ($this->aCreatePerson instanceof Persistent) {\n $this->aCreatePerson->clearAllReferences($deep);\n }\n if ($this->aModifyPerson instanceof Persistent) {\n $this->aModifyPerson->clearAllReferences($deep);\n }\n if ($this->aSetPerson instanceof Persistent) {\n $this->aSetPerson->clearAllReferences($deep);\n }\n if ($this->aActionType instanceof Persistent) {\n $this->aActionType->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collActionPropertys instanceof PropelCollection) {\n $this->collActionPropertys->clearIterator();\n }\n $this->collActionPropertys = null;\n if ($this->collDrugCharts instanceof PropelCollection) {\n $this->collDrugCharts->clearIterator();\n }\n $this->collDrugCharts = null;\n if ($this->collDrugComponents instanceof PropelCollection) {\n $this->collDrugComponents->clearIterator();\n }\n $this->collDrugComponents = null;\n $this->aEvent = null;\n $this->aCreatePerson = null;\n $this->aModifyPerson = null;\n $this->aSetPerson = null;\n $this->aActionType = null;\n }", "title": "" }, { "docid": "4cb86c5ae38814a4d16253595f4c0773", "score": "0.4519474", "text": "public function clear()\n {\n $this->idproveedor = null;\n $this->proveedor_nombrecomercial = null;\n $this->proveedor_telefono = null;\n $this->proveedor_celular = null;\n $this->proveedor_fechainicio = null;\n $this->proveedor_email = null;\n $this->proveedor_razonsocial = null;\n $this->proveedor_rfc = null;\n $this->proveedor_direccion = null;\n $this->proveedor_colonia = null;\n $this->proveedor_cp = null;\n $this->proveedor_ciudad = null;\n $this->proveedor_estado = null;\n $this->proveedor_contactonombre = null;\n $this->proveedor_contactotelefono = null;\n $this->proveedor_contactoemail = null;\n $this->alreadyInSave = false;\n $this->alreadyInValidation = false;\n $this->alreadyInClearAllReferencesDeep = false;\n $this->clearAllReferences();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "38b701ca69d062d3f21213560fa3da60", "score": "0.45158404", "text": "public function destroy($id)\n {\n if (!$id){\n return $this->sendFail(\"缺少参数\");\n }\n\n $result=Friend::destroy($id);\n if ($result){\n return $this->sendSuccess(\"\",\"删除友链成功!\");\n }\n }", "title": "" }, { "docid": "acad6ffffda3eb1bd27cd6a8d5e8a13c", "score": "0.45016026", "text": "public function clearWhyCames()\n {\n $this->collWhyCames = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "9392d83a14ab6f2923138e64a3812dc4", "score": "0.44981328", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collActividadCargos) {\n foreach ($this->collActividadCargos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collActividadObjetivos) {\n foreach ($this->collActividadObjetivos as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collDictacions) {\n foreach ($this->collDictacions as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collActividadCargos = null;\n $this->collActividadObjetivos = null;\n $this->collDictacions = null;\n $this->aEActividad = null;\n $this->aTActividad = null;\n $this->aTHora = null;\n $this->aTModalidad = null;\n }", "title": "" }, { "docid": "edc782824c304a6c9f08990d3762233d", "score": "0.4494666", "text": "public function clear()\n {\n if (null !== $this->aWebsite) {\n $this->aWebsite->removeWebsiteRouting($this);\n }\n $this->id = null;\n $this->website_id = null;\n $this->comment = null;\n $this->tags = null;\n $this->enable = null;\n $this->page = null;\n $this->javascript = null;\n $this->stylesheet = null;\n $this->controller = null;\n $this->created_at = null;\n $this->updated_at = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "caec37beb0a6f100bf5616471bcd0630", "score": "0.44857717", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t} // if ($deep)\n\n\t\t$this->aAlpzaMiembro = null;\n\t}", "title": "" }, { "docid": "5e790e19cd115616de637abc141c061a", "score": "0.4481301", "text": "public static function clearRelatedInstancePool()\n\t{\n\t\t// invalidate objects in DoucheVotePeer instance pool, since one or more of them may be deleted by ON DELETE CASCADE rule.\n\t\tDoucheVotePeer::clearInstancePool();\n\n\t}", "title": "" }, { "docid": "3139c3e2da8a25d79e838c6f2ab647a1", "score": "0.44780764", "text": "public function clearAllReferences($deep = false)\n\t{\n\t\tif ($deep) {\n\t\t\tif ($this->collIdeaI18ns) {\n\t\t\t\tforeach ((array) $this->collIdeaI18ns as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collIdea2commentss) {\n\t\t\t\tforeach ((array) $this->collIdea2commentss as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collIdeaabuses) {\n\t\t\t\tforeach ((array) $this->collIdeaabuses as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collIdeavotes) {\n\t\t\t\tforeach ((array) $this->collIdeavotes as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->collBestideaI18ns) {\n\t\t\t\tforeach ((array) $this->collBestideaI18ns as $o) {\n\t\t\t\t\t$o->clearAllReferences($deep);\n\t\t\t\t}\n\t\t\t}\n\t\t} // if ($deep)\n\n\t\t$this->collIdeaI18ns = null;\n\t\t$this->collIdea2commentss = null;\n\t\t$this->collIdeaabuses = null;\n\t\t$this->collIdeavotes = null;\n\t\t$this->collBestideaI18ns = null;\n\t\t\t$this->aUser = null;\n\t}", "title": "" }, { "docid": "fec5c359cf12112f83a71334f1470b1d", "score": "0.44612718", "text": "public function clear()\n {\n if (null !== $this->aCiUsuariosRelatedByIdCliente) {\n $this->aCiUsuariosRelatedByIdCliente->removeHbfPrepagosRelatedByIdCliente($this);\n }\n if (null !== $this->aCiUsuariosRelatedByIdUserCreated) {\n $this->aCiUsuariosRelatedByIdUserCreated->removeHbfPrepagosRelatedByIdUserCreated($this);\n }\n if (null !== $this->aCiUsuariosRelatedByIdUserModified) {\n $this->aCiUsuariosRelatedByIdUserModified->removeHbfPrepagosRelatedByIdUserModified($this);\n }\n if (null !== $this->aHbfSesiones) {\n $this->aHbfSesiones->removeHbfPrepagos($this);\n }\n if (null !== $this->aCiOptions) {\n $this->aCiOptions->removeHbfPrepagos($this);\n }\n if (null !== $this->aHbfTurnos) {\n $this->aHbfTurnos->removeHbfPrepagos($this);\n }\n $this->id_prepago = null;\n $this->id_cliente = null;\n $this->id_turno = null;\n $this->id_sesion = null;\n $this->fichas_total = null;\n $this->fichas_usadas = null;\n $this->fichas_gratis = null;\n $this->fichas_restantes = null;\n $this->id_option_tipo_prepago = null;\n $this->a_cuenta = null;\n $this->saldo = null;\n $this->importe = null;\n $this->pagado = null;\n $this->finalizado = null;\n $this->observaciones = null;\n $this->estado = null;\n $this->change_count = null;\n $this->id_user_created = null;\n $this->id_user_modified = null;\n $this->date_modified = null;\n $this->date_created = null;\n $this->alreadyInSave = false;\n $this->clearAllReferences();\n $this->applyDefaultValues();\n $this->resetModified();\n $this->setNew(true);\n $this->setDeleted(false);\n }", "title": "" }, { "docid": "a08b85b3013fae750a8a5430de1f465d", "score": "0.4457633", "text": "public function clearRoutes()\n {\n $this->collRoutes = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "8f35289917a54d7991342b4969039706", "score": "0.44571823", "text": "public function clearRems()\n {\n $this->collRems = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "5daa9440d3e6ce75bad2ee6b65da600d", "score": "0.44544214", "text": "public function clearAnws()\n {\n $this->collAnws = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "d511a6ae27c4deacdc99be6a1d1d9c22", "score": "0.4449404", "text": "public function destroy($id)\n {\n FriendshipLink::destroy($id);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "97071090ab2a968a4f3f3593e90c5df3", "score": "0.44493142", "text": "public static function remove($user, $friend) {\n $photos = $friend->photos()\n ->where('origin_user_id', $user->id)\n ->get()\n ->pluck('id');\n foreach ($photos as $photo_id) {\n $friend->photos()->detach($photo_id);\n }\n\n // Remove friendship and followers\n $user->friends()->detach($friend->id);\n $user->followers()->detach($friend->id);\n\n return response(['status' => 'success'], 200);\n }", "title": "" }, { "docid": "098b826f2cb44e5ade54db1695e44a3e", "score": "0.44445175", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collApInvoiceDetails) {\n foreach ($this->collApInvoiceDetails as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collApInvoiceDetails = null;\n $this->aVendor = null;\n $this->aPurchaseOrder = null;\n }", "title": "" }, { "docid": "7de174186c7529a2d5644934468db457", "score": "0.44323823", "text": "public function clear()\n {\n // Start of user code Collection.clear\n $this->items = array();\n // End of user code\n }", "title": "" }, { "docid": "19fcf4fa4634a73f8cdd4a3d901ec030", "score": "0.44251683", "text": "public function remove()\n\t{\n\t\t$this->getQuery()->remove(array('_id' => $this->_data['_id']));\n\t}", "title": "" }, { "docid": "0eae2e815a1d14daf10b76bbe49f8c35", "score": "0.44248036", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep && !$this->alreadyInClearAllReferencesDeep) {\n $this->alreadyInClearAllReferencesDeep = true;\n if ($this->collActions) {\n foreach ($this->collActions as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->aEventType instanceof Persistent) {\n $this->aEventType->clearAllReferences($deep);\n }\n if ($this->aClient instanceof Persistent) {\n $this->aClient->clearAllReferences($deep);\n }\n if ($this->aCreatePerson instanceof Persistent) {\n $this->aCreatePerson->clearAllReferences($deep);\n }\n if ($this->aModifyPerson instanceof Persistent) {\n $this->aModifyPerson->clearAllReferences($deep);\n }\n if ($this->aSetPerson instanceof Persistent) {\n $this->aSetPerson->clearAllReferences($deep);\n }\n if ($this->aDoctor instanceof Persistent) {\n $this->aDoctor->clearAllReferences($deep);\n }\n if ($this->aOrgStructure instanceof Persistent) {\n $this->aOrgStructure->clearAllReferences($deep);\n }\n\n $this->alreadyInClearAllReferencesDeep = false;\n } // if ($deep)\n\n if ($this->collActions instanceof PropelCollection) {\n $this->collActions->clearIterator();\n }\n $this->collActions = null;\n $this->aEventType = null;\n $this->aClient = null;\n $this->aCreatePerson = null;\n $this->aModifyPerson = null;\n $this->aSetPerson = null;\n $this->aDoctor = null;\n $this->aOrgStructure = null;\n }", "title": "" }, { "docid": "50549efe151b11407421fdb683532dc1", "score": "0.44168046", "text": "public function clearFieldReferences();", "title": "" }, { "docid": "14985e4c345995586254f7969f068e13", "score": "0.44160777", "text": "public function clearAllReferences($deep = false)\n {\n if ($deep) {\n if ($this->collArcs) {\n foreach ($this->collArcs as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collCommands) {\n foreach ($this->collCommands as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collGates) {\n foreach ($this->collGates as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collNotifications) {\n foreach ($this->collNotifications as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collRoutes) {\n foreach ($this->collRoutes as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collTriggerFulfillments) {\n foreach ($this->collTriggerFulfillments as $o) {\n $o->clearAllReferences($deep);\n }\n }\n if ($this->collWorkItems) {\n foreach ($this->collWorkItems as $o) {\n $o->clearAllReferences($deep);\n }\n }\n } // if ($deep)\n\n $this->collArcs = null;\n $this->collCommands = null;\n $this->collGates = null;\n $this->collNotifications = null;\n $this->collRoutes = null;\n $this->collTriggerFulfillments = null;\n $this->collWorkItems = null;\n $this->aWorkFlow = null;\n }", "title": "" } ]
69aa2469259afdbd89e6046d212cbee0
Creates and returns domain object from data.
[ { "docid": "e5177c9a3c41d5181d6c9793d2ab6949", "score": "0.73513925", "text": "public function create(array $data) {\n\t\t/* @var $object \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractDomainObject */\n\t\t$object = $this->objectManager->get($this->objectType);\n\t\t$this->setProperties($object, $data);\n\t\t$this->setDefaultProperties($object, $data);\n\t\treturn $object;\n\t}", "title": "" } ]
[ { "docid": "a3443e1384b911c95b8691f28fa51a94", "score": "0.70994055", "text": "public static function createFromData($data)\n {\n $model = new Data();\n $model->setRaw($data);\n return $model;\n }", "title": "" }, { "docid": "0de324d0765fe002795cb912a2942df6", "score": "0.67453915", "text": "public function loadEntity($data)\n {\n return new Record([\n 'id' => $data->id,\n 'zone' => $data->zone,\n 'name' => $data->name,\n 'type' => $data->type,\n 'content' => $data->content,\n 'ttl' => $data->ttl,\n 'priority' => $data->priority,\n ]);\n }", "title": "" }, { "docid": "94b3d0ca745a251a441f99f30e186bbf", "score": "0.6721218", "text": "public static function from($data)\n\t{\n\t\t$p = Model::persons()->find($data['name'] ?? null);\n\t\t$p->set($data);\n\t\treturn $p;\n\t}", "title": "" }, { "docid": "87be460d957d6c7875bb46d2e733aab2", "score": "0.6654432", "text": "public function create($data = [])\n {\n try {\n $response = $this->request->curl->post(\"{$this->getUrlEntity()}\", [\n 'json' => $data,\n ]);\n\n $responseData = (array) json_decode($response->getBody()->getContents(), true);\n\n return new $this->model($this->request, $responseData[$this->getSingularEntity()]);\n } catch (ClientException $exception) {\n throw new FortnoxRequestException($exception);\n } catch (ServerException $exception) {\n throw new FortnoxServerException($exception);\n }\n }", "title": "" }, { "docid": "4b70fb702616a496b6eb53f546986c85", "score": "0.66234404", "text": "public function createAndStoreObject(array $data) {\n\t\t// prevents a configurationManager check, which speeds up a process of thousands of inserts\n\t\tif ($this->storagePid !== NULL) {\n\t\t\t$data['pid'] = $this->storagePid;\n\t\t}\n\t\t// $data is provided with defaults 'pid' (if not previously set) and 'uid'\n\t\t$this->repository->insertRecord($data);\n\t\t/* @var $object \\TYPO3\\CMS\\Extbase\\DomainObject\\AbstractDomainObject */\n\t\t$object = $this->create($data);\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "8d574ef3aab2419e5d71852219cf753d", "score": "0.65796095", "text": "public function buildDomain(array $data)\n {\n $post = new Post();\n foreach ($data as $key => $value)\n {\n $method = 'set'.ucfirst($key);\n if (method_exists($post, $method))\n {\n $post->$method($value);\n }\n }\n return $post;\n }", "title": "" }, { "docid": "66dc2357ebe8be00d9394e5534df501e", "score": "0.6503019", "text": "public static function create($data)\n {\n return new static($data);\n }", "title": "" }, { "docid": "50ea35cb499c862aaf706945a4780ba8", "score": "0.64707774", "text": "public function create($data = null) {\n return $this->_create_model_instance(parent::create($data));\n }", "title": "" }, { "docid": "032d1fa0043c0d7729a39c73fa1a04a4", "score": "0.64250135", "text": "public function create($data=null) {\n return $this->_create_model_instance(parent::create($data));\n }", "title": "" }, { "docid": "e23ca82c2a30b6ea6eec149869e9d5d9", "score": "0.63577807", "text": "public function loadEntity($data)\n {\n return new Host(\n [\n 'id' => $data->id,\n 'name' => $data->name,\n 'cpu' => $data->cpu,\n 'ram' => $data->ram,\n 'solutionId' => $data->solution_id,\n 'podId' => $data->pod_id\n ]\n );\n }", "title": "" }, { "docid": "dede878b956f6639aa888b76a3acbad0", "score": "0.63512284", "text": "public function factory($data)\n {\n $item = $this->getItem();\n $mapper = $this->getInputMapper();\n $data = $mapper->map($data);\n\n $item->init($data);\n return $item;\n }", "title": "" }, { "docid": "971b0c552c35e9b6f7e4e57158139a3e", "score": "0.6275061", "text": "public static function factory($data)\n {\n // If it's a string...\n if (is_string($data)) {\n // Assume it's JSON.\n $data = json_decode($data, true);\n\n // Throw an exception if it turns out to not be JSON...\n if (is_null($data)) {\n throw new \\InvalidArgumentException('Invalid JSON passed to constructor');\n }\n }\n\n // Based on type...\n switch ($data['type']) {\n case 'trust':\n return new TrustCorporation($data);\n case 'human':\n return new Human($data);\n }\n\n // Otherwise check if there was a number passed...\n if (isset($data['number'])) {\n return new TrustCorporation($data);\n }\n\n // else assume it's a human...\n return new Human($data);\n }", "title": "" }, { "docid": "146bf6ca9ee7823fb86bf569dd8de302", "score": "0.6266261", "text": "public function make($data)\n {\n return $this->createDriver()->init($data);\n }", "title": "" }, { "docid": "52e61a73cbe0beeb2b14560f8575e1a9", "score": "0.62542826", "text": "public function create(array $data)\n {\n $data = collect($data);\n\n $class = $this->modelClass();\n\n $service = $this->resolveService(new $class)->validate($data);\n\n $service->saveData($data);\n\n return $service->model();\n }", "title": "" }, { "docid": "f5efa774937a850ef8a1bc4cb56d268e", "score": "0.6244466", "text": "public function create($data) {\r\n\t\t$string = $data ['content'];\r\n\t\t\r\n\t\treturn new JsonModel ( array (\r\n\t\t\t\t\"content\" => $string \r\n\t\t) );\r\n\t}", "title": "" }, { "docid": "0d33e499b63ed43d8067a9a9f0c2b1b6", "score": "0.62428963", "text": "public function createData($data);", "title": "" }, { "docid": "b566674c4047e4e405e0ed23f35b4b15", "score": "0.62246484", "text": "public static function create($data)\n\t{\n\t\t$model_name = get_called_class();\n\t\t\n\t\ttry {\n\t\t\t$model = new $model_name();\n\t\t\t\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$model->columns[$key] = $value;\n\t\t\t}\n\t\t\t\n\t\t\t$model->store();\n\t\t\t\n\t\t\treturn $model;\n\t\t} catch (Exception $e) {\n\t\t\techo \"Error: Creating new model instance. Error Details: \".$e->getMessage();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "3b9415e047b15bec386a7304b0246a26", "score": "0.61882293", "text": "public function createEntity(array $data) {\n\t\treturn $this->getFactory()->createEntity($data);\n\t}", "title": "" }, { "docid": "b37d3cf4354b6653ce32d8548123f62d", "score": "0.61689335", "text": "public function factory(array $data = [])\n {\n $model = $this->newQuery()->getModel()->newInstance();\n\n $this->setModelData($model, $data);\n\n return $model;\n }", "title": "" }, { "docid": "296129e642cf27d0751cf7689e93a954", "score": "0.613961", "text": "public function createEntityFromSource($data){\n $element=[];\n \n foreach($this->getFields() as $field){\n $element[$field->getName()]=$data[$field->getName()];\n }\n $element[\"___scheme___\"]=$this;\n \n return $element;\n }", "title": "" }, { "docid": "5dbb5c3839eda0b60551a972aab337d3", "score": "0.6137744", "text": "public function factory(array $data)\n {\n $entityClass = $this->entityClass;\n $entity = new $entityClass();\n\n if (!($entity instanceof Entity)) {\n throw new EntityParentClassMissingException(\\sprintf('Entity %s is not a chid class of %s.', \\get_class($entity), Entity::class));\n }\n\n $entity->__deserialize($data);\n\n return $entity;\n }", "title": "" }, { "docid": "16dd381b696ae57e5b3f85284a6f0749", "score": "0.61140263", "text": "abstract public function create(array $data);", "title": "" }, { "docid": "f1bb5ebe154e67ae12ed2c7fa0ee71d3", "score": "0.61131793", "text": "private function createRecord($data) {\n\t\t$record\t= new Record();\n\t\tforeach ($data as $key => $value) {\n\t\t\t$record->$key = $value;\n\t\t}\n\t\treturn $record;\n\t}", "title": "" }, { "docid": "2e74ccd606aeeab1ff148dc42154022e", "score": "0.60816354", "text": "public function create(Array $data): AbstractEntity\n {\n $entity = new $this->entity($data); \n if (method_exists($entity, 'setCode'))\n $entity->setCode($this->getCodeHash());\n\n $this->entityManager->persist($entity);\n $this->entityManager->flush();\n\n $this->getEventManager()->trigger('create', $this, ['entity' => $entity, 'module' => $this->entity]);\n\n return $entity;\n }", "title": "" }, { "docid": "ac216fd26223d0ebfadfb4dd077653ca", "score": "0.6067319", "text": "public function create(array $data = array())\n\t{\n\t\t$model = new static::$modelName();\n\t\t$model->onConstruct($data);\n\t\tif ($model->isValid()) {\n\t\t\t$model->insert();\n\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new \\Exception('Model data is not valid!');\n\t\t}\n\t}", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "912fbbf3bfb832c914e055d575912c1a", "score": "0.60658056", "text": "public function create($data);", "title": "" }, { "docid": "2e90e4a7a716f2de5184469458ecb3ab", "score": "0.606481", "text": "public static function createFromArray($data)\n {\n $name = isset($data['name']) && $data['name'] != '' ? $data['name'] : '';\n $surname = isset($data['surname']) && $data['surname'] != '' ? $data['surname'] : '';\n $birthDate = isset($data['birthDate']) && $data['birthDate'] != '' ? $data['birthDate'] : '';\n $address = isset($data['address']) && $data['address'] != '' ? $data['address'] : '';\n $email = isset($data['email']) && $data['email'] != '' ? $data['email'] : '';\n $login = isset($data['login']) && $data['login'] != '' ? $data['login'] : '';\n $password = isset($data['password']) && $data['password'] != '' ? $data['password'] : '';\n $gender = isset($data['gender']) && $data['gender'] != '' ? $data['gender'] : '';\n $admissionDate = isset($data['admissionDate']) && $data['admissionDate'] != '' ? $data['admissionDate'] : '';\n $diploma = isset($data['diploma']) && $data['diploma'] != '' ? $data['diploma'] : '';\n $grade = isset($data['grade']) && $data['grade'] != '' ? $data['grade'] : '';\n $lastUpgradeDate = isset($data['lastUpgradeDate']) && $data['lastUpgradeDate'] != '' ? $data['lastUpgradeDate'] : '';\n return new self(null, $name, $surname, $birthDate, $address, $email, $login, $password, $gender, $admissionDate, $diploma, $grade, $lastUpgradeDate);\n }", "title": "" }, { "docid": "afd9a26f9443ebc8ffbfcbec93a06f9c", "score": "0.60613763", "text": "public function __construct(ShopDomain $domain, \\stdClass $data)\n {\n $this->domain = $domain;\n $this->data = $data;\n }", "title": "" }, { "docid": "a73ea7997941e09c7e91e9efb8efdedb", "score": "0.6056485", "text": "function create($arr) {\n\t\t$obj = $this->dormio->getObjectFromEntity($this->entity);\n\t\t$obj->_data = $arr;\n\t\tforeach($obj->_data as $key=>$value) $obj->$key = $value;\n\t\t$this->add($obj);\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "47d9961d35d293e1d7e0e42c63143e7a", "score": "0.6051794", "text": "public function getData(){\n\t\t$object = new stdClass();\n\t\t$object->id = $this->id;\n\t\t$object->name = $this->name;\n\t\t$object->description = $this->description;\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "812e4924917f177e20204d911b302128", "score": "0.60444546", "text": "protected abstract function make_object( \\stdClass $data );", "title": "" }, { "docid": "50b5d77f2cedc5cf84e8fa06845055a8", "score": "0.60211134", "text": "public function create($data)\n {\n return Property::create($data);\n }", "title": "" }, { "docid": "fad72e4a90730313bcf6538764f9bddd", "score": "0.60064805", "text": "public function create($data) {\n return new JsonModel(array_merge(array(\n 'contact_id' => 4), $data\n ));\n }", "title": "" }, { "docid": "a4f31c847cb8b5bd19ce9ac6087f9812", "score": "0.59923106", "text": "public function create( array $data )\n { \n\n if( isset($data['slug']) )\n {\n $data['slug'] = Str::slug( $data['slug'] );\n }\n\n if( isset($data['title']) )\n {\n $data['slug'] = Str::slug( $data['title'] );\n }\n\n if( isset($data['meta']) )\n {\n $data['meta'] = $this->syncMeta( $data['meta'] );\n }\n\n $this->model = $this->model->create( $data );\n\n $this->storage( $data );\n\n return $this->model;\n }", "title": "" }, { "docid": "43d1f2b7f65a91f2fb7520ccfc766534", "score": "0.5989689", "text": "public function create($data, $class)\n {\n return is_object($data) ? $data : $this->hydrate(is_array($data) ? $data : [$data], $class);\n }", "title": "" }, { "docid": "c13c6e17ff9d1f8c2eb35d9fb4ea46b8", "score": "0.5988353", "text": "public function create(array $data): mixed;", "title": "" }, { "docid": "8727a00cfb687c7145ede9ab99a77147", "score": "0.5956179", "text": "public function hydrate($data);", "title": "" }, { "docid": "b9a3b26f1a46143ce3641c3821edae19", "score": "0.59426767", "text": "protected function makeDataSet($dataset){\n\n $this->object = new Data($dataset);\n\n return $this->object;\n }", "title": "" }, { "docid": "bc5b13e31dfda123e891360b4e4184a9", "score": "0.59353966", "text": "public function getDataModel()\n {\n $entityData = $this->getData();\n \n $entityDataObject = $this->entityDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $entityDataObject,\n $entityData,\n EntityInterface::class\n );\n \n return $entityDataObject;\n }", "title": "" }, { "docid": "3cab77c54c154ba72820f272d280d1ef", "score": "0.5913696", "text": "public function hydrate(array $data): EntityInterface;", "title": "" }, { "docid": "982a80b09bf12f69b7960d8352e79014", "score": "0.5872186", "text": "public function create($data)\n {\n $query = $this->model->create($data);\n $query->relations()->sync(array_get($data, 'relations', []));\n event(new EntityWasCreated($query, $data));\n //$entity->setTags(array_get($data, 'tags', []));\n return $query;\n }", "title": "" }, { "docid": "88731602e5caa908e98436574efeca4c", "score": "0.5863834", "text": "protected function createCustomData()\n {\n $p = &$this->data;\n\n $p['data'] = Util\\toJSONArray(@$p['data']);\n $p['sys_data'] = Util\\toJSONArray(@$p['sys_data']);\n\n //filter fields\n $this->filterHTMLFields($p['data']);\n\n $this->lastMentionedUserIds = $this->setFollowers();\n\n $this->collectSolrData();\n\n $data = array(\n 'id' => $this->id\n ,'data' => Util\\jsonEncode($p['data'])\n ,'sys_data' => Util\\jsonEncode($p['sys_data'])\n );\n\n if (DM\\Objects::exists($this->id)) {\n DM\\Objects::update($data);\n } else {\n DM\\Objects::create($data);\n }\n }", "title": "" }, { "docid": "f59d2127bdb6ce73d4c76b77ef7ef605", "score": "0.5851493", "text": "public static function createModel($className, $data){\n try {\n //get class name and create get the path for that model class\n $className = ucfirst($className);\n $className = \"MoaMaster\\\\Domain\\\\Models\\\\\" . $className;\n //create new object based on string\n $object = new $className;\n //set attributes and return object\n $object->setAttributes($data);\n return $object;\n }catch (\\Exception $e){\n echo $e->getMessage();\n }\n return null;\n }", "title": "" }, { "docid": "8f741bdc7df9df7989d00ba2c36a8d6c", "score": "0.5843212", "text": "public function build($data)\n {\n $oSystem = new PointSystem($this->oGateway, $this->oLogger);\n $sAlias = $this->getTableQueryAlias();\n \n $oSystem->iEpisodeID = $this->getField($data,'episode_id',$sAlias);\n $oSystem->sSystemID = $this->getField($data,'system_id',$sAlias);\n $oSystem->sSystemName = $this->getField($data,'system_name',$sAlias);\n $oSystem->sSystemNameSlug = $this->getField($data,'system_name_slug',$sAlias);\n $oSystem->oEnabledFrom = $this->getField($data,'enabled_from',$sAlias);\n $oSystem->oEnabledTo = $this->getField($data,'enabled_to',$sAlias);\n \n return $oSystem;\n }", "title": "" }, { "docid": "a7f8712664290157f5734d80af49f0bc", "score": "0.582703", "text": "public static function make(array $data = array())\n {\n if (isset($data['.tag']) && isset($data['id'])) {\n $tag = $data['.tag'];\n\n //File\n if ($tag === 'file') {\n return new FileMetadata($data);\n }\n\n //Folder\n if ($tag === 'folder') {\n return new FolderMetadata($data);\n }\n }\n\n //Temporary Link\n if (isset($data['metadata']) && isset($data['link'])) {\n return new TemporaryLink($data);\n }\n\n //List\n if (isset($data['entries'])) {\n return new MetadataCollection($data);\n }\n\n //Search Results\n if (isset($data['matches'])) {\n return new SearchResults($data);\n }\n\n //Deleted File/Folder\n if (!isset($data['.tag']) || !isset($data['id'])) {\n return new DeletedMetadata($data);\n }\n\n //Base Model\n return new BaseModel($data);\n }", "title": "" }, { "docid": "389c10916c68b46e50727dd18d3d8a35", "score": "0.582236", "text": "public function model(array $data = [])\n {\n return new $this->modelName($data);\n }", "title": "" }, { "docid": "09e6b89b5ffe41499ad30b0f0bd83b93", "score": "0.58150303", "text": "abstract public function createModel(array $data): Model;", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "9997815f8748eea6fbd1b3a1330e5a4f", "score": "0.5812199", "text": "public function create(array $data);", "title": "" }, { "docid": "7b9cd4a6112285910ebfe8735ee8d609", "score": "0.58121085", "text": "public function convertToEntity($data) {\n\t\tif (is_null($data) || empty($data[$this->alias][$this->primaryKey])) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$entity = $this->newEntity($data, null, false);\n\t\t$entity->isNew(false);\n\t\t$entity->clean();\n\t\treturn $entity;\n\t}", "title": "" }, { "docid": "2d928727331cbd5fb8b3556d33ce24cb", "score": "0.58048636", "text": "public static function create($data, $related = false)\n\t{\n\t\tif (!is_array($data)) return new Base;\n\n\t\t$json_api_keys = array_intersect_key($data, array_flip(['type', 'id']));\n\n\t\tif (!count($json_api_keys) >= 2) {\n\t\t\tthrow new \\InvalidArgumentException('Are you sure this data is JSON:API: ' . print_r($data, 1));\n\t\t}\n\n\t\t$className = join('\\\\', [__NAMESPACE__, Str::studly($data['type'])]);\n\n\t\tif (!class_exists($className)) {\n\t\t\t$className = join('\\\\', [__NAMESPACE__, 'Base']);\n\t\t}\n\n\t\t$attrs = array_key_exists('attributes', $data) ? $data['attributes'] : null;\n\n\t\t/** @var Base $entity */\n\t\t$entity = new $className($attrs, $data['type'], $data['id']);\n\n\t\tif ($related && array_key_exists('relationships', $data)) {\n\t\t\tforeach ($data['relationships'] as $k => $related) {\n\t\t\t\tif (array_key_exists('data', $related) && !empty($related['data'])) {\n\t\t\t\t\t$reldata = $related['data'];\n\t\t\t\t\tif (!is_array($reldata)) $reldata = [$reldata];\n\t\t\t\t\t\n\t\t\t\t\t// if this is only for an array with a single value set, don't loop over it\n\t\t\t\t\tif (isset($reldata['id'])) {\n\t\t\t\t\t\t$entity->addRelationship($k, Factory::create($reldata));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tforeach ($reldata as $relation) {\n\t\t\t\t\t\t\t$entity->addRelationship($k, Factory::create($relation));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $entity;\n\t}", "title": "" }, { "docid": "8b4822ce30707b0fc591f2c1bb59b0ca", "score": "0.57852525", "text": "public function create( array $data);", "title": "" }, { "docid": "f1b645e8361fc0aa1cea277dc97a0e9f", "score": "0.57708097", "text": "private function createAndInitializeEntity($objType, $data)\r\n {\r\n $obj = Models\\EntityFactory::factory($objType);\r\n //$def = $this->getDefWithLoader($objType);\r\n \r\n foreach ($data as $fname=>$fval)\r\n $obj->setValue($fname, $fval);\r\n\t\t\r\n return $obj; \r\n }", "title": "" }, { "docid": "51653a7901cdeaf129dae302c442e222", "score": "0.57606876", "text": "public function create($data)\n {\n $data['type'] = 'company';\n\n $user = $this->user->create($data);\n\n $data['user_id'] = $user['id'];\n\n $data = $this->company->create($data);\n $data['user'] = $user;\n\n return $data;\n }", "title": "" }, { "docid": "033e4e5f3bf75f3eb8e5f2381a49f92a", "score": "0.5750505", "text": "public function new($data)\n {\n $response = [];\n\n try {\n if (!in_array('new', $this->allowableActions)) {\n return;\n }\n \n if (!$this->checkPermissions('new')) {\n throw new \\Exception('Permission Denied');\n }\n \n if ($this->model !== null) {\n if (!isset($this->model['appId']) && $this->requireAccount) {\n // add account information\n $data['kyte_account'] = $data['kyte_account'] ?? $this->api->account->id;\n } elseif ($this->api->app->org_model !== null && $this->api->app->userorg_colname !== null && isset($this->model['struct'][$this->api->app->userorg_colname]) && $this->requireAccount) {\n $data[$this->api->app->userorg_colname] = $data[$this->api->app->userorg_colname] ?? $this->api->user->{$this->api->app->userorg_colname};\n }\n }\n\n // hook for any custom behaviours before creating object\n $this->hook_preprocess('new', $data);\n \n // go through data parameters and...\n // 1. covert times to unix time\n // 2. check for foregin key table data\n // 3. check for external table data\n $linkedModels = $this->sift($data);\n\n // create any FK entries\n $this->createFkEntries($linkedModels, $data);\n\n // init new object\n $obj = new \\Kyte\\Core\\ModelObject($this->model);\n\n // check existing and fail if present\n if ($this->checkExisting) {\n if ($obj->retrieve($this->checkExisting, $data[$this->checkExisting])) {\n if ($this->existingThrowException) {\n throw new \\Exception($this->model['name'].' already exists');\n } else {\n return;\n }\n }\n }\n \n\n // add user info\n if (isset($this->api->user->id)) {\n $data['created_by'] = $this->api->user->id;\n }\n \n // create object & get return\n if ($obj->create($data)) {\n $ret = [];\n $ret = $this->getObject($obj);\n $this->hook_response_data('new', $obj, $ret, $data);\n $response[] = $ret;\n } else {\n if ($this->failOnNull) {\n throw new \\Exception($this->exceptionMessages['new']['failOnNull']);\n }\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n\n $this->response['data'] = $response;\n }", "title": "" }, { "docid": "a4f97e782ee75bfcb8af0f3858a92d78", "score": "0.5746069", "text": "public static function generateEntity($data, $model)\n {\n $className = self::className($model);\n\n self::checkParameters($data, $className);\n\n return $model = new $className($data);\n }", "title": "" }, { "docid": "08ba66d09cb25f2e5fb3ec3a1e4260fc", "score": "0.57398933", "text": "public function createModel($data = array(), $from = null)\n {\n $model = new $this->_modelClass();\n if ('db' == $from && $data) {\n $this->_colsToModel($model, $data);\n } else {\n $model->populate($data);\n }\n return $model;\n }", "title": "" }, { "docid": "fa12d1b00ac2276ccec7af292336fbb9", "score": "0.5739509", "text": "public function create(array $data) {\n\n $item = new $this->model;\n\n $item->name = $data['name'];\n $item->description = e($data['description']);\n \n $item->save();\n\n return $item;\n }", "title": "" }, { "docid": "14593edbbb91c262738d1837b82cd673", "score": "0.5701607", "text": "public function getDataModel()\n {\n $cataloguecatagoryData = $this->getData();\n \n $cataloguecatagoryDataObject = $this->cataloguecatagoryDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $cataloguecatagoryDataObject,\n $cataloguecatagoryData,\n CataloguecatagoryInterface::class\n );\n \n return $cataloguecatagoryDataObject;\n }", "title": "" }, { "docid": "9bfb84aaeec952d86fb1c080f3c280c0", "score": "0.570081", "text": "protected function getObject(\\stdClass $data)\n {\n switch ($data->type) {\n case 'account_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\AccountType';\n } elseif ($this->entity != 'PublicApi\\Entity\\AccountType') {\n throw new \\Exception(500);\n }\n\n $object = new AccountType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'media_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\MediaType';\n } elseif ($this->entity != 'PublicApi\\Entity\\MediaType') {\n throw new \\Exception(500);\n }\n\n $object = new MediaType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'users':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\User';\n } elseif ($this->entity != 'PublicApi\\Entity\\User') {\n throw new \\Exception(500);\n }\n\n $object = new User((array)$data->attributes);\n $res = [$object->getIdUser(), $object];\n break;\n case 'user_identities':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\UserIdentity';\n } elseif ($this->entity != 'PublicApi\\Entity\\UserIdentity') {\n throw new \\Exception(500);\n }\n\n $object = new UserIdentity((array)$data->attributes);\n $res = [$object->getIdIdentity(), $object];\n break;\n case 'oauth_clients':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\OAuthClient';\n } elseif ($this->entity != 'PublicApi\\Entity\\OAuthClient') {\n throw new \\Exception(500);\n }\n\n $object = new OAuthClient((array)$data->attributes);\n $res = [$object->getIdClient(), $object];\n break;\n case 'oauth_tokens':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\OAuthToken';\n } elseif ($this->entity != 'PublicApi\\Entity\\OAuthToken') {\n throw new \\Exception(500);\n }\n\n $object = new OAuthToken((array)$data->attributes);\n $res = [$object->getToken(), $object];\n break;\n case 'bulk_transactions':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\BulkTransaction';\n } elseif ($this->entity != 'PublicApi\\Entity\\BulkTransaction') {\n throw new \\Exception(500);\n }\n\n $object = new BulkTransaction((array)$data->attributes);\n $res = [$object->getIdBulkTransaction(), $object];\n break;\n case 'bulk_types':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\BulkType';\n } elseif ($this->entity != 'PublicApi\\Entity\\BulkType') {\n throw new \\Exception(500);\n }\n\n $object = new BulkType((array)$data->attributes);\n $res = [$object->getType(), $object];\n break;\n case 'files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'PublicApi\\Entity\\File';\n } elseif ($this->entity != 'PublicApi\\Entity\\File') {\n throw new \\Exception(500);\n }\n\n $object = new File((array)$data->attributes);\n $res = [$object->getIdFile(), $object];\n break;\n default:\n throw new \\Exception(500);\n }\n\n return $res;\n }", "title": "" }, { "docid": "060860dc19820c5b175bea488aeb6767", "score": "0.56992924", "text": "function create()\n\t{\n\t\t$names = ['id','name', 'stock','desc','price'];\n\t\t$object = new StdClass;\n\t\tforeach ($names as $name)\n\t\t\t$object->$name = \"\";\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "df116755eb3fd0c9a12b54e64aee6570", "score": "0.5698804", "text": "public function toEntity(array $data)\n {\n // Type check\n if ($data['type'] !== $this->getName()) {\n throw new \\Exception('Resource and type do not match');\n }\n\n // Check if an id is present\n if (array_key_exists('id', $data)) {\n // Load the entity\n $entity = $this->loadEntityById($data['id']);\n } else {\n // Create new\n $entity = $this->createNewEntity();\n }\n\n if (array_key_exists('attributes', $data)) {\n foreach($data['attributes'] as $name => $value) {\n $attribute = $this->getAttributeByJsonName($name);\n if (null !== $attribute) {\n $entity = $attribute->addToEntity($entity, $value);\n }\n }\n }\n\n if (array_key_exists('relationships', $data)) {\n foreach($data['relationships'] as $name => $relationData) {\n $relationship = $this->getRelationshipByJsonName($name);\n if (null !== $relationship) {\n $relationship->addToEntity($entity, $relationData, $this->getManager());\n }\n }\n }\n\n return $entity;\n }", "title": "" }, { "docid": "25c4f1124012050c15fd9e8960bb741f", "score": "0.5682023", "text": "public function create(array $data)\n {}", "title": "" }, { "docid": "244ebbf4bfd1edff2fd0c2b5af68caa3", "score": "0.5671482", "text": "public static function data_to_entity(&$data, $class, $db = NULL)\n {\n if($data === NULL)\n {\n return NULL;\n }\n\n $Go_Model = 'Go_Model';\n $new_data = NULL;\n\n // if it is already instance of the class\n if($data instanceof $class)\n {\n return $data;\n }\n // if it is instance of Go_Model\n else if($data instanceof $Go_Model)\n {\n $new_data = $data->as_array();\n }\n // array and other datatype\n else if(is_string($data))\n {\n $new_data = $data;\n }\n else\n {\n $new_data = (array) $data;\n }\n\n if($db == NULL)\n {\n $CI =& get_instance();\n $db =& $CI->db;\n }\n\n return new $class($new_data, $db);\n }", "title": "" }, { "docid": "b85e4582c8ec10cd85d38b30c65d3f9c", "score": "0.5669398", "text": "public function createEntity(array $data): EntityInterface\n {\n }", "title": "" }, { "docid": "29d18952f165f6a75457ffdf194de2c4", "score": "0.5666533", "text": "private function createFromData($data) {\n\t\tif (is_array($data)) {\n\t\t\t$this->createFromArray($data);\n\t\t\t$this->cleanArray();\n\t\t\t$this->arrayToString();\n\t\t} else {\n\t\t\t$this->asString = $data;\n\t\t\t$this->stringToArray();\n\t\t\t$this->cleanArray();\n\t\t\t$this->arrayToString();\n\t\t}\n\n\t\t$this->removeSingleSplits();\n\t}", "title": "" }, { "docid": "12d1bbb7e21f0fa22704cb4c1801cf59", "score": "0.5661651", "text": "abstract protected function createDataInstance(array $data): ?INabuDataReadable;", "title": "" }, { "docid": "55b016edf21c4cc691f32086306acc7d", "score": "0.56529635", "text": "protected function getObject(\\stdClass $data)\n {\n switch ($data->type) {\n case 'users':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\User';\n } elseif ($this->entity != 'AppBundle\\Entity\\User') {\n throw new HttpException(500);\n }\n\n $object = new User((array)$data->attributes);\n $res = [$object->getIdUser(), $object];\n break;\n case 'user_identities':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\UserIdentity';\n } elseif ($this->entity != 'AppBundle\\Entity\\UserIdentity') {\n throw new HttpException(500);\n }\n\n $object = new UserIdentity((array)$data->attributes);\n $res = [$object->getIdIdentity(), $object];\n break;\n case 'files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\File';\n } elseif ($this->entity != 'AppBundle\\Entity\\File') {\n throw new HttpException(500);\n }\n\n $object = new File((array)$data->attributes);\n $res = [$object->getIdFile(), $object];\n break;\n case 'blockchain':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BlockChain';\n } elseif ($this->entity != 'AppBundle\\Entity\\BlockChain') {\n throw new HttpException(500);\n }\n\n $object = new BlockChain((array)$data->attributes);\n $res = [$object->getTransaction(), $object];\n break;\n case 'account_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\AccountType';\n } elseif ($this->entity != 'AppBundle\\Entity\\AccountType') {\n throw new HttpException(500);\n }\n\n $object = new AccountType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'media_type':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\MediaType';\n } elseif ($this->entity != 'AppBundle\\Entity\\MediaType') {\n throw new HttpException(500);\n }\n\n $object = new MediaType((array)$data->attributes);\n $res = [$object->getIdType(), $object];\n break;\n case 'processes_status':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\ProcessStatus';\n } elseif ($this->entity != 'AppBundle\\Entity\\ProcessStatus') {\n throw new HttpException(500);\n }\n\n $object = new ProcessStatus((array)$data->attributes);\n $res = [$object->getType().'_'.$object->getIdStatus(), $object];\n break;\n case 'processes':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\Processes';\n } elseif ($this->entity != 'AppBundle\\Entity\\Processes') {\n throw new HttpException(500);\n }\n\n $object = new Process((array)$data->attributes);\n $res = [null, $object];\n break;\n case 'bulk_transactions':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BulkTransaction';\n } elseif ($this->entity != 'AppBundle\\Entity\\BulkTransaction') {\n throw new HttpException(500);\n }\n\n $object = new BulkTransaction((array)$data->attributes);\n $res = [$object->getIdBulkTransaction(), $object];\n break;\n case 'bulk_files':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\BulkFile';\n } elseif ($this->entity != 'AppBundle\\Entity\\BulkFile') {\n throw new HttpException(500);\n }\n\n $object = new BulkFile((array)$data->attributes);\n $res = [$object->getIdBulkFile(), $object];\n break;\n case 'signers':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\Signer';\n } elseif ($this->entity != 'AppBundle\\Entity\\Signer') {\n throw new HttpException(500);\n }\n\n $object = new Signer((array)$data->attributes);\n $res = [$object->getEmail(), $object];\n break;\n case 'oauth_clients':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\OAuthClient';\n } elseif ($this->entity != 'AppBundle\\Entity\\OAuthClient') {\n throw new HttpException(500);\n }\n\n $object = new OAuthClient((array)$data->attributes);\n $res = [$object->getEmail(), $object];\n break;\n case 'signatures':\n // Fill the entity class\n if (!$this->entity) {\n $this->entity = 'AppBundle\\Entity\\DocsSignature';\n } elseif ($this->entity != 'AppBundle\\Entity\\DocsSignature') {\n throw new HttpException(500);\n }\n\n $object = new DocsSignature((array)$data->attributes);\n $res = [0, $object];\n break;\n default:\n throw new HttpException(500);\n }\n\n return $res;\n }", "title": "" }, { "docid": "53177e53e1348a2a0fff1f8330b04912", "score": "0.56495893", "text": "protected function transformToModel($data)\n {\n $exercise = new \\App\\Model\\Exercise();\n $exercise->name = $data->exerciseName; // TODO - do i like that the name is called this?\n $exercise->weight = $data->weight;\n $exercise->reps = $data->reps;\n $exercise->sets = $data->sets;\n return $exercise;\n }", "title": "" }, { "docid": "1df1b42d170ffda0ae91f9e6cd534937", "score": "0.5647317", "text": "function create()\n {\n $names = ['id', 'name', 'description', 'price', 'picture', 'category'];\n $object = new StdClass;\n foreach ($names as $name) {\n $object->$name = \"\";\n }\n return $object;\n }", "title": "" }, { "docid": "6d2eaf432dbdb6c6078512d4c2e0754f", "score": "0.56286025", "text": "public function createFromArray(array $data);", "title": "" }, { "docid": "c9d414843eda04cdeea587af6a666b25", "score": "0.5627061", "text": "public function create($data)\n {\n return MallMaster::create($data);\n }", "title": "" }, { "docid": "7d61023dc2d97373497a3a57261da395", "score": "0.5623116", "text": "public static function create($data)\n {\n $obj = new static();\n\n $obj->fill($data);\n\n if (!empty($obj->view)) {\n $obj->message = new View($obj->view, $obj->viewParams);\n }\n\n $version = phpversion();\n $obj->headers['xmailer'] = \"X-mailer: {$version}\";\n\n if (!empty($obj->from)) {\n $obj->headers['from'] = \"From: {$obj->from}\";\n\n }\n\n return $obj;\n }", "title": "" }, { "docid": "56942658459ceae6119b14508c8bf76b", "score": "0.56229997", "text": "public function create(array $data)\n\t{\n\t\tswitch($data['type'])\n\t\t{\n\t\t\tcase \"DM\":\n\t\t\t\t$user = new UserDM();\n\t\t\t\tbreak;\n\t\t\tcase \"MFP\":\n\t\t\t\t$user = new UserMFP();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$user = new User();\n\t\t}\n\t\t\n\t\t$user->name = $data['name'];\n\t\t$user->lastname = $data['lastname'];\n\t\t$user->email = $data['email'];\n\t\t$user->type = $data['type'];\n\t\t$user->password = bcrypt($data['password']);\n\t\tEntityManager::persist($user);\n\t\tEntityManager::flush();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "9e4152adcb6818389234f221e6c93c2e", "score": "0.56205183", "text": "public function create($data) {\n }", "title": "" }, { "docid": "9e4152adcb6818389234f221e6c93c2e", "score": "0.56205183", "text": "public function create($data) {\n }", "title": "" }, { "docid": "0e1880d0aa670fe96537fe15303cb84b", "score": "0.5618752", "text": "public function build($data)\n {\n $object = new Storage();\n \n $object->setJobId($data['job_id']);\n $object->setRetryLeft($data['retry_count']);\n $object->setDateAdded($data['dte_add']);\n $object->setState($data['state_id']);\n $object->setJobData($data['job_data']);\n \n if($data['lock_timeout'] instanceof DateTime) {\n $object->setLockoutTimer($data['lock_timeout']); \n }\n \n if($data['retry_last'] instanceof DateTime) {\n $object->setRetryLast($data['lock_timeout']); \n }\n \n if($data['handle'] !== null) {\n $object->setLockoutHandle($data['handle']); \n }\n \n return $object;\n }", "title": "" }, { "docid": "610dbd35db96bae6371ea7d4f9a85b91", "score": "0.56147695", "text": "public function create(String $domain) :Object\n {\n $class = 'App\\\\service\\\\indexLinkes\\\\'.$domain;\n return new $class;\n }", "title": "" }, { "docid": "3c35b923917201537a7f0b3622003987", "score": "0.5614441", "text": "protected function __new__($data)\n {\n return new self($data, $this->_encoding);\n }", "title": "" }, { "docid": "dab42f8a9c91669e9944862feed7df88", "score": "0.5610832", "text": "private function asObject() {\n\t\t$data = new stdClass();\n\n\t\t$headObj = new stdClass();\n\t\tforeach ($this->head as $key => $value) \n\t\t{\n\t\t\t$headObj->$key = $value;\n\t\t}\n\t\t$data->head = $headObj;\n\n\t\t$bodyObj = new stdClass();\n\t\tforeach ($this->body as $key => $value) \n\t\t{\n\t\t\t$bodyObj->$key = $value;\n\t\t}\n\t\t$data->body = $bodyObj;\n\n\t\treturn $data;\n\t}", "title": "" } ]
9d8dc4ae37e94d5ca37f2783167c12ec
Return array (in internal format) from string duration
[ { "docid": "dbe41fe9ecc35b19136361280419fe75", "score": "0.73915476", "text": "public static function durationStr2arr( $duration ) {\n static $P = 'P';\n static $Tt = ['t', 'T'];\n static $W = 'W';\n static $D = 'D';\n static $H = 'H';\n static $M = 'M';\n static $S = 'S';\n $duration = (string) trim( $duration );\n while( 0 != strcasecmp( $P, $duration[0] )) {\n if( 0 < strlen( $duration ))\n $duration = substr( $duration, 1 );\n else\n return false; // no leading P !?!?\n }\n $duration = substr( $duration, 1 ); // skip P\n $duration = str_replace( $Tt, null, $duration );\n $output = [];\n $val = null;\n $durLen = strlen( $duration );\n for( $ix=0; $ix < $durLen; $ix++ ) {\n switch( strtoupper( $duration[$ix] )) {\n case $W :\n $output[self::$LCWEEK] = $val;\n $val = null;\n break;\n case $D :\n $output[self::$LCDAY] = $val;\n $val = null;\n break;\n case $H :\n $output[self::$LCHOUR] = $val;\n $val = null;\n break;\n case $M :\n $output[self::$LCMIN] = $val;\n $val = null;\n break;\n case $S :\n $output[self::$LCSEC] = $val;\n $val = null;\n break;\n default:\n if( ! ctype_digit( $duration[$ix] ))\n return false; // unknown duration control character !?!?\n else\n $val .= $duration[$ix];\n }\n }\n return self::duration2arr( $output );\n }", "title": "" } ]
[ { "docid": "7429b3706cbc3e05ecd93dfa93eaf164", "score": "0.71030027", "text": "public static function duration2arr( $duration ) {\n $seconds = 0;\n foreach( $duration as $durKey => $durValue ) {\n if( empty( $durValue )) continue;\n switch ( $durKey ) {\n case '0': case self::$LCWEEK:\n $seconds += (((int) $durValue ) * 60 * 60 * 24 * 7 );\n break;\n case '1': case self::$LCDAY:\n $seconds += (((int) $durValue ) * 60 * 60 * 24 );\n break;\n case '2': case self::$LCHOUR:\n $seconds += (((int) $durValue ) * 60 * 60 );\n break;\n case '3': case self::$LCMIN:\n $seconds += (((int) $durValue ) * 60 );\n break;\n case '4': case self::$LCSEC:\n $seconds += (int) $durValue;\n break;\n }\n }\n $output = [];\n $output[self::$LCWEEK] = (int) floor( $seconds / ( 60 * 60 * 24 * 7 ));\n if(( 0 < $output[self::$LCWEEK] ) &&\n ( 0 == ( $seconds % ( 60 * 60 * 24 * 7 ))))\n return $output;\n unset( $output[self::$LCWEEK] );\n $output[self::$LCDAY] = (int) floor( $seconds / ( 60 * 60 * 24 ));\n $seconds = ( $seconds % ( 60 * 60 * 24 ));\n $output[self::$LCHOUR] = (int) floor( $seconds / ( 60 * 60 ));\n $seconds = ( $seconds % ( 60 * 60 ));\n $output[self::$LCMIN] = (int) floor( $seconds / 60 );\n $output[self::$LCSEC] = ( $seconds % 60 );\n if( empty( $output[self::$LCDAY] ))\n unset( $output[self::$LCDAY] );\n if(( 0 == $output[self::$LCHOUR] ) &&\n ( 0 == $output[self::$LCMIN] ) &&\n ( 0 == $output[self::$LCSEC] ))\n unset( $output[self::$LCHOUR],\n $output[self::$LCMIN],\n $output[self::$LCSEC] );\n return $output;\n }", "title": "" }, { "docid": "48b334227c8f3bc1ee679395a374f9e4", "score": "0.6890833", "text": "public function getParseStringData()\n {\n $out = [];\n\n // Case #0: one day.\n $out[] = ['1d', 86400000];\n\n // Case #1: all unit types.\n $out[] = ['2w3d4h5m6ms', 1483500006];\n\n // Case #2: Invalid unit type.\n $out[] = ['2w3d4h5g6ms', 0, 'InvalidArgumentException', \"Unknown time unit 'g'\"];\n\n // Case #3: Invalid string.\n $out[] = ['ggg', 0, 'InvalidArgumentException', \"Invalid time string 'ggg'\"];\n\n return $out;\n }", "title": "" }, { "docid": "7a1ea0e84e8e5932bc4196464c46a896", "score": "0.6393037", "text": "function dtlTimeStrToArray($ts) {\n // * works with any TimeStr in the format HH:mm:ss, even if invalid (e.g. 99:99:99)\n // * returns false if $ts not in the proper format\n if (!dtlIsTimeStr($ts)) {\n return false;\n }\n $timeParts = explode(':', $ts);\n $ta = [];\n $ta['time'] = $ts;\n $ta['hours'] = (int) $timeParts[0];\n $ta['minutes'] = (int) $timeParts[1];\n $ta['seconds'] = (int) $timeParts[2];\n return $ta;\n}", "title": "" }, { "docid": "4a176ac7fd1a3ee8941aebc23a355b56", "score": "0.63063496", "text": "public function int2array()\n\t{\n\t\t$values = null;\n\n\t\t// Loop\n\t\t$seconds = (float)abs($this->time);\n\t\tforeach ($this->periods as $period => $value) {\n\t\t\t$count = floor($seconds / $value);\n\n\t\t\tif ($count == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($count > 1) {\n\t\t\t\t$period .= 's';\n\t\t\t}\n\t\t\t$values[$period] = $count;\n\t\t\t$seconds = $seconds % $value;\n\t\t}\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "d8fe5eb53d0c3b0fc9a733e6f0500d2f", "score": "0.6304864", "text": "function datetoarr($d) {\r\n\tpreg_match(\"/([0-9]{4})(\\\\-)([0-9]{2})(\\\\-)([0-9]{2}) ([0-9]{2})(\\\\:)([0-9]{2})(\\\\:)([0-9]{2})/\", $d, $matches);\r\n return array( \r\n\t\t'seconds' => $matches[10], \r\n\t\t'minutes' => $matches[8], \r\n\t\t'hours' => $matches[6], \r\n\t\t'mday' => $matches[5], \r\n\t\t'mon' => $matches[3], \r\n\t\t'year' => $matches[1], \r\n\t);\r\n}", "title": "" }, { "docid": "1d2b8d3e7866a1adddb030601eff093e", "score": "0.617402", "text": "static function duration2secs($duration)\n {\n // PHP ignores the designator at the end of each part so we can multiply without fear\n // PnW and P<date>T<time> are not supported\n // The \\b at the end is to make sure that we always get an entry for secs in $d\n $durationinsecs = 0;\n $secs = array(0, 365 * 86400, 30 * 86400, 86400, 3600, 60, 1);\n if (preg_match('/^P(\\d+Y)?(\\d+M)?(\\d+D)?T?(\\d+H)?(\\d+M)?(\\d+S)?(\\b)?$/', $duration, $d)) {\n foreach ($secs as $i => $s) {\n $durationinsecs += $s * $d[$i];\n }\n return $durationinsecs;\n } else {\n exit(\"Unsupported duration: '$duration'\");\n }\n }", "title": "" }, { "docid": "272126ca0a09c55ff6fe396a16742850", "score": "0.5986168", "text": "function parse_time_string(string $src) : ?array\n {\n $matches = [];\n\n if(preg_match(\"/(?<hours>\\d{1,2}):(?<minutes>\\d{1,2})/\", $src, $matches)){\n return [\n 'hours' => intval($matches['hours']),\n 'minutes' => intval($matches['minutes']),\n ];\n } else{\n return null;\n }\n }", "title": "" }, { "docid": "7bc4e1658ddab99a805f5af8de6eaf92", "score": "0.5985756", "text": "private function getTimeParts($time)\n {\n $time = trim((string)$time);\n\n // matches JIRA style string\n if (preg_match_all(self::DURATION_JIRA_REGEX, $time, $matches)) {\n return [\n 'h' => $this->getFloat($matches[1][0]),\n 'm' => $this->getFloat($matches[2][0]),\n 's' => $this->getFloat($matches[3][0]),\n ];\n }\n\n // parse Column style (h:m:s)\n // make sure we have all parts when hours or minutes are omitted\n $parts = array_pad(explode(':', $time), -3, 0);\n\n return [\n 'h' => $this->getFloat($parts[0]),\n 'm' => $this->getFloat($parts[1]),\n 's' => round($this->getFloat($parts[2])),\n ];\n }", "title": "" }, { "docid": "a07121eebbc7c8b1915176eb18524e57", "score": "0.5791063", "text": "public function extract()\n {\n $datetimes = [];\n if (preg_match_all(self::REGEX_DATE, $this->str, $match_date)) {\n preg_match_all(self::REGEX_TIME, $this->str, $match_time);\n\n $dt_start = $match_date[0][0].'-'.$match_time[0][0];\n $dt_end = $match_date[0][1].'-'.$match_time[0][1];\n\n $datetimes[0] = Carbon::createFromFormat('Y-m-d-H:i', $dt_start);\n $datetimes[1] = Carbon::createFromFormat('Y-m-d-H:i', $dt_end);\n } else {\n $datetimes[0] = null;\n $datetimes[1] = null;\n }\n\n return $datetimes;\n }", "title": "" }, { "docid": "b6be7b92d47953021101e5ff5cd36698", "score": "0.5721381", "text": "public static function getDurationFromValue($value)\n {\n if (isset(self::$durations[$value])) {\n return self::$durations[$value];\n }\n // @see https://stackoverflow.com/a/32045167\n $isMatch = preg_match('/^P(?!$)(?:(?<years>\\d+)Y)?(?:(?<months>\\d+)M)?(?:(?<days>\\d+)D)?(T(?=\\d)(?:(?<hours>\\d+)H)?(?:(?<minutes>\\d+)M)?(?:(?<seconds>\\d+)S)?)?$/', $value, $matches);\n if (!$isMatch) {\n throw new \\InvalidArgumentException('Invalid duration string, must use ISO 8601 without fractions, negatives, or weeks');\n }\n $duration = [\n 'years' => (isset($matches['years']) && '' !== $matches['years']) ? (int) $matches['years'] : null,\n 'months' => (isset($matches['months']) && '' !== $matches['months']) ? (int) $matches['months'] : null,\n 'days' => (isset($matches['days']) && '' !== $matches['days']) ? (int) $matches['days'] : null,\n 'hours' => (isset($matches['hours']) && '' !== $matches['hours']) ? (int) $matches['hours'] : null,\n 'minutes' => (isset($matches['minutes']) && '' !== $matches['minutes']) ? (int) $matches['minutes'] : null,\n 'seconds' => (isset($matches['seconds']) && '' !== $matches['seconds']) ? (int) $matches['seconds'] : null,\n ];\n $duration['years_normalized'] = isset($duration['years']) ? $duration['years'] : 0;\n $duration['months_normalized'] = isset($duration['months']) ? $duration['months'] : 0;\n $duration['days_normalized'] = isset($duration['days']) ? $duration['days'] : 0;\n $duration['hours_normalized'] = isset($duration['hours']) ? $duration['hours'] : 0;\n $duration['minutes_normalized'] = isset($duration['minutes']) ? $duration['minutes'] : 0;\n $duration['seconds_normalized'] = isset($duration['seconds']) ? $duration['seconds'] : 0;\n // Calculate the total seconds of the duration.\n $totalSeconds =\n ($duration['years_normalized'] * self::SECONDS_YEAR)\n + ($duration['months_normalized'] * self::SECONDS_MONTH)\n + ($duration['days_normalized'] * self::SECONDS_DAY)\n + ($duration['hours_normalized'] * self::SECONDS_HOUR)\n + ($duration['minutes_normalized'] * self::SECONDS_MINUTE)\n + $duration['seconds_normalized'];\n if (Integer::MAX_SAFE_INT < $totalSeconds) {\n throw new \\InvalidArgumentException('Invalid duration, exceeds maximum safe integer');\n }\n $duration['total_seconds'] = $totalSeconds;\n self::$durations[$value] = $duration; // Cache the duration\n return $duration;\n }", "title": "" }, { "docid": "892ea88df804d3554867139e8cd83ced", "score": "0.5653979", "text": "public function timeArray($timestr)\n {\n $values = self::dateTimeArray(\n $timestr,\n array(\n 'U',\n 'g:ia',\n 'g',\n 'i',\n 'a'\n )\n );\n\n if ($values['g:ia']) {\n $values['formatted'] = str_replace(':00', '', $values['g:ia']);\n }\n\n return $values;\n }", "title": "" }, { "docid": "dffbfa25537bd7c4270e0503e4056d78", "score": "0.56461746", "text": "public function parse_position($string)\n {\n\n if (empty($string)) return array();\n\n // get the timestamp for this year\n $time_array = array(\n 'range' => '*',\n 'interval' => false\n );\n\n if ($string == '*') {\n return $time_array;\n } else if (preg_match('/^(\\d{4})$/', $string)) {\n $time_array['range'] = $string;\n\n return $time_array;\n } else {\n $time_array['range'] = array();\n switch (true) {\n // first check if it's a list\n case (strpos($string, ',') !== false) :\n $multi_pos = explode(',', $string);\n $interval = false;\n foreach ($multi_pos as $pos) {\n switch (true) {\n // get the interval first than proceed to the next\n case (($pos_pos = strpos($pos, '/')) !== false) :\n $interval = explode('/', $pos);\n $pos = substr($pos, 0, -(strlen($pos) - $pos_pos));\n // check the ranges\n default :\n $time_array['range'][] = array(\n 'range' => $pos,\n 'interval' => $interval[1]\n );\n $interval = false;\n break;\n\n }\n }\n break;\n // check if it's a range\n case (strpos($string, '-') !== false) :\n // get the interval first than proceed\n if (($pos_pos = strpos($string, '/')) !== false) {\n $interval = explode('/', $string);\n $time_array['interval'] = $interval[1];\n $string = substr($string, 0, -$pos_pos);\n }\n $time_array['range'] = $string;\n break;\n // check if it's an interval\n case (strpos($string, '/') !== false) :\n $multi_pos = explode('/', $string);\n $time_array['range'] = $multi_pos[0];\n $time_array['interval'] = $multi_pos[1];\n break;\n }\n }\n\n return $time_array;\n }", "title": "" }, { "docid": "416d413593ca090e41d968ba3c5929f3", "score": "0.56369823", "text": "function duration($minutes) {\n \t$minutes = intval($minutes);\n $vals_arr = array(\t'days' => (int) ($minutes / (24*60) ), \n \t\t'hours' => $minutes / 60 % 24, \n \t\t'mins' => $minutes % 60); \n\t\t$return_arr = array(); \n\t\t$is_added = false; \n\t\tforeach ($vals_arr as $unit => $amount) { \n\t\t\t$return_arr[$unit] = 0;\n\t\t\tif ( ($amount > 0) || $is_added ) { \n\t\t\t\t$is_added = true;\n\t\t\t\t$return_arr[$unit] = $amount;\n\t\t\t}\n\t\t}\n\t\treturn $return_arr;\n }", "title": "" }, { "docid": "a9edd8dbbc0a06680704fe098d54b06a", "score": "0.56010896", "text": "public function get_duration_values()\n\t{\n\t\t$result = $this->db->from(\"duration\")->where(array(\"duration_merchantid\"=>$this->user_id))->orderby(\"duration_period\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7b6d4b5fbc614d483fd046e002a8ce2d", "score": "0.5594387", "text": "function get_valid_durations() {\n\treturn array(45, 30, 15);\n}", "title": "" }, { "docid": "df51298795df93579b38581c52128f2c", "score": "0.5576698", "text": "function datetimepicker_array($str){\n $arr = explode('/', $str);\n $arr2 = explode(' ', $arr[2]);\n //neu khong nhap gio:phut\n if(empty($arr2[1])) $arr2[1] = '00:00';\n $arr3 = explode(':', $arr2[1]);\n $result = array(\n 'day' => $arr[1],\n 'month' => $arr[0],\n 'year' => $arr2[0],\n 'hour' => $arr3[0],\n 'minute' => $arr3[1],\n 'second' => '00',\n );\n return $result;\n }", "title": "" }, { "docid": "c141ed6115bf403263a0036fbe26ab61", "score": "0.55699605", "text": "function durationToRuntime($duration) {\n\tif (ereg(\"PT([0-9]+)H([0-9]+)M\",$duration,$regs) !== false) {\n\t\treturn ($regs[1]*60) + $regs[2];\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "f325bf7c305b064f36e7e8bc1c5cf607", "score": "0.55401075", "text": "public static function getDuration(int $duration): string {\n $return = [];\n $days = (int) ($duration / (24 * 60 * 60));\n if ($days > 0) {\n $return[] = $days . \" days\";\n $duration -= $days * (24 * 60 * 60);\n }\n $hours = (int) ($duration / (60 * 60));\n if ($hours > 0) {\n $return[] = $hours . \" hours\";\n $duration -= $hours * (60 * 60);\n }\n $min = (int) ($duration / (60));\n if ($min > 0) {\n $return[] = $min . \" min\";\n $duration -= $min * (60);\n }\n if ($duration > 0) {\n $return[] = $duration . \" sec\";\n }\n return join(\" \", $return);\n }", "title": "" }, { "docid": "6af09911d588ac7e1d295919ff4163aa", "score": "0.5528729", "text": "static function getParsedTimeInterval ( $time_interval )\r\n\t{\r\n\t\t$timeInterval = array();\r\n\t\t\r\n\t\t$timeInterval['value'] = substr($time_interval, 0, strlen($time_interval)-1);\r\n\t\t$timeInterval['type'] = substr($time_interval, -1);\r\n\t\t\r\n\t\treturn $timeInterval;\r\n\t}", "title": "" }, { "docid": "cb2a718004edf2743a7a80cf38737857", "score": "0.5500897", "text": "private function _timeToArray(string $time): array\n {\n\n $time = explode(':', $time, 2);\n\n if (isset($time[1])) {\n\n $return = [\n 'hour' => ltrim($time[0], '0'),\n 'minute' => ltrim($time[1], '0')\n ];\n\n foreach ($return as $k => $v) {\n\n /*\n * ltrim() would have removed both zeros for 00,\n * but one must be kept.\n */\n\n if ($v == '') {\n\n $return[$k] = 0;\n\n }\n\n }\n\n return $return;\n\n }\n\n throw new SyntaxException('Invalid time format');\n\n }", "title": "" }, { "docid": "b01268d7cc8f8db4a92e2ef1cdbdfa5d", "score": "0.547288", "text": "function seconds_to_arrival($response){\n $response = substr($response,1,strlen($response)-2);\n $json_obj = json_decode($response);\n $seconds_to_arrival = array();\n foreach($json_obj->Arrivals as $bus){\n array_push($seconds_to_arrival,$bus->SecondsToArrival);\n }\n var_export($seconds_to_arrival);\n return $seconds_to_arrival;\n}", "title": "" }, { "docid": "fa3a4dc6196778a06ceca77e0c6565fc", "score": "0.54627585", "text": "private function checkDuration($duration)\n {\n if ($duration == \"1 Minggu\") {\n $last_day_borrow = Carbon::now()->addWeeks(1);\n }elseif($duration == \"2 Minggu\"){\n $last_day_borrow = Carbon::now()->addWeeks(2);\n }elseif($duration == \"3 Minggu\"){\n $last_day_borrow = Carbon::now()->addWeeks(3);\n }else{\n $last_day_borrow = Carbon::now()->addMonths(1);\n }\n\n return [\n 'duration_in_week' => $duration,\n 'last_day_borrow' => $last_day_borrow,\n ];\n }", "title": "" }, { "docid": "5450426024f95a55f766b20388a1104c", "score": "0.53861094", "text": "protected function parse()\n {\n $timeStr = preg_replace(\"/[^0-9:\\-\\n]/\", \"\", $this->readFile());\n $timeRows = explode(\"\\n\", $timeStr);\n\n return $this->getTimeRowsAsDateTime($timeRows, '-');\n }", "title": "" }, { "docid": "3eee450871a4700870f9a50503b9a507", "score": "0.5381367", "text": "protected static function parseString( $string ) {\n\n //default values for start, stop, and step\n $values = [ 0, null, 1 ];\n\n //make sure there is some slice specified\n if( $string != '' ) {\n\n //normal slice notation\n if( strpos( $string, ':' ) !== false ) {\n $parts = explode( ':', $string );\n for( $i = 0; $i < count( $parts ); ++$i ) {\n if( strlen( $parts[ $i ] ) > 0 ) {\n $values[ $i ] = intval( $parts[ $i ] );\n }\n }\n }\n\n //single element\n else {\n $values[ 0 ] = intval( $string );\n $values[ 1 ] = $values[ 0 ] + 1;\n }\n }\n\n //return the slice values\n return $values;\n }", "title": "" }, { "docid": "d1fc129a2e007a5384adade6e01257b1", "score": "0.53616625", "text": "public static function parse_seconds_to_times( $seconds ) {\n\t\t\t// Force seconds as in integer\n\t\t\t$seconds = (int) $seconds;\n\n\t\t\t// gmdate() doesn't play nice with days and years because of leap years\n\t\t\t$days = floor( $seconds / 86400 );\n\t\t\t$years = floor( $days / 365 );\n\t\t\tif ( $years ) {\n\t\t\t\t$days = $days - $years * 365;\n\t\t\t}\n\n\t\t\t// Prep values\n\t\t\t$time_array = array(\n\t\t\t\t'original' => $seconds,\n\t\t\t\t'years' => $years,\n\t\t\t\t'days' => $days,\n\t\t\t\t'hours' => (int) gmdate( 'H', $seconds ),\n\t\t\t\t'minutes' => (int) gmdate( 'i', $seconds ),\n\t\t\t\t'seconds' => (int) gmdate( 's', $seconds ),\n\t\t\t);\n\n\t\t\treturn $time_array;\n\t\t}", "title": "" }, { "docid": "2e213f5880e3821c2d75873fb3a72b83", "score": "0.53416926", "text": "function durationFrom( $value ) {\n if( is_string($value) ) {\n $months = 0;\n $weeks = 0;\n $days = 0;\n $hours = 0;\n $minutes = 0;\n $seconds = 0;\n\n $pattern = \"/(?P<value>[\\d\\.]{1,})\\s{0,}(?P<key>\\w{0,})/\";\n $matches = null;\n preg_match_all( $pattern, $value, $matches );\n\n if( isset($matches[\"key\"]) ) {\n foreach( $matches[\"key\"] as $key => $value ) {\n foreach([\"month\",\"months\",\"mon\"] as $subKey) {\n if( $value === $subKey ) { $months = floatval($matches[\"value\"][$key]) * 2592000; break; }\n }\n foreach([\"week\",\"weeks\",\"w\"] as $subKey) {\n if( $value === $subKey ) { $weeks = floatval($matches[\"value\"][$key]) * 604800; break; }\n }\n foreach([\"days\",\"day\",\"d\"] as $subKey) {\n if( $value === $subKey ) { $days = floatval($matches[\"value\"][$key]) * 86400; break; }\n }\n foreach([\"hours\",\"hour\",\"h\"] as $subKey) {\n if( $value === $subKey ) { $hours = floatval($matches[\"value\"][$key]) * 3600; break; }\n }\n foreach([\"min\",\"minutes\",\"m\",\"minute\"] as $subKey) {\n if( $value === $subKey ) { $minutes = floatval($matches[\"value\"][$key]) * 60; break; }\n }\n foreach([\"sec\",\"seconds\",\"s\",\"second\"] as $subKey) {\n if( $value === $subKey ) { $seconds = floatval($matches[\"value\"][$key]); break; }\n }\n }\n }\n return round($months + $weeks + $days + $hours + $minutes + $seconds);\n\n } else if( is_array($value) ) {\n $months = 0;\n $weeks = 0;\n $days = 0;\n $hours = 0;\n $minutes = 0;\n $seconds = 0;\n\n foreach([\"month\",\"months\",\"mon\"] as $key) {\n if( isset($value[$key]) ) { $months = floatval($value[$key]) * 2592000; break; }\n }\n foreach([\"week\",\"weeks\",\"w\"] as $key) {\n if( isset($value[$key]) ) { $weeks = floatval($value[$key]) * 604800; break; }\n }\n foreach([\"days\",\"day\",\"d\"] as $key) {\n if( isset($value[$key]) ) { $days = floatval($value[$key]) * 86400; break; }\n }\n foreach([\"hours\",\"hour\",\"h\"] as $key) {\n if( isset($value[$key]) ) { $hours = floatval($value[$key]) * 3600; break; }\n }\n foreach([\"min\",\"minutes\",\"m\",\"minute\"] as $key) {\n if( isset($value[$key]) ) { $minutes = floatval($value[$key]) * 60; break; }\n }\n foreach([\"sec\",\"seconds\",\"s\",\"second\"] as $key) {\n if( isset($value[$key]) ) { $seconds = floatval($value[$key]); break; }\n }\n\n return round($months + $weeks + $days + $hours + $minutes + $seconds);\n }\n return 0;\n}", "title": "" }, { "docid": "59b0b84ece23d1894dee25766f5b06c9", "score": "0.5266021", "text": "protected function extractSecondsToTimeArray($seconds)\n {\n //get years\n $remaining['years'] = floor($seconds / 31104000) > 0 ? floor($seconds / 31104000) : null;\n\n //get months\n $seconds %= 31104000;\n $remaining['months'] = floor($seconds / 2592000) > 0 ? floor($seconds / 2592000) : null;\n\n //get weeks\n $seconds %= 2592000;\n $remaining['weeks'] = floor($seconds / 604800) > 0 ? floor($seconds / 604800) : null;\n\n //get days\n $seconds %= 604800;\n $remaining['days'] = floor($seconds / 86400) > 0 ? floor($seconds / 86400) : null;\n\n //get hours\n $seconds %= 86400;\n $remaining['hours'] = floor($seconds / 3600) > 0 ? floor($seconds / 3600) : null;\n\n //get minutes\n $seconds %= 3600;\n $remaining['minutes'] = floor($seconds / 60) > 0 ? floor($seconds / 60) : null;\n\n //get seconds\n $seconds %= 60;\n $remaining['seconds'] = $seconds > 0 ? $seconds : null;\n\n return $remaining;\n }", "title": "" }, { "docid": "e3c4f4acfe7615480624169aee8ba89d", "score": "0.52103287", "text": "public function get_duration(){\n\t\t$db \t= \\Config\\Database::connect();\n\t\t $builder \t= $db->table('fee_duration')->select('id,name')->where('status',1)->get();\n\t\t return $builder->getResultArray();\n\t}", "title": "" }, { "docid": "c1b23a21dd8a9c51c471f39f055c8ac8", "score": "0.5201656", "text": "public function separate_date_time($datetime_str){\n $temp = explode(' ', $datetime_str);\n return array($temp[0], $temp[1]); \n }", "title": "" }, { "docid": "c7e848f575af3524050935625d45c5d4", "score": "0.51836157", "text": "public function getdurationData($durationid=\"\") \n\t{\n\t\t$result = $this->db->from(\"duration\")->where(array(\"duration_id\"=>$durationid))->get();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0d10b73910965a6e3af5d4a26abb24ae", "score": "0.5125909", "text": "public function toOptionArray()\n {\n $time = array();\n for($i = 7; $i <= 15; $i++) {\n $timeStr = str_pad($i,2,'0',STR_PAD_LEFT).\":00\";\n $time[$timeStr] = $timeStr;\n if($i < 15) {\n $timeStr = $i.\":30\";\n $time[$timeStr] = $timeStr;\n }\n }\n return $time;\n }", "title": "" }, { "docid": "9c2c78d9c831435c392766b8980f20db", "score": "0.51216817", "text": "private function getRequiredMomentsArray($requiredMomentCount, $requiredMomentsString){\r\n \t$reqM = explode(',', $requiredMomentsString);\n \t$requiredMoments = array();\r\n \t\n \tforeach ($reqM as $rm) {\n \t\t$rmSlice = explode('-', $rm);\n \t\t \n \t\tif(count($rmSlice)==2){\n \t\t\t$start = $rmSlice[0];\n \t\t\t$end = $rmSlice[1];\n \t\t\t\t\n \t\t\t$rmSlice = array();\n \t\t\t\t\n \t\t\tfor ($i = $start; $i <= $end; $i++){\n \t\t\t\t$rmSlice[] = $i;\n \t\t\t}\n \t\t}\n \t\t \n \t\tforeach ($rmSlice as $num){\n \t\t\tif($num>=1 && count($requiredMoments)<=$requiredMomentCount){\n \t\t\t\t$requiredMoments[] = $num;\n \t\t\t}\n \t\t}\n \t}\n \t\t\n \treturn array_unique($requiredMoments);\r\n }", "title": "" }, { "docid": "412b407ef6d75e85b84b9d324300ab37", "score": "0.5120062", "text": "private function handleLifetime()\n {\n $start = $this->config->startTime;\n $expiration = $this->config->expiration;\n $duration = $this->config->duration;\n\n if (! strcasecmp((string) $start, 'now')) {\n $start = Utils::unixTimeNow();\n } elseif (is_numeric($start)) {\n $start = (int)$start;\n }\n if (! isset($expiration)) {\n if (isset($duration)) {\n $expiration = (isset($start) ? $start : Utils::unixTimeNow()) + $duration;\n } else {\n throw new InvalidArgumentException('Must provide \\'expiration\\' or \\'duration\\'.');\n }\n }\n\n return [$start, $expiration];\n }", "title": "" }, { "docid": "1838c72e01f5c823b947a318a1e71bd1", "score": "0.50848", "text": "function _get_va($video, $ffmpeg)\r\n{\r\n\r\n $command = $ffmpeg . ' -i ' . $video . ' -vstats 2>&1';\r\n $output = shell_exec($command);\r\n\r\n $regex_sizes = \"/Video: ([^,]*), ([^,]*), ([0-9]{1,4})x([0-9]{1,4})/\";\r\n if (preg_match($regex_sizes, $output, $regs)) {\r\n $codec = $regs [1] ? $regs [1] : null;\r\n $width = $regs [3] ? $regs [3] : null;\r\n $height = $regs [4] ? $regs [4] : null;\r\n }\r\n if (!isset($height) || intval($height < 10)) {\r\n $regex_sizes = \"(\\b[^0]\\d+x[^0]\\d+\\b)\";\r\n if (preg_match($regex_sizes, $output, $regs)) {\r\n if (isset($regs[0])) {\r\n $sizer = @explode('x', $regs[0]);\r\n $width = $sizer[0] ? $sizer[0] : null;\r\n $height = $sizer[1] ? $sizer[1] : null;\r\n //var_dump($sizer);\r\n }\r\n }\r\n }\r\n\r\n $regex_duration = \"/Duration: ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}).([0-9]{1,2})/\";\r\n if (preg_match($regex_duration, $output, $regs)) {\r\n $hours = $regs [1] ? $regs [1] : null;\r\n $mins = $regs [2] ? $regs [2] : null;\r\n $secs = $regs [3] ? $regs [3] : null;\r\n $ms = $regs [4] ? $regs [4] : null;\r\n }\r\n\r\n return array(\r\n 'width' => $width,\r\n 'height' => $height,\r\n 'hours' => $hours,\r\n 'mins' => $mins,\r\n 'secs' => $secs,\r\n 'ms' => $ms\r\n );\r\n\r\n}", "title": "" }, { "docid": "5edf6c4e793ecd8d8971bb141b1b645f", "score": "0.50814897", "text": "public function getTimeSlots($startTime, $endTime, $duration)\n {\n $i=0;\n $slots = [];\n $startTime = Carbon::parse($startTime)->format('H:i');\n $endTime = Carbon::parse($endTime)->format('H:i');\n \n while(strtotime($startTime) <= strtotime($endTime)) {\n $start = $startTime;\n $end = date('H:i', strtotime('+'.$duration.' minutes', strtotime($startTime)));\n $startTime = date('H:i', strtotime('+'.$duration.' minutes', strtotime($startTime)));\n $i++;\n if(strtotime($startTime) <= strtotime($endTime)) {\n $slots[$i]['start'] = $start;\n $slots[$i]['end'] = $end;\n }\n }\n\n return $slots;\n }", "title": "" }, { "docid": "fe96038f85577061310b6dfa9c966337", "score": "0.50708926", "text": "public static function getGameTime(): array\n {\n try {\n $now = new DateTime();\n } catch (Exception $e) {\n return [];\n }\n\n try {\n // Note: no leading zeros.\n $result = new PangYaBuffer();\n $result->insertShort($now->format('Y'));\n $result->insertShort($now->format('m'));\n $result->insertShort($now->format('w'));\n $result->insertShort($now->format('d'));\n $result->insertShort($now->format('G'));\n $result->insertShort($now->format('i'));\n $result->insertShort($now->format('s'));\n $result->insertShort($now->format('v'));\n\n $result->rewind();\n\n return $result->getArrayBytes($result->size());\n } catch (BufferException $e) {\n return [];\n }\n }", "title": "" }, { "docid": "4503c0b3dcb04a1207d8a580b5af53de", "score": "0.5057638", "text": "public static function tidyTime($in)\n {\n // remove \".:\" and \"::\" which RG1 can generate when adding results\n $t = str_replace('.:', ':', $in);\n $t = str_replace('::', \":\", $t);\n // remove leading 0:\n if (substr($t, 0, 2) === '0:') {\n $t = substr($t, 2);\n }\n // correct seconds for missing leading 0 which RG1 can generate from Emit. e.g 25:9 becomes 25:09\n $secs = substr($t, -2);\n if (substr($secs, 0, 1) === ':') {\n $t = substr_replace($t, '0', -1, 0);\n }\n // prevent negative times which can slip through for various reasons\n if (substr($t, 0, 1) === \"-\") {\n $t = \"0:00\";\n }\n // convert hh:mm:ss to mm:ss for consistency\n $bits = explode(\":\", $t);\n if (count($bits) === 3) {\n $mins = (intval($bits[0]) * 60) + intval($bits[1]);\n $t = $mins.\":\".$bits[2]; \n }\n return array($t, self::getSecsFromHHMM($t));\n }", "title": "" }, { "docid": "4751e895af3e6f599fa24a0bbea208f4", "score": "0.505135", "text": "public function unmodifiedTimesDataProvider()\n {\n $times = array();\n $times['empty values'] = array('');\n $times['erliest two digit time'] = array('00:00');\n $times['latest two digit time'] = array('23:59');\n $times['random two digit time'] = array('21:34');\n\n return $times;\n }", "title": "" }, { "docid": "2ecf886a0d24d383dbb355ace3ebe92e", "score": "0.5029521", "text": "function timeslist (){\r\n\r\n $dd_pack = \"\";\r\n $dd_pack = array();\r\n $second_cnt = \"00\";\r\n\r\n for ($hour_cnt=0;$hour_cnt <=23;$hour_cnt++){\r\n if (strlen($hour_cnt)==1){\r\n $hour_cnt = \"0\".$hour_cnt;\r\n }\r\n for ($min_cnt=0;$min_cnt <= 59;$min_cnt++){\r\n if (strlen($min_cnt)==1){\r\n $min_cnt = \"0\".$min_cnt;\r\n }\r\n/*\r\n for ($second_cnt=0;$second_cnt <= 59;$second_cnt++){\r\n if (strlen($second_cnt)==1){\r\n $second_cnt = \"0\".$second_cnt;\r\n }\r\n*/\r\n $dd_pack[\"$hour_cnt:$min_cnt:$second_cnt\"] = \"$hour_cnt:$min_cnt:$second_cnt\";\r\n\r\n// }\r\n }\r\n }\r\n\r\n return $dd_pack;\r\n\r\n }", "title": "" }, { "docid": "af787757237814c6cd100e35d2e1557f", "score": "0.50190717", "text": "public function duration();", "title": "" }, { "docid": "cd619fbae94d94cde857f62778812bac", "score": "0.50185263", "text": "public function parse_duration($iso_duration, $allow_negative = true)\n\t{\n\t\t// Parse duration parts\n\t\t$matches = array();\n\t\tpreg_match('/^(-|)?P([0-9]+Y|)?([0-9]+M|)?([0-9]+D|)?T?([0-9]+H|)?([0-9]+M|)?([0-9]+S|)?$/', $iso_duration, $matches);\n\n\t\tif ( ! empty($matches))\n\t\t{\n\t\t\t// Strip all but digits and -\n\t\t\tforeach($matches as &$match){\n\t\t\t\t$match = preg_replace('/((?!([0-9]|-)).)*/', '', $match);\n\t\t\t}\n\t\t\t// Fetch min/plus symbol\n\t\t\t$result['symbol'] = ($matches[1] == '-') ? $matches[1] : '+'; // May be needed for actions outside this function.\n\t\t\t// Fetch duration parts\n\t\t\t$m = ($allow_negative) ? $matches[1] : '';\n\t\t\t$result['year'] = intval($m.$matches[2]);\n\t\t\t$result['month'] = intval($m.$matches[3]);\n\t\t\t$result['day'] = intval($m.$matches[4]);\n\t\t\t$result['hour'] = intval($m.$matches[5]);\n\t\t\t$result['minute'] = intval($m.$matches[6]);\n\t\t\t$result['second'] = intval($m.$matches[7]);\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fa3084de3a641dbaecb34858ce780a90", "score": "0.50165725", "text": "static function timeBits($time_str){\r\n \r\n // canary...\r\n if(empty($time_str)){ return array(0,0); }//if\r\n \r\n $hour_str = (string)$time_str;\r\n $minute_str = 0;\r\n $hour_str_len = mb_strlen($hour_str);\r\n if($hour_str_len == 4){\r\n $minute_str = $hour_str[2].$hour_str[3];\r\n $hour_str = $hour_str[0].$hour_str[1];\r\n }else if($hour_str_len == 3){\r\n $minute_str = $hour_str[1].$hour_str[2];\r\n $hour_str = $hour_str[0];\r\n }//if/else if\r\n \r\n return array($hour_str,$minute_str);\r\n \r\n }", "title": "" }, { "docid": "0588de9f97cae86a29ebf5343d77e272", "score": "0.5007878", "text": "static function parseLine(string $line): array {\n preg_match('/^\\[(([\\d\\-]{10}) (\\d\\d):(\\d\\d))\\] (wake|fall|Guard #\\d+)/', $line, $matches);\n return [\n 'timestamp' => strtotime($matches[1]),\n 'date'=> $matches[2],\n 'h' => $matches[3],\n 'm' => $matches[4],\n 'type' => $matches[5]\n ];\n }", "title": "" }, { "docid": "6520aecc6e2e9c316baf839a1ae8f3f1", "score": "0.50034016", "text": "public static function duration2str( array $duration ) {\n static $P = 'P';\n static $W = 'W';\n static $D = 'D';\n static $H = 'H';\n static $OH = '0H';\n static $M = 'M';\n static $OM = '0M';\n static $S = 'S';\n static $OS = '0S';\n static $PT0H0M0S = 'PT0H0M0S';\n if( isset( $duration[self::$LCWEEK] ) ||\n isset( $duration[self::$LCDAY] ) ||\n isset( $duration[self::$LCHOUR] ) ||\n isset( $duration[self::$LCMIN] ) ||\n isset( $duration[self::$LCSEC] ))\n $ok = true;\n else\n return null;\n if( isset( $duration[self::$LCWEEK] ) &&\n ( 0 < $duration[self::$LCWEEK] ))\n return $P . $duration[self::$LCWEEK] . $W;\n $output = $P;\n if( isset($duration[self::$LCDAY] ) &&\n ( 0 < $duration[self::$LCDAY] ))\n $output .= $duration[self::$LCDAY] . $D;\n if(( isset( $duration[self::$LCHOUR]) &&\n ( 0 < $duration[self::$LCHOUR] )) ||\n ( isset( $duration[self::$LCMIN]) &&\n ( 0 < $duration[self::$LCMIN] )) ||\n ( isset( $duration[self::$LCSEC]) &&\n ( 0 < $duration[self::$LCSEC] ))) {\n $output .= self::$T;\n $output .= ( isset( $duration[self::$LCHOUR]) &&\n ( 0 < $duration[self::$LCHOUR] ))\n ? $duration[self::$LCHOUR] . $H : $OH;\n $output .= ( isset( $duration[self::$LCMIN]) &&\n ( 0 < $duration[self::$LCMIN] ))\n ? $duration[self::$LCMIN] . $M : $OM;\n $output .= ( isset( $duration[self::$LCSEC]) &&\n ( 0 < $duration[self::$LCSEC] ))\n ? $duration[self::$LCSEC] . $S : $OS;\n }\n if( $P == $output )\n $output = $PT0H0M0S;\n return $output;\n }", "title": "" }, { "docid": "9288b3a129459f2af85cb0807b0f45fe", "score": "0.49897596", "text": "public function getDetailStartEndTime () {\n $result = array();\n $s = strtotime($this->starttime);\n $e = strtotime($this->endtime);\n\n $tail1 = date(\"H:i:s\", $s);\n $tail2 = date(\"H:i:s\", $e);\n\n $head1 = date(\"Y-m-d\", $s);\n $head2 = date(\"Y-m-d\", $e);\n $onedaytime = 24 * 60 * 60;\n $day = 1 + (strtotime($head2) - strtotime($head1)) / $onedaytime;\n\n for ($i = 0; $i < $day; $i ++) {\n $arr = array();\n $time = strtotime($head1) + $i * $onedaytime;\n $arr['starttime'] = date(\"Y-m-d\", $time) . \" {$tail1}\";\n $arr['endtime'] = date(\"Y-m-d\", $time) . \" {$tail2}\";\n $result[] = $arr;\n }\n return $result;\n }", "title": "" }, { "docid": "c48ce2e9bc046286360cab9536bc7a63", "score": "0.49835882", "text": "private function _parseExpression($expression) {\n $exploded = explode(' ', $expression);\n $result = array(\n 'minute' => '*',\n 'hour' => '*',\n 'day' => '*',\n 'month' => '*',\n 'dayOfWeek' => '*'\n );\n\n foreach ($exploded as $part) {\n $key = key($result);\n $result[$key] = $part;\n next($result);\n }\n\n reset($result);\n\n return $result;\n }", "title": "" }, { "docid": "5289f7ac30b2845fd5a5298c434a953c", "score": "0.49813238", "text": "private function segmentToArray($parsedSegment){\n\t\t\t$segments = explode('/', $parsedSegment);\n\t\t\treturn $segments;\n\t\t}", "title": "" }, { "docid": "ff62730bd93f1d37133c8237442c20b4", "score": "0.49803475", "text": "protected static function array2string($duration)\n\t{\n\t\tif (!is_array($duration)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$array = [];\n\t\tforeach ($duration as $key => $value) {\n\t\t\t$segment = abs($value) . ' ' . $key;\n\t\t\t// otherwise -1 years, -1 months ago\n\n\t\t\t$array[] = $segment;\n\t\t}\n\n\t\t$str = implode(', ', $array);\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "474fd042fb01e19b265a21d8a95f4da9", "score": "0.49780053", "text": "public function parse(string $source): array;", "title": "" }, { "docid": "4e6bcd0efe372be83ddd6a3480f9fae5", "score": "0.49597853", "text": "function explode_unix_time($unix_time)\n\t{\n\t\t$unix_time = $this->fix_unix_time($unix_time, 1);\n\t\t$time_fragments = array(\n\t\t\t'year' => gmdate('Y', $unix_time),\n\t\t\t'month' => gmdate('m', $unix_time),\n\t\t\t'day' => gmdate('d', $unix_time),\n\t\t\t'hour' => gmdate('H', $unix_time),\n\t\t\t'minute' => gmdate('i', $unix_time),\n\t\t\t'second' => gmdate('s', $unix_time),\n\t\t);\n\t\treturn $time_fragments;\n\t}", "title": "" }, { "docid": "0a7e13510b973a52b5f89b2c73c2478d", "score": "0.49499893", "text": "function durationString($duration) {\n if(preg_match('/^PT((?P<hours>\\d+)H)?((?P<minutes>\\d+)M)?((?P<seconds>\\d+)S)?$/', $duration, $matches)) {\n $hours = isset($matches['hours']) && intval($matches['hours']) > 0 ? sprintf('%02d', $matches['hours']) . ':' : '';\n $minutes = isset($matches['minutes']) ? sprintf('%02d', $matches['minutes']) : '00';\n $seconds = isset($matches['seconds']) ? sprintf('%02d', $matches['seconds']) : '00';\n return $hours . $minutes . ':' . $seconds;\n } else {\n return '00:00';\n }\n}", "title": "" }, { "docid": "b7380544ad8293ab46adcba932ab32b2", "score": "0.49473256", "text": "function human_readable_duration($duration = '')\n{\n}", "title": "" }, { "docid": "7f2b38919e0f6a115bd159f8c49c6393", "score": "0.4938175", "text": "function parse_log_to_array($logstring)\n\t{\n\t\tif ($logstring != '')\n\t\t{\n\t\t\t$result = explode('#', $logstring);\n\t\t\t$result = explode(' ', $result[3]);\n\t\t\t$temp_data = array();\n\t\t\tforeach ($result as $key=>$value)\n\t\t\t{\n\t\t\t\tif (strlen($value) > 0)\n\t\t\t\t{\n\t\t\t\t\t$temp_data[] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$data['num_deleted']\t= $temp_data[0];\n\t\t\t$data['num_replaced']\t= $temp_data[1];\n\t\t\t$data['num_inserted']\t= $temp_data[2];\n\t\t\t$data['num_updated']\t= $temp_data[3];\n\t\t\t$data['str_algorithm']\t= $temp_data[4];\n\t\t\t$data['num_exit']\t= $temp_data[5];\n\t\t\t$data['str_table']\t= $temp_data[6];\n\t\t\t$data['dat_date']\t= date('Y-m-d H:i:s');\n\t\t\t$data['mem_log']\t= $logstring;\n\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "a5c303a63207edd471fcfa4b1a8e1cf9", "score": "0.4929785", "text": "private function getStreamArray(){\n parse_str($this->getVideoInfo(), $data);\n $stream_link = $data[\"url_encoded_fmt_stream_map\"];\n return explode(\",\", $stream_link); \n }", "title": "" }, { "docid": "9041384dc702d807d397a67246e3b4a2", "score": "0.49279812", "text": "function arrumadata($str)\n{\n\tlist($ano,$mes,$dia) = explode(\"-\",$str);\n\treturn \"$dia-$mes-$ano\";\n}", "title": "" }, { "docid": "3494a8490ffe20fd9d0f16aa76244fab", "score": "0.4926964", "text": "public function parse() : array {}", "title": "" }, { "docid": "0ab46a5378ae4b7955a817f2142e53dc", "score": "0.49251348", "text": "private function convertTime($time)\n\t{\n\t\tpreg_match('/^(?:P|C)T(?:([0-9]+)H)?(?:([0-9]+)M)?/', $time, $matches);\n\n\t\treturn array(\n\t\t\t'hours' => (int) $matches[1],\n\t\t\t'minutes' => isset($matches[2]) ? (int) $matches[2] : 0\n\t\t);\n\t}", "title": "" }, { "docid": "c0941ee22fc78ef9981f5fde149d472f", "score": "0.49244308", "text": "protected function getTiming() {\n $timing = [];\n $timing['high_season'] = dosomething_helpers_extract_field_data($this->node->field_high_season);\n $timing['low_season'] = dosomething_helpers_extract_field_data($this->node->field_low_season);\n\n foreach ($timing as $season => $dates) {\n if ($timing[$season]) {\n foreach ($timing[$season] as $key => $date) {\n $timing[$season][$key] = dosomething_helpers_convert_date($date);\n }\n }\n }\n\n return $timing;\n }", "title": "" }, { "docid": "ea4c37585935d9ebf6101da384fa4084", "score": "0.49142057", "text": "private function getStreamArray(){\n parse_str($this->getVideoInfo(), $data);\n $stream_link = $data[\"url_encoded_fmt_stream_map\"];\n return explode(\",\", $stream_link); \n }", "title": "" }, { "docid": "00875ac9885f00d8610a40a45c37cc51", "score": "0.49074408", "text": "public function getDuration();", "title": "" }, { "docid": "00875ac9885f00d8610a40a45c37cc51", "score": "0.49074408", "text": "public function getDuration();", "title": "" }, { "docid": "31fe81058123e9c957c7edb2aad6bd61", "score": "0.49037054", "text": "public static function duration_to_seconds(string $duration): int {\n $minutesandseconds = explode('m', $duration);\n // Only numbers followed by an 's'.\n if (count($minutesandseconds) === 1) {\n return trim($minutesandseconds[0], 's');\n }\n // Numbers followed by 'm', such as '1m', '2m'.\n if (!$minutesandseconds[1]) {\n return $minutesandseconds[0] * MINSECS;\n }\n // Numbers followed by 'm', followed by numbers and 's' such as '1m20s'.\n if (is_number($minutesandseconds[1])) {\n $seconds = $minutesandseconds[1];\n } else {\n $seconds = trim($minutesandseconds[1], 's');\n }\n return ($minutesandseconds[0] * MINSECS) + $seconds;\n }", "title": "" }, { "docid": "89d83f107c080859ccef220fbbc4507a", "score": "0.49034932", "text": "public function listDelayed($converted = false):array;", "title": "" }, { "docid": "c066c2c6f42ffb91eea3aede9a2a042d", "score": "0.49012998", "text": "public function durationToString(array $normalizedObject, string $key): array\n {\n if ($normalizedObject === []) {\n throw new EmptyObjectException();\n }\n\n if ($key === '') {\n throw new EmptyKeyException();\n }\n\n if (!array_key_exists($key, $normalizedObject)) {\n throw new PropertyNotFoundException();\n }\n\n if (!is_integer($normalizedObject[$key])) {\n throw new InvalidDurationException();\n }\n\n // convert duration integer to string\n $hours = intval($normalizedObject[$key] / 3600);\n $minutes = intval(($normalizedObject[$key] % 3600) / 60);\n\n $normalizedObject[$key] = sprintf('%02d:%02d', $hours, $minutes);\n\n return $normalizedObject;\n }", "title": "" }, { "docid": "69b1055069328c6ed4df078526fc6b05", "score": "0.48776972", "text": "public function duration(string $start, string $end);", "title": "" }, { "docid": "4cbe7313d9267521434c47daae2ffc3e", "score": "0.48769975", "text": "function dateTimeToArray($inputDateTime, $isEvent)\n{\n $dateTime = array();\n if ($isEvent == 1) {\n $dateTime = explode(\"T\", $inputDateTime);\n } else {\n $dateTime = explode(\" \", $inputDateTime);\n }\n\n $date = explode(\"-\", $dateTime[0]);\n $time = explode(\":\", $dateTime[1]);\n $dateTime = array($date[0], $date[1], $date[2], $time[0], $time[1], $time[2]);\n\n return $dateTime;\n}", "title": "" }, { "docid": "10ba7a7b660a236b6b81bb90674bd7a8", "score": "0.48698795", "text": "public static function getTimeList()\n\t{\n\t\tif (!Loader::includeModule('calendar'))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$result = array();\n\t\t$result[strval(0)] = \\CCalendar::formatTime(0, 0);\n\t\tfor ($i = 0; $i < 24; $i++)\n\t\t{\n\t\t\tif ($i !== 0)\n\t\t\t{\n\t\t\t\t$result[strval($i)] = \\CCalendar::formatTime($i, 0);\n\t\t\t\t$result[strval($i)] = \\CCalendar::formatTime($i, 0);\n\t\t\t}\n\t\t\t$result[strval($i).'.30'] = \\CCalendar::formatTime($i, 30);\n\t\t\t$result[strval($i).'.30'] = \\CCalendar::formatTime($i, 30);\n\t\t}\n\t\t$result[strval('23.59')] = \\CCalendar::formatTime(23, 59);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ceade04a1b948204614dd4d18fc2a5a6", "score": "0.4864758", "text": "function readInterval($s) {\n $parts = explode(' ', $s);\n if (count($parts) != 2 || !is_numeric($parts[0])) {\n throw new InvalidArgumentException(\"Parameter must be in format '[number] [unit-of-time]'\");\n }\n $unit = strtolower($parts[1]);\n $bigUnits = array('day' => 'D', 'days' => 'D');\n $smallUnits = array('second' => 'S', 'seconds' => 'S', 'hour' => 'H', 'hours' => 'H');\n if (isset($bigUnits[$unit])) {\n return new DateInterval('P' . $parts[0] . $bigUnits[$unit]);\n } else if (isset($smallUnits[$unit])) {\n return new DateInterval('PT' . $parts[0] . $smallUnits[$unit]);\n } else {\n throw new InvalidArgumentException(\"Unrecognized time unit specified: $unit\");\n }\n}", "title": "" }, { "docid": "bd0e89d842b65a66260ff542ab9f45b1", "score": "0.48629543", "text": "public function timesFromInteger()\n {\n $times = [];\n foreach (self::TIMES as $idx => $time) {\n // we need to shift right to normalize our values to one, so that\n // if e.g. '1200' is set, we get 1 and not 32\n $times[$idx] = ($this->given_at & $time) >> $idx;\n }\n return $times;\n }", "title": "" }, { "docid": "235e509db10e7836de9e257bf4ab062d", "score": "0.4860718", "text": "public function calcDuration()\n {\n\n $timestamp = Carbon::parse($this->created_at);\n $now = Carbon::parse(Carbon::now());\n $hours = $now->diffInHours($timestamp);\n $mins = $now->diffInMinutes($timestamp);\n return ['hours' => $hours, 'minutes' => $mins];\n }", "title": "" }, { "docid": "65baa75d19506805c4afb2744d427e22", "score": "0.48487657", "text": "function dtlDateTimeStrToArray($dts) {\n // * works with any DateTimeStr in the format YYYY-MM-DD HH:mm:ss, even if invalid\n // * returns false if $dts not in the proper format\n if (!dtlIsDateTimeStr($dts)) {\n return false;\n }\n $dtParts = explode(' ', $dts);\n return array_merge(dtlDateStrToArray($dtParts[0]), dtlTimeStrToArray($dtParts[1]));\n}", "title": "" }, { "docid": "025cafc035f30fbd53f26eddff912026", "score": "0.4839836", "text": "public function parse(string $string): array\n {\n return $this->parsed;\n }", "title": "" }, { "docid": "269da21198533b0e0b2bda35c3020dba", "score": "0.48379102", "text": "function getDuration($file) {\n $file = 'src/vid/' . $file;\n $result = shell_exec(\"avprobe \" . escapeshellarg($file) . \" 2>&1 | grep 'Duration' | awk '{print $2}' | sed s/,//\");\n $parts = explode(':', trim($result));\n $time = ($parts[0] * 3600) + ($parts[1] * 60) + $parts[2];\n return $time;\n }", "title": "" }, { "docid": "68ac2483a6c3f1d2e7c39ce0ba338d30", "score": "0.4834495", "text": "protected function parseTimeComponents($value)\n {\n $components = array();\n\n if (preg_match('/^(\\d{1,2}):(\\d{2}) (AM|PM)$/', $value, $mathces)) {\n\n $components['h'] = $mathces[1];\n $components['m'] = $mathces[2];\n }\n\n return $components;\n }", "title": "" }, { "docid": "1ff4a48028ce74e1be017d82c5962af7", "score": "0.483369", "text": "private function __splitTime($t) {\r\n\r\n\t\t$spans = array(\r\n\t\t\t'days' => 86400,\r\n\t\t\t'hours' => 3600,\r\n\t\t\t'minutes' => 60,\r\n\t\t\t'seconds' => 1);\r\n\r\n\t\t$time = array();\r\n\r\n\t\tforeach($spans as $k => $v) {\r\n\t\t\tif(!(floor($t / $v) > 0)) continue;\r\n\t\t\t$time[$k] = floor($t / $v);\r\n\t\t\t$t -= floor($time[$k] * $v);\r\n\t\t}\r\n\r\n\t\treturn $time;\r\n\t}", "title": "" }, { "docid": "1c4c8fe500bb76b5d57c55bd44857f23", "score": "0.48152936", "text": "public function toArray(string $listStr): array;", "title": "" }, { "docid": "0ea119d4eb38889692189135940c1cf4", "score": "0.4810933", "text": "protected function _parse($text)\n {\n /* The parser expects the following format:\n Input #0 .*:\n Duration: %duration(hh:mm:ss.ss), .*'\n Stream #0.%track: %type(Video/Audio): %data'\n \n The %data can be:\n Video: %codec, %frameSize (WxH), %bitRate kb/s, %frameRate tbr\n Audio: %codec, %sampleRate Hz, %channels (mono|stereo), %bitRate kb/s\n */\n \n /* Parse algorithm:\n seek in all text Input #0\n go to next line\n seek Duration: %duration (hh:mm:ss.ss)\n for each following line\n get the stream type with a regexp (Audio/Video)\n get the other data with a regexp (based on stream type)\n */\n \n $start = strpos($text, 'Input #0');\n\n $format = array();\n\n if ($start) {\n $content = substr($text, $start);\n\n $lines = explode(\"\\n\", $content);\n\n // get duration\n $durationLine = $lines[1];\n\n preg_match('/Duration: (\\d\\d):(\\d\\d):(\\d\\d).(\\d\\d)/', $durationLine, $matches);\n\n if (5 == count($matches)) {\n list($all, $hours, $minutes, $seconds, $miliseconds) = $matches;\n \n $format['duration'] = (float) ($hours * 3600 + $minutes * 60 + $seconds + $miliseconds / 100);\n\n $format['streams'] = array();\n\n // parse streams\n for ($i = 2; $i; $i++) {\n if (preg_match('/Stream #0.\\d: (Audio|Video):/', $lines[$i], $matches)) {\n if ('Audio' == $matches[0]) {\n // Audio track\n preg_match('//', $lines[$i], $matches);\n } else {\n // Video track\n preg_match('//', $lines[$i], $matches);\n }\n } else {\n break;\n }\n }\n \n return $format;\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "fdf1991a76f52f25f69029af30def69d", "score": "0.47954315", "text": "public function reverseTransform($string)\n {\n $startDate = time();\n $endDate = time();\n\n if ($string != null) {\n $array = explode(' - ', $string);\n\n if (array_key_exists(0, $array)) {\n $startDate = $endDate = strtotime($array[0]);\n }\n if (array_key_exists(1, $array)) {\n $endDate = strtotime($array[1]);\n }\n\n return array($startDate, $endDate);\n }\n }", "title": "" }, { "docid": "1e93c3a717ac96ac3e5bd4d3209fbfa5", "score": "0.4781263", "text": "function strExplode($str,$length){\n\n\t\t\tfor ($i=0; $i < $length; $i++) { \n\t\t\t\tif ($str[$i]=='/') {\n\t\t\t\t\t$arr = explode('/', $str);\n\t\t\t\t\t$m_str = valueToMonth($arr[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telseif($str[$i]=='-'){\n\t\t\t\t\t$arr = explode('-', $str);\n\t\t\t\t\t$m_str = valueToMonth($arr[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$m_str=null;\n\t\t\t\t\t$arr[0]=\"Invalid Data\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t $arr[1]=$m_str;\n\t\t\t return $arr;\n\t\t}", "title": "" }, { "docid": "4f9969dd89f6216d282cdb7db419e2e6", "score": "0.47760844", "text": "private function DDtoDMS($_val)\n {\n if ($_val == NULL) return NULL;\n // Converts decimal format to DMS ( Degrees / minutes / seconds ) \n $vars = explode(\".\",$_val);\n $deg = (float)$vars[0];\n $tempma = \"0.\".$vars[1];\n\n $tempma = $tempma * 3600;\n $min = floor($tempma / 60);\n $sec = $tempma - ($min*60);\n\n return array(\"deg\"=>$deg,\"min\"=>$min,\"sec\"=>$sec);\n }", "title": "" }, { "docid": "b10c23553c92d77115757127149a3c50", "score": "0.4763773", "text": "function GetArrFromColonString ( $str )\r\n{\r\n\t$arr = array();\r\n\tif ( $str )\r\n\t\t$arr = explode ( '::', trim( $str, ':' ) );\r\n\t\t\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "26d80fb63f47c146d3da03ae6f886aac", "score": "0.47433373", "text": "function strToArray($str) {\n $data = array();\n // _ denotes layers, seperate these out\n $oneDimArray = explode('_', $str);\n foreach ($oneDimArray as $subArray) {\n // , denotes different settings inside layers\n $twoDimArray = explode(',', $subArray);\n foreach ($twoDimArray as $subSubArray) {\n $data = addToArrays($subSubArray, $data);\n $data = addToArrays(',', $data);\n }\n $data = addToArrays('_', $data);\n }\n return $data;\n}", "title": "" }, { "docid": "7af88af93685bb26582b5cc4f4d60116", "score": "0.47425914", "text": "public static function parseIntoArray($string)\n {\n preg_match_all('/\\+(?<key>\\w+)=(?<val>.*?)(?:\\+|$)/', $string, $matches);\n $result = [];\n foreach($matches['key'] as $i => $key) {\n $result[$key] = self::convert($matches['val'][$i], $key);\n \n }\n return $result;\n }", "title": "" }, { "docid": "d19feae00c368b86c19e6a414256e609", "score": "0.47420028", "text": "function rangestr_to_array($range_str) {\n\t\t$list = split('-', $range_str);\n\t\tif (count($list) == 1) {\n\t\t\treturn array(intval($list[0]), intval($list[0]));\n\t\t} else {\n\t\t\treturn array(intval($list[0]), intval($list[1]));\n\t\t}\n\t}", "title": "" }, { "docid": "2821a6e46d6f2367d2a0b95eb2b9423f", "score": "0.4736763", "text": "public function getStats(): array\n {\n $stats = [];\n\n $prevCheckTime = 0;\n if (!empty($this->marker)) {\n $startTime = array_values($this->marker)[0];\n $prevTime = $startTime;\n foreach ($this->marker as $markerLabel => $markerTime) {\n $stats[$markerLabel] = [\n 'microtime' => $markerTime,\n 'timeDiffSinceStart' => $markerTime - $startTime,\n 'timeDiffSincePrev' => $markerTime - $prevTime,\n ];\n\n $prevTime = $markerTime;\n }\n }\n\n return $stats;\n }", "title": "" }, { "docid": "1169ea8ccc03f07edc04611932164f7b", "score": "0.47000176", "text": "public function dateArray($timestr)\n {\n return self::dateTimeArray(\n $timestr,\n array(\n 'U',\n 'n/j/Y',\n 'l',\n 'F',\n 'n',\n 'j',\n 'S',\n 'd',\n 'Y'\n )\n );\n }", "title": "" }, { "docid": "ed512f623be3c18ddd53da7e4e9ca4f0", "score": "0.4699844", "text": "function explode_time($time, $format = 'unix')\n\t{\n\t\tswitch ($format)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t$time_fragments = $this->explode_mysql_time($time);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$time_fragments = $this->explode_unix_time($time);\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $time_fragments;\n\t}", "title": "" }, { "docid": "5dd1af5e16eb2cf49a1715363eb5a929", "score": "0.46917212", "text": "public function get_duration_list($offset=\"\",$record=\"\",$name=\"\")\n\t{\n\t\t$contitions = ' duration_merchantid = '.$this->user_id;\n\t\tif($_GET){\n\t\t\tif($name){\n\t\t\t\t$contitions .= ' and duration_period like \"%'.mysql_real_escape_string($name).'%\"';\n\t\t\t}\n\t\t\t$result = $this->db->query(\"select * from duration where $contitions order by duration_period ASC limit $offset,$record\");\n } else{\n\t\t\t$result = $this->db->query(\"select * from duration where $contitions order by duration_period ASC limit $offset,$record\");\n }\n return $result;\n\t}", "title": "" }, { "docid": "762a5e37240b06671f171db1b5296868", "score": "0.46899408", "text": "public function render($duration) {\n preg_match('#PT(.*?)H(.*?)M(.*?)S#si',$duration,$out);\n if(empty($out[1])){\n preg_match('#PT(.*?)M(.*?)S#si',$duration,$out);\n if(empty($out[1])){\n preg_match('#PT(.*?)S#si',$duration,$out);\n if(empty($out[1])){\n return '00:00';\n }else{\n if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; }\n return '00:'.$out[1];\n }\n }else{\n if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; }\n if(strlen($out[2])==1){ $out[2]= '0'.$out[2]; }\n return $out[1].':'.$out[2];\n }\n }else{\n if(strlen($out[1])==1){ $out[1]= '0'.$out[1]; }\n if(strlen($out[2])==1){ $out[2]= '0'.$out[2]; }\n if(strlen($out[3])==1){ $out[3]= '0'.$out[3]; }\n return $out[1].':'.$out[2].':'.$out[3];\n }\n }", "title": "" }, { "docid": "28a389f46d7342789eb628e8a19f6527", "score": "0.46858382", "text": "function dtlDateStrToArray($ds) {\n // * returns an array containing the different date parts\n // * works with any DateStr in the format YYYY-MM-DD, even if invalid (e.g. 0000-00-00)\n // * returns false if $ds not in the proper format\n if (!dtlIsDateStr($ds)) {\n return false;\n }\n dtlDateSplit($ds, $year, $month, $day);\n $da = [];\n $da['date'] = $ds;\n $da['year'] = $year;\n $da['month'] = $month;\n $da['day'] = $day;\n return $da;\n}", "title": "" }, { "docid": "f60d06d8a655914bc158ab786121cfdc", "score": "0.46833012", "text": "public function getTimings(): array {\r\n return $this -> timings['times'];\r\n }", "title": "" }, { "docid": "7692414090ed55971edb38e02c33f183", "score": "0.4675089", "text": "public static function validateTime($dat)\n {\n if(!is_array($dat))\n return [];\n\n for ($i=0; $i < count($dat); $i++) {\n $dat[$i]['initialSpin'] = sprintf('%e', (float)$dat[$i]['initialSpin']);\n $dat[$i]['finalSpin'] = sprintf('%e', (float)$dat[$i]['finalSpin']);\n $dat[$i]['modes'] = sprintf('%e', (int)$dat[$i]['modes']);\n $dat[$i]['steps'] = sprintf('%e', (int)$dat[$i]['steps']);\n\n $dat[$i]['phases'] = self::validatePhase($dat[$i]['phases']);\n }\n return $dat;\n }", "title": "" }, { "docid": "5ffbc5883afd7d1dc4b05d0cfe8c696a", "score": "0.46733862", "text": "public static function build_duration( $time_array, $added_arrays = null ) {\n\t\t\t// Make sure time array is built\n\t\t\tif ( ! is_array( $time_array ) ) {\n\t\t\t\t// Only return if there are no added arrays\n\t\t\t\tif ( ! $time_array && '0' !== $time_array && empty( $added_arrays ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t$time_array = self::parse_seconds_to_times( $time_array );\n\t\t\t}\n\t\t\t$durations = array(\n\t\t\t\t'years',\n\t\t\t\t'days',\n\t\t\t\t'hours',\n\t\t\t\t'minutes',\n\t\t\t\t'seconds',\n\t\t\t);\n\t\t\t$date_durations = array(\n\t\t\t\t'Y' => 'years',\n\t\t\t\t'D' => 'days',\n\t\t\t);\n\t\t\t$time_durations = array(\n\t\t\t\t'H' => 'hours',\n\t\t\t\t'M' => 'minutes',\n\t\t\t\t'S' => 'seconds',\n\t\t\t);\n\t\t\tif ( is_array( $added_arrays ) ) {\n\t\t\t\tforeach ( $added_arrays as $added_array ) {\n\t\t\t\t\t// Make sure time array is built\n\t\t\t\t\tif ( ! is_array( $added_array ) ) {\n\t\t\t\t\t\tif ( ! $added_array ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$added_array = self::parse_seconds_to_times( $added_array );\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ( $durations as $current_duration ) {\n\t\t\t\t\t\t// Create base time array if field missing\n\t\t\t\t\t\tif ( empty( $time_array[ $current_duration ] ) ) {\n\t\t\t\t\t\t\t$time_array[ $current_duration ] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add time to time array\n\t\t\t\t\t\tif ( ! empty( $added_array[ $current_duration ] ) ) {\n\t\t\t\t\t\t\t$time_array[ $current_duration ] = intval( $time_array[ $current_duration ] ) + intval( $added_array[ $current_duration ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $time_array['seconds'] ) && $time_array['seconds'] > 60 ) {\n\t\t\t\t\t$time_array['minutes'] = $time_array['minutes'] + floor( $time_array['seconds'] / 60 );\n\t\t\t\t\t$time_array['seconds'] = $time_array['seconds'] % 60;\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $time_array['minutes'] ) && $time_array['minutes'] > 60 ) {\n\t\t\t\t\t$time_array['hours'] = $time_array['hours'] + floor( $time_array['minutes'] / 60 );\n\t\t\t\t\t$time_array['minutes'] = $time_array['minutes'] % 60;\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $time_array['hours'] ) && $time_array['hours'] > 24 ) {\n\t\t\t\t\t$time_array['days'] = $time_array['days'] + floor( $time_array['hours'] / 24 );\n\t\t\t\t\t$time_array['hours'] = $time_array['hours'] % 24;\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $time_array['days'] ) && $time_array['days'] > 365 ) {\n\t\t\t\t\t$time_array['years'] = $time_array['years'] + floor( $time_array['days'] / 365 );\n\t\t\t\t\t$time_array['days'] = $time_array['days'] % 365;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$duration = 'P';\n\t\t\tforeach ( $date_durations as $abbr => $date_duration ) {\n\t\t\t\tif ( ! empty( $time_array[ $date_duration ] ) ) {\n\t\t\t\t\t\t$duration .= intval( $time_array[ $date_duration ] ) . $abbr;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$duration .= 'T';\n\t\t\tforeach ( $time_durations as $abbr => $time_duration ) {\n\t\t\t\tif ( ! empty( $time_array[ $time_duration ] ) ) {\n\t\t\t\t\t\t$duration .= intval( $time_array[ $time_duration ] ) . $abbr;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle 0-y values\n\t\t\tif ( 'PT' === $duration ) {\n\t\t\t\t$duration .= '0S';\n\t\t\t}\n\n\t\t\treturn $duration;\n\t\t}", "title": "" }, { "docid": "f1c261b06c657bb97c001a0f01060183", "score": "0.4670212", "text": "protected function getSecondsOptions(string $pattern): array\n {\n $valueFormatter = new IntlDateFormatter(\n $this->getLocale(),\n IntlDateFormatter::NONE,\n IntlDateFormatter::NONE,\n null,\n null,\n $pattern\n );\n $date = new DateTime('1970-01-01 00:00:00');\n\n $result = [];\n for ($sec = 0; $sec <= 59; $sec++) {\n $key = $date->format('s');\n $value = $valueFormatter->format($date);\n $result[$key] = $value;\n\n $date->modify('+1 second');\n }\n\n return $result;\n }", "title": "" }, { "docid": "bb8e10c6f7e8d1a5c95359e7ba1d962c", "score": "0.4669583", "text": "private function getTimeMinutes()\n\t{\n\t\t$minutes = [];\n\n\t\t$time_separators = TimeSeparator::select('minutes')->get()->toArray();\n\n\t\tforeach ($time_separators as $time_separator){\n\t\t\t$minutes[] = $time_separator['minutes'];\n\t\t}\n\n\t\treturn $minutes;\n\t}", "title": "" }, { "docid": "a57ccc4a54e1d44b163bee04312973d4", "score": "0.4658123", "text": "public function getItemDuration();", "title": "" }, { "docid": "5e129c368907cf4c38c0dd2e3eecfd63", "score": "0.46510717", "text": "public function retrouve_cycling_hour($schedule_times,$duration,$unit) {\n\t\t$retour = array ();\n\t\tif($schedule_times==\"\"){\n\t\t\t$this->onWarning(\"Pas de schedule_times\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$now = $this->getCurrentDate ();\n\t\t$diff_seconde=$this->calcul_duration($duration, $unit);\n\n\t\t$liste_heures = explode ( \",\", $schedule_times );\n\t\t//Il ne faut qu'une heure de depart\n\t\tif ($liste_heures === false || count($liste_heures)>1) {\n\t\t\t$this->onWarning ( \"Explode en erreur avec : \" . $schedule_times );\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$liste_periode = explode ( \":\", $liste_heures[0] );\n\t\tif (is_array ( $liste_periode ) && count ( $liste_periode ) == 2) {\n\t\t\t$start_hour=mktime ( $liste_periode [0], $liste_periode [1], 0, $now [\"month\"], $now [\"day\"], $now [\"year\"] );\n\t\t\t$cycle=$start_hour;\n\t\t\twhile($cycle<$now[\"ts\"]){\n\t\t\t\t$cycle+=$diff_seconde;\n\t\t\t}\n\t\t \t $diff_sec_restant=$cycle-$now[\"ts\"];\n\t\t\t\n\t\t\treturn $diff_sec_restant;\n\t\t} else {\n\t\t\t$this->onWarning ( \"Explode impossible de l'heure a valider\" );\n\t\t}\n\t\n\t\treturn $retour;\n\t}", "title": "" }, { "docid": "b1d8a2ea763f97cd80d65707f1fc6e73", "score": "0.46450704", "text": "function getIcsEventsAsArray()\r\n {\r\n $icalString = file_get_contents($this->file);\r\n $icsDates = array();\r\n /* Explode the ICs Data to get datas as array according to string ‘BEGIN:’ */\r\n $icsData = explode(\"BEGIN:\", $icalString);\r\n /* Iterating the icsData value to make all the start end dates as sub array */\r\n foreach ($icsData as $key => $value) {\r\n $icsDatesMeta [$key] = explode(\"\\n\", $value);\r\n }\r\n /* Itearting the Ics Meta Value */\r\n foreach ($icsDatesMeta as $key => $value) {\r\n foreach ($value as $subKey => $subValue) {\r\n /* to get ics events in proper order */\r\n $icsDates = $this->getICSDates($key, $subKey, $subValue, $icsDates);\r\n }\r\n }\r\n\r\n return $this->sortEvents($icsDates);\r\n }", "title": "" }, { "docid": "0dcca47a3aaced118dc602f641546792", "score": "0.4644674", "text": "function computeTime( $amount ) {\n\t\t$return_array = array();\n\t\t$return_array['hours'] = intval( $amount / 3600 );\n\t\t$return_array['minutes'] = intval( $amount % 3600 / 60 );\n\t\t$return_array['seconds'] = $amount - $return_array['hours'] * 3600 - $return_array['minutes'] * 60;\n\t\treturn $return_array;\n\t}", "title": "" }, { "docid": "894fde37118037a8976093e8c8f77275", "score": "0.46429583", "text": "function duration($secs, $used = 'hms', $zero = FALSE) {\n static $period = array(\n 'Years' => 31556926,\n 'Months' => 2629743,\n 'Weeks' => 604800,\n 'Days' => 86400,\n 'hours' => 3600,\n 'minutes' => 60,\n 'seconds' => 1,\n );\n\n\n $out =\n $parts = array();\n $secs = (float) $secs;\n\n foreach ($period as $key => $value) {\n if ( ! empty($used) && is_false(strpos($used, substr($key, 0, 1)))) {\n continue;\n }\n\n $count = floor($secs / $value);\n\n if ($count == 0 && is_false($zero)) {\n continue;\n }\n\n $secs %= $value;\n $parts[$key] = abs($count);\n }\n\n foreach ($parts as $key => $value) {\n $out []= ln($value, 'date.' . strtolower($key));\n }\n\n return $out;\n}", "title": "" } ]
78c16929c2cde7a5e933c0fd65002fda
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.
[ { "docid": "052636648912743c4c3c6b20e835d6a4", "score": "0.7084026", "text": "protected function tearDown(): void\n {\n\n // stop the transaction and rollback\n self::$container->get(DependencyInjectionKeys::CONNECTION)->getConnection()->rollback();\n\n // clean-up the temporary directory\n $this->removeDir($this->getTmpDir());\n }", "title": "" } ]
[ { "docid": "b513b13c6b77846af5dadbdbaf81e0aa", "score": "0.7725601", "text": "protected function tearDown() {\n\n $this->myfixture->tearDown();\n $this->ChatInstance = null;\n\n }", "title": "" }, { "docid": "6d1a8eb5e26d10bcd0d24ef3c13081e8", "score": "0.7239495", "text": "public function tearDown()\n {\n $this->applicationHelper->stop();\n $this->infrastructureHelper->destroy();\n }", "title": "" }, { "docid": "38cb666f6b70283c3d88d9fb841fadc0", "score": "0.71912843", "text": "public function tearDown() {\n\t\tm::close();\n\t}", "title": "" }, { "docid": "8ed063ddfb1b061a926ad8f51612f30e", "score": "0.71800905", "text": "public static function tearDownAfterClass() {\n self::$CI->session->sess_destroy();\n session_destroy();\n self::$CI->mongo_db->dropDb('aw_datacollection_test');\n \n // Remove temp directory\n system(\"rm -rf tests/tmp\");\n }", "title": "" }, { "docid": "3cd0f501310d298bbd57fd8294479c71", "score": "0.71404153", "text": "public function tearDown()\n {\n $this->cleanUp();\n }", "title": "" }, { "docid": "48637ec69bb45e47910d62046d3cefc7", "score": "0.7127372", "text": "public function tearDown() {\n\n\t\t$this->testee->unregister();\n\t}", "title": "" }, { "docid": "c1892105c257b7ced8c3ed8d78ab932d", "score": "0.7097133", "text": "protected function teardown() {}", "title": "" }, { "docid": "c1892105c257b7ced8c3ed8d78ab932d", "score": "0.7097133", "text": "protected function teardown() {}", "title": "" }, { "docid": "35cdd89a010ea53c653ac715a2bd0ede", "score": "0.70802003", "text": "protected function tearDown()\n {\n $this->cleanup($this->tmpDir);\n }", "title": "" }, { "docid": "1225314acc95179496f73f17d5577b85", "score": "0.70793605", "text": "function teardown() {\n // close database connection\n $this->conn = null;\n }", "title": "" }, { "docid": "34bead5df590f9c28d61fed3e3fe837c", "score": "0.70782226", "text": "protected function tear_down() {\n\t\tMonkey\\tearDown();\n\t\tparent::tear_down();\n\t}", "title": "" }, { "docid": "5f07f9d4a86a341bf3a9bf35b4f40c87", "score": "0.70379764", "text": "protected function tearDown(): void\n {\n $this->finish();\n \\Mockery::close();\n }", "title": "" }, { "docid": "0f2bcf65baa71f03dc4a36c9c88be6c1", "score": "0.7034237", "text": "protected function tearDown() {\n\t\tparent::tearDown();\n\t\t$this->cleanupTestDirectory();\n\t}", "title": "" }, { "docid": "32613a2705d821903acac42e1f543b86", "score": "0.7015932", "text": "public function teardown()\n {\n parent::teardown();\n }", "title": "" }, { "docid": "32613a2705d821903acac42e1f543b86", "score": "0.7015932", "text": "public function teardown()\n {\n parent::teardown();\n }", "title": "" }, { "docid": "06f977e73ba6452ee480e9d21af500ef", "score": "0.7002467", "text": "public function tearDown()\n {\n unset($this->CommandTester);\n unset($this->Command);\n unset($this->QuestonHelper);\n\n unset($this->Output);\n unset($this->Input);\n }", "title": "" }, { "docid": "b9e9c8c1b10f319807f7675a6a3642cc", "score": "0.7000821", "text": "protected function tearDown():void{\n $this->loadFixtures([RemoveRendezVousFixtures::class]);\n }", "title": "" }, { "docid": "89311b421bca512e6c37af1399231933", "score": "0.6982454", "text": "protected function tearDown() {\n\t\t$this->_descriptor = null;\n\t}", "title": "" }, { "docid": "471cf2d4dfcb8fd35027e285a9b2dc96", "score": "0.69761443", "text": "public function doTearDown()\n {\n }", "title": "" }, { "docid": "f37e6b3ca79da657ff7cda6dc6b5871e", "score": "0.6958809", "text": "protected function tearDown() {\n // As we want to test a static library, there is nothing to do here\n\t}", "title": "" }, { "docid": "7220529fd7cc8485de6f4b8e29abd82e", "score": "0.6956649", "text": "public static function doTearDownAfterClass()\n {\n }", "title": "" }, { "docid": "257972d2fcaf56b414b2d418818fcdb7", "score": "0.69564325", "text": "protected function tearDown() {\n\t\tparent::tearDown ();\n\t\tsys_db_TestDatabase::setCallbackHandler();\n\t\tsys_LibFactory::setConfig();\n\t}", "title": "" }, { "docid": "917be1a7b06c7e709656604ca17e553f", "score": "0.6951365", "text": "protected function tearDown():void{\n\n\t\tif(isset($this->driver) && $this->driver instanceof DriverInterface){\n\t\t\t$this->driver->disconnect();\n\t\t}\n\n\t}", "title": "" }, { "docid": "41e9956680423dbbfc71e1802075f2a9", "score": "0.6945821", "text": "public function tearDown()\n {\n parent::tearDown();\n\n unset($this->procService);\n unset($this->countryRepo);\n unset($this->dbManager);\n unset($this->config);\n unset($this->dbConn);\n }", "title": "" }, { "docid": "ce7be9ccd1b70187b9f79fcae7b04263", "score": "0.6939139", "text": "protected function tearDown()\n {\n m::close();\n unset($this->repo);\n }", "title": "" }, { "docid": "15a29b745cf129daab1b11f47caff17e", "score": "0.69365996", "text": "public function tearDown()\n\t{\n\t\t$this->unLoadDataSets();\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "2252f9d2077e84e3410940a1259ce62b", "score": "0.69365907", "text": "public function tearDown() {\n\t\tTest::tearDown();\n\n\t\t// then\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "1fdb8f0d7e88b27c1a4fa5c8cbe6c823", "score": "0.69325435", "text": "protected function after_teardown() {}", "title": "" }, { "docid": "aff4635b2199f91eda06cfcf635d39fd", "score": "0.6925153", "text": "public function tearDown() {\n\t\t$this->clearUserInfo();\n\t\t$this->restoreUIlang();\n\t\t$this->restoreSessionInfo();\n\t\tset_time_limit(0);\n\n\t\tunset($this->Controller);\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "2f9f960244e9f5236dcd7e69fed09b6e", "score": "0.69217634", "text": "public function TearDown():void\n {\n unset($this->object);\n parent::tearDown();\n }", "title": "" }, { "docid": "3324054f2e67815c83e2233d5bb3fb41", "score": "0.69087", "text": "public function tearDown()\n {\n // Shut down the mock server connection\n fclose($this->server);\n }", "title": "" }, { "docid": "eb4d80dedec061b8cfdf4ebcfb49cf82", "score": "0.68952316", "text": "public function end() {\n\t\tif (isset($this->_fixtures) && isset($this->db)) {\n\t\t\tif ($this->dropTables) {\n\t\t\t\tforeach (array_reverse($this->_fixtures) as $fixture) {\n\t\t\t\t\t$fixture->drop($this->db);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->db->sources(true);\n\t\t\tConfigure::write('Cache.disable', false);\n\t\t}\n\n\t\tif (class_exists('ClassRegistry')) {\n\t\t\tClassRegistry::flush();\n\t\t}\n\t}", "title": "" }, { "docid": "9d4e7d0083c6f13c9bed0deea73ed76b", "score": "0.68783003", "text": "public function tearDown()\n {\n unset($this->helper);\n }", "title": "" }, { "docid": "9d4e7d0083c6f13c9bed0deea73ed76b", "score": "0.68783003", "text": "public function tearDown()\n {\n unset($this->helper);\n }", "title": "" }, { "docid": "a443293e1ebc814fb467fd8371cfc1fe", "score": "0.68765366", "text": "protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }", "title": "" }, { "docid": "3171b4c27e554e7df5a60e25e0f0833a", "score": "0.6876173", "text": "public function tearDown()\n {\n $this->cleanBehind();\n }", "title": "" }, { "docid": "0294055954ea424a48ae8608773fb5b1", "score": "0.6873376", "text": "protected function tearDown() {\n unset($this->Paymill);\n }", "title": "" }, { "docid": "6eb6c4eb9b27b29f637e0ac1a5c3a12f", "score": "0.6873105", "text": "public function tearDown()\n\t{\n\t\t\\Mockery::close();\n\n\t\t$this->logger = null;\n\t\t$this->futureFunc = null;\n\t\t$this->response = null;\n\t}", "title": "" }, { "docid": "78c62ba0e8841aa33af03639b6bddaee", "score": "0.6866986", "text": "public function tearDown()\n {\n $this->closeAll();\n parent::tearDown();\n }", "title": "" }, { "docid": "88b6a1cb9447fb56a5ac0ae28fb02b4e", "score": "0.68643266", "text": "protected function tearDown(): void\n {\n unset($this->app);\n\n m::close();\n }", "title": "" }, { "docid": "88b6a1cb9447fb56a5ac0ae28fb02b4e", "score": "0.68643266", "text": "protected function tearDown(): void\n {\n unset($this->app);\n\n m::close();\n }", "title": "" }, { "docid": "9a5008c37d0a183acc0c9dbb3e029970", "score": "0.68542594", "text": "public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.6849841", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.6849841", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.6849841", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "d9781566f11d32022040aa3537f1c5ef", "score": "0.6849841", "text": "public function tearDown()\n {\n m::close();\n }", "title": "" }, { "docid": "e041fdc591627a19f53d80a5aad5649a", "score": "0.68473995", "text": "public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }", "title": "" }, { "docid": "7a65abdf0eb11519fd919868fcefd0d6", "score": "0.6839582", "text": "protected function tearDown()\n {\n unset($this->app);\n unset($this->command);\n }", "title": "" }, { "docid": "fba7add9faf632ec457cf60be27f18d6", "score": "0.6833105", "text": "protected function tearDown() : void\n {\n parent::tearDown();\n\n $this->entityManager->close();\n $this->entityManager = null; // avoid memory leaks\n }", "title": "" }, { "docid": "73ab4926b466bf1b824a4c1fb4d7221a", "score": "0.6832898", "text": "protected function tearDown()\n {\n $this->DbDataSourceDescriptor = null;\n \n parent::tearDown();\n }", "title": "" }, { "docid": "75b90d62f67e29eb5d06a327894b9b8f", "score": "0.6830109", "text": "function test_cleanup() {\n\t\t// Restore default database connection\n\t\tif (isset(Database::$instances['default_backup'])) {\n\t\t\tDatabase::$instances['default'] = Database::$instances['default_backup'];\n\t\t\tunset(Database::$instances['default_backup']);\n\t\t}\n\t\t// DROP test database\n\t\t$db = $this->getDatabase();\n\t\tif ($this->dbName && $db->getAttribute(\\PDO::ATTR_DRIVER_NAME) == 'mysql') {\n\t\t\t$db->query('DROP DATABASE '.$this->dbName);\n\t\t}\n\t\t$this->assertTrue(true, 'cleaned up');\n\t}", "title": "" }, { "docid": "09012abdb62e42eefe44035961436c57", "score": "0.6827432", "text": "public function tearDown()\r\n {\r\n foreach ($this->onTearDown as $command) {\r\n $this->app->run(new StringInput($command));\r\n }\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }", "title": "" }, { "docid": "49cf888ce965672bb048da6d1f9a3124", "score": "0.68220705", "text": "public function tearDown()\n {\n unset($this->app);\n m::close();\n }", "title": "" }, { "docid": "f4e2f09bb013030abbef1c6327cf717e", "score": "0.6821002", "text": "public function tearDown(){\n\t\t// Instruct the database management system to discard all changes that happened during the test method. This keeps the original database content.\n\t\tself::$connection->rollBackTransaction();\n\t}", "title": "" }, { "docid": "c28ad8841eb4dd293742837f891be5ed", "score": "0.6816137", "text": "protected function tearDown()\r\n {\r\n $application = new Application(self::$kernel);\r\n $application->setAutoExit(false);\r\n\r\n $options = array('command' => 'doctrine:database:drop', '--force' => true);\r\n $application->run(new ArrayInput($options));\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }", "title": "" }, { "docid": "53376eb427d275e971aab8efd3928254", "score": "0.6812886", "text": "protected function tearDown(): void {\n\t}", "title": "" }, { "docid": "3e663dabce91bde429ae8a2fcf4f62f3", "score": "0.6812295", "text": "public function tearDown(): void\n {\n // $this->client->quit();\n }", "title": "" }, { "docid": "54d74a3b8e24ba601cb359cccf73d4f4", "score": "0.6808002", "text": "public function tearDown()\n {\n if (is_resource($this->socket)) {\n fclose($this->socket);\n }\n unset($this->handler);\n parent::tearDown();\n }", "title": "" }, { "docid": "1f0db1508f1f58406c310b03cd794d5f", "score": "0.6805329", "text": "protected function tearDown()\n {\n $this->aq->query($this->drop_table_sql);\n $this->aq->query($this->drop_db_sql);\n unset($this->aq);\n unset($this->o);\n }", "title": "" }, { "docid": "cd5f9feafe6d80016f142ebef05facf4", "score": "0.68046194", "text": "protected function tearDown()\n {\n parent::tearDown();\n if (!is_null($this->em)) {\n $this->em->getConnection()->close();\n }\n }", "title": "" }, { "docid": "b541fa87dd4f560b1e38abf4d6e937c0", "score": "0.6803367", "text": "protected function tearDown()\n {\n $this->infrastructure = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "2552aa22a3a9f790055c7bf2a0a27818", "score": "0.6793621", "text": "protected function tearDown()\n\t{\n\t\t$this->restoreFactoryState();\n\t}", "title": "" }, { "docid": "2a74a15dab13811015e30cc2c584f3e2", "score": "0.67928755", "text": "public function tearDown()\n {\n parent::tearDown();\n\n $this->factory\n ->unregisterFactory();\n\n $this->builder\n ->unregisterAll();\n\n $this->builder = null;\n $this->factory = null;\n }", "title": "" }, { "docid": "0b3f4bf483ece161c1fe9de6b3fb3e78", "score": "0.6791513", "text": "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->schoolManager);\n unset($this->schoolConfigManager);\n unset($this->commandTester);\n }", "title": "" }, { "docid": "be8c44f25c551bfc1c189820449cec4c", "score": "0.67913955", "text": "protected function tearDown()\n {\n $this->data = null;\n $this->object = null;\n }", "title": "" }, { "docid": "78c2f44a0c8020794191831afc489311", "score": "0.6786826", "text": "protected function tearDown() {\n unset($GLOBALS['pdo']);\n }", "title": "" }, { "docid": "06d781b2ca141c2d37d7db3ced11145d", "score": "0.67855424", "text": "public function tearDown()\n\t{\n\t\tunset($this->_server);\n\t\tfclose($this->_stdout);\n\t}", "title": "" }, { "docid": "5fb1086d55f8b0dbb39332708b0164b0", "score": "0.67852944", "text": "protected function tear_down()\n {\n $path = $this->_config->local_directory;\n\n // If the test directory exists, remove it\n if (file_exists($path)) {\n $this->_rmRecursive($path);\n }\n\n parent::tear_down();\n }", "title": "" }, { "docid": "4902ac77d982cc2bd047fa9377a73d75", "score": "0.6783294", "text": "public function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->stopHttpHalting();\n\t\t$this->stopHttpMocking();\n\n\t\tself::$error_log->clear();\n\t}", "title": "" }, { "docid": "e95ca1219de858c79a44ffeeea5da0ca", "score": "0.6781298", "text": "protected function tearDown()/*: void*/\n {\n $this->tearDownTheTestEnvironment();\n }", "title": "" }, { "docid": "f9f12d0976d2c71e1dbde2a70c42f734", "score": "0.6779183", "text": "public function test_cleanup()\n {\n // DROP test database\n $db = Connection::instance($this->dbLink);\n if ($this->dbName && $db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {\n $db->query('DROP DATABASE '.$this->dbName);\n }\n // Restore default database connection backup\n if (isset(Connection::$instances['default']) && Connection::$instances['default'] === 'INVALID') {\n Connection::$instances['default'] = Connection::$instances['_default_backup'];\n unset(Connection::$instances['_default_backup']);\n }\n $this->assertTrue(true, 'cleaned up');\n }", "title": "" }, { "docid": "5854fc53e8e35006fc062dd8ba43ccb3", "score": "0.67785466", "text": "public function tearDown()\n {\n @unlink('/var/www/Symfony/src/NiftyThrifty/ShopBundle/Tests/TestFiles/newslettertop_temp.jpg');\n @unlink('/var/www/Symfony/src/NiftyThrifty/ShopBundle/Tests/TestFiles/collectionpanel_temp.jpg');\n\n $this->container->get('doctrine')->getConnection()->close();\n parent::tearDown();\n $this->em->close();\n }", "title": "" }, { "docid": "194a3f407b38ec2cb737a54b36fb8c9e", "score": "0.67777455", "text": "public function tearDown(){\n unset($this->foodUnit);\n unset($this->category);\n unset($this->food);\n unset($this->ingrUnit);\n unset($this->quantity);\n\n $this->db->close();\n\n unset($this->expectedIngredientArray);\n unset($this->dbh);\n unset($this->ingredientRepository);\n unset($this->ingredientFactory);\n unset($this->host);\n unset($this->user);\n unset($this->pass);\n unset($this->dbName);\n unset($this->charset);\n unset($this->db);\n\n }", "title": "" }, { "docid": "9aa88c6550072e8b0e98ea5616937523", "score": "0.67739743", "text": "protected function tearDown()\n {\n parent::tearDown();\n $this->em->close();\n }", "title": "" }, { "docid": "9aa88c6550072e8b0e98ea5616937523", "score": "0.67739743", "text": "protected function tearDown()\n {\n parent::tearDown();\n $this->em->close();\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "65427d299abd6054e781b472bbf2a70e", "score": "0.67726016", "text": "protected function tear_down()\n {\n }", "title": "" }, { "docid": "14aeaf9f28ee3e2b20669d9e9bb2ca62", "score": "0.677147", "text": "protected function tearDown()\n\t{\n\t\tunset($this->options);\n\t\tunset($this->client);\n\t\tunset($this->object);\n\t}", "title": "" }, { "docid": "837dd1b749c01e7defcf1a29e20fd8c8", "score": "0.67668587", "text": "protected function tearDown(): void {\n unset($this->container);\n }", "title": "" }, { "docid": "841985c257973433293bdae31f5ee76f", "score": "0.6762602", "text": "protected function tearDown(): void\n\t{\n\t\tunset($this->fs);\n\t}", "title": "" }, { "docid": "50f1fb78c4ec6c75f0177c4ba20848f9", "score": "0.6759134", "text": "protected function tearDown(): void\n {\n $this->instance = null;\n $this->config = null;\n $this->container = null;\n }", "title": "" }, { "docid": "b9ffab589b2188623b5ba317b70e9606", "score": "0.6753191", "text": "protected function tearDown() {\n fclose($this->handle);\n }", "title": "" }, { "docid": "e72749e6199cbf576e5c16a5a864f9ec", "score": "0.67520833", "text": "public function unloadFixtures() {\n foreach ($this->fixtures as $name => $fixture) {\n $fixture->dropTable();\n unset($this->fixtures[$name]);\n }\n }", "title": "" }, { "docid": "a8e085ae436759b64d3a932ea94e2677", "score": "0.67458826", "text": "public function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\t$this->databaseTester = NULL;\n\t}", "title": "" }, { "docid": "c3eb0881929d9f7ca729c0b362518b32", "score": "0.6738977", "text": "protected function tearDown() {\r\n\t\tunset ( $this->repository );\r\n\t}", "title": "" }, { "docid": "197cd9b61def5f8a043ff03599513ff0", "score": "0.6737361", "text": "protected function tearDown()\n\t{\n\t\t$this->Otp = null;\n\t\t\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "ff16c72dc99ae6153db1f54462588266", "score": "0.67349046", "text": "protected function tearDown() {\n\t\t$this->sql->ReleaseRecordSet(__FILE__, __LINE__);\n\t\t$this->sql->SQLQueryString = 'DROP TABLE sqlsolution';\n\t\t$this->sql->RunQuery(__FILE__, __LINE__);\n\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.67307645", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "aa6860a0bfaf7367f4af033a61e5adcf", "score": "0.67307645", "text": "protected function tearDown() {\n\t}", "title": "" }, { "docid": "e943655793ce4dc7b190a0c604e55507", "score": "0.67304623", "text": "public function tearDown()\n\t{\n\t\tunset(Event::$events['test.event']);\n\t}", "title": "" }, { "docid": "58f6215bfa121b85824f98211838a32f", "score": "0.67300767", "text": "protected function teardown() {\n\t\t@unlink($this->file_name);\n\t}", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.67267257", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.67267257", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.67267257", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" }, { "docid": "cf5a4bc4115c21dfde7d89d7ec4f7e49", "score": "0.67267257", "text": "protected function tearDown(): void\n {\n m::close();\n }", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "8eebf425ce52b4bb228e70caffb79698", "score": "0.0", "text": "public function authorize()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "4c4fbdb895548c0ca03ecf5e521e4d5e", "score": "0.8375539", "text": "public function authorize()\n {\n return $this->user() !== null;\n }", "title": "" }, { "docid": "adc35a96694d73041eb8bde60a1a3a34", "score": "0.83555704", "text": "public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "9fb39029db943b6c00f8b0416336e051", "score": "0.82621014", "text": "public function authorize()\n {\n return $this->session()->has('user');\n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.82615393", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "7b85778f456fbd27b6eeaf095e5c3b1d", "score": "0.8214117", "text": "public function authorize()\n {\n return $this->session()->has('user');;\n }", "title": "" }, { "docid": "863c6df1a64b6980d99e321f5f5e2d24", "score": "0.82116765", "text": "public function authorize()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "4f4bc5f3b6afa1249558389fa211529a", "score": "0.8185683", "text": "public function authorize()\n {\n return $this->isAuthorized();\n }", "title": "" }, { "docid": "ba24ebd1f73a0e28e230dc3d8d4ad598", "score": "0.8143969", "text": "public function authorize()\n {\n return intval($this->user) === intval($this->get('id'));\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8139579", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "97ff65f09cf39bf2988dedb9c7c1f6e7", "score": "0.81390905", "text": "public function authorize()\n {\n return $this->user() === null;\n }", "title": "" }, { "docid": "a7282d6761520498a678260c56a365a4", "score": "0.8131922", "text": "public function authorize()\n {\n // Authorization parameters.\n $isLoggedIn = Auth::check();\n $belongsToAuthoringTeam = Auth::user()->isPartOfAuthoringTeam($this->resource->id);\n $isTeamOwner = $this->team->owner_id === Auth::user()->id;\n return $isLoggedIn && ($belongsToAuthoringTeam || $isTeamOwner);\n }", "title": "" }, { "docid": "d94da425f5191a3432b24571ce1f3f91", "score": "0.8117193", "text": "public function authorize() {\n return true; // true if we plan to check user access elsewhere\n }", "title": "" }, { "docid": "5a16ebbb158143fb89b0da48dbefff18", "score": "0.80957747", "text": "public function authorize()\n {\n // if you're not logged in, need your token\n if (!$this->user) return true;\n\n // if you're not an admin, but supplied someone elses id\n if (!$this->user->isAdmin() \n && $this->get('uid')\n && $this->get('uid') != $this->user->id)\n \n return false;\n\n // otherwise go crazy\n return true;\n }", "title": "" }, { "docid": "d68408159f20eb07865e04e3f820e8b9", "score": "0.808821", "text": "protected static function is_authorized()\n {\n return User::get_authorized_user() !== NULL;\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.80702335", "text": "public function isAuthorized();", "title": "" }, { "docid": "9848174a7f01e602f5b2cca10182994a", "score": "0.8060525", "text": "public function authorize()\n {\n return ($this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "9e03a611541dce0c22ee584309b77ab3", "score": "0.8013722", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n return true;\n break;\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n default:\n return false;\n break;\n }\n }", "title": "" }, { "docid": "47f5f6ef32e8e61162898128dd80a95d", "score": "0.8001055", "text": "public function authorize()\n {\n\n $user = auth()->user();\n\n if ($user) {\n\n return $this->route('user') == $user->id || parent::authorize();\n\n }\n\n return parent::authorize();\n\n }", "title": "" }, { "docid": "0481f26f599fed1551437604a6f9e1c2", "score": "0.7990831", "text": "public function authorize()\n {\n return $this->user()->id == $this->enterprise->user_id;\n }", "title": "" }, { "docid": "8e64a8c8c86463cae319675933f00c0b", "score": "0.7974808", "text": "public function authorize()\n {\n if ($this->hasHeader('Authorization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c04d651befc635e0a47cdb314ffe8d48", "score": "0.7973787", "text": "public function authorize()\n {\n $user = $this->user();\n\n $userCondition = strpos($this->url(), 'users/') !== false ?\n $this->route('user')->id === $user->id :\n $this->input('user', $user->id) == $user->id;\n\n return $user->isAdmin() || $user->hasKey('get-edits') || \n ($user->isCommittee() && $userCondition);\n }", "title": "" }, { "docid": "00fe28a5de2fe63f82fe0455e4ad5957", "score": "0.7935606", "text": "public function authorize(): bool\n {\n return Auth::id() == $this->user()->id;\n }", "title": "" }, { "docid": "2e4b8cd956bd73bc40e6733dd98a5f70", "score": "0.79259396", "text": "public function authorized()\r\n {\r\n return !is_null($this->accessToken);\r\n }", "title": "" }, { "docid": "9dc7a2c2f8ecedfbbadf5681a0053e6f", "score": "0.79041535", "text": "public function authorize()\n {\n $company = Company::find($this->input('companyId'));\n if ($company !== null) {\n if ($company->owner_id == $this->user()->id) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "1e2a73fe2e20120cc8f9637f634c7b46", "score": "0.7874885", "text": "public function authorize(): bool\n {\n return (bool)$this->user();\n }", "title": "" }, { "docid": "4fac191b87dae973b42a1df4499533b7", "score": "0.78744376", "text": "public function authorize()\n {\n return (auth()->check()) ? true : false;\n }", "title": "" }, { "docid": "b09d43d46b4370d2fc5e90fcf4f5e629", "score": "0.78706414", "text": "public function authorize()\n\t{\n\t\tif (!empty(Auth::user()->id))\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "eb86beeda38f41b136324e4d5dc3cede", "score": "0.78690964", "text": "public function authorize()\n {\n if ($this->is('PUT') || $this->is('PATCH')) {\n if (\\Auth::check() && \\Auth::user()->isAdmin()) {\n return true;\n } else {\n return Ticket::find($this->get('id'))->user_id == \\Auth::user()->id;\n }\n } else {\n return \\Auth::check();\n }\n }", "title": "" }, { "docid": "c143850896d8cd259d39683a654c0144", "score": "0.78497976", "text": "public function authorize()\n {\n return auth()->user()->id === $this->route('user.id') || auth()->user()->role === User::ROLE_SUPER_ADMIN;\n }", "title": "" }, { "docid": "3ef676a034edc2d8d135a1b516c7d5a4", "score": "0.78493726", "text": "public function authorize()\n {\n return auth()->id() === $this->route('profile')->user_id;\n }", "title": "" }, { "docid": "cbc582dedbfdfaaf1eedb3a19d6f9ce4", "score": "0.7846507", "text": "public function authorize()\n {\n if ($this->isMethod('post')) {\n return ($this->user());\n }\n return false;\n }", "title": "" }, { "docid": "eb3318524e75bb63de92aa90e246c0c1", "score": "0.78312224", "text": "public function isAuthorized()\n\t{\n\t\tif ($this->_localHttpClient instanceof Zend_Oauth_Client) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "18963b4b17f2518f0bbc210f3343fe5e", "score": "0.78260726", "text": "public function isAuthorized(): bool;", "title": "" }, { "docid": "23ff8a607ea19366374391fb83717de2", "score": "0.7814183", "text": "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 true;\n break;\n }\n }", "title": "" }, { "docid": "c6da7dd7bc8f2b095be3ce96a2800843", "score": "0.7805627", "text": "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n\n $isOrganizationAdmin = $organisation->admin_id == $user->id;\n $isMember = $user->id == $this->route('members');\n\n return $isOrganizationAdmin || $isMember;\n }", "title": "" }, { "docid": "5e009eea8b4c81445ad8d5a68e42cfc3", "score": "0.78027946", "text": "public function authorize(): bool\n {\n if (! $this->user()) {\n return false;\n }\n\n if ($this->creating()) {\n return $this->user()->can('create', $this->guessModel());\n }\n\n return $this->user()->can('update', $this->routeModel());\n }", "title": "" }, { "docid": "7657d7c3aa668c4dbec0f1a919b35fbb", "score": "0.77977747", "text": "public function authorize()\n {\n $id = $this->route( 'id' );\n\n if( $id == 0 )\n return TRUE;\n\n $transactionItem = \\App\\TransactionItem::find( $id );\n\n if( ! $transactionItem )\n return TRUE;\n\n return \\Auth::user()->owns( $transactionItem->transaction->customer );\n }", "title": "" }, { "docid": "82f1cfbd42d07c07ccf54c4bb9b5c281", "score": "0.7777388", "text": "public function authorize()\n {\n $user = Auth::user();\n\n if (!$user->can(['edit-request_tenant', 'edit-request_service', 'edit-request'])) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b2685f5ef593b2bb733e589b9d528d9b", "score": "0.7775378", "text": "public function isAuthorized() {\n $hasSession = Yii::$app->session->has($this->sessionParam);\n $sessionVal = Yii::$app->session->get($this->sessionParam);\n return ($hasSession && !empty($sessionVal));\n }", "title": "" }, { "docid": "0e0f88dd62b79b349871769f0c5ee5c0", "score": "0.77749175", "text": "function isAuthorized() {\n // Currently we do all meaningful checks in beforeFilter().\n \n return true;\n }", "title": "" }, { "docid": "60cab0f6dbeb086261240fd352acb09f", "score": "0.7774051", "text": "public function authorize()\n {\n if ($this->user()->user_type == 'admin') return true;\n return false;\n }", "title": "" }, { "docid": "c17b56e9f22b820a96855ea56b3b8c0a", "score": "0.7758228", "text": "public function authorize()\n {\n // TODO Check for user!\n return true;\n }", "title": "" }, { "docid": "88e8e6fb9ed468cc42d45ab581d6b1de", "score": "0.77494735", "text": "public function isAuthorized(): bool\n {\n return $this->matchAuthResult(self::AUTHORIZED);\n }", "title": "" }, { "docid": "2514f3a98106d28cd196f06408045e98", "score": "0.7748001", "text": "public function authorize()\n {\n return $this->user()->userType == 1 ? true : false;\n }", "title": "" }, { "docid": "5bc0e01d7ee7d281e405ff13324a39ba", "score": "0.7743285", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_users') ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5a0966ca518aa545a37821563ee5fbdf", "score": "0.77344805", "text": "protected function authorized()\n {\n return $_SESSION['authorized'] == 1;\n }", "title": "" }, { "docid": "5991897bbbbc9438c63bcd58a4f4e055", "score": "0.7723491", "text": "public function authorize()\n {\n switch ($this->method())\n {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "title": "" }, { "docid": "977c162efbb9ce6cf5f45729c4416c11", "score": "0.7719186", "text": "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 }", "title": "" }, { "docid": "77c452ccd0ea914f4aa2e4ccef6d2cc1", "score": "0.77188283", "text": "public function authorize()\n {\n $user = User::find($this->route(\"user_id\"));\n $permission = Permission::find($this->route(\"permission_id\"));\n\n return !empty($user) and !empty($permission) and Auth::user()->can(\"edit users permissions\");\n }", "title": "" }, { "docid": "1bdbf6d4e984ac7b857b34e1c69a6866", "score": "0.7718706", "text": "private function _authorize()\n {\n return $this->_request->getSession('auth') != null;\n }", "title": "" }, { "docid": "0faf71bf2236c04f1d24b441cb48dbf1", "score": "0.77084607", "text": "public function isUserAuthorized()\r\n {\r\n //$actionAlwaysAllowed = ['claim/incidenttype', 'claim/claimantinfo'];\r\n $actionAlwaysAllowed = [];\r\n if (Yii::$app->user->identity->UserLevelID > 99)\r\n return true;\r\n\r\n /*\r\n * STEP 1: check if Claim belongs to users company\r\n * STEP 2: check if MultiCompany user and this claim belongs to one of their other companies\r\n * STEP 3: actionAlwaysAllowed is an override\r\n */\r\n if ($this->CompanyID == Yii::$app->user->identity->activeCompany->CompanyID ||\r\n in_array($this->CompanyID, explode(',', Yii::$app->user->identity->MultiCompany)) ||\r\n in_array(Yii::$app->requestedRoute, $actionAlwaysAllowed))\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "d6da9c280c9f836770756863a7210155", "score": "0.7705772", "text": "public function authorize()\n {\n $name = $this->route()->getName();\n $user = $this->user();\n return $user->can($name);\n }", "title": "" }, { "docid": "2852d944607d680a4e616400c2bf522d", "score": "0.7699961", "text": "public function isAuthorized()\n {\n $auth = substr($this->request->getHeaderLine('Authorization'), 7);\n return $this->request->getAttribute('config')['api_secret'] === $auth;\n }", "title": "" }, { "docid": "bfd1828d7fb9813a374aacdd98def0bc", "score": "0.76951563", "text": "public function authorize()\n {\n return $this->user()->id == $this->project->user_id;;\n }", "title": "" }, { "docid": "7834505356ec1412c40d11ea3f93a4b0", "score": "0.7694584", "text": "public function authorize()\n {\n return $this->channel->user_id === auth() -> user() -> id;\n }", "title": "" }, { "docid": "553c1c80d90571b4c3f6607bedfac84e", "score": "0.76916", "text": "public function authorize()\n {\n $key = ApiKey::find(\\Request::get('apiKeyId'));\n if ( ! $key || $key->user_id != \\Auth::id()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6ed7130732ecd3fb49934308e98087f7", "score": "0.7683226", "text": "public function authorize()\n {\n if ($this->checkPermissions){\n if (!$this->userHasPermission()){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "44ae3bfa682b7bf105d32fa5f17f963a", "score": "0.76822466", "text": "public function authorize()\n {\n $contact = Contact::find($this->route('contact'))->first();\n\n return $contact && ($contact->user_id == $this->user()->id);\n }", "title": "" }, { "docid": "af403d13911c8abbe58240701826455b", "score": "0.7673625", "text": "public function authorize()\n {\n /** @var User $user */\n $user = Auth::user();\n if($user === null) {\n return false;\n }\n $this->merge(['user_id' => $user->id]);\n return true;\n }", "title": "" }, { "docid": "716058140c765f694bbfbd045f241ffd", "score": "0.76689607", "text": "public function authorize()\n\t{\n\t\t$org = is_null($this->route('orgs')) ? $this->route('org_subdomain') : $this->route('orgs');\n\t\t$user = Auth::user();\n\n\t\treturn $user->isMasterAdmin() || ( $user->isAdmin() && $user->organizationId == $org->organizationId );\n\t}", "title": "" }, { "docid": "acd39263de7f8581d42809fa4fb0cc78", "score": "0.76465154", "text": "public function authorize()\n {\n $id = $this->route('id');\n $project_environment = ProjectEnvironment::query()->find($id);\n return $project_environment && $project_environment->isUserAuthorized(auth()->user()->id);\n }", "title": "" }, { "docid": "db8b6f4406e8f676b3b3ecbe557c0481", "score": "0.7639592", "text": "public function authorize()\n {\n $user = $this->user();\n\n return $user->isAdmin() || $user->hasKey('post-submissions') || (\n $user->isEntrant() && $user->entry->id == $this->input('entry', null)\n );\n }", "title": "" }, { "docid": "c09da7e098bda54d4da34a6819227518", "score": "0.7635879", "text": "public function authorize()\n {\n $survey = Survey::where(\"id\", $this->route(\"id\"))->firstOrFail();\n return ($survey->user->id === Auth::id() || Auth::user()->checkAdmin());\n }", "title": "" }, { "docid": "a2e42d2ec9cd1063ca56edd8cd7292be", "score": "0.7631456", "text": "public function authorize()\n {\n return ( auth()->check() && ! auth()->user()->finished_profile && auth()->user()->role != 'admin' ) ? true : false;\n }", "title": "" }, { "docid": "66914d5b27e51e2879064d9715438853", "score": "0.7631258", "text": "public function authorize()\n\t{\n\t\treturn true; //anyone can make the request (switch to false to secure and specify users)\n\t}", "title": "" }, { "docid": "d25a3bf1707b506461c91d07904e34da", "score": "0.7630823", "text": "public function authorize()\n {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::user()->can($action['as'], 'edit');\n $own_edit = Auth::user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->states->created_by == Auth::user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "ca1497647954295c6d4d9436233ea908", "score": "0.76186574", "text": "public function authorize()\n {\n if (auth()->user()->id == 2) {\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "46db0b1864bc02cb5f1e50e7206d17bd", "score": "0.7613048", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7611082", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "f552d137956d5a06b6ea120c0ffd6add", "score": "0.76093554", "text": "public function authorize()\n {\n $farm = $this->route('farm');\n\n return $farm && $farm->access === 1;\n }", "title": "" }, { "docid": "67170928c642f3b3733e584c71d8ad72", "score": "0.7604307", "text": "public function authorize()\n {\n return $this->user()['role'] == 'admin' || $this->user()['role'] == 'professor';\n }", "title": "" }, { "docid": "77cc85eebce13fde2466c5b4651336bd", "score": "0.7599847", "text": "public function authorize()\n {\n if ($this->route('slack')) {\n return $this->route('slack')->user_id == Auth::user()->id || Auth::user()->id == 1;\n }\n return true;\n }", "title": "" }, { "docid": "3b323585b3fed12cc3fbf7aaf8d53c66", "score": "0.75991833", "text": "public function authorize()\n {\n $this->user = $this->getUser();\n\n return $this->user && $this->checkFolderOwnership();\n }", "title": "" }, { "docid": "cfb6bd3751c0ccd791cd47f7baf526cb", "score": "0.75967103", "text": "public function authorize()\n {\n return $this->user()->can('view-users');\n }", "title": "" }, { "docid": "96aa1dec1a19e602ee15c8763d0e2cf5", "score": "0.75950336", "text": "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\n }", "title": "" }, { "docid": "44763acad525501079de6dd9f81f5c47", "score": "0.7591126", "text": "public function authorize()\n {\n $updating_user = $this->route('user');\n if (Auth::user()->can('update', $updating_user)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "2454ed01ff29eeabfcd734c7a85ba640", "score": "0.7590216", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7285cb9384ad4fb56ac12ff9f6fee6f9", "score": "0.75894165", "text": "public function authorize()\n {\n $question = $this->route('answer')->question()->first();\n return $question->user()->first()->id === request()->user()->id;\n }", "title": "" }, { "docid": "4c54020c6c60ab51e81a9670d68b022b", "score": "0.758034", "text": "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b9cd57c366a6a09396cefe03ad466a17", "score": "0.75799745", "text": "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "title": "" }, { "docid": "26d91e2c68e8b198e7f5fb3884808f55", "score": "0.7565283", "text": "public function authorize()\n {\n return $this->user()->role === 'admin';\n }", "title": "" }, { "docid": "a25385f9e5f1f9cf23233df8408ea9fa", "score": "0.75652546", "text": "function authorised() {\n switch( $this->type ) {\n case IP:\n return inet_ntop( inet_pton( $_SERVER['REMOTE_ADDR'] ) ) === $this->value;\n\n case ID:\n return array_key_exists( ID, $_REQUEST ) &&\n $_REQUEST[ID] === $this->value;\n\n case DOMAIN:\n return $_SERVER['REMOTE_ADDR'] === gethostbyname( $this->value );\n }\n\n Page::addErr( UNKNOWN_AUTH_MSG . $this->type, HTTP_INTERNAL_SERVER );\n return false;\n }", "title": "" }, { "docid": "313d94e8acea8646cc8150a6ab69f739", "score": "0.75646734", "text": "public function authorize()\n {\n return !user();\n }", "title": "" }, { "docid": "ddf07a2b01ff2619fc5c7deaa69edc81", "score": "0.75604844", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3b5f419fddf5cee35fbacd9123498629", "score": "0.75530267", "text": "public function authorize()\n {\n return $this->user()->direcao || $this->user()->tipo_socio == 'P';\n }", "title": "" }, { "docid": "f52ccaf661c1b2febef1e4cafd75ff2b", "score": "0.75523335", "text": "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') || $this->user->hasPermission('manage_pages') ) ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f1352dae99d6aa06a56e1e2c722ca08a", "score": "0.7544698", "text": "public function authorize() {\n $token = Server::data_get('token');\n\n if (empty($token) || $token != AuthModel::getAccessToken()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "f4dbb6e525d3b664a97c6104aedf95b9", "score": "0.75418955", "text": "public function authorize()\n {\n $task = $this->route('task');\n\n return $task->exists && $task->user_id == $this->user()->id;\n }", "title": "" }, { "docid": "7e0197d0950c593fc3659945c33fe79d", "score": "0.7538843", "text": "public function authorize()\n {\n return $this->user()->role->name === Role::ADMIN;\n }", "title": "" }, { "docid": "5b276d01c340c0e7092d9b11f13e0d8f", "score": "0.7535166", "text": "public function authorize()\n {\n if(!Auth::check()) return false;\n $user = User::find(Auth::user()->id);\n if($user->hasRole('admin') || $user->hasRole('superadmin')) return true;\n return false;\n }", "title": "" }, { "docid": "b1ae796968ef1d83cd65fd804c750672", "score": "0.7526828", "text": "public function authorize()\n {\n return $this->container['auth']->check();\n }", "title": "" }, { "docid": "b1ae796968ef1d83cd65fd804c750672", "score": "0.7526828", "text": "public function authorize()\n {\n return $this->container['auth']->check();\n }", "title": "" }, { "docid": "d97bc1ec030fe917739805ae19688cdc", "score": "0.75268173", "text": "public function authorize() {\n \t$userRoute = $this->route('users');\n if(!is_null($user = \\Auth::user())) {\n return $user->is_admin || $user->id == $userRoute;\n }\n return false;\n }", "title": "" }, { "docid": "6bfd1731ff920472c83db5e90bee1819", "score": "0.7522615", "text": "public function authorize()\n {\n return $this->user()->can('view-permission');\n }", "title": "" }, { "docid": "6f3f226aa89f9f1b6aaeef87644aa5d2", "score": "0.75202364", "text": "public function authorize()\n {\n // return true;\n $user = User::find($this->route('user'));\n\n\n return $user && $this->user()->can('edit user', $user);\n }", "title": "" }, { "docid": "3e8a479a2665438b6d78c7df2a721310", "score": "0.75199217", "text": "public function authorize()\n {\n $order = Order::find($this->route('order_id'));\n return $order && $order->owner_id == Auth::ownerId() && $order->status == 1;\n }", "title": "" }, { "docid": "3594daafa944b6c0730db5d3ea25e5d1", "score": "0.75184494", "text": "public function authorize()\n {\n return $this->user()->is_admin;\n }", "title": "" }, { "docid": "6c41fe82c334141fe28583e9fbabd081", "score": "0.7504009", "text": "public function authorize()\n {\n // By default allow all requests to be authorized.\n return true;\n }", "title": "" }, { "docid": "57be0226d4ca5af776883768a1eb76d3", "score": "0.75003505", "text": "public function authorize()\n {\n // Si no tiene permisos para lo echa.\n if (!auth()->check()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6237b941998ef1907c8773286dade87f", "score": "0.75001657", "text": "public function authorize()\n {\n return !auth()->user();\n }", "title": "" }, { "docid": "ad8b1499e5f4db449742514887a7edf2", "score": "0.74997073", "text": "public function authorize(): bool\n {\n // No authorization needed because the authorization check.\n // Happends on the controller action.\n return true;\n }", "title": "" } ]
00d80e74394acabd9496372c87552775
FFM [ D51 ]
[ { "docid": "8b363fcfa8145e8f69538b4b6991b698", "score": "0.5114495", "text": "public function getTukFFM() { \n\t\treturn $this->KNTSession_ProcentoTuku * $this->KNTSession_Hmotnost / 100;\n\t}", "title": "" } ]
[ { "docid": "f40ed0a05651005073635c1d3337598d", "score": "0.54597044", "text": "function controller_getCfam31() {\n return $GLOBALS['Ffami3']->getCfam31();\n }", "title": "" }, { "docid": "a53283cf3bfc180b423d570055b47cde", "score": "0.5437963", "text": "function controller_ReadDesc_ffami3() {\n return $GLOBALS['Ffami3']->ReadDesc_ffami3();\n }", "title": "" }, { "docid": "395d60d83e00a67357e06bb94548bcf9", "score": "0.53544784", "text": "function Fcec078b5() { }", "title": "" }, { "docid": "820ce5863ceaa7d09b3871b07561653c", "score": "0.529975", "text": "function cv_raw_data($faccode, $cardid)\n{\n $pad_faccode = str_pad(decbin($faccode), 16, \"0\", STR_PAD_LEFT);\n $pad_cardid = str_pad(decbin($cardid), 19, \"0\", STR_PAD_LEFT);\n\n // concat faccode and cardid\n $fc_concat = $pad_faccode . $pad_cardid;\n\n $fc_left = substr($fc_concat, 0, 18);\n $fc_right = substr($fc_concat, -18);\n\n $event_parity = ((strlen(str_replace('0', '', $fc_left)) % 2) == 0) ? '0' : '1';\n $odd_parity = ((strlen(str_replace('0', '', $fc_right)) % 2) == 0) ? '1' : '0';\n $concat_all = $event_parity . $fc_concat . $odd_parity;\n return '5,0,' . base_convert($concat_all, 2, 16);\n}", "title": "" }, { "docid": "855685127b949466894f185455534cc8", "score": "0.51833504", "text": "function controller_getCfam_Ffami3() {\n return $GLOBALS['Ffami3']->getCfam_Ffami3();\n }", "title": "" }, { "docid": "b0df312a0d1ae879824a03a0d27b375f", "score": "0.5043893", "text": "public function parseBlm();", "title": "" }, { "docid": "67bf0d63a348d5e10ac63435bc033589", "score": "0.49457806", "text": "function addwf()\r\n{\r\n $data = GetParams();\r\n $reg = GetF($data);\r\n $f = +RegGet($data, $reg) % 0x100;\r\n $w = +GetW($data) % 0x100;\r\n $d = +GetD($data) % 0x100;\r\n\r\n $result = ($w + $f) % 256;\r\n if ($d == 0)\r\n {\r\n SetW($data, $result);\r\n }\r\n else\r\n {\r\n RegSet($data, $reg, $result);\r\n }\r\n\r\n if ($result === 0)\r\n {\r\n SetStatusZero($data);\r\n }\r\n else\r\n {\r\n ClrStatusZero($data);\r\n }\r\n\r\n if ($w + $f > 0xFF)\r\n {\r\n SetStatusCarry($data);\r\n }\r\n else\r\n {\r\n ClrStatusCarry($data);\r\n }\r\n\r\n if (($w & 0x0F) + ($f & 0x0F) > 0x0F)\r\n {\r\n SetStatusDigitCarry($data);\r\n }\r\n else\r\n {\r\n ClrStatusDigitCarry($data);\r\n }\r\n\r\n SendArray($data);\r\n}", "title": "" }, { "docid": "30fbdd4da9a8d35eb366b1e5fc1038c7", "score": "0.4932096", "text": "function packet_51($Byte)\n\t{\n\t$b1 = u_0bis65535(51,$Byte[0],$Byte[1]);\n\t$b2 = GetValueInteger(LIGHT_BUMP_RIGHT_SIGNAL);\n\tif ( $b1 != $b2 )SetValueInteger(LIGHT_BUMP_RIGHT_SIGNAL,$b1);\n\t}", "title": "" }, { "docid": "66a765e40322682b3dcb7b5ce5da183f", "score": "0.48867032", "text": "function f4()\n\t{\n\t\tstatic $in_f4 = 0;\n\n\t\t$in_f4++;\n\t\treturn $in_f4;\n\t}", "title": "" }, { "docid": "efdac2b0dc75e55140f7bfd7f69b288c", "score": "0.4857013", "text": "public function getMfa()\n {\n return $this->mfa;\n }", "title": "" }, { "docid": "47f12a6a918a4366967e3eb6e317af4b", "score": "0.48373267", "text": "public function getApplicableFFLevel()\n\t{\n\t\treturn $this->applicableFFLevel;\n\t}", "title": "" }, { "docid": "f3dbf2a454cdccfb7ace402e832e1654", "score": "0.4826266", "text": "function mtr2ft($_input=\"0\") {\n\t$_output = round($_input * 3.28084);\n\treturn $_output;\n\tunset($_input,$_output);\n\t}", "title": "" }, { "docid": "9665c9ece2d437c9bcb874fca69dbfd8", "score": "0.4823941", "text": "function writeFF($handle) \r\n{\r\n $b =0xFF;\r\n writeByte($handle, $b);\r\n}", "title": "" }, { "docid": "1a90e4768376169e32b5102832213ec2", "score": "0.4789085", "text": "function controller_getCsfam_Ffami3() {\n return $GLOBALS['Ffami3']->getCsfam_Ffami3();\n }", "title": "" }, { "docid": "f2236465481a71dd7793f0e5764d2e83", "score": "0.47627106", "text": "function fam_next_event($fam)\n{\n}", "title": "" }, { "docid": "cb724df106ce7a973a98c97badbcb92a", "score": "0.4750364", "text": "function packet_50($Byte)\n\t{\n\t$b1 = u_0bis65535(50,$Byte[0],$Byte[1]);\n\t$b2 = GetValueInteger(LIGHT_BUMP_FRONT_RIGHT_SIGNAL);\n\tif ( $b1 != $b2 )SetValueInteger(LIGHT_BUMP_FRONT_RIGHT_SIGNAL,$b1);\n\t}", "title": "" }, { "docid": "bb74009581f7c30f08e57dca2fc7b839", "score": "0.47464502", "text": "public function getFaxDetect()\n {\n return $this->getKey('FaxDetect');\n }", "title": "" }, { "docid": "869fd88bf9a67579e52909f0fb002819", "score": "0.47327098", "text": "public function getListOfFamilyPlanMDNs()\r\n {\r\n return $this->familyLines;\r\n }", "title": "" }, { "docid": "7028533b115433329d81a5755670fee9", "score": "0.47145653", "text": "function packet_45($Byte)\n\t{\n\t$b1 = u_0bis255(45,$Byte[0]);\n\t$b2 = GetValueInteger(LIGHT_BUMPER);\n\tif ( $b1 != $b2 )SetValueInteger(LIGHT_BUMPER,$b1);else return;\n\tif ( ($b1 & 1) != ($b2 & 1))if ( ($b1 & 1) == 1 ) SetValueBoolean(LIGHT_BUMPER_LEFT\t\t\t\t,true); else SetValueBoolean(LIGHT_BUMPER_LEFT\t\t\t,false);\n\tif ( ($b1 & 2) != ($b2 & 2))if ( ($b1 & 2) == 2 ) SetValueBoolean(LIGHT_BUMPER_FRONT_LEFT\t\t,true); else SetValueBoolean(LIGHT_BUMPER_FRONT_LEFT\t,false);\n\tif ( ($b1 & 4) != ($b2 & 4))if ( ($b1 & 4) == 4 ) SetValueBoolean(LIGHT_BUMPER_CENTER_LEFT\t,true); else SetValueBoolean(LIGHT_BUMPER_CENTER_LEFT\t,false);\n\tif ( ($b1 & 8) != ($b2 & 8))if ( ($b1 & 8) == 8 ) SetValueBoolean(LIGHT_BUMPER_CENTER_RIGHT\t,true); else SetValueBoolean(LIGHT_BUMPER_CENTER_RIGHT,false);\n\tif ( ($b1 &16) != ($b2 &16))if ( ($b1 &16) ==16 ) SetValueBoolean(LIGHT_BUMPER_FRONT_RIGHT\t,true); else SetValueBoolean(LIGHT_BUMPER_FRONT_RIGHT\t,false);\n\tif ( ($b1 &32) != ($b2 &32))if ( ($b1 &32) ==32 ) SetValueBoolean(LIGHT_BUMPER_RIGHT\t\t\t,true); else SetValueBoolean(LIGHT_BUMPER_RIGHT\t\t\t,false);\n\t}", "title": "" }, { "docid": "5e3d86cf369ce70068cdd51aa99cb5a2", "score": "0.4702724", "text": "public function GetFax () \r\n\t{\r\n\t\treturn (Contact::GetFax());\r\n\t}", "title": "" }, { "docid": "aa6d099fcb164e27335cc33497c9b93d", "score": "0.46877015", "text": "function getSetupOrFFvalue_fh002 (&$cObj, $code, $codeExt, $defaultCode, $T3FlexForm_array, $fieldName='display_mode', $useFlexforms=1, $sheet='sDEF',$lang='lDEF',$value='vDEF') {\r\n\t\t$rc = '';\r\n\t\tif (empty($code)) {\r\n\t\t\tif ($useFlexforms) {\r\n\t\t\t\t// Converting flexform data into array:\r\n\t\t\t\t$rc = tx_div2007_ff::get($T3FlexForm_array, $fieldName, $sheet, $lang, $value);\r\n\t\t\t} else {\r\n\t\t\t\t$rc = strtoupper(trim($cObj->stdWrap($code, $codeExt)));\r\n\t\t\t}\r\n\t\t\tif (empty($rc)) {\r\n\t\t\t\t$rc = strtoupper($defaultCode);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$rc = $code;\r\n\t\t}\r\n\t\treturn $rc;\r\n\t}", "title": "" }, { "docid": "a603fb910d0bae3adcd103ced7010058", "score": "0.46784768", "text": "function movwf()\n{\n $data = GetParams();\n $reg = GetF($data);\n $w = +GetW($data) % 0x100;\n\n $result = $w;\n RegSet($data, $reg, $result);\n\n SendArray($data);\n}", "title": "" }, { "docid": "7283f9a411f02c08325874aa56a65589", "score": "0.46659106", "text": "function test_by_flash(){\n\t\t$msg=pack(\"NCNNN\",17,1,30000,0,0 );\n\t\t$result=socket_write($this->sock->socket,$msg, strlen($msg) );\n\t\t$buf= socket_read($this->sock->socket,8192);\n\t\treturn bin2hex($buf);\n\t}", "title": "" }, { "docid": "864617bf509ca465f92a8c23c2c46239", "score": "0.46491903", "text": "public function getF1()\n {\n return $this->f1;\n }", "title": "" }, { "docid": "990b0c5c2499656e05926f0ce1119638", "score": "0.46405503", "text": "function BOF() {\n\t\t$this->doc .= pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n\t}", "title": "" }, { "docid": "16f561e1498811e55d6d69bdafb58242", "score": "0.46360567", "text": "public function getBEG03()\n\t{\n\t\treturn parent::getValueOfIndex(3);\n\t}", "title": "" }, { "docid": "9105f7258bf33193ac5bca0c2f615e80", "score": "0.46164635", "text": "function controller_ReadMarquOfFami($req){\n return $GLOBALS['Partsof']->ReadMarquOfFami($req);\n }", "title": "" }, { "docid": "1df8c4030282143f8bd7ddb597401658", "score": "0.46075666", "text": "private function readSharedFmla(): void\n {\n $length = self::getUInt2d($this->data, $this->pos + 2);\n $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);\n\n // move stream pointer to next record\n $this->pos += 4 + $length;\n\n // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything\n $cellRange = substr($recordData, 0, 6);\n $cellRange = $this->readBIFF5CellRangeAddressFixed($cellRange); // note: even BIFF8 uses BIFF5 syntax\n\n // offset: 6, size: 1; not used\n\n // offset: 7, size: 1; number of existing FORMULA records for this shared formula\n $no = ord($recordData[7]);\n\n // offset: 8, size: var; Binary token array of the shared formula\n $formula = substr($recordData, 8);\n\n // at this point we only store the shared formula for later use\n $this->sharedFormulas[$this->baseCell] = $formula;\n }", "title": "" }, { "docid": "c05258c93598e87d459b4b414976fed4", "score": "0.4607551", "text": "public function getFamId()\n {\n return $this->plg_famid;\n }", "title": "" }, { "docid": "09a839e62c35a84a41e5b24f6d68328d", "score": "0.45982566", "text": "function comprobarMedidor($med){\n return 0;\n }", "title": "" }, { "docid": "ccf375e3edd6052b62ebee758d23ca31", "score": "0.4590725", "text": "public function F()\n{\n$ele['type']='Float32Type';\nreturn $ele;\n}", "title": "" }, { "docid": "412b9361e4152279445de089ee7f54c6", "score": "0.4588901", "text": "public function getFtypeInfo() {\n\t\tif($this->ftInst===null)\n\t\t\terr_out(\"FT is null!\");\n\t\t$this->ftInst->populateASM();\n\t}", "title": "" }, { "docid": "d38bbed7c3fd9e100fc2bcaf3ec67f52", "score": "0.45613915", "text": "function packet_55($Byte)\n\t{\n\t$b1 = u_32768bis32767(55,$Byte[0],$Byte[1]);\n\t$b2 = GetValueInteger(RIGHT_MOTOR_CURRENT);\n\tif ( $b1 != $b2 )SetValueInteger(RIGHT_MOTOR_CURRENT,$b1);\n\t}", "title": "" }, { "docid": "d47cb5ac3171847857648220068e1b2d", "score": "0.45518702", "text": "public function getFax() {}", "title": "" }, { "docid": "038fc00af0bcf4fb519c4d0006b493c9", "score": "0.45501176", "text": "protected function parseAfm($afm)\n {\n $data = file_get_contents($afm);\n\n if (stripos($data, 'FontBBox') !== false) {\n $bBox = substr($data, (stripos($data, 'FontBBox') + 8));\n $bBox = substr($bBox, 0, stripos($bBox, \"\\n\"));\n $bBox = trim($bBox);\n $bBoxAry = explode(' ', $bBox);\n $this->properties['bBox'] = new Data([\n 'xMin' => $bBoxAry[0],\n 'yMin' => $bBoxAry[1],\n 'xMax' => $bBoxAry[2],\n 'yMax' => $bBoxAry[3]\n ]);\n }\n\n if (stripos($data, 'ItalicAngle') !== false) {\n $ital = substr($data, (stripos($data, 'ItalicAngle ') + 11));\n $this->properties['italicAngle'] = trim(substr($ital, 0, stripos($ital, \"\\n\")));\n if ($this->properties['italicAngle'] != 0) {\n $this->properties['flags']->isItalic = true;\n }\n }\n\n if (stripos($data, 'IsFixedPitch') !== false) {\n $fixed = substr($data, (stripos($data, 'IsFixedPitch ') + 13));\n $fixed = strtolower(trim(substr($fixed, 0, stripos($fixed, \"\\n\"))));\n if ($fixed == 'true') {\n $this->properties['flags']->isFixedPitch = true;\n }\n }\n\n if (stripos($data, 'CapHeight') !== false) {\n $cap = substr($data, (stripos($data, 'CapHeight ') + 10));\n $this->properties['capHeight'] = trim(substr($cap, 0, stripos($cap, \"\\n\")));\n }\n\n if (stripos($data, 'Ascender') !== false) {\n $asc = substr($data, (stripos($data, 'Ascender ') + 9));\n $this->properties['ascent'] = trim(substr($asc, 0, stripos($asc, \"\\n\")));\n }\n\n if (stripos($data, 'Descender') !== false) {\n $desc = substr($data, (stripos($data, 'Descender ') + 10));\n $this->properties['descent'] = trim(substr($desc, 0, stripos($desc, \"\\n\")));\n }\n\n if (stripos($data, 'StartCharMetrics') !== false) {\n $num = substr($data, (stripos($data, 'StartCharMetrics ') + 17));\n $this->properties['numberOfGlyphs'] = trim(substr($num, 0, stripos($num, \"\\n\")));\n $chars = substr($data, (stripos($data, 'StartCharMetrics ') + 17 + strlen($this->properties['numberOfGlyphs'])));\n $chars = trim(substr($chars, 0, stripos($chars, 'EndCharMetrics')));\n $glyphs = explode(\"\\n\", $chars);\n $widths = [];\n foreach ($glyphs as $glyph) {\n $w = substr($glyph, (stripos($glyph, 'WX ') + 3));\n $w = substr($w, 0, strpos($w, ' ;'));\n $widths[] = $w;\n }\n $this->properties['glyphWidths'] = $widths;\n }\n }", "title": "" }, { "docid": "7bb27e8523222fe956cb3e5c46fe2540", "score": "0.45454338", "text": "function packet_56($Byte)\n\t{\n\t$b1 = u_32768bis32767(56,$Byte[0],$Byte[1]);\n\t$b2 = GetValueInteger(MAIN_BRUSH_MOTOR_CURRENT);\n\tif ( $b1 != $b2 )SetValueInteger(MAIN_BRUSH_MOTOR_CURRENT,$b1);\n\t}", "title": "" }, { "docid": "d3ae6ed5fea462e9563572d5b3c03003", "score": "0.45399603", "text": "abstract public function tell($f);", "title": "" }, { "docid": "4e3f673693b3d869e1a35327c1ba60a7", "score": "0.4532336", "text": "public function getMedicoFisio(){\n return $this->Medico_Fisio;\n }", "title": "" }, { "docid": "83bc359946e99e6d306f7df595e76ecc", "score": "0.4530944", "text": "function controller_getDes3_Ffami3() {\n return $GLOBALS['Ffami3']->getDes3_Ffami3();\n }", "title": "" }, { "docid": "22d18addc9f86759ffbd91f354ae2e5c", "score": "0.45233577", "text": "public static function getFP()\n {\n return parent::getFP();\n }", "title": "" }, { "docid": "601e9900ac3922a25b6595ed7ea0fad8", "score": "0.45041287", "text": "private static function ver50() { }", "title": "" }, { "docid": "d25aaa00cb28491d1af030768283ad8b", "score": "0.44974712", "text": "static function from($fs) {\n if ($fs->Immun_HL7) {\n HL70292::loadIds($fs->Immun_HL7->CVX);\n HL70227::loadIds($fs->Immun_HL7->MVX);\n }\n if ($fs->Immuns) {\n $mes = array();\n foreach ($fs->Immuns as $imm)\n $mes[] = static::fromImmun($imm, $fs->Immun_HL7);\n return $mes;\n } \n }", "title": "" }, { "docid": "b9520ca6fb09674a09dc537fa63e50cc", "score": "0.44970945", "text": "public function cambiaf_a_normal($f_proc){\n\t $anio = substr($f_proc, 0,4);\n\t $mes = substr($f_proc, 5,2);\n\t $dia = substr($f_proc, -2);\n\t $lafecha=$dia.\"/\".$mes.\"/\".$anio; \n\t return $lafecha; \n\t}", "title": "" }, { "docid": "e5a959f1e1fcf62e0b23db3e69174c5f", "score": "0.44778156", "text": "function packet_11($Byte)\n\t{\n\t$b1 = u_0bis1(11,$Byte[0]);\n\t$b2 = GetValueBoolean(CLIFF_FRONT_RIGHT);\n\tif ( $b1 != $b2 )SetValueBoolean(CLIFF_FRONT_RIGHT,$b1);\n\t}", "title": "" }, { "docid": "cc868e5ff9006d71c4b2d41fb909fba4", "score": "0.44643787", "text": "public function getDetune() : float;", "title": "" }, { "docid": "6bf419f626daded0a0ba6a16c9e25009", "score": "0.44591543", "text": "public function get_feu_uid()\n {\n return $this->_feu_uid;\n }", "title": "" }, { "docid": "5cbb6a4f1673d6852a86115353152ae0", "score": "0.44432527", "text": "function packet_46($Byte)\n\t{\n\t$b1 = u_0bis65535(46,$Byte[0],$Byte[1]);\n\t$b2 = GetValueInteger(LIGHT_BUMP_LEFT_SIGNAL);\n\tif ( $b1 != $b2 )SetValueInteger(LIGHT_BUMP_LEFT_SIGNAL,$b1);\n\t}", "title": "" }, { "docid": "ee54e86175b682f4173118a731e035c1", "score": "0.4439158", "text": "public function set_feu_uid($uid)\n {\n $this->_feu_uid = $uid;\n }", "title": "" }, { "docid": "6a3c5bad1a542211f01c5ce1dc1fd3df", "score": "0.4427954", "text": "public function getMfy()\n {\n return $this->hasOne(Mfy::className(), ['id' => 'mfy_id']);\n }", "title": "" }, { "docid": "2d9df888d52d0471d3526bb1dfd88956", "score": "0.44238564", "text": "function setSFValByFF($field_f, $field_s, $assignVal)\n\t{\n\t\t\n\t\t//condition\n\t\tif($field_f > 0)\n\t\t{\n\t\t\t$field_s = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$field_s = $assignVal;\n\t\t}\n\t\t\n\t\t//return second field value\n\t\treturn $field_s;\n\t\t\n\t}", "title": "" }, { "docid": "4b1b7d2754d6dec469de5466c9efa281", "score": "0.44212642", "text": "public function summKomun () {\n $all_flatcost=( $this->floorsnum*1*$this->porchnum*$this->flats['fl4'])+\n ( $this->floorsnum*1*$this->porchnum*$this->flats['fl3'])+\n (( $this->floorsnum*2*$this->porchnum-3)*$this->flats['fl2'])+\n (3*$this->flats['fl1']);\n return $all_flatcost;\n\n}", "title": "" }, { "docid": "7c7b2d1525ec2905e7109c66da97b8fe", "score": "0.44189054", "text": "function plugin_camm_version () {\n return camm_version ();\n }", "title": "" }, { "docid": "df8122c56860fbd1ccbfc4fcf1ca2a01", "score": "0.44062263", "text": "public function showFirmwareVersion()\n {\n $this->connector->write(\"\\x02\\x05\\x56\\x01\\x03\");\n }", "title": "" }, { "docid": "3611db172b0dd1b6b222d57d8efa64a6", "score": "0.44044876", "text": "function readDefRecord(){\n $this->formDB = array();\n $q = myPear_db()->query(\"SELECT *,lm_key AS rf_name FROM jam_rf \".\n\t\t\t \" LEFT JOIN zzz_list_members ON rf_lmid = lm_id \".\n\t\t\t \" LEFT JOIN jam_positions ON rf_posid = pos_id \".\n\t\t\t \" WHERE $this->TABLEID = '$this->ID'\");\n while ($r = myPear_db()->next_record($q)) $this->formDB = $r;\n }", "title": "" }, { "docid": "f3cc41a6f65d30a2e7a4b6fae46b74ff", "score": "0.44003466", "text": "public function getFila()\n\t {\n\t \t return $this->fila;\n\t }", "title": "" }, { "docid": "13c195bb7fae537d6e6d634175b38cba", "score": "0.43967623", "text": "function packet_52($Byte)\n\t{\n\t$b1 = u_0bis255(52,$Byte[0]);\n\t$b2 = GetValueInteger(INFRARED_CHARACTER_LEFT);\n\tif ( $b1 == $b2 ) return;\n\tSetValueInteger(INFRARED_CHARACTER_LEFT,$b1);\n\tlighthouse(INFRARED_CHARACTER_LEFT,$b1);\n\t}", "title": "" }, { "docid": "f911a26041313f7ef3486b6546ac4b66", "score": "0.43965343", "text": "function getMacc(){\n}", "title": "" }, { "docid": "4967cd0779ee5271a55587ee95180cb4", "score": "0.43810672", "text": "function play_balance_cny_dtmf($agi,$balance)\n{\n\n\n $agi->verbose(\"play_balance_cny_dtmf:$balance\");\n\n if ($balance<0)\n {\n $filename = 'balanceless';\n $agi->stream_file($filename, \"#\");\n }\n else\n {\n $res_dtmf = $agi->get_data('vm_youhave', 1, 1);\n $dtmf = $res_dtmf[\"result\"];\n if(trim($dtmf) != '')\n {\n $agi->verbose(\"play_balance_cny_dtmf dtmf:$dtmf\");\n $agi->set_variable(\"CB_IVR_BALANCE_DTMF\", $dtmf);\n return 0;\n }\n\n\n $number = sprintf(\"%0.2f \", $balance);\n\n if (floatval($number) == 0)\n {\n $res_dtmf = $agi->get_data('0', 1, 1);\n $dtmf = $res_dtmf[\"result\"];\n if(trim($dtmf) != '')\n {\n $agi->verbose(\"play_balance_cny_dtmf dtmf:$dtmf\");\n $agi->set_variable(\"CB_IVR_BALANCE_DTMF\", $dtmf);\n return 0;\n }\n\n\n $res_dtmf = $agi->get_data('unit', 1, 1);\n $dtmf = $res_dtmf[\"result\"];\n if(trim($dtmf) != '')\n {\n $agi->verbose(\"play_balance_cny_dtmf dtmf:$dtmf\");\n $agi->set_variable(\"CB_IVR_BALANCE_DTMF\", $dtmf);\n return 0;\n }\n }\n else\n {\n\n\n $balance_array = cny($number);\n $agi->verbose($balance_array);\n for($i = 0; $i < count($balance_array); $i++)\n {\n \t $num = trim( $balance_array[$i]);\n \t $agi->verbose($num);\n \t if ($num != '')\n \t {\n $res_dtmf = $agi->get_data($num,1, 1);\n $dtmf = $res_dtmf[\"result\"];\n if(trim($dtmf) != '')\n {\n $agi->verbose(\"play_balance_cny_dtmf dtmf:$dtmf\");\n $agi->set_variable(\"CB_IVR_BALANCE_DTMF\", $dtmf);\n return 0;\n }\n \t }\n\n\n }\n }\n }\n return 0;\n\n}", "title": "" }, { "docid": "678d4f9eee0c2c6363c170d9ff181557", "score": "0.4379523", "text": "function fdf_get_encoding($fdf_document)\n{\n}", "title": "" }, { "docid": "733470843d1f3580c428329239c093f3", "score": "0.4373485", "text": "function drush_fluginfo_temp(){\n\n}", "title": "" }, { "docid": "9c046792af50fd55d14623da387e54ad", "score": "0.43685195", "text": "public function show(f114 $f114)\n {\n //\n }", "title": "" }, { "docid": "07e35fe877f6825b5ce1a1d6d8e50d47", "score": "0.4351026", "text": "function parse()\n{\nif ($this->compressed_size >= $this->min_compressed_size)\n{\n// Check ID1, ID2, and CM\nif (substr($this->compressed_data, 0, 3) !== \"\\x1F\\x8B\\x08\")\n{\nreturn false;\n}\n\n// Get the FLG (FLaGs)\n$this->flags = ord($this->compressed_data[3]);\n\n// FLG bits above (1 << 4) are reserved\nif ($this->flags > 0x1F)\n{\nreturn false;\n}\n\n// Advance the pointer after the above\n$this->position += 4;\n\n// MTIME\n$mtime = substr($this->compressed_data, $this->position, 4);\n// Reverse the string if we're on a big-endian arch because l is the only signed long and is machine endianness\nif (current(unpack('S', \"\\x00\\x01\")) === 1)\n{\n$mtime = strrev($mtime);\n}\n$this->MTIME = current(unpack('l', $mtime));\n$this->position += 4;\n\n// Get the XFL (eXtra FLags)\n$this->XFL = ord($this->compressed_data[$this->position++]);\n\n// Get the OS (Operating System)\n$this->OS = ord($this->compressed_data[$this->position++]);\n\n// Parse the FEXTRA\nif ($this->flags & 4)\n{\n// Read subfield IDs\n$this->SI1 = $this->compressed_data[$this->position++];\n$this->SI2 = $this->compressed_data[$this->position++];\n\n// SI2 set to zero is reserved for future use\nif ($this->SI2 === \"\\x00\")\n{\nreturn false;\n}\n\n// Get the length of the extra field\n$len = current(unpack('v', substr($this->compressed_data, $this->position, 2)));\n$this->position += 2;\n\n// Check the length of the string is still valid\n$this->min_compressed_size += $len + 4;\nif ($this->compressed_size >= $this->min_compressed_size)\n{\n// Set the extra field to the given data\n$this->extra_field = substr($this->compressed_data, $this->position, $len);\n$this->position += $len;\n}\nelse\n{\nreturn false;\n}\n}\n\n// Parse the FNAME\nif ($this->flags & 8)\n{\n// Get the length of the filename\n$len = strcspn($this->compressed_data, \"\\x00\", $this->position);\n\n// Check the length of the string is still valid\n$this->min_compressed_size += $len + 1;\nif ($this->compressed_size >= $this->min_compressed_size)\n{\n// Set the original filename to the given string\n$this->filename = substr($this->compressed_data, $this->position, $len);\n$this->position += $len + 1;\n}\nelse\n{\nreturn false;\n}\n}\n\n// Parse the FCOMMENT\nif ($this->flags & 16)\n{\n// Get the length of the comment\n$len = strcspn($this->compressed_data, \"\\x00\", $this->position);\n\n// Check the length of the string is still valid\n$this->min_compressed_size += $len + 1;\nif ($this->compressed_size >= $this->min_compressed_size)\n{\n// Set the original comment to the given string\n$this->comment = substr($this->compressed_data, $this->position, $len);\n$this->position += $len + 1;\n}\nelse\n{\nreturn false;\n}\n}\n\n// Parse the FHCRC\nif ($this->flags & 2)\n{\n// Check the length of the string is still valid\n$this->min_compressed_size += $len + 2;\nif ($this->compressed_size >= $this->min_compressed_size)\n{\n// Read the CRC\n$crc = current(unpack('v', substr($this->compressed_data, $this->position, 2)));\n\n// Check the CRC matches\nif ((crc32(substr($this->compressed_data, 0, $this->position)) & 0xFFFF) === $crc)\n{\n$this->position += 2;\n}\nelse\n{\nreturn false;\n}\n}\nelse\n{\nreturn false;\n}\n}\n\n// Decompress the actual data\nif (($this->data = gzinflate(substr($this->compressed_data, $this->position, -8))) === false)\n{\nreturn false;\n}\nelse\n{\n$this->position = $this->compressed_size - 8;\n}\n\n// Check CRC of data\n$crc = current(unpack('V', substr($this->compressed_data, $this->position, 4)));\n$this->position += 4;\n/*if (extension_loaded('hash') && sprintf('%u', current(unpack('V', hash('crc32b', $this->data)))) !== sprintf('%u', $crc))\n{\nreturn false;\n}*/\n\n// Check ISIZE of data\n$isize = current(unpack('V', substr($this->compressed_data, $this->position, 4)));\n$this->position += 4;\nif (sprintf('%u', strlen($this->data) & 0xFFFFFFFF) !== sprintf('%u', $isize))\n{\nreturn false;\n}\n\n// Wow, against all odds, we've actually got a valid gzip string\nreturn true;\n}\nelse\n{\nreturn false;\n}\n}", "title": "" }, { "docid": "32f14ca106fc67c6f9d06724cfe101d4", "score": "0.43491176", "text": "public function q6 ($Band, $IFChannel, $FEid, $DataSetGroup) {\n\t\t$r = $this->qkeys($Band, $IFChannel, $FEid, $DataSetGroup);\n\t\t\n\t\t$b6points = array();\n\t\t$maxvar = -999;\n\t\twhile($row = @mysql_fetch_array($r)) {\n\t\t\t$q6 = \"SELECT MAX(Power_dBm), MIN(Power_dBm) \n\t\t\t\t\tFROM IFSpectrum WHERE fkSubHeader = $row[0] \n\t\t\t\t\tAND Freq_Hz < 6000000000 AND Freq_Hz > 5000000000;\";\n\t\t\t\n\t\t\t$r6 = $this->run_query($q6);\n\t\t\t$b6val = @mysql_result($r6, 0, 0) - @mysql_result($r6, 0, 1);\n\t\t\tif ($b6val != 0) {\n\t\t\t\t$b6points[] = $b6val;\n\t\t\t\tif ($b6val > $maxvar) {\n\t\t\t\t\t$maxvar = $b6val;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fwin = 2 * pow(10, 9);\n\t\t\t$qdata = \"SELECT Power_dBm, Freq_Hz FROM TEMP_TEST_IFSpectrum_PowerVar \n\t\t\t\t\t\tWHERE fkSubHeader = $row[0] \n\t\t\t\t\t\tAND WindowSize_Hz = $fwin \n\t\t\t\t\t\tORDER BY Freq_Hz ASC;\";\n\t\t\t$rdata = $this->run_query($qdata);\n\t\t\twhile ($rowdata = @mysql_fetch_array($rdata)) {\n\t\t\t\t$pval = $rowdata[0];\n\t\t\t\t$fval = $rowdata[1] * pow(10, -9);\n\t\t\t\tif ($fval < 6) {\n\t\t\t\t\t$pval = \"-1\";\n\t\t\t\t}\n\t\t\t\tif ($fval >= 7 && $fval <= 9) {\n\t\t\t\t\tif ($pval > $maxvar) {\n\t\t\t\t\t\t$maxvar = $pval;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\t\t\n\t\treturn array($b6points, $maxvar);\n\t}", "title": "" }, { "docid": "f41e07263e579dae42ee6789612ea2b5", "score": "0.43466488", "text": "function FAPD($file,$k='',$v='',$inc=0){FAP($file,$k,$v,$inc);}", "title": "" }, { "docid": "0a45f1a00e2d94e8ed2095ce98fd2827", "score": "0.43454224", "text": "public function getFPSFees() \n {\n return $this->_fields['FPSFees']['FieldValue'];\n }", "title": "" }, { "docid": "1a8269b4603607126626083822203a7c", "score": "0.4342704", "text": "public function get_cam_rfc4188()\n {\n $oid = \".1.3.6.1.2.1.17.4.3.1.2\";\n if($this->version<3) $table = snmprealwalk($this->host, $this->community, $oid, $this->timeout, $this->retries);\n if($this->version>2) $table = snmp3_real_walk($this->host, $this->sec_name, $this->sec_level, $this->auth_protocol, $this->auth_passphrase, $this->priv_protocol, $this->priv_passphrase, $oid, $this->timeout, $this->retries);\n $cam = array();\n while($value = current($table))\n {\n preg_match('/[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$/', key($table), $macindex);\n $val = str_replace(\"INTEGER:\", \"\", $value);\n $val = trim($val);\n if(array_key_exists($val, $cam))\n {\n array_push($cam[$val], $macindex[0]);\n }\n else\n {\n $cam[$val][0] = $macindex[0];\n }\n next($table);\n }\n return $cam;\n }", "title": "" }, { "docid": "595c9275392546116173ad6b4c46b82e", "score": "0.43414372", "text": "function parse_refl($data,$file) \n{\n\t$header = array(\n\n\t\t\t\t\"Collection Time:\"=>array('datetime','yes'),\n\t\t\t\t\"Operator Name :\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Scan Software Version:\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Parameter List :\"=>array('varchar(255)','no'),\n\t\t\t\t\"Instrument\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Instrument Version\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Start (nm)\"=>array('int(4)','yes'),\n\t\t\t\t\"Stop (nm)\"=>array('int(4)','yes'),\n\t\t\t\t\"X Mode\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Y Mode\"=>array('varchar(5)','yes'),\n\t\t\t\t\"UV-Vis Data Interval (nm)\"=>array('float','yes'),\n\t\t\t\t\"UV-Vis SBW (nm)\"=>array('float','yes'),\n\t\t\t\t\"Slit Height\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Beam Mode\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Signal-to-noise Mode\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Acceptable S/N Ratio\"=>array('float','yes'),\n\t\t\t\t\"S/N Time Out (sec)\"=>array('varchar(255)'),\n\t\t\t\t\"UV Source\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Vis Source\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Third Source\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Source Changeover (nm)\"=>array('float','yes'),\n\t\t\t\t\"Detector Changeover (nm)\"=>array('float','yes'),\n\t\t\t\t\"Grating Changeover (nm)\"=>array('float','yes'),\n\t\t\t\t\"Baseline Correction\"=>array('varchar(25)','yes'),\n\t\t\t\t\"Baseline Type\"=>array('varchar(255)','yes'),\n\t\t\t\t\"Status:\"=>array('varchar(32)','yes')\n\t\t\t);\n\n\t$init = false;\n\t\n\tini_set('auto_detect_line_endings',TRUE);\n\n\t$table_name = 'epi_refl_meas';\n\t\n\t$meas_table_name = 'epi_refl_meas_values';\n\t\n\t$primary_key = 'refl_meas_id';\n\t$object_id = 'wafer_id';\n\t$object_name = 'wafer_name';\n\t\t\n\tif ($init) {\n\n\t\techo \"<br>\";\n\t\techo \"CREATE TABLE IF NOT EXISTS `$table_name` (\n\t\t\t $primary_key INT(11) NOT NULL auto_increment,\n\t\t\t $object_id INT(11) NOT NULL,\n\t\t\t $object_name VARCHAR(255) NOT NULL,\n\t\t\t file_name VARCHAR(255) NULL,\n\t\t\t\t\";\n\t\tforeach ($header as $k=>$v){\n\t\t\n\t\t\tif ($v[1] == 'yes') \n\t\t\t{\n\t\t\t\t $ksave = trim(trim($this->db_safe_name($k),'_'));\n\t\t\t\techo \"<br>`$ksave` \".$v['type'].\" \".$v[0].\" NULL COMMENT '\".addslashes($k).\"', \";\n\t\t\t}\n\t\t}\n\t\techo \"\tPRIMARY KEY (`$primary_key`), \n \t\t\t\tINDEX(`$object_id`,`$object_name`)\n\t\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1\";\t\n\t\n\t\techo \"<br>\";\n\t\t\n\t\techo \"ALTER TABLE `$table_name` ADD CONSTRAINT FOREIGN KEY (`wafer_id`) \n\t\t\t\tREFERENCES epi_wafer(wafer_id) ON DELETE CASCADE\";\n\n\t\techo \"CREATE TABLE IF NOT EXISTS `$meas_table_name` (\n\t\t\t $primary_key INT(11) NOT NULL,\n\t\t\t `wavelength_nm` float NOT NULL,\n\t\t\t `reflectivity` float NOT NULL\n\t\t\t) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;\";\t\n\t\n\t\techo \"ALTER TABLE `$meas_table_name` ADD CONSTRAINT FOREIGN KEY (`$primary_key`) \n\t\t\t\tREFERENCES $table_name($primary_key) ON DELETE CASCADE\";\n\n\t\n\t}\n\t\n\techo \"<br> trying to open $file \";\n\n \t$handle = fopen($file, \"r\");\n\t\n\tif ($handle == NULL ){\n\t\techo \"<br> Could not open file\";\n\t\treturn array('error'=>3,'point'=>'File Read Error');\n\t}\n\t\n\t$data_set = array();\n\twhile(!feof($handle)) \n\t{\n\t\t$string = fgetcsv($handle);\n\t\t\n\t\tif (stristr($string[0],'Wavelength (nm)'))\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\twhile(!feof($handle)) \n\t{\n\t\t$string = fgetcsv($handle);\n\n\t\tif(\n\t\t (!$this->is_float_num($string[1]) && !$this->is_int_num($string[1]))\n\t\t\t|| (!$this->is_float_num($string[0]) && !$this->is_int_num($string[0]))\n\t\t\t)\n\t\t{\n\t\t\tbreak;\n\t\t} else {\n\t\t\t\n\t\t\t$data_set[] = array('wavelength_nm' => $string[0],'reflectivity'=>$string[1]);\n\t\t}\n\t}\n\t\n\t//$header = $this->file_get_header_array($handle,'','Comment',\",\");\n\t\n\t$header_set = array();\n\n\t\n\t$header_set[$object_name] = $data['sample'];\n\t\n\t$header_set[$object_id] = $data['sample_id'];\n\t\n\t$header_set['file_name'] = $file;\n\t\n\t// now special fields:\n\t$tmp = explode('-',$data['extra']);\n\t$header_set['ARC'] = $tmp[0];\n\t$header_set['ARC_vendor'] = $tmp[1];\n\tif (count($tmp) > 2) {\n\t\t$header_set['ARC_design'] = $tmp[2];\n\t\t$header_set['annealed'] = ($tmp[3] == 'Y') ? 1 : 0;\n\t}\n\t\n\twhile(!feof($handle)) \n\t{\n\t\t$string = fgets($handle);\n\t\t\n\t\tforeach ($header as $k=>$v)\n\t\t{\n\t\t\tif (stristr($string,$k) && $v[1] === 'yes')\n\t\t\t{\n\t\t\t\t$ksave = trim(trim($this->db_safe_name($k),'_'));\n\t\t\t\t\n\t\t\t\t$vsave = addslashes(trim(trim(trim(str_replace($k,'',$string)),',')));\n\t\t\t\t\n\t\t\t\tif($v[0] === 'datetime')\n\t\t\t\t{\n\t\t\t\t\t$vsave = $this->parse_datetime($vsave);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$header_set[$ksave] = $vsave;\n\t\t\t\t\n\t\t\t\tunset($header[$k]);\n\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfclose($handle);\n\t\n\t$query = \"INSERT INTO \n\t\t\t\t`$table_name` \n\t\t\t\tSET \";\n\t$q = array();\n\t\n\tforeach ($header_set as $k=>$v)\n\t{\n\t\t$q[] = \"`$k` = '\".$v.\"'\";\n\t}\n\t\n\t$query = $query . implode(\" , \",$q);\n\t\n\t$result = $this->local_insert($query);\n\t\n\tif($result == NULL ) {\n\t\treturn array('error'=>2,'point'=>$query);\n\t}\n\t\n\t$meas_id = $this->last_insert();\n\t\n\tif ($meas_id == NULL){\n\t\treturn array('error'=>2,'point'=>$query);\n\t}\n\t\n\t\n\tforeach ($data_set as $s)\n\t{\n\t\t$query = \"INSERT INTO `$meas_table_name` SET \";\n\t\t$query .= \" `$primary_key` = $meas_id , \";\n\t\t$q = array();\n\t\tforeach ($s as $k=>$v)\n\t\t{\n\t\t\t$q[] = \"`$k` = '\".$v.\"'\";\n\t\t}\n\t\t\n\t\t$query .= implode(\" , \",$q);\n\t\t\n\t\t$result = $this->local_insert($query);\n\t\n\t\tif($result == NULL ) {\n\t\t\treturn array('error'=>2,'point'=>$query);\n\t\t}\n\n\t\t\n\t}\n\t\n\treturn array('error'=>0,'data_id'=>$meas_id);\n\t\n}", "title": "" }, { "docid": "c92d9ac58ac54d3ed54a29246665a52f", "score": "0.43352768", "text": "public function show(Mgbidi2020 $mgbidi20202020)\n {\n //\n\n }", "title": "" }, { "docid": "8b54d701e30709ef4c1076099221bb52", "score": "0.43344027", "text": "function controller_ReadAllSFfami3() {\n return $GLOBALS['Ffami3']->ReadAllSFfami3();\n }", "title": "" }, { "docid": "66ba99cdcad5b6898c63bf1018035031", "score": "0.43277025", "text": "function fxo ($funcion) {\n\t\t\t\t\tglobal $datos;\n\t\t\t\t\tif (count ($datos['nfxo']) <= count($datos['fxo']) ){\n\t\t\t\t\t\t\t\t$s = count ($datos['nfxo']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"No hay suficientes Slots FXO para las lineas\";\n\t\t\t\t\t}\n\t\t\t \t\t$script_voice = \"\";\n\t\t\t\t\tswitch ($funcion){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t//voice-port\n\t\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\t\twhile ($i < $s) {\n\t\t\t\t\t\t\t\t$script_voice .= \"!\\r\nvoice-port \".$datos['fxo'][$i].\"\\r\ntrunk-group FXO\\r\nsupervisory disconnect dualtone mid-call\\r\nsupervisory custom-cptone us-custom\\r\nsupervisory dualtone-detect-params 1\\r\nno battery-reversal\\r\necho-cancel coverage 24\\r\nno vad\\r\ncptone VE\\r\ntimeouts call-disconnect 5\\r\ntimeouts ringing 60\\r\ntimeouts wait-release 5\\r\nconnection plar opx 505\".$datos['nro'].\"99\\r\nimpedance 900c\\r\nstation-id name LINEA-\".($i+1).\"\\r\nstation-id number \".$datos['nfxo'][$i].\"\\r\n!\\r\";\n\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\treturn $script_voice;\n\t\t\t\t}", "title": "" }, { "docid": "b101da37a8def8707c641bda423d50d4", "score": "0.43264937", "text": "static public function F0(array $cube)\n\t{\n\t\t$result = $cube;\n\n\t\t$result[6] = $cube[27];\n\t\t$result[7] = $cube[30];\n\t\t$result[8] = $cube[33];\n\t\t$result[11] = $cube[8];\n\t\t$result[14] = $cube[7];\n\t\t$result[17] = $cube[6];\n\t\t$result[18] = $cube[20];\n\t\t$result[19] = $cube[23];\n\t\t$result[20] = $cube[26];\n\t\t$result[21] = $cube[19];\n\t\t$result[23] = $cube[25];\n\t\t$result[24] = $cube[18];\n\t\t$result[25] = $cube[21];\n\t\t$result[26] = $cube[24];\n\t\t$result[27] = $cube[47];\n\t\t$result[30] = $cube[46];\n\t\t$result[33] = $cube[45];\n\t\t$result[45] = $cube[11];\n\t\t$result[46] = $cube[14];\n\t\t$result[47] = $cube[17];\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d6a78b2ceedf48259f7240cb3de8fcf8", "score": "0.43254265", "text": "private static function ver46() { }", "title": "" }, { "docid": "a83d22e30c3ca8dbb04e50389b74e66d", "score": "0.43225715", "text": "public function getFcm()\n {\n return $this->fcm;\n }", "title": "" }, { "docid": "fd2dd572f4a35e2511c4212c18ae8eaa", "score": "0.43195656", "text": "function checkRule51(){\n // rule':: administrativeAuthorityAwb87~/\\administrativeAuthorityAwb87/\\-I\n // sqlExprSrc fSpec rule':: party1\n $v=DB_doquer('SELECT DISTINCT isect0.`party1`, isect0.`party`\n FROM `administrativeauthorityawb87` AS isect0, `administrativeauthorityawb87` AS isect1\n WHERE (isect0.`party1` = isect1.`party` AND isect0.`party` = isect1.`party1`) AND isect0.`party1` <> isect0.`party` AND isect0.`party1` IS NOT NULL AND isect0.`party` IS NOT NULL');\n if(count($v)) {\n DB_debug('Overtreding (Party '.$v[0][0].',Party '.$v[0][1].')\nreden: \\\"Artificial explanation: administrativeAuthorityAwb87~/\\\\administrativeAuthorityAwb87 |- I\\\"<BR>',3);\n return false;\n }return true;\n }", "title": "" }, { "docid": "f52100e1bf49d6d66a807b7c425431df", "score": "0.4318443", "text": "public function facMathPattern() {\n $gui=new GuidTypeofView();\n return($gui->getProperties());\n }", "title": "" }, { "docid": "724763e8359607611b1a812bffdfd759", "score": "0.4312836", "text": "public function getNumberFeminine()\n {\n return $this->arNumberFeminine;\n }", "title": "" }, { "docid": "b3613854d2e2ee277996a8d45be66867", "score": "0.42959762", "text": "function MW_of_dsDNA($sequence){\r\n\t\t$no_base_pair=strlen($sequence);\r\n\t\treturn ($no_base_pair*660);\r\n}", "title": "" }, { "docid": "1221d9f13f496dbf7a6af93a2f7c67a3", "score": "0.4294403", "text": "function f0() {}", "title": "" }, { "docid": "caacd453f43d3c13b3ea6565b53958cb", "score": "0.42942917", "text": "function xlsBOF()\n\t{\n\techo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n\treturn;\n\t}", "title": "" }, { "docid": "67d4b5148b996550f15b037a8e346552", "score": "0.42938986", "text": "function & getInfModelF($baseURI = null)\r\n\t{\r\n require_once RDFAPI_INCLUDE_DIR . 'infModel/InfModelF.php';\r\n\t\t$mod = new InfModelF($baseURI);\r\n\t\treturn $mod;\r\n\t}", "title": "" }, { "docid": "51882c5cc22d9741f79b68685a537a67", "score": "0.42938226", "text": "function frecuencia($tag, $f){}", "title": "" }, { "docid": "be4ec249bbd706e75a974b7d749673be", "score": "0.42883885", "text": "public function getXFant()\n {\n return $this->xFant;\n }", "title": "" }, { "docid": "3dec8cf8d220a344e70289f36b0ba7bb", "score": "0.42869213", "text": "function callactive() \n { \n\t\tglobal $astman;\n\t\t$foo = $astman->Command(\"core show channels concise\");\n\t\tforeach(explode(\"\\n\", $foo['data']) as $line)\n\t\tif (preg_match(\"/Up/i\", $line) || preg_match(\"/!Dial!/i\", $line)) \n\t\t{\n\t\t\t\t$pieces = explode(\"!\", $line);\n\t\t\t\t$regex = \"~\".preg_quote($pieces[12],\"~\").\"!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!(.*?)!~\";\n\t\t\t\tpreg_match($regex,$foo['data'],$to);\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'Event' => 'Active',\n\t\t\t\t\t\t\t'Channel' => $pieces[0],\n\t\t\t\t\t\t\t'Exten'=> $pieces[2],\n\t\t\t\t\t\t\t'srcChannel' => $pieces[12],\n\t\t\t\t\t\t\t'dstChannel' => $to[12],\n\t\t\t\t\t\t\t'State' => $pieces[4],\n\t\t\t\t\t\t\t'src'=>$pieces[7],\n\t\t\t\t\t\t\t'dst'=> $to[7],\n\t\t\t\t\t\t);\n\t\t\t\t\treturn $data;\n\n\t\t}\n }", "title": "" }, { "docid": "1e83bb87cd4097220f3b991a0aba2efd", "score": "0.42815912", "text": "private function addfcm()\n\t\t{\n\t\t\t $variables=json_decode(file_get_contents(\"php://input\"),true);\n\t\t //echo $variables[\"profile_pic\"];exit();\n\t\t if(!empty($variables)&&count($variables)==4)\n\t\t {\n\t\t\t //cuugvJZM3gY:APA91bEw3LsnUDQzlwe_Ssu68JLScVkRl6x0psKFyh3lZikI2knDe7cDTTqdJ15PsfpZkK9s3huEAjmwshUidmY2mcZ99n-HGKN-uMqsTvdu55liRsSF9zQIwrxdTTtNZzv0J7qJs4Pw\n\t\t\t \n\t\t\t $result=mysqli_query($this->db,\"CALL insert_or_update_users_tokens('\".$variables[\"imei\"].\"','\".$variables[\"fcm_id\"].\"','\".$variables[\"platform\"].\"','\".$variables[\"u_uid\"].\"')\");\n\t\t if($result) // it reflect signle record;\n\t\t {\n\t\t\t\theader('Content-Type: application/json');\n\t\t\t\t$success[\"status\"]=true;\n\t\t\t\t$success[\"message\"]=\"successfully fcm is updated\";\n\t\t\t\t//$success[\"data\"]=\"successfully fcm is updated\";\n\t\t\t\t$this->response($this->json($success), 200);\n\t\t }\n\t\t else\n\t\t {\n\t\t $fail[\"status\"]=false;\n\t\t $fail[\"message\"]=\"no data found operation\";\n\t\t $this->response($this->json($fail),200);\n\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \t$this->dbClose();\n\t\t\t\t$this->response('',404);\n\t\t }\n\n\t\t $this->dbClose();\n\t\t}", "title": "" }, { "docid": "1924f45db3758f3314974be125b8644a", "score": "0.42749742", "text": "function controller_ReadOneFfami3() {\n return $GLOBALS['Ffami3']->ReadOneFfami3();\n }", "title": "" }, { "docid": "8f132a14c5f92e78451d1f9868b150a6", "score": "0.42722628", "text": "function install_foxpro_data_miner() {\n\t\t// do not generate any output here\n \tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"fdm_dbs\";\n\t $sql = \"CREATE TABLE $table_name (\n\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t fdm_database VARCHAR(255) NOT NULL,\n\t\t fdm_column VARCHAR(255) DEFAULT '' NOT NULL,\n\t\t fdm_id mediumint(9) NOT NULL,\n\t\t fdm_data text NOT NULL,\n\t\t fdm_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t UNIQUE KEY id (id)\n\t\t);\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); \n\t\tdbDelta($sql);\n\t}", "title": "" }, { "docid": "3ba208b1f6781b462c7e8041b8f79ee4", "score": "0.4270669", "text": "public function GetFax () \r\n\t{\r\n\t\treturn ($this->Fax);\r\n\t}", "title": "" }, { "docid": "ab1dad322e3d9a6d3c70719bca7eeab2", "score": "0.4263046", "text": "public function getFamilydes()\n {\n return $this->familydes;\n }", "title": "" }, { "docid": "3cdf201e006403beb01d665d74e2099e", "score": "0.4257935", "text": "public function getCodeFamille(): ?string {\n return $this->codeFamille;\n }", "title": "" }, { "docid": "f9aa3ddc39ebfe8ce841eee2bc504aba", "score": "0.4250752", "text": "function xlsBOF()\n {\n echo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n return;\n }", "title": "" }, { "docid": "4cffbb826d0fb74d45ddf230e0c6981f", "score": "0.42488202", "text": "function controller_getCfam_partsof() {\n return $GLOBALS['Partsof']->getCfam_partsof();\n }", "title": "" }, { "docid": "b2f9bfdca84ac7f863e3fad262633f5b", "score": "0.42420635", "text": "function STFC_WRITE_TO_TCPIC ($fce)\n{\n global $rfc_handle, $data_file;\n\n $tbuf = sprintf(\"\\n\\nStart Function %s\", \"STFC_WRITE_TO_TCPIC\");\n TRFC_trace($tbuf);\n\n $tbuf = \"\\n<== RfcGetAttributes rc = \";\n TRFC_trace($tbuf);\n \n $rfc_attributes = saprfc_attributes ($rfc_handle);\n $tbuf = sprintf(\"%d\", 0);\n TRFC_trace($tbuf);\n if ($rfc_attributes == false)\n rfc_error(\"RfcGetAttributes\");\n\n $tbuf = \"\\n\\nAttributes of this RFC connection\";\n $tbuf .= \"\\n---------------------------------\";\n $tbuf .= sprintf (\"\\nDestination : %s\", $rfc_attributes[dest]);\n $tbuf .= sprintf (\"\\nMy Host : %s\", $rfc_attributes[own_host]);\n\n if ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n {\n if ($rfc_attributes[partner_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nServer Program Name : %s\", $rfc_attributes[partner_host]);\n elseif ($rfc_attributes[partner_type] == RFC_SERVER_EXT_REG)\n $tbuf .= sprintf(\"\\nServer Program ID : %s\", $rfc_attributes[partner_host]);\n else\n $tbuf .= sprintf(\"\\nPartner Host : %s\", $rfc_attributes[partner_host]);\n }\n else\n $tbuf.= sprintf(\"\\nPartner Host : %s\", $rfc_attributes[partner_host]);\n\n $tbuf.= sprintf(\"\\nSystem No. : %s\", $rfc_attributes[systnr]);\n $tbuf.= sprintf(\"\\nSystem Name : %s\", $rfc_attributes[sysid]);\n $tbuf.= sprintf(\"\\nClient : %s\", $rfc_attributes[client]);\n $tbuf.= sprintf(\"\\nUser : %s\", $rfc_attributes[user]);\n $tbuf.= sprintf(\"\\nLanguage : %s\", $rfc_attributes[language]);\n $tbuf.= sprintf(\"\\nISO-Language : %s\", $rfc_attributes[ISO_language]);\n\n if ($rfc_attributes[trace] == 'X')\n $tbuf .= sprintf(\"\\nRFC Trace : ON\");\n else\n $tbuf .= sprintf(\"\\nRFC Trace : OFF\");\n\n $tbuf .= sprintf(\"\\nMy Codepage : %s\", $rfc_attributes[own_codepage]);\n $tbuf .= sprintf(\"\\nPartner Codepage : %s\", $rfc_attributes[partner_codepage]);\n\n if ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Client\");\n else if ($rfc_attributes[own_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Server, started by SAP gateway\");\n else\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Server, registered at SAP gateway\");\n\n $tbuf .= sprintf(\"\\nRFC Library Release : %s\", $rfc_attributes[own_rel]);\n\n if ($rfc_attributes[partner_type] == RFC_SERVER_R3)\n $tbuf .= sprintf(\"\\nRFC Partner : SAP R/3\");\n elseif ($rfc_attributes[partner_type] == RFC_SERVER_R2)\n $tbuf .= sprintf(\"\\nRFC Partner : SAP R/2\");\n elseif ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n {\n if ($rfc_attributes[partner_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Server, started by SAP gateway\");\n else\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Server, registered at SAP gateway\");\n }\n else\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Client\");\n\n\n $tbuf .= sprintf(\"\\nPartner System Release : %s\", $rfc_attributes[partner_rel]);\n $tbuf .= sprintf(\"\\nR/3 Kernel Release : %s\", $rfc_attributes[kernel_rel]);\n $tbuf .= sprintf(\"\\nCPI-C Conversation ID : %s\\n\", $rfc_attributes[CPIC_convid]);\n TRFC_trace($tbuf);\n /* Put the name of data file in trace file */\n $tbuf = sprintf(\"\\nDATA FILE: '%s'\", $data_file);\n TRFC_trace($tbuf);\n\n $rc = write_itab_to_file($fce, $data_file, \"TCPICDAT\");\n\n if ($rc)\n {\n return (\"CANNOT_WRITE_DATA\");\n }\n return true;\n\n}", "title": "" }, { "docid": "3e0a8c36ac1d19ee35e6c0985edd153c", "score": "0.42415377", "text": "function loadNvMMconfigOF10(&$nvmmFvURL,&$nvmmFvAuth) {\n\t//Effects ========> Load values from config file into variables passed as parameters\n\n\t$xml = simplexml_load_file('ofmat.conf');\n\t\n //checking NvMM\n if (isset($xml->NvMM->FVurl) == FALSE)\n return \"URL for NvMM in 'ofmat.conf' not found.\";\n elseif (filter_var($xml->NvMM->FVurl, FILTER_VALIDATE_URL) === FALSE)\n return \"Invalid URL for NvMM in 'ofmat.conf'.\";\n elseif (isset($xml->NvMM->FVuser) == FALSE)\n return \"User for NvMM in 'ofmat.conf' not found.\";\n elseif (strlen(trim((string)$xml->NvMM->FVuser)) < 1)\n return \"User for NvMM in 'ofmat.conf' can not be empty.\";\n elseif (isset($xml->NvMM->FVpassword) == FALSE)\n return \"Password for NvMM in 'ofmat.conf' not found.\";\n\n //all requirements already checked\n $nvmmFvURL = trim((string)$xml->NvMM->FVurl);\n $nvmmFvAuth = trim((string)$xml->NvMM->FVuser).':'.((string)$xml->NvMM->FVpassword);\n return \"OK\";\n}", "title": "" }, { "docid": "2fbb317e4cf8e66391bddbabacbced43", "score": "0.42395183", "text": "function writeOrderDebug( $match, $MH_Drug_ID, $MH_ID, $MH_Pre_Or_Post, $MH_Description, $MH_Flow_Rate, $MH_Admin_Day, $MH_Infusion_Time, $MH_Sequence_Number, $MH_Fluid_Vol, $MH_Admin_Time )\n {\n }", "title": "" }, { "docid": "85b013bac86ae59fef81e659d0b7a980", "score": "0.42332315", "text": "public function getOkmessFqf() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(8, $this->_result)) return (string) $this->_result[8];\n\t\t\telse parent::throwGetColException('Not set FormsQfieldsModel::getOkmessFqf', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From FormsQfieldsModel::getOkmessFqf', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "1a919af575e357984f8395ff551fdcb3", "score": "0.42310226", "text": "function wb_get_function_address($fname, $idlib) {}", "title": "" }, { "docid": "e957790bc5846e0559a50921687f5cd0", "score": "0.42309433", "text": "public function getFurosemida_mg()\r\n\t{\r\n\t\treturn($this->furosemida_mg);\r\n\t}", "title": "" }, { "docid": "f6b81c42e09747e331ae9cecf3ec1eb1", "score": "0.4226128", "text": "public function synpred6_t033backtracking_fragment() {\n // runtime/Php/test/Antlr/Tests/grammers/t033backtracking.g\n // runtime/Php/test/Antlr/Tests/grammers/t033backtracking.g\n {\n $this->pushFollow(self::$FOLLOW_declaration_specifiers_in_synpred6_t033backtracking166);\n $this->declaration_specifiers();\n\n $this->state->_fsp--;\n if ($this->state->failed) return ;\n\n }\n }", "title": "" }, { "docid": "bcd608198f8b688d2e01cd154cd84c26", "score": "0.42241272", "text": "public function getFrontEndControlDLL_ini() {\r\n $band = $this->Band;\r\n $sn = ltrim($this->SN, '0');\r\n $esn = $this->ESN1;\r\n\r\n $output = \"\";\r\n\r\n $output .= \"[~ColdCart$band-$sn]\\r\\n\";\r\n $description = \"Band $band SN$sn\";\r\n $output .= \"Description=$description\\r\\n\";\r\n $output .= \"Band=$band\\r\\n\";\r\n $output .= \"SN=$sn\\r\\n\";\r\n $output .= \"ESN=$esn\\r\\n\";\r\n\r\n $mstring = \"\";\r\n\r\n switch ($band) {\r\n case 1:\r\n case 2:\r\n case 3:\r\n $output .= \"MagnetParams=0\\r\\n\";\r\n break;\r\n case 4:\r\n $output .= \"MagnetParams=0\\r\\n\";\r\n break;\r\n case 6:\r\n $output .= \"MagnetParams=1\\r\\n\";\r\n $mstring = \"MagnetParam01=\" . number_format($this->MixerParams[0]->lo, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[0]->imag01, 2) . \",\";\r\n $mstring .= \"0.00,\";\r\n $mstring .= number_format($this->MixerParams[0]->imag11, 2) . \",\";\r\n $mstring .= \"0.00\\r\\n\";\r\n break;\r\n default:\r\n //Get number of magnet params\r\n $im01 = 'x';\r\n $im02 = 'x';\r\n $im11 = 'x';\r\n $im12 = 'x';\r\n $numMags = 0;\r\n for ($ic = 0; $ic < count($this->MixerParams); $ic++) {\r\n if (($this->MixerParams[$ic]->imag01 != $im01)\r\n || ($this->MixerParams[$ic]->imag02 != $im02)\r\n || ($this->MixerParams[$ic]->imag11 != $im11)\r\n || ($this->MixerParams[$ic]->imag12 != $im12)\r\n ) {\r\n $im01 = $this->MixerParams[$ic]->imag01;\r\n $im02 = $this->MixerParams[$ic]->imag02;\r\n $im11 = $this->MixerParams[$ic]->imag11;\r\n $im12 = $this->MixerParams[$ic]->imag12;\r\n $numMags += 2;\r\n }\r\n }\r\n\r\n $output .= \"MagnetParams=$numMags\\r\\n\";\r\n $im01 = 'x';\r\n $im02 = 'x';\r\n $im11 = 'x';\r\n $im12 = 'x';\r\n $magcount = 1;\r\n $mstring = '';\r\n for ($ic = 0; $ic < count($this->MixerParams); $ic++) {\r\n $imLO = $this->MixerParams[$ic]->lo;\r\n $magcountStr = \"MagnetParam0\" . $magcount;\r\n if ($magcount > 9) {\r\n $magcountStr = \"MagnetParam\" . $magcount;\r\n }\r\n\r\n //Check to see if this set of Imag values is unique\r\n if (($this->MixerParams[$ic]->imag01 != $im01)\r\n || ($this->MixerParams[$ic]->imag02 != $im02)\r\n || ($this->MixerParams[$ic]->imag11 != $im11)\r\n || ($this->MixerParams[$ic]->imag12 != $im12)\r\n ) {\r\n if ($ic > 0) {\r\n $mstring .= \"$magcountStr=\" . number_format($this->MixerParams[$ic - 1]->lo, 3) . \",\";\r\n $mstring .= number_format($im01, 2) . \",\";\r\n $mstring .= number_format($im02, 2) . \",\";\r\n $mstring .= number_format($im11, 2) . \",\";\r\n $mstring .= number_format($im12, 2) . \"\\r\\n\";\r\n $magcount += 1;\r\n $magcountStr = \"MagnetParam0\" . $magcount;\r\n if ($magcount > 9) {\r\n $magcountStr = \"MagnetParam\" . $magcount;\r\n }\r\n }\r\n $im01 = $this->MixerParams[$ic]->imag01;\r\n $im02 = $this->MixerParams[$ic]->imag02;\r\n $im11 = $this->MixerParams[$ic]->imag11;\r\n $im12 = $this->MixerParams[$ic]->imag12;\r\n\r\n $mstring .= \"$magcountStr=\" . number_format($this->MixerParams[$ic]->lo, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag01, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag02, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag11, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag12, 2) . \"\\r\\n\";\r\n $magcount += 1;\r\n }\r\n //Put the last string in\r\n if ($ic >= count($this->MixerParams) - 1) {\r\n $mstring .= \"$magcountStr=\" . number_format($this->MixerParams[$ic]->lo, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag01, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag02, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag11, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$ic]->imag12, 2) . \"\\r\\n\";\r\n }\r\n }\r\n }\r\n\r\n $output .= $mstring;\r\n\r\n if (!$this->MixerParams) {\r\n $output .= \"MixerParams=0\\r\\n\";\r\n } else {\r\n $output .= \"MixerParams=\" . (count($this->MixerParams)) . \"\\r\\n\";\r\n \r\n for ($i = 0; $i < (count($this->MixerParams)); $i++) {\r\n if ($i < 9) {\r\n $mstring = \"MixerParam0\" . ($i + 1) . \"=\";\r\n }\r\n if ($i >= 9) {\r\n $mstring = \"MixerParam\" . ($i + 1) . \"=\";\r\n }\r\n $mstring .= number_format($this->MixerParams[$i]->lo, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->vj01, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->vj02, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->vj11, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->vj12, 3) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->ij01, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->ij02, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->ij11, 2) . \",\";\r\n $mstring .= number_format($this->MixerParams[$i]->ij12, 2) . \"\\r\\n\";\r\n $output .= $mstring;\r\n }\r\n }\r\n\r\n $numpa = 4;\r\n if ($this->Band == 9) {\r\n $numpa = 2;\r\n }\r\n $ij_precision = 2;\r\n if ($this->Band == 3) {\r\n $ij_precision = 3;\r\n }\r\n\r\n $output .= \"PreampParams=\" . (count($this->PreampParams)) . \"\\r\\n\";\r\n\r\n for ($i = 0; $i < (count($this->PreampParams)); $i++) {\r\n if ($i < 9) {\r\n $mstring = \"PreampParam0\" . ($i + 1) . \"=\";\r\n }\r\n if ($i >= 9) {\r\n $mstring = \"PreampParam\" . ($i + 1) . \"=\";\r\n }\r\n $mstring .= number_format($this->PreampParams[$i]->FreqLO, 3) . \",\";\r\n $mstring .= $this->PreampParams[$i]->Pol . \",\";\r\n $mstring .= $this->PreampParams[$i]->SB . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VD1, 2) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VD2, 2) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VD3, 2) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->ID1, $ij_precision) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->ID2, $ij_precision) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->ID3, $ij_precision) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VG1, 2) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VG2, 2) . \",\";\r\n $mstring .= number_format($this->PreampParams[$i]->VG3, 2) . \"\\r\\n\";\r\n $output .= $mstring;\r\n }\r\n $output .= \"\\r\\n\";\r\n return $output;\r\n }", "title": "" }, { "docid": "1473d564e5a671a5f7831c74603170ae", "score": "0.42237726", "text": "function fm_blank()\n{\n \n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "54e6ae373eedff5ec94c1e3e974aed0f", "score": "0.0", "text": "public function sendFeedbackToDevelopmentTeam($id)\n { \n $data = $this->feedback->sendFeedbackToDevelopmentTeam($id);\n return redirect()->route('getFeedbacks')->with('sendFeedbackToDevelopmentTeamSuccess', $data);\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "5412f0b9b053fcd0929c40d71994403a", "score": "0.69773793", "text": "public function index()\n {\n try {\n $resources = Resource::all();\n return $this->showAll($resources);\n } catch (Exception $ex) {\n return $this->errorResponse(\"Danh sách trống!\", Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "cbc2f6f0039706d1ede6b809aad8c23e", "score": "0.6894162", "text": "public function index()\n\t{\n\t\t//\n\t\t$this->getlist();\n\t\n\t}", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "efde97fbf9254ea0e2b2b7023e05101a", "score": "0.68546814", "text": "public function indexAction()\n {\n\t\tif(!Engine_Api::_()->core()->hasSubject('list_listing')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET LISTING SUBJECT\n\t\t$subject = Engine_Api::_()->core()->getSubject();\n\n\t\t//GET VARIOUS WIDGET SETTINGS\n\t\t$this->view->statisticsRating = (int) Engine_Api::_()->getApi('settings', 'core')->getSetting('list.rating', 1);\n\t\t$this->view->truncation = $this->_getParam('truncation', 23);\n\t\t$related = $this->_getParam('related', 'categories');\n\n\t\t$params = array();\n\n\t\tIf($related == 'tags') {\n\n\t\t\t//GET TAGS\n\t\t\t$listingTags = $subject->tags()->getTagMaps();\n\n\t\t\t$params['tags'] = array();\n\t\t\tforeach ($listingTags as $tag) {\n\t\t\t\t$params['tags'][] = $tag->getTag()->tag_id;\n\t\t\t}\n\n\t\t\tif(empty($params['tags'])) {\n\t\t\t\treturn $this->setNoRender();\n\t\t\t}\n\n\t\t}\n\t\telseif($related == 'categories') {\n\t\t\t$params['category_id'] = $subject->category_id;\n\t\t}\n\t\telse {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n //FETCH LISTINGS\n\t\t$params['listing_id'] = $subject->listing_id;\n $params['orderby'] ='RAND()';\n $params['limit'] = $this->_getParam('itemCount', 3);\n $this->view->paginator = Engine_Api::_()->getDbtable('listings', 'list')->widgetListingsData($params);\n\n if (Count($this->view->paginator) <= 0) {\n return $this->setNoRender();\n }\n }", "title": "" }, { "docid": "248744b37e08a9b9e31438a427fee7ee", "score": "0.68331116", "text": "public function index()\n {\n $module = Module::get('Resources');\n \n if(Module::hasAccess($module->id)) {\n return View('la.resources.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => Module::getListingColumns('Resources'),\n 'module' => $module\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "954a21a94c60b4569f28c882641e7298", "score": "0.68295634", "text": "public function index()\n {\n return view('admin.resources.index', [\n 'resources' => Resource::published()->get()\n ]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "b27b06ba87e23efaf02018ba6a48d4b4", "score": "0.68071634", "text": "public function index()\n {\n /// Get cars\n $cars = Car::paginate();\n\n // Return collection of articles as a resource\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "ecd287988f4b7da6fd1ee3a4ce0dbbb4", "score": "0.6772568", "text": "public function index()\n {\n $tickets = TicketsModel::paginate(10);\n\n //passing data to resource\n return TicketsResource::collection($tickets);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "465ee43697fce30b312a8f52108bb059", "score": "0.6708992", "text": "public function listAction ( )\n {\n $model = $this->getModel('Scale');\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "5370c2b221a0c31116fb4369ab9f4812", "score": "0.66993403", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new ProfileRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page');\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['profile/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "cd9c5c4bfebd4034e9aab606b543d95a", "score": "0.66892284", "text": "public function index()\n {\n $todos = Todo::paginate(50);\n return TodosResource::collection($todos);\n }", "title": "" }, { "docid": "5509d28122c561e86197cbcc735e8008", "score": "0.6688171", "text": "public function index()\n {\n $products = Product::filter()->paginate();\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "712af5c8b3ebcbb93ccacf71c37b0d64", "score": "0.66876715", "text": "public function index()\n {\n return ResourceResource::collection(auth()->user()->resources);\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "4749d27d60b7528b95f66725757fb6f5", "score": "0.66763073", "text": "public function listAction()\n {\n $tags = $this->getTags();\n $this->view->assign('tags', $tags);\n }", "title": "" }, { "docid": "148383f68d3328f7ff820d3aa26f22ff", "score": "0.6669373", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$this->_view->itemsStatusCount \t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$status \t\t\t\t\t\t\t= $this->_arrParam['status'] ?? 'all';\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[$status], $this->_pagination);\n\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->slbCategory \t\t\t\t= [0 => ' - Select Category - '] + $this->_model->itemInSelectbox($this->_arrParam, null);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "0e3a54a39646333a6d375a7c945db124", "score": "0.6655571", "text": "public function listAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $films = $em->getRepository(Film::class)\n ->findAll();\n return $this->render('admin/listFilm.html.twig', [\n 'films' => $films,\n 'user' => $user\n ]);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "2564823d78cf46605ebc641dd521408d", "score": "0.6619503", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStage:list.html.twig');\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "ffa4ab9d8165639a117e4bc3980fc30d", "score": "0.6590207", "text": "public function index()\n {\n //\n // $authors= Author::all();\n $authors = QueryBuilder::for(Author::class)->allowedSorts([\n 'name',\n 'created_at'\n ])->jsonPaginate();\n return AuthorsResource::collection($authors);\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "74d4617df84723cff26f33e255390482", "score": "0.65881836", "text": "public function actionIndex()\n {\n $items = ModelGeneral::showItems();\n\n $this->view->render('index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "0221833762d40c420a048045edcecf8f", "score": "0.6586874", "text": "public function actionList()\n {\n $searchModel = new RecipeRepository();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render([\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "fb55b34f40f8931a10a91283716c2912", "score": "0.6586714", "text": "public function index()\n {\n return ListItem::all();\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.6585575", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "7056dcfc0479ee6a004c692cbdce673b", "score": "0.65567315", "text": "public function index()\n {\n $operations = $this->Operations->getAllOperations();\n $this->set(compact('operations'));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "8ffe23111661c679bede8757d6ebad59", "score": "0.65496445", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->role_model->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "901678e4ca1d10119628a2768429725f", "score": "0.65128183", "text": "public function index()\n {\n return AlbumResource::collection(\\App\\Album::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "ff30a4ae8d49f1706d1dbd328394a294", "score": "0.6493153", "text": "public function index()\n {\n $brands = Brand::query()->paginate();\n return BrandResource::collection($brands);\n }", "title": "" }, { "docid": "629569270186c168f2f698db8154b51a", "score": "0.6487244", "text": "public function index()\n {\n $articles = Article::query()->latest()->paginate(10);\n\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "25aaedcb3f8fbe36cdc02986a86cf453", "score": "0.64846873", "text": "public function index()\n {\n // Get Specifications\n $specifications = Specification::orderBy('created_at', 'desc')->paginate(100);\n\n // Return collection of Specifications as a resource\n return SpecificationResource::collection($specifications);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" } ]
b96ef22af9667626c553e8a069a03cf7
/ Test function has unique function name Cases no previous version this version is less than another version this version is greater than another version this version is equal to another version
[ { "docid": "c7177cda4263b4f0d35f817eb6138c80", "score": "0.50022155", "text": "function tw_test_include_2_1() {\n\t$this_version = 2.1;\n\n\t// option key\n\t$last_version = (float) get_option( 'templatewrangler_version',\n\t\tFALSE );\n\t$function_loaded = ( function_exists( 'theme' ) );\n\t$load_this_version = FALSE;\n\n\tif ( ! $last_version || ( $this_version > $last_version ) ) {\n\t\t// - no previous version\n\t\t// or\n\t\t// - this version is greater than another version\n\t\t// make ours the new option\n\t\tupdate_option( 'templatewrangler_version', $this_version );\n\n\t\t// if function hasn't loaded, use this version\n\t\tif ( ! $function_loaded ) {\n\t\t\t$load_this_version = TRUE;\n\t\t}\n\t\t// else do nothing, function is already loaded\n\t} else if ( $this_version == $last_version ) {\n\t\t// - this version is equal to another version\n\t\t// go ahead and load the first one that hits\n\t\tif ( ! $function_loaded ) {\n\t\t\t$load_this_version = TRUE;\n\t\t}\n\t}\n\t//else if ($this_version < $last_version){\n\t// - this version is less than another version\n\t// do nothing\n\t//}\n\n\t// else, this version is old and $load_this_version remains false\n\treturn $load_this_version;\n}", "title": "" } ]
[ { "docid": "a8136254f5a6c1a7692381973a6bb7bc", "score": "0.6302447", "text": "function test11() {\n\n}", "title": "" }, { "docid": "49a225e5383603e04fb68cbbd6d84012", "score": "0.62115115", "text": "function test12() {\n\n}", "title": "" }, { "docid": "a80c3f0ae9a82659b0e0f0656395db0f", "score": "0.6120577", "text": "function checkStudentFuncName($studentanswer, $actualname)\n{\n echo \"Function names in checkStudentFuncName: <br>\";\n echo \"================================================\";\n echo \"<br> studentanswer: <br>\";\n echo $studentanswer;\n echo \"<br> actualname: <br>\";\n echo $actualname;\n echo '<br><br>';\n $x = strpos($studentanswer, \"(\");\n $y = substr($studentanswer, 0, $x);\n // echo $y;\n // echo '<br><br>';\n #if the student's function name does not equal the actual function name, return true\n if($y !== (\"def \" . $actualname))\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "title": "" }, { "docid": "131d9759cdfb2df91dd15c2adcb0a0a0", "score": "0.6064856", "text": "function test13() {\n\n}", "title": "" }, { "docid": "fd90c5f40297a4287d6eaf2151af7de5", "score": "0.6060831", "text": "function test9() {\n\n}", "title": "" }, { "docid": "38108b667a20aec134406647c8f9dc5d", "score": "0.60238165", "text": "public function testBugGH153()\n {\n $dataSource = self::$fixtures . self::GH153;\n $analysers = array('compatibility');\n $metrics = self::$api->run($dataSource, $analysers);\n $functions = $metrics[self::$analyserId]['functions'];\n\n $this->assertEquals(\n array(\n 'ext.name' => 'standard',\n 'ext.min' => '5.0.0',\n 'ext.max' => '',\n 'ext.all' => '',\n 'php.min' => '5.0.0',\n 'php.max' => '',\n 'php.all' => '5.0.0',\n 'parameters' => array('4.0.0', '5.0.0'),\n 'php.excludes' => '',\n 'deprecated' => '',\n 'arg.max' => 2,\n 'matches' => 3,\n ),\n $functions['md5']\n );\n }", "title": "" }, { "docid": "22e169e656d3f303b977ca6971971f7d", "score": "0.5971324", "text": "function isolated_test_two_canary_function()\n{\n return 'Sum';\n}", "title": "" }, { "docid": "fccf26a338707a3070432ef189451df3", "score": "0.59245235", "text": "function test10() {\n\n}", "title": "" }, { "docid": "e81d7c69b80be35d7bc9638f8a0c3c32", "score": "0.5829793", "text": "private function versionName() {\n\t\treturn 'Test Version ' . rand( 1, 1000000 );\n\t}", "title": "" }, { "docid": "f1c8d567201684270db945179c77f46d", "score": "0.5809549", "text": "function test8() {\n\n}", "title": "" }, { "docid": "1b55f449f24ded6bd72936fcf8c068d7", "score": "0.5785787", "text": "function __test()\n{\n //Upgrade::run('5902400102', '378400000034031082', 'Plus');\n\n return;\n}", "title": "" }, { "docid": "a570d441e571e30643cb43794f29cb40", "score": "0.577904", "text": "function test_function()\n{\n\n}", "title": "" }, { "docid": "d96347e1b347ca1d1515d7ac9847826f", "score": "0.5753334", "text": "function testFunction() {\n return 'TEST ME I am Function';\n}", "title": "" }, { "docid": "7fa83141b0ce2fac04706d8c7a775255", "score": "0.57251424", "text": "public function getFunctionName();", "title": "" }, { "docid": "c4a168215bb6810f538fee2122db5190", "score": "0.5647964", "text": "function rpmvercmp(string $evr1, string $evr2)\n{\n}", "title": "" }, { "docid": "0d6a930c702c51726f3e029c4228b3aa", "score": "0.56349546", "text": "public function testLogic () {\n $this->assertTrue(\n \\CodeCounter\\VersionMatcher::test('ver > 1.0 && ver < 2.0', array('ver' => '1.5.0'))\n );\n\n // 1.0 < 1.5.0 < 2.0\n $this->assertFalse(\n \\CodeCounter\\VersionMatcher::test('ver < 1.0 || ver > 2.0', array('ver' => '1.5.0'))\n );\n }", "title": "" }, { "docid": "fac63552c72d5001cc83ec9565165e12", "score": "0.56320935", "text": "public function getHookFun():string\n {\n $functions = [\n 'getValByTagName' => [\n 'getValByTagName(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n 'tagName' => 'tag name',\n ],\n 'description' => 'xmlStr + tagName -> tag value'\n ],\n 'getAttrValByTagName' => [\n 'getAttrValByTagName(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n 'tagName' => 'tag name',\n 'attr' => 'tag attribute',\n ],\n 'description' => 'xmlStr + tagName + attr -> tag attribute value'\n ],\n 'getValByTagNameAtt' => [\n 'getValByTagNameAtt(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n 'tagName' => 'tag name',\n 'attr' => 'tag attribute name',\n 'attrVal' => 'tag attribute value',\n ],\n 'description' => 'xmlStr + tagName + attr + attrVal -> tag value'\n ],\n 'getAttrValByAttr' => [\n 'getAttrValByAttr(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n 'tagName' => 'tag name',\n 'attr' => 'tag attribute name',\n 'attrVal' => 'tag attribute value',\n 'searchAttr' => 'tag attribute name searched',\n ],\n 'description' => 'xmlStr + tagName + attr + attrVal + searchAttr -> tag attribute value searched'\n ],\n 'getRootTag' => [\n 'getRootTag(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n ],\n 'description' => 'xmlStr -> root tag name'\n ],\n 'levelSearch' => [\n 'levelSearch(array $param)' => 'function name',\n '$param' => [\n 'xmlStr' => 'xml string',\n 'tagName' => 'tag name',\n 'attr' => 'tag attribute name',\n 'attrVal' => 'tag attribute value',\n 'level' => 'tag level(root tag level is 1)'\n ],\n 'description' => 'xmlStr + tagName + attr + attrVal + level -> tag value',\n ],\n ];\n return json_encode($functions,JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "4607ed89dec33c2fa8c6a327481b5cf4", "score": "0.5606902", "text": "function _test_filter_build_unique_id($tag, $function, $priority)\n{\n if (is_string($function)) {\n return $function;\n }\n\n if (is_object($function)) {\n // Closures are currently implemented as objects.\n $function = [$function, ''];\n } else {\n $function = (array) $function;\n }\n\n if (is_object($function[0])) {\n // Object class calling.\n return spl_object_hash($function[0]) . $function[1];\n } elseif (is_string($function[0])) {\n // Static calling.\n return $function[0] . '::' . $function[1];\n }\n}", "title": "" }, { "docid": "d6a78b2ceedf48259f7240cb3de8fcf8", "score": "0.56053686", "text": "private static function ver46() { }", "title": "" }, { "docid": "5ae6d64ee978aa2cc0f365dd2928858a", "score": "0.5601374", "text": "public function testFunctionChans()\n {\n\n $function = 'Chans';\n\n $sumNumber = [\"1\", \"2\", \"3\", \"4\", \"5\"];\n $exp = 15;\n $this->assertFunctionEquals($sumNumber, $function, $exp);\n\n $sumNumber = [\"6\", \"6\", \"6\", \"6\", \"6\"];\n $exp = 30;\n $this->assertFunctionEquals($sumNumber, $function, $exp);\n }", "title": "" }, { "docid": "c0bae64f4ab728175712f0bf569d850a", "score": "0.54231524", "text": "public static function are_the_test_functions_working_correctly(){\n $function1 = self::is_actually_valid_ssn('640823-3234', true); //Ska lyckas\n $function2 = self::is_correct_long_lat(\"Rörbecksgatan, 14\", \"Falkenberg\", 56.90558, 12.48476); //Ska lyckas\n $function3 = self::is_cache_busted(\"1.0\"); //Ska lyckas\n if(($function1 && $function2 && $function3 === true)){\n echo '<p><span style=\"color: green;\">Alla test genomfördes korrekt!</span></p>';\n }\n else{\n echo '<p><span style=\"color: red;\">Något av testen misslyckades!</span></p>';\n }\n }", "title": "" }, { "docid": "61057f4a9d0d005fc33064db7751eab1", "score": "0.54117715", "text": "public function testVersionCheckHash()\n {\n $hash = '';\n\n $db_version = get_option( 'db_version' );\n\n if (defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE ) {\n $version = $db_version;\n if (defined( 'WP_TESTS_BLOGS' )) {\n $version .= WP_TESTS_BLOGS;\n }\n if ( defined( 'WP_TESTS_SUBDOMAIN_INSTALL' ) ) {\n $version .= WP_TESTS_SUBDOMAIN_INSTALL;\n }\n if ( defined( 'WP_TESTS_DOMAIN' ) ) {\n $version .= WP_TESTS_DOMAIN;\n }\n\n } else {\n $version = $db_version;\n }\n\n return sha1($version);\n }", "title": "" }, { "docid": "875b2a78c0450511f25bdee14c6c528a", "score": "0.5407168", "text": "function has_function ($res,$function) {\n\t\t$function = strtoupper($function);\n\t\tif (preg_match(\"/$function\\\\(([\\\\w\\\\W]*)\\\\)/\",$res,$tmp0)==0)\n\t\t\treturn false;\n\t\t//return($tmp0);\n\t\t\n\t\t$tmp1 = $tmp0[1];\n\t\t$tmp2 = explode(\"\\\",\\\"\",$tmp1);\n\t\tfor($i=0;$i<count($tmp2);$i++)\n\t\t\t$tmp2[$i] = str_replace(\"\\\"\",\"\",$tmp2[$i]);\n\t\treturn $tmp2;\n\t}", "title": "" }, { "docid": "2c7e166b48c16a28b1beb10db4f1a3b2", "score": "0.5407016", "text": "function testFirst() {\n }", "title": "" }, { "docid": "cf4d140583deaaf8510619e366cb4e3a", "score": "0.5392954", "text": "public function testGetClassName()\n {\n $return = uniqid();\n\n $this->mockOriginalRepoMethod(\n $function = $this->extractOriginalRepoMethodName(__FUNCTION__),\n [],\n $return\n );\n\n static::assertSame($return, $this->fixture->$function());\n }", "title": "" }, { "docid": "3b311f5d202222ae3f6c30ad1fab69b8", "score": "0.5389969", "text": "public function test_get_topic_name()\n {\n $func = new ReflectionFunction(\"get_topic_name\");\n $patch = new FunctionPatch($func);\n eval($patch->code);\n\n $res = get_topic_name_patch((object)[\"section\" => \"0\", \"name\" => null]);\n $res2 = get_topic_name_patch((object)[\"section\" => \"12\", \"name\" => null]);\n $correct = \"General\";\n $correct2 = \"Topic 12\";\n\n $this->assertEquals($correct, $res);\n $this->assertEquals($correct2, $res2);\n }", "title": "" }, { "docid": "e23187d310048069968c2c0a3e85b565", "score": "0.53713626", "text": "public function getTestName(): string;", "title": "" }, { "docid": "bf20fddbd13ded4dfc445273723a31cf", "score": "0.5369655", "text": "function testEventName(){\n \n }", "title": "" }, { "docid": "5979a032fc42cd19bbfe2a5e06f9ec84", "score": "0.5366101", "text": "public function testCustomFunctionName() {\n\t\t$this->initClient(array('environment' => 'customFunctionName', 'config' => 'config_customFunctionName.yml'));\n\t\t$this->assertSame('Craue\\GeoBundle\\Doctrine\\Query\\Mysql\\GeoDistance',\n\t\t\t\t$this->getEntityManager()->getConfiguration()->getCustomNumericFunction('CRAUE_GEO_DISTANCE'));\n\t\t$this->assertSame('Craue\\GeoBundle\\Doctrine\\Query\\Mysql\\GeoDistanceByPostalCode',\n\t\t\t\t$this->getEntityManager()->getConfiguration()->getCustomNumericFunction('CRAUE_GEO_DISTANCE_BY_POSTAL_CODE'));\n\t}", "title": "" }, { "docid": "601e9900ac3922a25b6595ed7ea0fad8", "score": "0.53560454", "text": "private static function ver50() { }", "title": "" }, { "docid": "3c94716c52d81590d493634116192673", "score": "0.5352669", "text": "public function testcode()\n\t{\n\t\techo checkDuplicate('M1809','กะเช้า','18-02-2020');\n\t}", "title": "" }, { "docid": "971458c8f49fcafac5d658e478e0563b", "score": "0.5350273", "text": "public function t_func_name ()\n {\n }", "title": "" }, { "docid": "3fc6ac5afb5dfb71590c84129c115e04", "score": "0.5347143", "text": "abstract protected function getBitgoTestIdentifier(): string;", "title": "" }, { "docid": "6b5f00c561abc256ffefb17a0f585162", "score": "0.53284353", "text": "public function testGetAQLFunctionsWithNamespaceFilter()\n {\n\n $name1 = 'phpTestFunctions' . static::$testsTimestamp . '::myFunction';\n $name2 = 'phpTestFunctions1' . static::$testsTimestamp . '::myFunction';\n $code = 'function (celsius) { return celsius * 1.8 + 32; }';\n\n //Setup\n $userFunction = new AqlUserFunction($this->connection);\n\n $userFunction->name = $name1;\n $userFunction->code = $code;\n\n $result = $userFunction->register();\n\n $userFunction = new AqlUserFunction($this->connection);\n\n $userFunction->name = $name2;\n $userFunction->code = $code;\n\n $result = $userFunction->register();\n\n $functions = $this->filter($userFunction->getRegisteredUserFunctions('phpTestFunctions' . static::$testsTimestamp));\n static::assertCount(1, $functions, 'phpTestFunctions namespace should contain 1 function.');\n\n $functions = $this->filter($userFunction->getRegisteredUserFunctions('phpTestFunctions1' . static::$testsTimestamp));\n static::assertCount(1, $functions, 'phpTestFunctions namespace should contain 1 function.');\n\n $userFunction->unregister($name1);\n $userFunction->unregister($name2);\n }", "title": "" }, { "docid": "00752544de3b995c08a00b1167424041", "score": "0.53229624", "text": "function is_function ($res,$function) {\n\t\tif (!ereg(\"([A-Za-z0-9]+)\\s*.*\",$res,$vars)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t$func = $vars[1];\n\t\t$attr = trim(ereg_replace(\"^\".$func,\"\",$res));\n\t\t//echo \"ATTR:\".$attr;\n\t\t$attr=str_replace(\"(\",\"\",$attr);\n\t\t$attr=str_replace(\")\",\"\",$attr);\n\t\t$vars=explode(\",\",$attr);\n\t\t$vars2[0]=strtoupper($func);\n\t\tforeach($vars as $v) {\n\t\t\t// tira as aspas em volta dos argumentos\n\t\t\t$vars2[]=str_replace(array(\"\\\"\",\"'\"),\"\",$v);\n\t\t}\n\t\tif (array_shift($vars2)==strtoupper($function)) {\n\t\t\treturn $vars2;\n\t\t} \n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "7897ff18efaab126749bd267c8f7bef1", "score": "0.5318825", "text": "private static function ver6()\n {\n }", "title": "" }, { "docid": "4044592b071671fa9c082b81af1ac3a4", "score": "0.53172606", "text": "function testt(){\r\n}", "title": "" }, { "docid": "6b3717ac7aeb46e3178f28e8399e3590", "score": "0.530578", "text": "function ass_testing_func() {\n}", "title": "" }, { "docid": "5b60718847328e380135af0eb019cd80", "score": "0.5267441", "text": "abstract public function version();", "title": "" }, { "docid": "5b60718847328e380135af0eb019cd80", "score": "0.5267441", "text": "abstract public function version();", "title": "" }, { "docid": "b928e7d5ee8e8d79811bd9410c282f0d", "score": "0.5261513", "text": "private static function makeName($func)\n\t{\n\t\treturn 'validate_' . $func;\n\t}", "title": "" }, { "docid": "ec3bd4679cc3acc3ef06921883220184", "score": "0.52605593", "text": "public function getFunction();", "title": "" }, { "docid": "5baab75556dcfb4462c84c4ba99e5e98", "score": "0.52476776", "text": "public function testGreaterThanVersionStrings(): void\n {\n $test = [\n ['7.0.0' => '6.0.0'],\n ['7.0.0+1231s' => '6.0.0'],\n // ['7.0.0-beta' => '7.0.0-dev'],\n ['7.0.0-beta' => '7.0.0-alpha'],\n ['7.0.0-beta.1' => '7.0.0-beta'],\n ['7.0.0-beta.2' => '7.0.0-beta.1'],\n ['7.0.0-beta.2+a34sdf' => '7.0.0-beta.1'],\n ];\n\n $versionSvc = app(VersionService::class);\n foreach ($test as $set) {\n $newVersion = array_key_first($set);\n $currentVersion = $set[$newVersion];\n\n $this->assertTrue(\n $versionSvc->isGreaterThan($newVersion, $currentVersion),\n \"{$newVersion} not greater than ${currentVersion}\"\n );\n }\n }", "title": "" }, { "docid": "a8c6171907fb040f7b80bd7dc0cf3663", "score": "0.5242559", "text": "public function compatVersionConditionMatchesSameRelease() : void {}", "title": "" }, { "docid": "a8c6171907fb040f7b80bd7dc0cf3663", "score": "0.5242559", "text": "public function compatVersionConditionMatchesSameRelease() : void {}", "title": "" }, { "docid": "729eb1a568c07c4962d07df573c709cc", "score": "0.523726", "text": "private function extractOriginalRepoMethodName(string $function): string\n {\n return lowerCaseFirst(substr($function, 4));\n }", "title": "" }, { "docid": "395d60d83e00a67357e06bb94548bcf9", "score": "0.522189", "text": "function Fcec078b5() { }", "title": "" }, { "docid": "2174d7a70ce0ba06d1a4708571a9228a", "score": "0.52204746", "text": "public function hasNameDifference();", "title": "" }, { "docid": "bb5844a3747150df46741a622a397141", "score": "0.5216302", "text": "abstract protected function getExpectedVersion();", "title": "" }, { "docid": "541091ecfefe64a5d95bc2fec747f367", "score": "0.5207262", "text": "function function_name() {\n\t\t;\n\t}", "title": "" }, { "docid": "f58a9fed90fd6483ea20d3b8eaa2d038", "score": "0.51997685", "text": "public function getFunction($name);", "title": "" }, { "docid": "ee24923272a0b8d18342fb98ba7f4a5c", "score": "0.51953536", "text": "public function testGetAddonVersion()\n {\n }", "title": "" }, { "docid": "c81ce575b10d594c4fac5fbdaa612524", "score": "0.519187", "text": "function run_function_once($functionname, $timelastupdatedcheck = 0) {\n\t$lastupdated = datalist_get($functionname);\n\tif ($lastupdated) {\n\t\t$lastupdated = (int) $lastupdated;\n\t} elseif ($lastupdated !== false) {\n\t\t$lastupdated = 0;\n\t} else {\n\t\t// unable to check datalist\n\t\treturn false;\n\t}\n\tif (is_callable($functionname) && $lastupdated <= $timelastupdatedcheck) {\n\t\t$functionname();\n\t\tdatalist_set($functionname, time());\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "1b4f949dcc92215e42216b2c109603f9", "score": "0.5186048", "text": "function check_setup($setup,$version)\r\n{\r\n\tif( $version == 1 )\r\n\t{\r\n\t\t$checklist = array( 'special', 'xp', 'life', 'stats', 'skills', 'perks', 'karma', 'kills', 'position' );\r\n\r\n\t\t$id = -1;\r\n\t\tforeach( $checklist as $check )\r\n\t\t{\r\n\t\t\tif( !array_key_exists( $check, $setup ))\r\n\t\t\t\treturn( $id );\r\n\t\t\t$id--;\r\n\t\t};\r\n\r\n\t\treturn( 1 );\r\n\t};\r\n}", "title": "" }, { "docid": "2a74c37a340b62a97ec2f214786bc969", "score": "0.51804733", "text": "public function checkUniquetopName()\r\n\t{\r\n\t\t$exp = $_POST['value'];\r\n\t\t$qstage = $this->Terms_of_payment_model->checkUniquetopName($exp);\r\n\t\t\r\n\t\tif(count($qstage) > 0){ echo 1; }else{ echo 0; }\r\n\t}", "title": "" }, { "docid": "80e631b535bf76c78d6eb4d3050a2ef5", "score": "0.51695", "text": "public function testBugGH155()\n {\n $dataSource = self::$fixtures . self::GH155;\n $analysers = array('compatibility');\n $metrics = self::$api->run($dataSource, $analysers);\n $versions = $metrics[self::$analyserId]['versions'];\n $functions = $metrics[self::$analyserId]['functions'];\n\n $this->assertEquals(\n array(\n 'php.min' => '4.0.0',\n 'php.max' => '',\n 'php.all' => '5.2.0',\n ),\n $versions\n );\n\n $this->assertEquals(\n array(\n 'ext.name' => 'json',\n 'ext.min' => '5.2.0',\n 'ext.max' => '',\n 'ext.all' => '',\n 'php.min' => '5.2.0',\n 'php.max' => '',\n 'php.all' => '5.2.0',\n 'parameters' => array('5.2.0', '5.3.0', '5.5.0'),\n 'php.excludes' => '',\n 'deprecated' => '',\n 'arg.max' => 1,\n 'matches' => 1,\n 'optional' => true,\n ),\n $functions['json_encode']\n );\n }", "title": "" }, { "docid": "e8f1a0e8d83869847a2df4fddb53fd3b", "score": "0.51652026", "text": "private function verFuncion()\n {\n //Array Funcion $arreglo\n //String $retorno\n $retorno = \"\";\n $arreglo = $this->getColFunciones();\n foreach ($arreglo as $i) {\n $retorno .= $i . \"\\n\";\n $retorno .= \"----------------------------------------------------------------------\\n\";\n }\n return $retorno;\n }", "title": "" }, { "docid": "0597efafe83baa8a4fdc3b7ec60b428b", "score": "0.51642364", "text": "private function sortFunctions(Reflection\\ReflectionFunction $one, Reflection\\ReflectionFunction $two)\n\t{\n\t\treturn strcasecmp($one->getNamespaceName() . '\\\\' . $one->getName(), $two->getNamespaceName() . '\\\\' . $two->getName());\n\t}", "title": "" }, { "docid": "6a824840884c746c07bbf1c6eac83e98", "score": "0.5161433", "text": "public function testGetFunctions()\n {\n $extension = new CategoryExtension(null);\n\n $expectedFunctionsNames = ['category_tree', 'render_tree', 'category_child_tree'];\n $actualFunctionNames = array_keys($extension->getFunctions());\n\n $this->assertEquals($expectedFunctionsNames, $actualFunctionNames);\n }", "title": "" }, { "docid": "35bf2733d30fd0cea46e2f20e32dc0c8", "score": "0.5146863", "text": "function generateGuid( $extcmp = null, $uniqueString = null )\n {\n if( !$uniqueString )\r\n $uniqueString = md5( microtime() . `uuidgen` . mt_rand() );\r\n return ( $extcmp ? $extcmp . '-' : '' ) . $uniqueString . '-' . time();\n//j I changed the block above\n }", "title": "" }, { "docid": "e0aacec32cc97d52074ea1b4400397ee", "score": "0.51405406", "text": "public function testFunctionHouse()\n {\n\n $function = 'House';\n\n $sumNumber = [\"1\", \"2\", \"3\", \"4\", \"5\"];\n $exp = 0;\n $this->assertFunctionEquals($sumNumber, $function, $exp);\n\n $sumNumber = [\"6\", \"6\", \"6\", \"5\", \"5\"];\n $exp = 28;\n $this->assertFunctionEquals($sumNumber, $function, $exp);\n }", "title": "" }, { "docid": "645d6bc65a8a5fe618a7dbf70271b4a0", "score": "0.51403207", "text": "function rrd_version()\n{\n}", "title": "" }, { "docid": "e5c262253674003d0877dcd67c4e171c", "score": "0.5132883", "text": "function set_cache_name_function($function = 'md5')\n{\nif (is_callable($function))\n{\n$this->cache_name_function = $function;\n}\n}", "title": "" }, { "docid": "600240f4c863133b5829c40cb4e1ff3b", "score": "0.512751", "text": "function name() {//chuc nang in string\n\techo 'Function';\n}", "title": "" }, { "docid": "888825882c57a193a8b23f18de880173", "score": "0.5120543", "text": "public function testVersions()\n\t {\n\t\tR::useFeatureSet('novice/latest');\n\t\tasrt( R::setAllowHybridMode( FALSE ), FALSE );\n\t\tR::useFeatureSet('latest');\n\t\tasrt( R::setAllowHybridMode( FALSE ), TRUE );\n\t\tR::useFeatureSet('novice/5.4');\n\t\tasrt( R::setAllowHybridMode( FALSE ), FALSE );\n\t\tR::useFeatureSet('5.4');\n\t\tasrt( R::setAllowHybridMode( FALSE ), TRUE );\n\t\tR::useFeatureSet('novice/5.3');\n\t\tasrt( R::setAllowHybridMode( FALSE ), FALSE );\n\t\tR::useFeatureSet('5.3');\n\t\tasrt( R::setAllowHybridMode( FALSE ), FALSE );\n\t }", "title": "" }, { "docid": "6c76ccae5821844902b355b133c53a4c", "score": "0.5104172", "text": "public function usefulFunctionB(): string;", "title": "" }, { "docid": "6c76ccae5821844902b355b133c53a4c", "score": "0.5104172", "text": "public function usefulFunctionB(): string;", "title": "" }, { "docid": "f9f9b2c27e87a3dbf2051f8f49256ab3", "score": "0.5095915", "text": "public function hasNameDifferenceOnly();", "title": "" }, { "docid": "062b20490e7fa136a52b0bee11da22a0", "score": "0.50718373", "text": "public abstract function getMinVersion();", "title": "" }, { "docid": "8b246cbd3ca7604a51cf81f642317ac8", "score": "0.5069197", "text": "function funcaptcha_upto_date($install_version) {\r\n return version_compare( $install_version, FUNCAPTCHA_VERSION, '>=' );\r\n}", "title": "" }, { "docid": "4ca149ac8066e84fd4e880f3959fcadd", "score": "0.50660557", "text": "function gen_test_header($fn_name, $proto, $desc, $source_file, $type_msg, $extra_msg, $alias, $test_sections) {\n\t$msg = \"$type_msg\";\n\tif($extra_msg != NULL)\n \t\t$msg = \"$msg - $extra_msg\";\n\n\n\n\t$test_sections['--TEST--'] = array(\"Test $fn_name() function : $type_msg $extra_msg\"\n\t\t\t\t);\n\n\t$test_sections['--FILE--'] = array (\"<?php\",\n\t\t\t\t\t\"/* Prototype : $proto\",\n\t\t\t\t\t\" * Description: $desc\",\n\t\t\t\t\t\" * Source code: $source_file\",\n\t\t\t\t\t\" * Alias to functions: $alias\",\n \t\t\t\t\t\" */\",\n \t\t\t\t\t\"\",\n\t\t\t\t\t\"echo \\\"*** Testing $fn_name() : $type_msg ***\\\\n\\\";\",\n\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\n\treturn $test_sections;\n}", "title": "" }, { "docid": "be94e3967f371fdafcb404bf79c30a14", "score": "0.5063155", "text": "function testing()\n {\n return 'testing';\n }", "title": "" }, { "docid": "1a70dff842d40032b2582061dd3b4cd3", "score": "0.50523835", "text": "function test_unique_filename_is_unique() {\n\t\t$name = rand_str();\n\n\t\t$filename1 = wp_unique_filename( $this->dir, $name . '.txt' );\n\t\t$this->assertTrue( $this->is_unique_writable_file($this->dir, $filename1) );\n\t\t$filename2 = wp_unique_filename( $this->dir, $name . '.txt' );\n\t\t$this->assertTrue( $this->is_unique_writable_file($this->dir, $filename2) );\n\n\t\t// the two should be different\n\t\t$this->assertNotEquals( $filename1, $filename2 );\n\n\t\tunlink($this->dir . DIRECTORY_SEPARATOR . $filename1);\n\t\tunlink($this->dir . DIRECTORY_SEPARATOR . $filename2);\n\t}", "title": "" }, { "docid": "2e1c092fb9a14daa83a4d71739bad8df", "score": "0.5041864", "text": "public function testVersion_name1()\n{\n\n // Traversed conditions\n // if (\\substr($this->data, $this->position, 7) === 'version') == true (line 206)\n\n $actual = $this->simplePie_XML_Declaration_Parser->version_name();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "1a175a63aeca56d3fb96eac51a989b8b", "score": "0.5039735", "text": "function wp_api($fname) {\n global $wp_functions;\n $in_list = false;\n foreach($wp_functions as $c) { /* CHECK EACH FUNCTION */\n if($fname == $c) { $in_list = true; } /* FLIP TO TRUE IF MATCH */\n }\n return $in_list;\n }", "title": "" }, { "docid": "eb4602066b364f97769ae75f56c64165", "score": "0.50341225", "text": "public static function version();", "title": "" }, { "docid": "69f4492263aabda0bf9475d40f35b74e", "score": "0.5029602", "text": "function numeroVersion()\r\n{\r\n return \"2.0\";\r\n}", "title": "" }, { "docid": "0aba548902e7d3d384c930c3ce9d7662", "score": "0.5011424", "text": "function chk_file_version($inFile) {\n global $selectedVersions,$earliestDate;\n if(!file_exists($inFile)) {\n\t return(\n\t array('n/a','','',\"<strong>$inFile file not found.</strong>\",'','<strong>File not installed</strong>')); \n }\n $mDate = date('Y-m-d H:i T',filemtime($inFile));\n $tContents = file_get_contents($inFile);\n $vInfo = scan_for_version_string($tContents);\n\t$tContents = preg_replace('|\\r|is','',$tContents);\n\t$FileMD5 = md5($tContents);\n\n if(strlen($vInfo) > 120) {$vInfo = '(not specified)'; }\n if(preg_match('!(\\d+\\.\\d+)[^\\d]*(\\d+-\\S{3}-\\d{4})!',$vInfo,$matches)) {\n\t$vNumber = $matches[1];\n\t$vDate = date('Y-m-d',strtotime($matches[2]));\n } else {\n\t$vNumber = 'n/a';\n\t$vDate = 'n/a';\n }\n $fStatus = 'unknown';\n if(isset($selectedVersions[$inFile])) { \n list($mstModDate,$mstSize,$mstFileMD5,$mstFversion,$mstFvDate,$mstFvDesc) = \n\t explode(\"\\t\",$selectedVersions[$inFile]);\n\t $MD5matches = ($mstFileMD5 == $FileMD5)?true:false;\n\t $VerMatches = ($vNumber <> 'n/a' and $mstFversion <> 'n/a' and \n\t strcmp($vNumber,$mstFversion) === 0)?true:false;\n\n\t if ($MD5matches) { $fStatus = \"Current<!-- MD5 matched -->\"; }\n\t if ($fStatus == 'unknown' and $VerMatches) {$fStatus = 'Current<!-- version matched -->'; }\n\t if ($fStatus == 'unknown' and $vNumber <> 'n/a' and $mstFversion <> 'n/a' and \n\t strcmp($vNumber,$mstFversion) < 0) {\n\t\t $fStatus = \"<strong>Need update to<br/>V$mstFversion - $mstFvDate</strong>\"; \n\t\t $earliestDate = ($mstFvDate < $earliestDate)?$mstFvDate:$earliestDate;\n\t }\n\t if ($fStatus == 'unknown' and $vNumber <> 'n/a' and $mstFversion <> 'n/a' and \n\t strcmp($vNumber,$mstFversion) > 0) {\n\t\t $fStatus = \"<strong>Installed version is more recent</strong>\"; \n\n\t }\n\t if ($fStatus == 'unknown' and $mstFversion <> 'n/a' and $mstFvDate <> 'n/a') {\n\t\t $fStatus = \"<strong>Need update to<br/>V$mstFversion - $mstFvDate</strong>\";\n\t\t $earliestDate = ($mstFvDate < $earliestDate)?$mstFvDate:$earliestDate;\n\t }\n \n }\n return(array($mDate,$vNumber,$vDate,$vInfo,$FileMD5,$fStatus));\n}", "title": "" }, { "docid": "a66317768368785d2ef5543a7057838d", "score": "0.50082165", "text": "function F_getTestName($test_id) {\n\t$test_id = intval($test_id);\n\t$td = F_getTestData($test_id);\n\treturn $td['test_name'];\n}", "title": "" }, { "docid": "20804b6c42904deabf0150f7205018b2", "score": "0.5004922", "text": "function test()\r\n\t{\r\n\t}", "title": "" }, { "docid": "90fb963217764b8be736d8f8276e97c4", "score": "0.49960604", "text": "public function test_hook_names_standardized() {\n\n\t\t$this->assertFileContainsHook(\n\t\t\tarray( 'name' => 'plain_action', 'line' => 3 )\n\t\t);\n\n\t\t$this->assertFileContainsHook(\n\t\t\tarray( 'name' => 'action_with_double_quotes', 'line' => 4 )\n\t\t);\n\n\t\t$this->assertFileContainsHook(\n\t\t\tarray( 'name' => '{$variable}-action', 'line' => 5 )\n\t\t);\n\n\t\t$this->assertFileContainsHook(\n\t\t\tarray( 'name' => 'another-{$variable}-action', 'line' => 6 )\n\t\t);\n\n\t\t$this->assertFileContainsHook(\n\t\t\tarray( 'name' => 'hook_{$object->property}_pre', 'line' => 7 )\n\t\t);\n\t}", "title": "" }, { "docid": "6d36f9b5aa21c23ab5282dd088ef8b4f", "score": "0.49911687", "text": "function dummy_function()\n {\n }", "title": "" }, { "docid": "35ed998f30282b45296e5b12b042aabd", "score": "0.49877673", "text": "public function testGetNameWithValidValue()\n {\n // $this->assertEquals(\"Axel\", $utils->get_name(1981, 6, 16));\n }", "title": "" }, { "docid": "101e73c3cf618107d7f5033828d0a3e2", "score": "0.49854693", "text": "public function testGetExpands()\n {\n $return = [uniqid()];\n\n $this->mockOriginalRepoMethod(\n $function = $this->extractOriginalRepoMethodName(__FUNCTION__),\n [],\n $return\n );\n\n static::assertSame($return, $this->fixture->$function());\n }", "title": "" }, { "docid": "74b7389b9836787107601045aa995d1c", "score": "0.49820513", "text": "public function test_addQuickAdjustmentAudit() {\n\n }", "title": "" }, { "docid": "fff3bab8d44177971ec0b3a96dff9aca", "score": "0.4980531", "text": "public static function version () {}", "title": "" }, { "docid": "82bf6b2ec29ffa68f24c8ab070c04edf", "score": "0.49654266", "text": "function gen_error_test($fn_det, $sections, $test_case) {\n $name = $fn_det['name'];\n $proto = $fn_det['proto'];\n $desc = $fn_det['desc'];\n $source_file = $fn_det['source_file'];\n $arg_det = $fn_det['arg_det'];\n $arg_c = $fn_det['arg_c'];\n $optional_args = $fn_det['optional_args'];\n $alias = $fn_det['alias'];\n\n\n\t// get the test header \n\t$test_case = gen_test_header($name, $proto, $desc, $source_file, \"error conditions\", NULL, $alias, $test_case);\n\n\tif($fn_det['arg_c'] == 0 ) {\n\t\t//If the function expects zero arguments generate a one arg test case and quit\n\t\t$test_case['--FILE--'] = gen_one_arg_code($name, \"extra_arg\", \"int\" , $test_case['--FILE--']);\n\n\t} else if (($fn_det['arg_c'] - $fn_det['optional_args']) == 1) { \n\t\t//If the function expects one argument generate a zero arg test case and two arg test case \n\t\t$test_case['--FILE--'] = gen_zero_arg_error_case($name, $test_case['--FILE--']);\n\t\t$test_case['--FILE--'] = gen_morethanexpected_arg_error_case($name, $arg_det, $test_case['--FILE--']);\n\t} else {\n\t\t$test_case['--FILE--'] = gen_morethanexpected_arg_error_case($name, $arg_det, $test_case['--FILE--']);\n\t\t$test_case['--FILE--'] = gen_lessthanexpected_arg_error_case($name, $arg_det, $arg_c, $optional_args, $test_case['--FILE--']);\n\t}\n\t// End the script\n\t$test_case = gen_test_trailer($test_case, '--EXPECTF--');\n\twrite_file($test_case, $name, 'error', $sections);\n\treturn($test_case);\n}", "title": "" }, { "docid": "5df356f93ace465630431d4d1845acc5", "score": "0.49653497", "text": "public function checkZenTaoVersion()\n {\n }", "title": "" }, { "docid": "b16886de9b59cd636db2f3da34b1143f", "score": "0.49624342", "text": "public function testVersion_name0()\n{\n\n // Traversed conditions\n // if (\\substr($this->data, $this->position, 7) === 'version') == false (line 206)\n\n $actual = $this->simplePie_XML_Declaration_Parser->version_name();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "2fe3e3d96bb1360212256acbb07734ef", "score": "0.49491546", "text": "public function hasFunction(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "7299eccf9cbbaf04bfb7eb01bef4ca9b", "score": "0.49373654", "text": "function myTest() {\n echo GREETING;\n}", "title": "" }, { "docid": "c9acc8f08804d39f1aa6f5fe1c4e5663", "score": "0.49372146", "text": "public function testDownloadAddonVersion()\n {\n }", "title": "" }, { "docid": "df7d7389cd0ac362fcff0da843227d44", "score": "0.49330932", "text": "function check_fname ($f)\n{\n if($f == NULL ) { \n echo \"Require a function name \\n\";\n print_opts();\n }\n}", "title": "" }, { "docid": "f131d66c10083805be3dcf2f39917848", "score": "0.49305204", "text": "public function testReRegisterListAndUnRegisterAqlUserFunctionTwice()\n {\n\n $name = 'phpTestFunctions' . static::$testsTimestamp . '::myFunction';\n $code = 'function (celsius) { return celsius * 1.8 + 32; }';\n\n\n $userFunction = new AqlUserFunction($this->connection);\n\n $userFunction->name = $name;\n $userFunction->code = $code;\n\n $result = $userFunction->register();\n static::assertTrue($result['isNewlyCreated']);\n\n static::assertEquals(\n false, $result['error'], 'result[\\'error\\'] Did not return false, instead returned: ' . print_r($result, 1)\n );\n\n $result = $userFunction->register();\n static::assertFalse($result['isNewlyCreated']);\n\n static::assertEquals(\n false, $result['error'], 'result[\\'error\\'] Did not return false, instead returned: ' . print_r($result, 1)\n );\n\n $list = $this->filter($userFunction->getRegisteredUserFunctions());\n static::assertCount(1, $list, 'List returned did not return expected 1 attribute');\n static::assertTrue(\n $list[0]['name'] === $name && $list[0]['code'] === $code,\n 'did not return expected Function. Instead returned: ' . $list[0]['name'] . ' and ' . $list[0]['code']\n );\n\n $result = $userFunction->unregister();\n\n static::assertEquals(\n false, $result['error'], 'result[\\'error\\'] Did not return false, instead returned: ' . print_r($result, 1)\n );\n\n $e = null;\n try {\n $userFunction->unregister();\n } catch (Exception $e) {\n }\n\n static::assertEquals(\n 404, $e->getCode(), 'Did not return code 404, instead returned: ' . $e->getCode()\n );\n }", "title": "" }, { "docid": "4fc1600d524b08919fbed0f14de8188d", "score": "0.49276412", "text": "public function a_func_name ()\n {\n }", "title": "" }, { "docid": "4f6cfa2280a7f054e940c10e9251a564", "score": "0.49253312", "text": "function printComparisonMessage($number)\n{\n if ($number > 5) {\n print \"Numarul $number este mai mare decat 5\\n\";\n $number = rand(1,6);\n return $number;\n } else {\n print \"Numarul $number este mai mic decat 5\\n\";\n $number = rand(4,9);\n return $number;\n }\n}", "title": "" }, { "docid": "794dbda266da6738fcbea99290dfd034", "score": "0.4921643", "text": "function isFittedForFunction($functionName);", "title": "" }, { "docid": "f834b109e4be0a11570f5b19a6c6bdb1", "score": "0.49175358", "text": "public function testFuncCreate_isTheCurrentYear()\n {\n $obj = new CodeGeneration();\n $expectedResult = \"18SO000003\";\n $actualResult = $obj->create(\"tb_sale_orders\",\"code\",6,\"SO\"); \n $this->assertSame($expectedResult, $actualResult);\n }", "title": "" }, { "docid": "4851c6a4219b86af49d5adfa0540cb07", "score": "0.49113044", "text": "public function testBranchCompare()\n {\n }", "title": "" }, { "docid": "4038c489fde4e47deab3c0c8098e95d5", "score": "0.48990747", "text": "abstract public function getMethodName( );", "title": "" } ]
981f63f27a8b996614c55f6400817eab
Create a new directory
[ { "docid": "ad4a004743fff1c37d98150fee7ad73f", "score": "0.77099454", "text": "public function newDirectory()\n {\n\n $target_full_path = $this->getTargetFile()->getFilepath(true);\n $this->event(YouweFileManagerEvents::BEFORE_FILE_DIR_CREATED);\n $this->getDriver()->makeDir($target_full_path);\n $this->getCurrentFile()->updateFilepath($target_full_path);\n $this->event(YouweFileManagerEvents::AFTER_FILE_DIR_CREATED);\n }", "title": "" } ]
[ { "docid": "270634c5385375dce53e3d34e90b9a76", "score": "0.83054304", "text": "function createDirectory($name);", "title": "" }, { "docid": "4faf4737f2da2a19b3d72d19c6ec424b", "score": "0.8040267", "text": "abstract function createDirectory($path);", "title": "" }, { "docid": "e95b3bc00aca824f3a8808617aa9471c", "score": "0.8034014", "text": "public function createDirectory($directoryName, $path = \"/\");", "title": "" }, { "docid": "ac6c592e8bf18bb025b40d220460d25d", "score": "0.7751961", "text": "protected function createDirectory()\n {\n $dirName = $this->destinationFilePath;\n if(!is_dir($dirName)) {\n mkdir($dirName, 0755, true);\n }\n }", "title": "" }, { "docid": "82cecd2d47e2f0f50fbb9f679d1f6a0a", "score": "0.75837475", "text": "public function createDirectory($path)\n {\n $this->mkdir($path);\n }", "title": "" }, { "docid": "9718ec13454ef2f95a75f93a5697d37f", "score": "0.75268036", "text": "function make_new_dir() {\n\t$dir = return_directory_name( 7 );\n\t\n\tif ( !is_dir( $dir ) ) {\n\t\tmkdir( $dir, 0777, true );\n\t\treturn $dir;\n\t} else {\n\t\tmake_new_dir();\n\t}\n}", "title": "" }, { "docid": "d7a4e07d5f7f441ce7119c4a3c321fde", "score": "0.7397305", "text": "function dir_create ($pathname, $mode = 0777, $recursive = false, $context = null)\n{\n return mkdir($pathname, $mode, $recursive, $context);\n}", "title": "" }, { "docid": "b294951bf3ed38fe4751ea8023cdc0dc", "score": "0.73950547", "text": "public function makeDirectory()\n {\n if (!file_exists(config('library.scanner.folder')))\n mkdir(config('library.scanner.folder'), 0755, true);\n }", "title": "" }, { "docid": "2a43914decaf48168c6bd301cc1acc8b", "score": "0.7389728", "text": "public function createDirectory()\n {\n $form = $this->createDirectoryForm();\n $form->bind($this->app['request']);\n\n Browser::setDirectory($form['directory']->getData());\n Browser::setRedirect($form['redirect']->getData());\n Browser::setUsage($form['usage']->getData());\n Browser::setDirectoryStart($form['start']->getData());\n Browser::setDirectoryMode($form['mode']->getData());\n Browser::setCKEditorFuncNum($form['CKEditorFuncNum']->getData());\n\n $create_directory = FRAMEWORK_PATH.$this->getDirectory().$this->app['utils']->sanitizePath($form['create_directory']->getData());\n\n $Filesystem = new Filesystem();\n $Filesystem->mkdir($create_directory);\n\n $this->setMessage($this->app['translator']->trans('<p>The directory <b>%directory%</b> was successfull created.</p>',\n array('%directory%' => substr($create_directory, strlen(FRAMEWORK_PATH)))));\n\n return $this->exec();\n }", "title": "" }, { "docid": "38b648cb25be770f9d8ffc47f9327a50", "score": "0.72411114", "text": "public function createDirectory($dirname)\n\t{\n\t\t$I = $this;\n\t\t$absolutePath = $this->absolutizePath($dirname);\n\t\t@mkdir($absolutePath);\n\t\t$I->comment('Created ' . $absolutePath);\n\t}", "title": "" }, { "docid": "c26bc0d5fd198fc1da9b3aea8d428512", "score": "0.7199033", "text": "function make_directory($dir, $mode=0777)\n{\n\t$parent_dir = dirname($dir);\n\n\tif (!file_exists($parent_dir)) {\n\t\tmake_directory($parent_dir, $mode);\n\t}\n\n\tmkdir($dir);\n\tchmod($dir, $mode);\n}", "title": "" }, { "docid": "809be9086f536047eea7277d0c76789b", "score": "0.7195403", "text": "public function testMakeDirectory()\n {\n Storage::mkdir(self::$temp . DS . 'created');\n $this->assertTrue(is_dir(self::$temp . DS . 'created'));\n }", "title": "" }, { "docid": "d8e92b23ebb1dd65486e83ef59501544", "score": "0.7182654", "text": "function mkdir($dirs, $mode = 0777);", "title": "" }, { "docid": "17a8cdd23972b792643f484c2329c749", "score": "0.713065", "text": "public function createDir($path)\n {\n if (!file_exists($path)) \n {\n mkdir($path, 0777, true);\n }\n }", "title": "" }, { "docid": "cce2ad46ffcc51a89fae8eb4a6f3c62d", "score": "0.7124951", "text": "function create_dir($path)\n{\n if (!file_exists($path)) {\n mkdir($path, 0777, true);\n }\n}", "title": "" }, { "docid": "c376a4a355c74ca4a7d2969ce3baec77", "score": "0.7124097", "text": "public function createDir($dirname, Config $config)\n {\n }", "title": "" }, { "docid": "73cad4eee6929193ff4cbb7cd57a1feb", "score": "0.71116346", "text": "public function createNewDir($path)\n {\n if ( !file_exists( $path ) && !is_dir( $path ) )\n return mkdir( $path );\n else \n return false;\n }", "title": "" }, { "docid": "0bee2494c3b67486af7fe9cc23b95ef6", "score": "0.71021277", "text": "private function createDirectory($path)\n {\n if (file_exists($path) === false) {\n mkdir($path);\n }//end if\n }", "title": "" }, { "docid": "bddc1d3a45bf615899691de3ec029d6c", "score": "0.7027122", "text": "public function createDirectory($name) {\r\n\r\n parent::createDirectory($this->getDecodedStr($name)); \r\n\r\n }", "title": "" }, { "docid": "ac2ea8c157d845fdbaf1a144b3604dea", "score": "0.7005359", "text": "public static function makeDir(string $path) {\n\t\tif (!file_exists($path)) {\n\t\t\t$umask = umask(0);\n\t\t\t$return = mkdir($path, AM_PERM_DIR, true);\n\t\t\tumask($umask);\n\t\t\tDebug::log($path, 'Created');\n\n\t\t\treturn $return;\n\t\t}\n\t}", "title": "" }, { "docid": "b09a3bb0ddc1c0a8d83b993008260794", "score": "0.699672", "text": "private function _createNewDirectories(){\n \n // need to first create the **version** directory\n $topLevel = $this->_dir . $this->_version . '/';\n \n\n try{\n if(!is_dir($topLevel)){\n mkdir($topLevel); \n $this->_showOutput('Creating directory: ' . $topLevel);\n }\n }catch(Exception $e){\n $this->logError($e, '_createNewDirectories'); \n }\n \n\n // iterate through the directories array and create all folders\n if(!empty($this->_dirArray)){\n foreach($this->_dirArray as $folder){\n // create folder\n try{\n if(!is_dir($folder)){\n mkdir($folder, $this->_folderPermissions);\n $this->_showOutput('Creating directory: ' . $folder);\n }\n \n }catch(Exception $e){\n $this->logError($e, '_createNewDirectories'); \n }\n \n }\n }\n \n }", "title": "" }, { "docid": "6e459d312b7b0000acaf17d66a71e884", "score": "0.69894636", "text": "public function testCreatingDirectory(): void {\r\n\r\n $this -> assertFalse($this -> directory -> isReadable());\r\n $this -> assertFalse($this -> directory -> isWritable());\r\n $this -> assertFalse($this -> directory -> exists());\r\n\r\n $this -> directory -> create();\r\n $this -> directory -> setOwner('administrator');\r\n $this -> directory -> setGroupId(1000);\r\n\r\n $this -> assertTrue($this -> directory -> isReadable());\r\n $this -> assertTrue($this -> directory -> isWritable());\r\n $this -> assertTrue($this -> directory -> exists());\r\n\r\n $this -> directory -> delete();\r\n }", "title": "" }, { "docid": "6776564f25d974f3ddf040943b5d4e9a", "score": "0.69844335", "text": "public static function createDirectory($dir_name, $dir_mode=NULL, $createIndex=false)\n\t\t{\n if (!$dir_mode)\n {\n $dir_mode = CAT_Registry::exists('OCTAL_DIR_MODE')\n ? CAT_Registry::get('OCTAL_DIR_MODE')\n : (int) octdec(self::defaultDirMode());\n }\n $dir_name = self::sanitizePath($dir_name);\n\t\t if($dir_name != '' && !is_dir($dir_name))\n\t\t {\n\t\t $umask = umask(0);\n\t\t mkdir($dir_name, $dir_mode, true);\n\t\t umask($umask);\n\t\t if ( $createIndex )\n\t\t {\n\t\t\t self::recursiveCreateIndex( $dir_name );\n\t\t }\n\t\t return true;\n\t\t }\n\t\t return false;\n\t\t }", "title": "" }, { "docid": "b09db3163cbcad7ca176e6e94c9ae23f", "score": "0.6939868", "text": "public function createDirectory(File $f)\n {\n $this->fs->mkdir($f->getPath());\n }", "title": "" }, { "docid": "8e038ab24403b54a4831a1a4a5ea67f1", "score": "0.6923968", "text": "public function testDirectoryIsCreated()\n {\n $example = new DirectoryCreator('id');\n $this->assertFalse(vfsStreamWrapper::getRoot()->hasChild('id'));\n\n $example->setDirectory(vfsStream::url('exampleDir'));\n $this->assertTrue(vfsStreamWrapper::getRoot()->hasChild('id'));\n }", "title": "" }, { "docid": "8143a96d99d21189f89b5c318a74567b", "score": "0.6907238", "text": "function make_path($dir, $mode = 0775)\n{\n if (is_dir($dir) || @mkdir($dir,$mode)) return TRUE;\n if (!make_path(dirname($dir),$mode)) return FALSE;\n return @mkdir($dir,$mode);\n}", "title": "" }, { "docid": "7fd03d599225deada9aa9c1dcfa302e6", "score": "0.68897355", "text": "private function make_files_dir()\n\t{\n\t $dir_name = $this->files_dir();\n\t if(! is_dir($dir_name)) {\n\t\t $ok = mkdir ($dir_name, 0755);\n\t\t if (! $ok) {die(\"Couldn't create dir \" . $dir_name);}\n\t }\t \n\t}", "title": "" }, { "docid": "f22c143a664fb94efc7ee31c3fff42ff", "score": "0.68681467", "text": "protected function createDir($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "title": "" }, { "docid": "025feea05545e8c286b189f54cdf6643", "score": "0.68674064", "text": "public function create()\n\t{\n\t\t$dirParent = $this->parent();\n\t\tif( !$dirParent->exists() )\n\t\t{\n\t\t\t$dirParent->create();\n\t\t}\n\n\t\treturn touch( $this->getPathname() );\n\t}", "title": "" }, { "docid": "cbaf17c7b53ed6c51f0c5ff537104d9d", "score": "0.68648034", "text": "public function createDirectory($id) {\n $path = 'uploads' . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR;\n\n if(!is_dir($path)) {\n //FileHelper::createDirectory($path);\n $oldmask = umask(0);\n mkdir($path, 0777);\n umask($oldmask);\n }\n\n return $path;\n }", "title": "" }, { "docid": "276e9918fed3a30ed940f00045ecc6ce", "score": "0.6832092", "text": "function file_make_dir($dirpath, $mode=0777) {\n return is_dir($dirpath) || mkdir($dirpath, $mode, true);\n}", "title": "" }, { "docid": "8076952cfa562ac199acab0a665120e8", "score": "0.6825074", "text": "public function mkdir($dirs, int $mode = 0777);", "title": "" }, { "docid": "5816cb708be3acabf99043d2421123ea", "score": "0.6824652", "text": "public function createDir(string $path): bool;", "title": "" }, { "docid": "af8ee81d1a934cad5dcd2caf9c55bd39", "score": "0.68165314", "text": "function createDir($dirPath)\n{\n if (!is_dir($dirPath)) {\n if (!mkdir($dirPath, 0777)) {\n throw new Exception(msgFailureCreate($dirPath));\n }\n }\n}", "title": "" }, { "docid": "eef369d4fe4e72a53cf02c5350833b47", "score": "0.6813668", "text": "function make_path($path) {\n //Test if path exist\n if (is_dir($path) || file_exists($path)) return;\n\n //No, create it\n mkdir($path, 0777, true);\n}", "title": "" }, { "docid": "4b5af8a6d8c0ab0ab788488a7bf6f4f6", "score": "0.6800146", "text": "function create_directory($company){ \n\t$thisdir = getcwd(); \n\t\n\t/* create a subfolder; make folder writable (CHMOD 0777)*/ \n\tif(file_exists ($thisdir .\"/userfiles/\". trim($company))){\n\t}\n\telse{\n\t\tif(mkdir($thisdir .\"/userfiles/\". trim($company) , 0777)) {\n\t\t\tmkdir($thisdir .\"/userfiles/\". trim($company).\"/archive\" , 0777); /*making archive folder*/\n\t\t} \n\t\telse { \n\t\t //echo \"Failed to create directory...\"; \n\t\t} \n\t}\n}", "title": "" }, { "docid": "45bd1b5bbf89e9de14244e7c26f6b73a", "score": "0.67955714", "text": "public function mkdir($dirName, $permissions = 0755);", "title": "" }, { "docid": "f7ed16249245a97ce49fb25c9f46549c", "score": "0.6779351", "text": "function mk_dir($path) {\n if(is_dir($path)) {\n return true;\n }\n if(is_dir(dirname($path))) {\n return mkdir($path);\n }\n\n //父目录不存在\n mk_dir(dirname($path));\n return mkdir($path);\n\n }", "title": "" }, { "docid": "132516c328f92db6cfb06f4257e53675", "score": "0.67579806", "text": "private static function createPath(string $path): void\n {\n if (!is_dir(dirname(dirname($path)))) {\n mkdir(dirname(dirname($path)), 0775, true);\n }\n if (!is_dir(dirname($path))) {\n mkdir(dirname($path), 0775, true);\n }\n }", "title": "" }, { "docid": "9f233065ae1407d0cd909bd7b4f48a48", "score": "0.674934", "text": "function createDirectory($dest)\n\t{\n\t\tif(!is_dir($dest))\n\t\t{\n\t\t\t$r = mkdir ( $dest, 0755 ,true);\n\t\t\tif(!$r)\n\t\t\t\tthrow new Exception(\"function mkdirreturned false while trying to created dir $dest\");\n\t\t}\n\t}", "title": "" }, { "docid": "9311a70a3a71ae2f259f59c704fac485", "score": "0.6735668", "text": "public function createDirectory() {\n\t\tglobal $wpdb;\n\t\t\n\t\tif (!is_dir($this->imagePath)) {\n\t\t\tif(!(wp_mkdir_p($this->imagePath))) {\n\t\t\t\terror_log(\"FMP: error creating the subdirectory\");\n\t\t\t}\t\n\t\t} \n\t\t\n\t\tadd_option( \"fmp_db_version\", $this->pluginVersion );\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5e45c4711c99c83c29e30d2464a8544a", "score": "0.67216957", "text": "public function makeDirectory($path)\n {\n if(!is_dir($path))\n {\n return mkdir($path);\n }\n }", "title": "" }, { "docid": "50e9c57c1f451b865b7ac61a95947c3f", "score": "0.67133486", "text": "public function create_dir($path) {\n if (!file_exists($path)) {\n return mkdir($path);\n }\n\n return false;\n }", "title": "" }, { "docid": "d821c02c6c2d96eeb1e9474bdcb56c11", "score": "0.6709887", "text": "function makeDir($path)\n {\n return is_dir($path) || mkdir($path);\n }", "title": "" }, { "docid": "4397b3553b855a195cef9ac07d0b3f1d", "score": "0.670775", "text": "public function createDirectory(): bool\n {\n try {\n return File::makeDirectory($this->directory, $this->permissions, true);\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "068abf279ed03d7188aa742b9e5121f9", "score": "0.6707239", "text": "private function createDirectories()\r\n {\r\n $info = $this->getModuleInfo();\r\n\r\n $directories = $this->getDirectories($info);\r\n\r\n $this->createDirectoriesFromArray($directories, $this->basePath);\r\n }", "title": "" }, { "docid": "1a76fe2436edfea5a9473bf4ffbdaea5", "score": "0.6692626", "text": "function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}", "title": "" }, { "docid": "8f40e37ae6c4095c65f5d9065e8bb8da", "score": "0.66910785", "text": "public function makeDirectory($dir)\n {\n if (! is_dir($dir)) {\n mkdir($dir, 0777, true);\n }\n }", "title": "" }, { "docid": "6c541b936e5a3b9090c4da48560fcc92", "score": "0.6690551", "text": "public function makeDirectory($mode = FileSystemPermission::NORMAL)\r\n {\r\n $directory = $this->factory->makeDirectory($mode);\r\n $this->container->add($directory);\r\n\r\n return $directory;\r\n }", "title": "" }, { "docid": "b000de7099f91e07369703fff79a33ca", "score": "0.6689753", "text": "function makeUserDirectory(string $dirName): void {\n mkdir('../../../../../social-media-uploads/' . strtolower($dirName), 0777, true);\n}", "title": "" }, { "docid": "f267880fc1097c825d5a02f26e450d0e", "score": "0.66840714", "text": "protected function makeDirectory($path)\n\t{\n\t\t$dir = dirname($path);\n\n\t\tif (!file_exists($dir)) {\n\t\t\tmkdir($dir, 0777, true);\n\t\t}\n\t}", "title": "" }, { "docid": "ea3ad70e9beb76ae05e7090be93f6257", "score": "0.6682171", "text": "public function createDir($dirname) {\r\n $path = USER_ROOT_DIR . $dirname;\r\n if (!file_exists($path)) {\r\n //echo \"Creating folder '$dirname' at \" . $path;\r\n mkdir($path, 0777);\r\n if (file_exists($path)) {\r\n //echo \"Directory '$dirname' created\";\r\n return true;\r\n } else {\r\n //echo \"Error creating directory '$dirname'\";\r\n return false;\r\n }\r\n } else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "6bc28308686082500ca8116abbb7bbb9", "score": "0.6682013", "text": "function createDirectory($name) {\n $category = $this->categoryForPath($this->myPath);\n\n $db = rex_sql::factory();\n $db->setTable(rex::getTablePrefix() . 'media_category');\n $db->setValue('name', $name);\n $db->setValue('parent_id', $category->getId());\n $db->setValue('path', $category->getPath() . $category->getId().'|');\n $db->addGlobalCreateFields();\n $db->addGlobalUpdateFields();\n\n $db->insert();\n\n rex_media_cache::deleteCategoryList($category->getId());\n }", "title": "" }, { "docid": "d4c51dfe6afa3be7514e99e3bed7f992", "score": "0.66313225", "text": "public function createDirectory(Request $request)\n {\n $directoryName = $this->newDirectoryPath($request->input('url'), $request->input('name'));\n // check - exist directory or no\n if (Storage::disk(self::DISK)->exists($directoryName)) {\n return \\response()->json([\n 'result' => [\n 'message' => 'Така директорія вже існує',\n ], abort(403)\n ]);\n } else {\n // create new directory\n Storage::disk(self::DISK)->makeDirectory($directoryName);\n return response()->json([\n 'result' => [\n 'status' => 'success',\n 'message' => trans('file-manager::response.dirCreated')\n ]]);\n }\n }", "title": "" }, { "docid": "34d4cc2ecf78a5d8ef811fa03c5fa8db", "score": "0.6625982", "text": "public function _create_directory( $path_link = '' ) {\n\t\tif ( ! empty( $path_link ) ) {\n\t\t\t$path = $path_link;\n\t\t} else {\n\t\t\t$path = getcwd();\n\t\t}\n\n\t\tif ( ! $this->_is_writable( $path ) ) {\n\t\t\tWP_CLI::error( 'Directory is not writable!' );\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->_write_to_file( $path . '/sites/', $this->site_name );\n\t\t}\n\t}", "title": "" }, { "docid": "8618a139ba6d5894fe23032c71602a79", "score": "0.6578886", "text": "private function mkDir(string $dirPath) {\n mkdir($dirPath, 771, true);\n $this->createdDirs[] = $dirPath;\n chgrp($dirPath, 'www-data');\n }", "title": "" }, { "docid": "55ea41a103189f9622564e065125d2cf", "score": "0.6571692", "text": "function create_directory($directory_name = null){\r\r\n\t$directory_path = WWW_ROOT.\"img/\".$directory_name.\"/\";\r\r\n\tif(!is_dir($directory_path)){\r\r\n\t\tmkdir($directory_path, 0755, TRUE);\r\r\n\t\treturn $directory_path;\r\r\n\t}else{\r\r\n\t\treturn $directory_path;\r\r\n\t}\r\r\n }", "title": "" }, { "docid": "4b2e85b3f9f6a421e50cf132b5232e44", "score": "0.6571455", "text": "function mkdir_p($path, $mode = 0700) {\r\n $dirs = split(\"/\",$path);\r\n\t$path = $dirs[0];\r\n\tfor($i = 1;$i < count($dirs);$i++) {\r\n\t\t$path .= \"/\".$dirs[$i];\r\n\t\tif(!is_dir($path))\r\n\t\t{\r\n\t\t\tmkdir($path,$mode);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "77efe5740578dd391a959b2dc0cb7e0c", "score": "0.65431553", "text": "function newFolder($folderName,$path) {\n\t\t$fullName = $path.\"/\".$folderName;\n\t\techo mkdir($fullName);\n\t}", "title": "" }, { "docid": "66f315c0be73be8ebdfa07f7eeaa741d", "score": "0.6541221", "text": "protected function createDirectories()\r\n {\r\n if (!is_dir($directory = path('database/migrations'))) {\r\n mkdir($directory, 0755, true);\r\n }\r\n }", "title": "" }, { "docid": "826a1d7db8137c92a07661ab85bbe9a4", "score": "0.6532983", "text": "private function createFolders()\n\t{\n\t\t$mediaConfig = $this->getServiceLocator()->get('config')['media'];\n\t\t$saveDir = rtrim($mediaConfig['save_path'], '\\\\/');\n\n\t\tif ( ! file_exists($saveDir))\n\t\t{\n\t\t\tmkdir($saveDir, 0755, true);\n\t\t}\n\t}", "title": "" }, { "docid": "a8cf91012361c055b246c47db1298125", "score": "0.65138996", "text": "public function mkdir()\n {\n return call_user_func_array('self::createFolder', func_get_args());\n\n }", "title": "" }, { "docid": "60db3861552e35c88b261fe238857653", "score": "0.65111494", "text": "function mkdir_if_not_exists($dir) {\n if (!file_exists($dir)) {\n mkdir($dir, 0777, true);\n }\n}", "title": "" }, { "docid": "ea8e721e934acfc6aa39a0232f760f8a", "score": "0.6506106", "text": "private function createModuleFolder(): void\n {\n if (!file_exists($this->getModulePath())) {\n mkdir($this->getModulePath());\n }\n }", "title": "" }, { "docid": "7ae2d9700a378696256d10341dcda87c", "score": "0.65055865", "text": "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0777, true, true);\n if($this->option('database')):\n $this->files->makeDirectory($path.\"/Database\", 0777, true, true);\n endif;\n $this->files->makeDirectory($path.\"/Controllers\", 0777, true, true);\n $this->files->makeDirectory($path.\"/Models\", 0777, true, true);\n $this->files->makeDirectory($path.\"/Views\", 0777, true, true);\n }\n }", "title": "" }, { "docid": "4a928fdb7d1f972094427591b76f6faa", "score": "0.6503421", "text": "function vikinger_create_directory($path) {\r\n $result = WP_Filesystem();\r\n\r\n if ($result) {\r\n global $wp_filesystem;\r\n\r\n if (!$wp_filesystem->exists($path)) {\r\n // true on success, false on failure\r\n $result = wp_mkdir_p($path);\r\n } else {\r\n // directory already exists\r\n $result = true;\r\n }\r\n }\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "33f76cfcb9756bd530f1f3de0b8b7cf1", "score": "0.64951736", "text": "function createOutputDirectory($outputDir) \n{\n remove($outputDir);\n mkdir($outputDir, 0777, true);\n}", "title": "" }, { "docid": "7980a42ade9f66e44d017b52c1f54296", "score": "0.6493126", "text": "protected function createDirectory($path)\n {\n if (!mkdir($path)) {\n throw new FileCreationException(\n \"I can't create the directory: $path\");\n }\n }", "title": "" }, { "docid": "ce5b27e4f9ed09324a50fa616e3dd933", "score": "0.6469836", "text": "function create_directory($directory){\n \n $directory = new FileHandler($directoryLocation);\n\n /*First check to see if the directory already exists*/\n if(!$(directory->directory_found())){\n mkdir($directory->fileName);\n \n /*Next checks to make sure that the directory has actually been created*/\n if($directory->directory_found()){\n\t$message = \"Success: (\".$directory->fileName.\") has been created\";\n\t$this->add_to_log($message);\n\treturn true;\n }\n \n else{\n\t$message = \"Error: (\".$directory->fileName.\") could not be created\";\n\treturn false;\n }\n }\n \n else{\n $message = \"Error: Can't create (\".$directory->fileName.\") as it already exists\";\n return false; \n }\n }", "title": "" }, { "docid": "bc7ff4bc5c7587263c9d93f5479a4c89", "score": "0.6419752", "text": "public function make_path($path) \n\t{\n\t\tif (!File::exists($path)) {\n File::makeDirectory(public_path($path), 0755, true, true);\n }\n }", "title": "" }, { "docid": "1c85ed5df045fad443892473c2cd2d33", "score": "0.64136785", "text": "private function ensureDirectoryExists(string $dirname)\n {\n return Directory::new($dirname)->create();\n }", "title": "" }, { "docid": "71d5d31ac0ad55a419308b1cde658836", "score": "0.6411979", "text": "public static function create()\n {\n $directories = [\n self::PATH.'/app',\n self::PATH.'/bootstrap/cache',\n self::PATH.'/framework/cache',\n self::PATH.'/framework/views',\n ];\n\n foreach ($directories as $directory) {\n if (! is_dir($directory)) {\n fwrite(STDERR, \"> Storage Bootstrap: Creating storage directory: $directory\".PHP_EOL);\n\n mkdir($directory, 0755, true);\n }\n }\n }", "title": "" }, { "docid": "59171cc6fd89d9fb7a065ecbad565f41", "score": "0.6408173", "text": "public function createDir($name = null)\n {\n unlink($dir = $this->createFile());\n\n if (false === mkdir($dir)) {\n throw FileSystemException::lastError($dir);\n }\n\n if (null !== $name) {\n $dir .= DIRECTORY_SEPARATOR . $name;\n\n if (false === mkdir($dir)) {\n throw FileSystemException::lastError($dir);\n }\n }\n\n return $dir;\n }", "title": "" }, { "docid": "63e9e11cabeaadb94c3d6345fcc954e7", "score": "0.6399317", "text": "public function test_make_dir() {\n $path = 'test/data/IO/FS/newdir/nesteddir';\n $parent_path = 'test/data/IO/FS/newdir';\n $dir = IO_FS::make_nested_dir($path);\n $this->\n assert_class('IO.FS.Dir', $dir)->\n assert_true(IO_FS::is_dir($dir))->\n assert_equal($dir->path, $path)->\n assert_true(IO_FS::rm($path))->\n assert_true(IO_FS::rm($parent_path))->\n assert_false(IO_FS::is_dir($path))->\n assert_false(IO_FS::is_dir($parent_path))->\n assert_false(IO_FS::exists($path))->\n assert_false(IO_FS::exists($parent_path));\n }", "title": "" }, { "docid": "89eca583ee661b6409cbbb0e9f3eab6d", "score": "0.6394032", "text": "protected function createFolders()\n {\n foreach ($this->getFolderStructure() as $folder) {\n $new_folder = $this->twig_string_renderer->renderToString($folder, $this->data);\n $this->fs->mkdir($this->target_path . DIRECTORY_SEPARATOR . $new_folder, self::DIRECTORY_MODE);\n\n $msg = '[mkdir] ' . $this->target_path . DIRECTORY_SEPARATOR . $new_folder;\n if ($this->reporting_enabled) {\n $this->report[] =$msg;\n }\n }\n }", "title": "" }, { "docid": "282b1e4b5e0e0c99a8f2da1ebd22a52c", "score": "0.6389909", "text": "private function makeTmpDir()\n {\n $tmpDir = $this->getTempDir();\n\n // Directory already exists, return true\n if (is_dir($tmpDir)) {\n return true;\n }\n\n // dir doesn't exist, make it\n return mkdir($tmpDir);\n }", "title": "" }, { "docid": "a1bc546b7392d1290eaa5310b5a0492b", "score": "0.6388005", "text": "function createFolder($newFolder,$email){\n$newFolder=$this->userFolder($email).\"/\".$newFolder; \n if (!file_exists($newFolder)) {\n mkdir($newFolder, 0777, true);\n return true;\n }else{\n return false; \n }\n}", "title": "" }, { "docid": "8f6f8cf655bd8adc2d14afac37ca7349", "score": "0.63871884", "text": "protected function createBaseDir() {\n\t\ttry {\n\t\t\t$this->filesystem->mkdir( $this->baseDir );\n\t\t}\n\t\tcatch ( IOExceptionInterface $e ) {\n\t\t\tthrow new IOException( \"Could not create base dir \" . $e->getPath() );\n\t\t}\n\t}", "title": "" }, { "docid": "6dfe6816d11943edb860fb00ae3b43ac", "score": "0.6385232", "text": "function create_dirs($path)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t if (!is_dir($path))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t$directory_path = \"\";\r\n\t\t\t\t\t\t$directories = explode(\"/\",$path);\r\n\t\t\t\t\t\tarray_pop($directories);\r\n\r\n\t\t\t\t\t\tforeach($directories as $directory)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t $directory_path .= $directory.\"/\";\r\n\t\t\t\t\t\t if (!is_dir($directory_path))\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\tmkdir($directory_path);\r\n\t\t\t\t\t\t\tchmod($directory_path, 0777);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}", "title": "" }, { "docid": "1ababd0fbfd4ce5936bae2876069f875", "score": "0.6385062", "text": "function crearCarpeta($directorio){\n @mkdir($directorio);\n}", "title": "" }, { "docid": "14f02d85365a03f78e11361110f2d249", "score": "0.63794476", "text": "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "title": "" }, { "docid": "14f02d85365a03f78e11361110f2d249", "score": "0.63794476", "text": "protected function makeDirectory($path)\n {\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n }", "title": "" }, { "docid": "9cc6863dcfef0f7fe2b4247ca377af33", "score": "0.6372392", "text": "protected function createWebSiteDirectory()\n {\n $project = $this->getProjectMachineName();\n $dir = $this->settings->getValueFor('Project directory');\n $this->websiteDirectory = $dir . '/' . $project;\n mkdir($this->websiteDirectory);\n // @todo: add exeption handling/error reporting for when goes wrong.\n }", "title": "" }, { "docid": "77e6e8080892720b273af620c6e7e158", "score": "0.6371224", "text": "static function makeDir($dir){\n\t\t\t$x=explode(\"/\",$dir);$d=\"\";for($i=0;$i<count($x);$i++){\n\t\t\t\t$d.=$x[$i].\"/\";\n\t\t\t\tif($x[$i]!=\"..\"&&$x[$i]!=\".\")if(!is_dir($d))mkdir($d,0755);else @chmod($d,0755);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "da092fa3e400776bdbfd4dd15e1ae1b7", "score": "0.63496923", "text": "private function createDirectory($directoryPath) {\n if (!@is_dir($directoryPath)) {\n $oldumask = umask(0);\n $success = @mkdir($directoryPath, 0755, TRUE);\n umask($oldumask);\n if (!$success) {\n throw new \\Exception(\"Can not create the directory $directoryPath\");\n }\n }\n }", "title": "" }, { "docid": "76be3f345c33a8b2162c64f85c869a01", "score": "0.63395905", "text": "private function _mkdir($dir)\r\n {\r\n if (!is_dir($dir)) {\r\n $ndir = \"\";\r\n foreach (explode(\"/\", $dir) as $pdir) {\r\n $ndir .= \"$pdir/\";\r\n if (!is_dir($ndir)) {\r\n mkdir($ndir);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5bd13040f9270ad9a3ffebadf12cd55d", "score": "0.6333355", "text": "public function createFolder($newFolderName, $parentFolderIdentifier = '', $recursive = false);", "title": "" }, { "docid": "d4fc4e611d778fcdd25d19df20c368b0", "score": "0.6331335", "text": "public function createFolder($destination = '')\n {\n \t// create folder if it doesn't already exist\n \tif (!is_dir($destination))\n \t{\n \t\t// attempt to create folder\n\t\t\tmkdir($destination, 0777, true);\n\t\t}\n\t}", "title": "" }, { "docid": "e0d1f3fe01cf718d9872753ba3107c4e", "score": "0.63303655", "text": "public function createDirectory($mode = 0700)\n {\n $attempts = 3;\n\n while ($attempts--) {\n $path = $this->generatePath();\n $this->isolator->unlink($path);\n\n if (@$this->isolator->mkdir($path, $mode)) {\n return new TemporaryDirectory($path, $this->fileSystem);\n }\n }\n\n throw new TemporaryNodeCreationFailedException('Unable to create temporary directory.');\n }", "title": "" }, { "docid": "fbeff316a24f650d34561d22751b06be", "score": "0.63286", "text": "function mkdir_p($target)\n{\n if (is_dir($target) || empty ($target)) {\n return 1; // best case check first\n }\n if (file_exists($target) && !is_dir($target)) {\n return 0;\n }\n if (mkdir_p(substr($target, 0, strrpos($target, '/')))) {\n return mkdir($target); // crawl back up & create dir tree\n }\n return 0;\n}", "title": "" }, { "docid": "822c04dbbe1cc06647b89014f8a50e61", "score": "0.6322158", "text": "public function creaDirectorio($path){\r\n\t\t$retorno=0;\r\n\t\tif(file_exists($path)){\r\n\t\t\t\t$retorno=-1;\r\n\t\t}else{\r\n\t\t\t$existe = mkdir($path,0777,true);\r\n\t\t\tif($existe){\r\n\t\t\t\t$retorno=1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $retorno;\r\n\t}", "title": "" }, { "docid": "57450a6453381e1d6c6815f0ea029355", "score": "0.63090324", "text": "private function createDirectory($directory)\n {\n $dir_array = explode('/', $directory);\n $dir_current_arr = [];\n\n foreach ($dir_array as $key => $string) {\n $dir_current_arr[] = $string;\n $dir_str = implode('/', $dir_current_arr);\n if (!file_exists($dir_str))\n mkdir($dir_str);\n }\n }", "title": "" }, { "docid": "a422d994ef1f07d61e186d2ebb02a9a5", "score": "0.6303847", "text": "public function makeDirectory(string $path): bool;", "title": "" }, { "docid": "bbf955a2dd20ead7da11bfb086e88e28", "score": "0.62909955", "text": "function instance_createdir($moduleid, $courseid, $itemid, $filearea, $newdir, $requestid){\n\n\tif(pathIsWritable($moduleid, $courseid, $itemid, $filearea,\"/\",\"\")){\n\t\t$return = do_createdir($moduleid, $courseid, $itemid, $filearea, $newdir);\n\t}else{\n\t\t//set up return object\t\n\t\t$return=fetchReturnArray(false);\n\t\t $return['success']=false;\n\t \t array_push($return['messages'],\"insuffficient permissions to create dir: \" . $newdir );\n\t}\n\t$xml_return = prepareXMLReturn($return,$requestid);\n\treturn $xml_return;\n}", "title": "" }, { "docid": "b063ef71e93d84a889ddfcf603103031", "score": "0.62899506", "text": "public static function MakeDataDirectory() {\r\n\r\n Display::_printer(\"Data directory: %G%\".Tools::GetBaseDir().\"data\".DIRECTORY_SEPARATOR);\r\n\r\n if (!@file_exists(Tools::GetBaseDir().DIRECTORY_SEPARATOR.\"data\".DIRECTORY_SEPARATOR.\"wallets\"))\r\n @mkdir(Tools::GetBaseDir().DIRECTORY_SEPARATOR.\"data\".DIRECTORY_SEPARATOR.\"wallets\",755, true);\r\n\r\n if (!@file_exists(Tools::GetBaseDir().DIRECTORY_SEPARATOR.\"tmp\"))\r\n @mkdir(Tools::GetBaseDir().DIRECTORY_SEPARATOR.\"tmp\",755, true);\r\n }", "title": "" }, { "docid": "809f3f9070fb79a2961e3889736b08d3", "score": "0.6285229", "text": "protected function createDirIfNotExists($path)\n\t{\n\t\tif (!is_dir($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "title": "" }, { "docid": "0f4fb20fafda6016b9775961f483534a", "score": "0.6261635", "text": "public function createDir($directory)\n {\n return Storage::makeDirectory($directory);\n }", "title": "" }, { "docid": "afc3ca45a8d84d1a2c0f47a76b695785", "score": "0.6260228", "text": "public function makeDirectory(string $path): SplFileInfo;", "title": "" }, { "docid": "23b620b9749fe04b7d72cb67aae83cc1", "score": "0.6255512", "text": "public function makeDir($dir){\n\t\t\n\t\t//controllare se esiste già la cartella @todo!\n\t\t//Creo la cartella con permessi 777\n\t\tif(mkdir($dir, 0777)){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "17fd8620620b673dd6d5b3358becc4ad", "score": "0.6249228", "text": "function create_export_dir($dir = 'export',$version=1){\n\tif(is_dir($dir.$version)){\n\t\t$version++;\n\t\treturn create_export_dir($dir,$version);\n\t}else{\n\t\tmkdir($dir.$version);\n\t\treturn $dir.$version;\n\t}\n\n}", "title": "" } ]
88c69c68ddc6809f34d3ff8ab72016ee
Render the versions dropdown menu
[ { "docid": "918643f4c4dbcbf5bc41b7532bd5a143", "score": "0.772186", "text": "public function renderDropdown()\n\t{\n\t\t$objVersion = $this->Database->prepare(\"SELECT tstamp, version, username, active FROM tl_version WHERE fromTable=? AND pid=? ORDER BY version DESC\")\n\t\t\t\t\t\t\t\t ->execute($this->strTable, $this->intPid);\n\n\t\tif ($objVersion->numRows < 2)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t$versions = '';\n\n\t\twhile ($objVersion->next())\n\t\t{\n\t\t\t$versions .= '\n <option value=\"'.$objVersion->version.'\"'.($objVersion->active ? ' selected=\"selected\"' : '').'>'.$GLOBALS['TL_LANG']['MSC']['version'].' '.$objVersion->version.' ('.\\Date::parse(\\Config::get('datimFormat'), $objVersion->tstamp).') '.$objVersion->username.'</option>';\n\t\t}\n\n\t\treturn '\n<div class=\"tl_version_panel\">\n\n<form action=\"'.ampersand(\\Environment::get('request'), true).'\" id=\"tl_version\" class=\"tl_form\" method=\"post\">\n<div class=\"tl_formbody\">\n<input type=\"hidden\" name=\"FORM_SUBMIT\" value=\"tl_version\">\n<input type=\"hidden\" name=\"REQUEST_TOKEN\" value=\"'.REQUEST_TOKEN.'\">\n<select name=\"version\" class=\"tl_select\">'.$versions.'\n</select>\n<input type=\"submit\" name=\"showVersion\" id=\"showVersion\" class=\"tl_submit\" value=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['restore']).'\">\n<a href=\"'.\\Backend::addToUrl('versions=1&amp;popup=1').'\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['showDifferences']).'\" onclick=\"Backend.openModalIframe({\\'width\\':768,\\'title\\':\\''.specialchars(str_replace(\"'\", \"\\\\'\", $GLOBALS['TL_LANG']['MSC']['showDifferences'])).'\\',\\'url\\':this.href});return false\">'.\\Image::getHtml('diff.gif').'</a>\n</div>\n</form>\n\n</div>\n';\n\t}", "title": "" } ]
[ { "docid": "31cad6654e9ef641ba410a1a45da9586", "score": "0.6655547", "text": "public function getVersionList(){\n $this->view->title = \"Version Listing\";\n $this->view->versions = system\\library\\Version::all();\n $this->view->render(\"version/index\",false);\n }", "title": "" }, { "docid": "78ec19f50f785f55788070736391e158", "score": "0.6366193", "text": "function print_filter_show_target_version() {\n\tglobal $t_select_modifier, $t_filter;\n\t?><!-- Fixed in Version -->\n\t\t<select <?php echo $t_select_modifier;?> name=\"<?php echo FILTER_PROPERTY_TARGET_VERSION;?>[]\">\n\t\t\t<option value=\"<?php echo META_FILTER_ANY?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_TARGET_VERSION], META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>\n\t\t\t<option value=\"<?php echo META_FILTER_NONE?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_TARGET_VERSION], META_FILTER_NONE );?>>[<?php echo lang_get( 'none' )?>]</option>\n\t\t\t<?php print_version_option_list( $t_filter[FILTER_PROPERTY_TARGET_VERSION], /* projectId */ null, /* released */ VERSION_ALL, /* leadingBlank */ false, /* withSubs */ true )?>\n\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "7e124b98686b59cc8f218c72c57f1311", "score": "0.6062641", "text": "public function render_licenses_menu() {\r\n $title = sprintf( __( '%s Plugin Automatic Updates Settings', $this->text_domain ), $this->product_name );\r\n $settings_group_id = $this->product_id . '-license-settings-group';\r\n\r\n ?>\r\n <div class=\"wrap\">\r\n <form action='options.php' method='post'>\r\n\r\n <h2><?php echo $title; ?></h2>\r\n\r\n <?php\r\n settings_fields( $settings_group_id );\r\n do_settings_sections( $settings_group_id );\r\n submit_button();\r\n ?>\r\n\r\n </form>\r\n </div>\r\n <?php\r\n }", "title": "" }, { "docid": "1ce2558b7151ce1b476024122e6769ea", "score": "0.60355276", "text": "function print_filter_show_fixed_in_version() {\n\tglobal $t_select_modifier, $t_filter;\n\t?><!-- Fixed in Version -->\n\t\t<select <?php echo $t_select_modifier;?> name=\"<?php echo FILTER_PROPERTY_FIXED_IN_VERSION;?>[]\">\n\t\t\t<option value=\"<?php echo META_FILTER_ANY?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_FIXED_IN_VERSION], META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>\n\t\t\t<option value=\"<?php echo META_FILTER_NONE?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_FIXED_IN_VERSION], META_FILTER_NONE );?>>[<?php echo lang_get( 'none' )?>]</option>\n\t\t\t<?php print_version_option_list( $t_filter[FILTER_PROPERTY_FIXED_IN_VERSION], /* projectId */ null, /* released */ VERSION_ALL, /* leadingBlank */ false, /* withSubs */ true )?>\n\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "1d67654cc0dac067db27257e73ce9484", "score": "0.60099804", "text": "public static function renderMenu() {\r\n\t\t\r\n\t\t$out='<ul>';\t\r\n\t\t\r\n\t\tforeach(ThemexCore::$options as $option) {\r\n\t\t\tif($option['type']=='section') {\r\n\t\t\t\t$out.='<li><a href=\"#'.themex_sanitize_key($option['name']).'\">'.$option['name'].'</a></li>';\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t$out.='</ul>';\r\n\t\t\r\n\t\techo $out;\t\t\r\n\t}", "title": "" }, { "docid": "50bd7c27e06944711b26879ff26ff17a", "score": "0.5936232", "text": "public function render()\n {\n return view('adminhub::livewire.components.products.options.option-creator')\n ->layout('adminhub::layouts.base');\n }", "title": "" }, { "docid": "2e8df613397374cea32eb401db061c8e", "score": "0.5881096", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $versions = $em->getRepository('AppBundle:Version')->findAll();\n\n return $this->render('Form/version/index.html.twig', array(\n 'versions' => $versions,\n ));\n }", "title": "" }, { "docid": "3536bdbf2951458abe7553e6a9862e72", "score": "0.5838256", "text": "function print_filter_os_build() {\n\tglobal $t_select_modifier, $t_filter;\n\n\t?>\n\t\t<!-- OS Build -->\n\t\t<select <?php echo $t_select_modifier;?> name=\"<?php echo FILTER_PROPERTY_OS_BUILD;?>[]\">\n\t\t\t<option value=\"<?php echo META_FILTER_ANY?>\" <?php check_selected( $t_filter[FILTER_PROPERTY_OS_BUILD], META_FILTER_ANY );?>>[<?php echo lang_get( 'any' )?>]</option>\n\t\t\t<?php print_os_build_option_list( $t_filter[FILTER_PROPERTY_OS_BUILD] )?>\n\t\t</select>\n\t\t<?php\n}", "title": "" }, { "docid": "02530bd6717f93c97b5d2d85af74577a", "score": "0.58280873", "text": "public function render_content() {\n if ( empty( $this->choices ) )\n return;\n\n if( !empty( $this->menus ) ) {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <select <?php $this->link(); ?>>\n <?php\n foreach ( $this->choices as $value => $label )\n echo '<option value=\"' . esc_attr( $value ) . '\"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';\n ?>\n <?php foreach ( $this->menus as $menu ) { ?>\n <option value=\"<?php echo esc_attr( $menu->slug ); ?>\" <?php echo selected($this->value(), $menu->slug, false); ?>><?php echo esc_html( $menu->name ); ?></option>\n <?php } ?>\n </select>\n </label>\n <?php\n }\n }", "title": "" }, { "docid": "b3fcfa94e7524a89907e7246d95788e5", "score": "0.58013874", "text": "public function index()\n {\n // Get all sliders\n $vendors = Vendor::all()->sortByDesc('id');\n\n return view('admin.informative.vendor.vendors', compact('vendors'));\n }", "title": "" }, { "docid": "7689bb3493d6823be764d1adf5244cc8", "score": "0.5800439", "text": "public function dropdown()\n {\n return static::orderBy('display_name', 'asc')->where('is_parent', false)->lists('name', 'name');\n }", "title": "" }, { "docid": "010cb9c1c78b650c78ffb600122b0b96", "score": "0.5750286", "text": "public function display() {\r\n\t\t$this->create_select_options();\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "e1d5f6ca017c88feb9fd38fa93248e49", "score": "0.5689942", "text": "public function action_select_zver() {\n $this->chek_admin_enter();\n $data = array();\n $data['zvernenna'] = DB::select()->distinct(true)->from('zvernenna')->order_by('date','DESC')->execute()->as_array();\n \n\t $this->template->content_admin = View::factory('admin/zvernenna/select_zver',$data);\n \n }", "title": "" }, { "docid": "0abfe2d06b80f623727c8d0765f49fc8", "score": "0.5689574", "text": "public function render() {\n return view( 'components.dropdown.modal' );\n }", "title": "" }, { "docid": "b8851dcc47a9e08dd74e66e33486a228", "score": "0.56201285", "text": "public static function renderSubmenu($vName = 'dashboard')\n\t{\n\t\t?>\n <script language=\"javascript\">\n function confirmBuildTaxRules() {\n if (confirm('This will delete all tax rules you created and build EU tax rules. Are you sure ?')) {\n location.href = 'index.php?option=com_osmembership&task=tool.build_eu_tax_rules';\n }\n }\n </script>\n\t\t<?php\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*')\n\t\t\t->from('#__osmembership_menus')\n\t\t\t->where('published = 1')\n\t\t\t->where('menu_parent_id = 0')\n\t\t\t->order('ordering');\n\t\t$db->setQuery($query);\n\t\t$menus = $db->loadObjectList();\n\t\t$html = '';\n\t\t$html .= '<ul id=\"mp-dropdown-menu\" class=\"nav nav-tabs nav-hover\">';\n\n\t\t$currentLink = 'index.php' . JUri::getInstance()->toString(array('query'));\n\n\t\tfor ($i = 0; $n = count($menus), $i < $n; $i++)\n\t\t{\n\t\t\t$menu = $menus[$i];\n\t\t\t$query->clear();\n\t\t\t$query->select('*')\n\t\t\t\t->from('#__osmembership_menus')\n\t\t\t\t->where('published = 1')\n\t\t\t\t->where('menu_parent_id = ' . intval($menu->id))\n\t\t\t\t->order('ordering');\n\t\t\t$db->setQuery($query);\n\t\t\t$subMenus = $db->loadObjectList();\n\n\t\t\tswitch ($i)\n\t\t\t{\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\t$view = 'subscriptions';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$view = 'coupons';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$view = 'plugins';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tcase 6:\n\t\t\t\tcase 7:\n\t\t\t\tcase 8:\n\t\t\t\t\t$view = 'configuration';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$view = '';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ($view && !OSMembershipHelper::canAccessThisView($view))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!count($subMenus))\n\t\t\t{\n\t\t\t\t$class = '';\n\t\t\t\t$extraClass = '';\n\n\t\t\t\tif ($menu->menu_link == $currentLink)\n\t\t\t\t{\n\t\t\t\t\t$class = ' class=\"active\"';\n\t\t\t\t\t$extraClass = ' active';\n\t\t\t\t}\n\n\t\t\t\t$html .= '<li' . $class . '><a href=\"' . $menu->menu_link . '\" class=\"nav-link dropdown-item' . $extraClass . '\"><span class=\"icon-' . $menu->menu_class . '\"></span> ' . JText::_($menu->menu_name) .\n\t\t\t\t\t'</a></li>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$class = ' class=\"dropdown\"';\n\n\t\t\t\tfor ($j = 0; $m = count($subMenus), $j < $m; $j++)\n\t\t\t\t{\n\t\t\t\t\t$subMenu = $subMenus[$j];\n\n\t\t\t\t\tif ($subMenu->menu_link == $currentLink)\n\t\t\t\t\t{\n\t\t\t\t\t\t$class = ' class=\"dropdown active\"';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$html .= '<li' . $class . '>';\n\t\t\t\t$html .= '<a id=\"drop_' . $menu->id . '\" href=\"#\" data-toggle=\"dropdown\" role=\"button\" class=\"dropdown-toggle nav-link dropdown-toggle\"><span class=\"icon-' . $menu->menu_class . '\"></span> ' .\n\t\t\t\t\tJText::_($menu->menu_name) . ' <b class=\"caret\"></b></a>';\n\t\t\t\t$html .= '<ul aria-labelledby=\"drop_' . $menu->id . '\" role=\"menu\" class=\"dropdown-menu\" id=\"menu_' . $menu->id . '\">';\n\n\t\t\t\tfor ($j = 0; $m = count($subMenus), $j < $m; $j++)\n\t\t\t\t{\n\t\t\t\t\t$subMenu = $subMenus[$j];\n\t\t\t\t\t$class = '';\n\t\t\t\t\t$extraClass = '';\n\n\t\t\t\t\t$vars = array();\n\t\t\t\t\tparse_str($subMenu->menu_link, $vars);\n\t\t\t\t\t$view = isset($vars['view']) ? $vars['view'] : '';\n\n\t\t\t\t\tif ($view && !OSMembershipHelper::canAccessThisView($view))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($subMenu->menu_link == $currentLink)\n\t\t\t\t\t{\n\t\t\t\t\t\t$class = ' class=\"active\"';\n\t\t\t\t\t\t$extraClass = ' active';\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$html .= '<li' . $class . '><a class=\"nav-link dropdown-item' . $extraClass . '\" href=\"' . $subMenu->menu_link .\n\t\t\t\t\t\t'\" tabindex=\"-1\"><span class=\"icon-' . $subMenu->menu_class . '\"></span> ' . JText::_($subMenu->menu_name) . '</a></li>';\n\t\t\t\t}\n\n\t\t\t\t$html .= '</ul>';\n\t\t\t\t$html .= '</li>';\n\t\t\t}\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "83c7d9f35cc180cea133631d49e8d45f", "score": "0.5618953", "text": "public function registerMenuOptions()\n {\n $categories = Menu::generateSelect([\n 'model' => app(CategoryInterface::class)->getModel(),\n 'theme' => false,\n 'options' => [\n 'class' => 'list-item',\n ]\n ]);\n echo view('blog::categories.partials.menu-options', compact('categories'));\n\n $tags = Menu::generateSelect([\n 'model' => app(TagInterface::class)->getModel(),\n 'theme' => false,\n 'options' => [\n 'class' => 'list-item',\n ]\n ]);\n echo view('blog::tags.partials.menu-options', compact('tags'));\n }", "title": "" }, { "docid": "9f1991ed55445a6e9e9a9eac99714e06", "score": "0.5574106", "text": "public function run()\n {\n echo $this->renderSortDropdown();\n }", "title": "" }, { "docid": "2f97ec91bac2d97e3a90631a16d9996a", "score": "0.55706733", "text": "public function _buildDropDownMenu($data){\n // debug($data);\n $html='';\n $options=null;\n $active=null;\n $html.='<ul class=\"dropdown-menu\">';\n foreach ($data as $value) {\n $html.= $this->_buildLi($value);\n }\n $html.='</ul>';\n return $html;\n }", "title": "" }, { "docid": "d947ec5c9e9616b3bbc5ba0c4a1ad01e", "score": "0.55687284", "text": "function display_option_select($args){\n\t\textract($args);\t\n\t\t\t \n\t\tif(!empty($open_value)){\n\t\t\t$val = get_option(THEME_SHORT_NAME.'_options_'.$find_value);\n\t\t\t$status = in_array($val,$open_value) || $default_open == true ? ' open' : ' closed';\n\t\t} else { $status = ''; }\n\t\t\n\t\t$slidecontrol = $slidecontrol ? 'slidecontrol' : '';\n\t\t\n\t\t$html .= '<div class=\"option '.$status.'\">';\n\t $html .= '<div class=\"option_title\">';\n\t \t$html .= '<label for=\"'.$name.'\">'.__($title).'</label>';\n\t $html .= '</div>';\n\t $html .= '<div class=\"option_input\">';\n\t \t$html .= '<select class=\"pretty-select '.$name.' '.$slidecontrol.'\" id=\"'.$name.'\" name=\"'.$name.'\" title=\"'.__($title).'\">';\n\t \tforeach ($options as $option):\n\t \t\t$selected = $option == esc_html($value) ? \"selected\" : \"\";\n\t \t \t$html .= '<option value=\"'.$option.'\" '.$selected.'>'.__($option).'</option>';\n\t endforeach;\n\t $html .= '</select>';\n\t $html .= '</div>';\n\t \n\t if(isset($description)){\n\t \t$html .= '<div class=\"option_description\">'.__($description).'</div>';\n\t\t\t}\n\t\t$html .= '</div>';\n $html .= '<div class=\"clear\"></div>';\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "2134d07721a2417c57ed7de558bae418", "score": "0.5536549", "text": "public function render() {\n $selectList = $this->_getBuilder()->createElement($this->getTag());\n\n foreach ($this->getAllAttributes() as $attr => $value) {\n $selectList->setAttribute($attr, $value);\n }\n\n if ( $defaultOption = $this->getDefaultOption() ) {\n $optionElem = $this->_getBuilder()->createElement('option');\n $optionElem->appendChild($this->_getBuilder()->createTextNode($defaultOption));\n $selectList->appendChild($optionElem);\n }\n\n foreach ($this->getAllOptions() as $option) {\n $optionElem = $this->_getBuilder()->createElement('option');\n $optionElem->setAttribute('value', $option);\n\n if ( $option === $this->getSelectedOption()) {\n $optionElem->setAttribute('selected', 'selected');\n }\n\n $optionElem->appendChild($this->_getBuilder()->createTextNode($option));\n\n $selectList->appendChild($optionElem);\n }\n\n $this->_getBuilder()->appendChild($selectList);\n\n return trim($this->_getBuilder()->saveHTML());\n }", "title": "" }, { "docid": "52f633edb93a26a11343bf1f31363af7", "score": "0.5523739", "text": "public function get_html() {\n\n\t\t// Generate output\n\t\t$out = '<div class=\"dropdown button\">';\n\t\t$out .= '<span class=\"dropdown--title\">'.$this->_vars['SourceID'].'</span>';\n\t\t$out .= '<ul class=\"dropdown--list\">';\n\t\tif(array_key_exists($this->_vars['Source'], $this->_vars['domain'])) {\n\t\t\t$out .= '<li><a href=\"'.WEB_ROOT.'/api/v1/view/domain/'.$this->_vars['domain'][$this->_vars['Source']].'/'.$this->_vars['SourceID'].'\" data-desc-id=\"'.$this->_vars['SourceID'].'\" data-desc-source=\"'.$this->_vars['domain'][$this->_vars['Source']].'\"><span class=\"icon-eye\">Show description</span></a></li>';\n\t\t}\n\t\tif(array_key_exists($this->_vars['Source'], $this->_vars['external_link'])) {\n\t\t\t$out .= '<li><a href=\"'.$this->get_external_url().'\"><span class=\"icon-link-ext\">View external data</span></a></li>';\n\t\t}\n\t\t$out .= '<li><a href=\"'.WEB_ROOT.'/tools/trex/?ids='.$this->_vars['SourceID'].'\" title=\"Search for proteins/transripts with this domain\"><span class=\"icon-search\">Search for proteins/transripts with this domain</span></a></li>';\n\t\t$out .= '</ul>';\n\t\t$out .= '</div>';\n\n\t\t// Return output\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "bb71db20500bec32a31348fbfb56bae3", "score": "0.5518211", "text": "private function getLangLinks()\n\t{\n\t\t$this->result = '<div class=\"dropdown ' . $this->options['class'] . '\">';\n\t\t$this->result .= '<button class=\"btn btn-primary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">' . HdbkLanguage::getLanguageByCode(Yii::$app->language)->code . ' ';\n\t\t$this->result .= '<span class=\"caret\"></span></button>';\n\t\t$this->result .= '<ul class=\"dropdown-menu\" id=\"main_ls\">';\n\t\t$this->getInacLanguagesTrait();\n\t\t$this->result .= '</ul></div>';\n\t}", "title": "" }, { "docid": "4fc49b05c4dc8290410bad91cc65aa5d", "score": "0.55176264", "text": "public function action_select_publinfo() {\n $this->chek_admin_enter();\n $data = array();\n $data['zvernenna'] = DB::select()->distinct(true)->from('publinfo')->order_by('zver_status')->execute()->as_array();\n \n\t $this->template->content_admin = View::factory('admin/publinfo/select_zver',$data);\n \n }", "title": "" }, { "docid": "a9801dc5fd22b2a44778a7317bed54fd", "score": "0.5513615", "text": "public function run()\n {\n $manager = Yii::$app->big->menuManager;\n $items = $manager->getItems($this->model->menu_id);\n $items = $manager->createDropDownMenu($items);\n if ($this->getIsNavbar()) {\n $navbarOptions = ['options' => $this->getNavbarOptions()];\n if (!empty($this->model->brand)) {\n $brand = $this->model->brand;\n // images has the string \"image:\" prepended\n if (strpos($brand, 'image:') === 0) {\n $brand = substr($brand, 6);\n $navbarOptions['brandLabel'] = Html::img($brand);\n } else {\n $navbarOptions['brandLabel'] = $brand;\n }\n }\n return $this->render('navbar', [\n 'block' => $this,\n 'items' => $items,\n 'options' => $this->getNavOptions(true),\n 'navbarOptions' => $navbarOptions,\n ]);\n } else {\n return $this->render('nav', [\n 'block' => $this,\n 'items' => $items,\n 'options' => $this->getNavOptions(false),\n ]);\n }\n }", "title": "" }, { "docid": "ca8cc32f134b9d1f68b7a28bc7e6e69b", "score": "0.5493976", "text": "public function index()\n {\n if(!$this->checkActionPermission('versions','view'))\n return redirect()->route('401');\n $versions = DB::table('versions')->select('*')\n ->orderBy('id','desc')->get();\n //print_r($versions);die;\n return view('versions.index')->withVersions($versions);\n \n }", "title": "" }, { "docid": "4429df3d17c64448ea216090df2e2a12", "score": "0.5486775", "text": "public function html()\n {\n return $this->builder()\n ->parameters([\n 'language' => [\n 'url' => asset('/vendor/datatables/lang/'.app()->getLocale().'.json'),\n ],\n 'filter' => false\n ])\n ->postAjax([\n 'url' => route('version.index', ['document' => request('document')->id]),\n 'data' => 'function(d) {\n d.revision = $(\"#revision\").val();\n d.user = $(\"#user\").val();\n }'\n ])\n ->setTableId('version-table')\n ->columns($this->getColumns())\n ->dom('B <\"row\"<\"col-sm-12 col-md-6\"l><\"col-sm-12 col-md-6\"f>> rt <\"row\"<\"col-sm-12 col-md-6\"i><\"col-sm-12 col-md-6\"p>>')\n ->orderBy(1, 'asc')\n ->buttons(\n Button::make('reload')\n );\n }", "title": "" }, { "docid": "e2764a13ae615cf4dd3c8135570b6467", "score": "0.5483188", "text": "public function listAction()\n {\n $options = $this->container->get('ir_product.manager.option')->findOptions();\n \n return $this->container->get('templating')->renderResponse('IRProductBundle:Admin/Option:list.html.'.$this->getEngine(), array(\n 'options' => $options,\n ));\n }", "title": "" }, { "docid": "4427acdd40e329998d1ca8db03a2596b", "score": "0.54689974", "text": "public function getFacility_DropDown() {\r\n $option_selected = '';\r\n if (!$this->level) {\r\n $option_selected = ' selected=\"selected\"';\r\n }\r\n \r\n // Get the levels\r\n $items = array('Public', 'Registered', 'Admin', 'LoggedIn', 'LoggedOut');\r\n\r\n $html = array();\r\n \r\n $html[] = '<p><label for=\"level\">Choose Menu Level</label>';\r\n $html[] = '<p><select name=\"level\" id=\"level\">';\r\n \r\n foreach ($items as $i=>$item) { \r\n // If the selected parameter equals the current then flag as selected\r\n if ($this->level == $item) {\r\n $option_selected = ' selected=\"selected\"';\r\n }\r\n // set up the option line\r\n $html[] = '<option value=\"' . $item . '\"' . $option_selected . '>' . $item . '</option>';\r\n // clear out the selected option flag\r\n $option_selected = '';\r\n }\r\n \r\n $html[] = '</select>';\r\n return implode(\"\\n\", $html); \r\n \r\n }", "title": "" }, { "docid": "08b7148034d5b4b86e038fdd9566673e", "score": "0.5454035", "text": "protected function renderListOptionsExt()\n\t{\n\t\tglobal $Security, $Language;\n\t}", "title": "" }, { "docid": "31c3d7d21be34d5571b297b0230b58c5", "score": "0.5445209", "text": "public function index()\n {\n $data = [\n 'title' => 'Data Vendor',\n 'menu' => 'vendor',\n 'sub_menu' => 'vendor',\n 'data_vendor' => Vendor::all(),\n ];\n\n return view('app.admin.vendors.index', $data);\n }", "title": "" }, { "docid": "0e1d8d081d259aadb8bea93d7a929e35", "score": "0.54427344", "text": "function europy_create_latest_release_menu( string $items ): string {\r\n\r\n\t// Get our months and piece together the shop url.\r\n\t$month_slugs = europy_find_last_six_months();\r\n\t$shop_page_url = wc_get_page_id( 'shop' ) ? get_permalink( wc_get_page_id( 'shop' ) ) : '';\r\n\r\n\t// Add a heading to the menu and start our submenu.\r\n\t$items .= \"<li id='menu-item-latest-releases' class='menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-latest-releases'><a href='#'>Latest releases</a>\";\r\n\t$items .= \"<ul class='sub-menu'>\";\r\n\r\n\t// Create a menu item for each archive.\r\n\tforeach ( $month_slugs as $month => $slug ) {\r\n\t\t$items .= \"<li><a href='\" . $shop_page_url . \"?archive-month=\" . $slug . \"' class=''>\" . $month . \"</a></li>\";\r\n\t}\r\n\r\n\t// Close the submenu.\r\n\t$items .= \"</ul>\";\r\n\r\n\treturn $items;\r\n}", "title": "" }, { "docid": "f6aa6c2ad577c6793183e65fd24aa109", "score": "0.54326457", "text": "public function render() {\n\n\n return $this->makeMenu();\n\n\n }", "title": "" }, { "docid": "adfbab111bc89a46f8ebb9a0d83986ce", "score": "0.5428739", "text": "public static function dropdownList()\n {\n \n $products = Product::orderBy('name', 'asc')->select('id', DB::raw('CONCAT(name, \" - Rs \", sellingprice) as name'))->get();\n\n return array('' => 'Select Product') + $products->lists('name', 'id');\n }", "title": "" }, { "docid": "d33acf3ec15261979a10d6aee832d1c1", "score": "0.5426775", "text": "public function render()\n {\n return view('viewcreator::components.select');\n }", "title": "" }, { "docid": "7fd0e29e72db7d033ebf96bbc9d8ba1c", "score": "0.5392059", "text": "public function init()\n {\n parent::init();\n Html::addCssClass($this->options, ['widget' => 'dropdown-menu']);\n }", "title": "" }, { "docid": "fab7e468472fb5d90c0e1227a8144be0", "score": "0.5382521", "text": "public function index()\n {\n // $categories = Category::nested()->get();\n\n return view('home'); \n\n\n $html = Category::renderAsHtml(); \n\n $categories = Category::attr(['name' => 'categories'])\n ->selected([3])\n ->renderAsDropdown();\n return view('category',compact('categories','html')); \n\n }", "title": "" }, { "docid": "e51608740c61ca14c094d054e02fd447", "score": "0.5367795", "text": "function displayAvailVolDateOptions() {\n $result = \"<option value='' disabled selected>-- Which Day works best?</option>\";\n $row = $this->retrieveAvailEventDates(date(\"Y\"));\n while ($ans = $row->fetch_row()) {\n $evtDate = strtotime($ans[0]);\n $result .= \"<option value='\" . date(\"Y-m-d\", $evtDate) . \"'>\"\n . date(\"l, F jS, Y\", $evtDate) . \"</option>\";\n }\n return $result;\n }", "title": "" }, { "docid": "c9ea09c89af33e8346864a6e957de82e", "score": "0.53596544", "text": "public function render_content() {\n\t\tif ( empty( $this->choices ) || ( ! is_array( $this->choices ) && ! is_callable( $this->choices ) ) )\n\t\t\treturn;\n\n\t\tif ( is_callable( $this->choices ) )\n\t\t\t$choices = call_user_func( $this->choices );\n\t\telse\n\t\t\t$choices = $this->choices;\n\n\t\t$name = '_options-dropdown-' . $this->id;\n\t\t?>\n\t\t<div class=\"options-control-inputs\">\n\t\t\t<label>\n\t\t\t\t<span class=\"options-control-preview\"></span>\n\t\t\t\t<select name=\"op-options[<?php __esc_attr( $this->id ) ?>]\" id=\"<?php __esc_attr( $name ) ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\tforeach ( $choices as $value => $label ):\n\t\t\t\t\t\tif ( is_array( $label ) && isset( $label['label'] ) && isset( $label['items'] ) && is_array( $label['items'] ) ): ?>\n\t\t\t\t\t\t\t<optgroup label=\"<?php __esc_attr( $label['label'] ) ?>\">';\n\n\t\t\t\t\t\t\t<?php foreach( $label['items'] as $item_value => $item_text ): ?>\n\n\t\t\t\t\t\t\t\t<option value=\"<?php __esc_attr( $item_value ) ?>\"<?php selected( $this->value(), $item_value ) ?>><?php __esc_html( $item_text ) ?></option>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php endforeach ?>\n\n\t\t\t\t\t\t\t</optgroup>\n\n\t\t\t\t\t\t\t<?php continue; ?>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<option value=\"<?php __esc_attr( $value ) ?>\" <?php selected( $this->value(), $value ) ?>><?php __esc_html( $label ) ?></option>\n\t\t\t\t\t<?php endforeach ?>\n\t\t\t\t</select>\n\t\t\t</label>\n\t\t</div><?php\n\t}", "title": "" }, { "docid": "715e87a01a32ebefd1ad31b46b2fd017", "score": "0.5355307", "text": "public function display_version()\n {\n $usage_vars = array(\n 'website' => Settings::get('website'),\n 'revision' => Settings::get('revision'),\n 'version' => Settings::get('version'),\n );\n $trmfrm = new TerminalFormatter();\n $this->render($usage_vars);\n $usage = $this->get_buffer();\n $usage = $trmfrm->format($usage);\n print($usage);\n }", "title": "" }, { "docid": "7349acc4c07f372eadb7507e75011840", "score": "0.5352749", "text": "static function showAdminMenu($vmView) {\n\t\tif(!isset(VmConfig::$installed)){\n\t\t\tVmConfig::$installed = false;\n\t\t}\n\t\tif(!VmConfig::$installed) return false;\n\n\t\t$moduleId = vRequest::getInt ( 'module_id', 0 );\n\t\t$menuItems = AdminUIHelper_override::_getAdminMenu ( $moduleId );\n\t\t$app = JFactory::getApplication();\n\t\t$isSite = $app->isSite();\n\n\t\t?>\n\t\t<!-- <div id=\"admin-ui-menu\" class=\"admin-ui-menu\"> -->\n <div id=\"menuspecial\" class=\"menuspecial white\">\n\t\t\t<?php\n\t\t\t$modCount = 1;\n\t\t\t$currentview = JRequest::getVar('view');\n\t\t\techo '<ul>';\n\t\t\tforeach ( $menuItems as $item ) {\n\n\t\t\t\t$html = '';\n\t\t\t\t$activegroup = \"\";\n\t\t\t\t$activegroup_style = \"\";\n\t\t\t\tforeach ( $item ['items'] as $link ) {\n\t\t\t\t\t$target='';\n\t\t\t\t\tif ($link ['name'] == '-') {\n\t\t\t\t\t\t// it was emtpy before\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (strncmp ( $link ['link'], 'http', 4 ) === 0) {\n\t\t\t\t\t\t\t$url = $link ['link'];\n\t\t\t\t\t\t\t$target='target=\"_blank\"';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$url = ($link ['link'] === '') ? 'index.php?option=com_virtuemart' :$link ['link'] ;\n\t\t\t\t\t\t\t$url .= $link ['view'] ? \"&view=\" . $link ['view'] : '';\n\t\t\t\t\t\t\t$url .= $link ['task'] ? \"&task=\" . $link ['task'] : '';\n\t\t\t\t\t\t\t$url .= $isSite ? '&tmpl=component&manage=1':'';\n\t\t\t\t\t\t\t// $url .= $link['extra'] ? $link['extra'] : '';\n\t\t\t\t\t\t\t$url = vRequest::vmSpecialChars($url);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $vmView->manager($link ['view'])\n\t\t\t\t\t\t|| $target || $link ['view']=='about' || $link ['view']=='virtuemart') {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$activeclass = \"\";\n\t\t\t\t\t\t\tif($link['view'] == $currentview)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$activeclass = \"activeli\";\n\t\t\t\t\t\t\t\t$activegroup = \"active\";\n\t\t\t\t\t\t\t\t$activegroup_style = \"display:block;\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$html .= '\n\t\t\t\t\t\t<li class=\"'.$activeclass.'\">\n\t\t\t\t\t\t\t<a href=\"'.$url.'\" '.$target.' >\n\t\t\t\t\t\t\t\t<span class=\"vmicon-wrapper hasTip\" title=\"'. vmText::_ ( $link ['name'] ).'\"><span class=\"'.$link ['icon_class'].'\"></span></span>\n\t\t\t\t\t\t\t\t<span class=\"menu-subtitle\">'. vmText::_ ( $link ['name'] ).'</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!empty($html)){\n\t\t\t\t\t?>\n <li class=\"<?php echo $activegroup; ?>\"><a href=\"#\">\n\n\t\t\t\t\t<span class=\"menu-title-wrapper\">\n\t\t\t\t\t\t<span class=\"vmicon-wrapper\"><span class=\"<?php echo vmText::_ ( $item['items'][0]['icon_class'] )?>\"></span></span>\n\t\t\t\t\t\t<span class=\"menu-title-content\"><?php echo vmText::_ ( $item ['title'] )?></span>\n\t\t\t\t\t</span>\n\n </a>\n\n\t\t\t\t\t\t<ul class=\"submenuspecial\" style=\"<?php echo $activegroup_style; ?>\">\n\t\t\t\t\t\t\t<?php echo $html ?>\n\t\t\t\t\t\t</ul>\n </li>\n\n\t\t\t\t\t<?php $modCount ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\techo \"</ul>\";\n\t\t\t?>\n\t\t\t<div class=\"menu-notice\"></div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "aa62decdf85933f9c2aa4f62c4a26172", "score": "0.5348532", "text": "public function getDropdown()\n\t{\n\t\t$return\t\t= array( array( 'blog_entries', $this->lang->words['rebuild__entry'] ) );\n\t\t$return[]\t= array( 'blog_comments', $this->lang->words['rebuild__comment'] );\n\t\t$return[]\t= array( 'blog_cblocks', $this->lang->words['rebuild__cblocks'] );\n\t return $return;\n\t}", "title": "" }, { "docid": "149240b40ff1ccdd58f26e77f00b998d", "score": "0.53289694", "text": "public function render() {\n \n return view('ladmin::components.menus.top_right_menu');\n }", "title": "" }, { "docid": "ecfdf77f70719443fc22b4cc3105c457", "score": "0.53265375", "text": "public function render()\n {\n parent::renderPrepare();\n foreach ($this->options as $key => $value) {\n $this->innerHtml .= (new OptionInput($this->attributes['name'], $this->attributes['name'].'_'.$key, $key, $key == $this->selectedValue))->render();\n $this->innerHtml .= ' '. (new Label($this->attributes['name'].'_'.$key, $value, false))->render().' ';\n }\n return parent::render();\n\n }", "title": "" }, { "docid": "ad20b36cd00fd1e8bf789a21f0e6864e", "score": "0.53263795", "text": "public function render()\n {\n return view('components.ibmv18form.select');\n }", "title": "" }, { "docid": "294cfa7cf901f7bc0b6ddde3adc3087a", "score": "0.53252", "text": "function build() {\n\t\t$first_year = 2005;\n\t\t$current_year = date(\"Y\");\n\t\t$current_month = date(\"m\");\n\t\t\n\t\t$i = $current_year;\n\t\twhile($i >= $first_year)\t{\n\t\t\t$options[$i] = $i;\n\t\t\t$i--;\n\t\t}\n\t\t\n\t\t$this->select_year = new view_element(\"select\");\n\t\t$this->select_year->options = $options;\n\t\t$this->select_year->value = $current_year;\n\t\t\n\t\t$this->select_month = new view_element(\"select\");\n\t\t$this->select_month->options = array(\n\t\t\t\"01\"=>\"January\",\n\t\t\t\"02\"=>\"February\",\n\t\t\t\"03\"=>\"March\",\n\t\t\t\"04\"=>\"April\",\n\t\t\t\"05\"=>\"May\",\n\t\t\t\"06\"=>\"June\",\n\t\t\t\"07\"=>\"July\",\n\t\t\t\"08\"=>\"August\",\n\t\t\t\"09\"=>\"September\",\n\t\t\t\"10\"=>\"October\",\n\t\t\t\"11\"=>\"November\",\n\t\t\t\"12\"=>\"December\");\n\t\t$this->select_month->value = $current_month;\n\n\t\tparent::build();\n\t}", "title": "" }, { "docid": "bef7df55771e2eb9aa4dfd351605a3e0", "score": "0.53247374", "text": "public function render()\n {\n return $this->environment->render('ProjectBlogBundle:Extension:side-menu.html.twig',[\n 'categories' => $this->categoryService->getCategories()\n ]);\n }", "title": "" }, { "docid": "a7703f915cbc6a906ca3a6d0495fce99", "score": "0.5321444", "text": "public function render()\n {\n return view('components.smth-search-dropdown');\n }", "title": "" }, { "docid": "5ebdc90ef2ddf33c555f24df67f9df52", "score": "0.5314091", "text": "public static function dropdown( $args ) {\n\t\t?>\n\n\t\t<label for=\"<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>\">\n\t\t\t<?php echo esc_html( $args->display ); ?>\n\t\t\t<?php if ( $args->required && apply_filters( 'gem_required_field_indicator', true, $args ) ) : ?>\n\t\t\t\t<span class=\"required\">*</span>\n\t\t\t<?php endif; ?>\n\t\t</label>\n\t\t</br>\n\t\t<select id=\"<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>\" name=\"<?php echo esc_attr( $args->name ); ?>\" class=\"<?php echo $args->required ? 'gem-required' : ''; ?>\" data-label=\"<?php echo esc_attr( $args->display ); ?>\">\n\n\t\t<?php\n\t\t$trim_values = array( '[', ']' );\n\t\t$options = $args->options;\n\t\tforeach ( $trim_values as $trim ) {\n\t\t\t$options = trim( $options, $trim );\n\t\t}\n\t\t$trimmed_options = array();\n\t\t$options = str_replace( '\"', '', $options );\n\t\t$trimmed_options = explode( ',', $options );\n\n\t\tforeach ( $trimmed_options as $dropdown_options ) :\n\t\t\t?>\n\t\t\t<option value=\"<?php echo esc_attr( $dropdown_options ); ?>\"> <?php echo esc_html( $dropdown_options ); ?><br>\n\t\t<?php endforeach; ?>\n\t\t</select>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "100626a7d62c51f9a1e304777a3a59aa", "score": "0.53061944", "text": "public function actionIndex()\n {\n $searchModel = new VersionSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "3c3cba7ac386f813c68026ffea387be5", "score": "0.53038174", "text": "public function renderMenu()\n {\n $contents = '';\n foreach (config('bkstar123_bkscms_sidebarmenu') as $link) {\n $menuItem = new MenuLink(\n $link['name'],\n $link['path'],\n $link['icon'] ?? '',\n $link['children'] ?? []\n );\n $contents .= $this->createLink($menuItem);\n }\n echo $contents;\n }", "title": "" }, { "docid": "96416d876e99776a4a44804364ff5194", "score": "0.53016496", "text": "static function showForVersion(SoftwareVersion $version) {\n self::showInstallations($version->getField('id'), 'id');\n }", "title": "" }, { "docid": "c7677f532171ed98cda24db9187553f3", "score": "0.53003085", "text": "function future_field_nav_style_cb() {\n\t\t\t\n\t\t\t$future_options = $this->future_get_admin_settings();\n\t\t\t$items = $this->future_nav_style_pd();\n\t\t\t\n\t\t\techo '<select id=\"future_nav_style\" name=\"future_options[future_nav_style]\">';\n\t\t\tforeach( $items as $key => $val ) {\n\t\t\t?>\n <option value=\"<?php echo $key; ?>\" <?php selected( $key, $future_options['future_nav_style'] ); ?>><?php echo $val; ?></option>\n <?php\n\t\t\t}\n\t\t\techo '</select>';\n\t\t\techo '<div><small>'. __( 'Select navigation style.', 'future' ) .'</small></div>';\n\t\t\n\t\t}", "title": "" }, { "docid": "a2643d32c622b2091f90130676a65f84", "score": "0.52983904", "text": "public function render()\n {\n $root =& XCube_Root::getSingleton();\n $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);\n\n $renderTarget =& $renderSystem->createRenderTarget('main');\n\n $renderTarget->setAttribute('legacy_module', 'legacy');\n $renderTarget->setTemplateName('legacy_xoopsform_select.html');\n $renderTarget->setAttribute('element', $this);\n\n $renderSystem->render($renderTarget);\n\n return $renderTarget->getResult();\n }", "title": "" }, { "docid": "cc3ef7bbcc83f6214767589acfa2f315", "score": "0.5296883", "text": "public function get_versions()\n {\n jsonView(\n Munkireportinfo_model::selectRaw('version, count(*) AS count')\n ->filter()\n ->groupBy('version')\n ->orderBy('count', 'desc')\n ->get()\n ->toArray()\n );\n }", "title": "" }, { "docid": "614b0bb111b92c5b7bb9089d730e2ab3", "score": "0.5296586", "text": "function to_html() {\n\t\t$html = '<select name=\"'.$this->owner->name.'-'.$this->name.'-value\" id=\"'.$this->owner->name.'-'.$this->name.'-value\">';\n\t\tforeach($this->files as $file) {\n\t\t\t$selected = ($this->value == $file ? ' selected=\"selected\"' : '');\n\t\t\t$html .= '<option value=\"'.esc_attr($file).'\" '.$selected.'>'.esc_attr($file).'</option>';\n\t\t}\n\t\t$html .= '</select>';\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "6613c490faf52ac6882a68827964f97c", "score": "0.5296475", "text": "public function display()\n\t{\n\t\tif (! $this->_visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tparent::display();\n\n\t\t$options = $this->getOptions();\n\t\t$selected = false;\n\n\t\tif ($this->_showBlank) {\n\t\t\t$options = array_merge(array($this->_getBlankOption()), $options);\n\t\t}\n\n\t\t// only show a select if there is more than one option\n\t\tif (count($options) > 1) {\n\t\t\t$flydownValue = ($this->_serializeValues) ?\n\t\t\t\t$this->_value : (string) $this->_value;\n\n\t\t\tif ($this->_serializeValues) {\n\t\t\t\t$salt = $this->getForm()->getSalt();\n\t\t\t}\n\n\t\t\t$selectTag = new Zap_HtmlTag('select');\n\t\t\t$selectTag->name = $this->_id;\n\t\t\t$selectTag->id = $this->_id;\n\t\t\t$selectTag->class = $this->_getCSSClassString();\n\n\t\t\tif (!$this->isSensitive()) {\n\t\t\t\t$selectTag->disabled = 'disabled';\n\t\t\t}\n\n\t\t\t$optionTag = new Zap_HtmlTag('option');\n\n\t\t\t$selectTag->open();\n\n\t\t\tforeach ($options as $flydownOption) {\n\t\t\t\tif ($this->_serializeValues) {\n\t\t\t\t\t$optionTag->value = Zap_String::signedSerialize(\n\t\t\t\t\t\t$flydownOption->getValue(), \n\t\t\t\t\t\t$salt\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$optionTag->value = (string) $flydownOption->getValue();\n\t\t\t\t}\n\n\t\t\t\tif ($flydownOption instanceof Zap_FlydownDivider) {\n\t\t\t\t\t$optionTag->disabled = 'disabled';\n\t\t\t\t\t$optionTag->class = 'swat-flydown-option-divider';\n\t\t\t\t} elseif ($flydownOption instanceof Zap_FlydownBlankOption) {\n\t\t\t\t\t$optionTag->removeAttribute('disabled');\n\t\t\t\t\t$optionTag->class = 'swat-blank-option';\n\t\t\t\t} else {\n\t\t\t\t\t$optionTag->removeAttribute('disabled');\n\t\t\t\t\t$optionTag->removeAttribute('class');\n\n\t\t\t\t\t// add option-specific CSS classes from option metadata\n\t\t\t\t\t$classes = $this->getOptionMetadata(\n\t\t\t\t\t\t$flydownOption, 'classes');\n\n\t\t\t\t\tif (is_array($classes)) {\n\t\t\t\t\t\t$optionTag->class = implode(' ', $classes);\n\t\t\t\t\t} elseif ($classes) {\n\t\t\t\t\t\t$optionTag->class = strval($classes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$value = ($this->_serializeValues) ?\n\t\t\t\t\t$flydownOption->getValue() : (string) $flydownOption->getValue();\n\n\t\t\t\tif ($flydownValue === $value && ! $selected &&\n\t\t\t\t\t! ($flydownOption instanceof Zap_FlydownDivider)\n\t\t\t\t) {\n\n\t\t\t\t\t$optionTag->selected = 'selected';\n\t\t\t\t\t$selected = true;\n\t\t\t\t} else {\n\t\t\t\t\t$optionTag->removeAttribute('selected');\n\t\t\t\t}\n\n\t\t\t\t$optionTag->setContent($flydownOption->getTitle());\n\n\t\t\t\t$optionTag->display();\n\t\t\t}\n\n\t\t\t$selectTag->close();\n\n\t\t} elseif (count($options) == 1) {\n\t\t\t// get first and only element\n\t\t\t$this->_displaySingle(current($options));\n\t\t}\n\t}", "title": "" }, { "docid": "d6f06ff333135c4799f3a8beeb89ba3a", "score": "0.5292043", "text": "public function render(){\r\n\t\tif (!$this->init_flag){\r\n\t\t\t$this->init_flag=true;\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t$res = $this->sql->get_variants($this->config->text[0][\"db_name\"],$this->request);\r\n\t\treturn $this->render_set($res);\r\n\t}", "title": "" }, { "docid": "7f5180075d7d1871b9b130792f675965", "score": "0.529144", "text": "function wpdevbk_show_help_dropdown_menu_in_top_menu_line() {\n\n $title = __('Help' ,'booking'); \n ?>\n <span class=\"dropdown pull-right\">\n <a href=\"javascript:void(0)\" data-toggle=\"dropdown\" class=\"dropdown-toggle nav-tab \"\n ><i class=\"icon-question-sign\"></i> <?php echo $title; ?> <b class=\"caret\" style=\"border-top-color: #333333 !important;\"></b></a>\n <ul class=\"dropdown-menu\" id=\"menu1\" style=\"right:0px; left:auto;\">\n <li><a href=\"<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-about' ), 'index.php' ) ) ); ?>\"><?php _e('About Booking Calendar' ,'booking'); ?></a></li>\n <li class=\"divider\"></li>\n <li><a href=\"http://wpbookingcalendar.com/help/\" target=\"_blank\"><?php _e('Help' ,'booking'); ?></a></li>\n <li><a href=\"http://wpbookingcalendar.com/faq/\" target=\"_blank\"><?php _e('FAQ' ,'booking'); ?></a></li>\n <li><a href=\"http://wpbookingcalendar.com/support/\" target=\"_blank\"><?php _e('Technical Support' ,'booking'); ?></a></li>\n <li class=\"divider\"></li>\n <li><a style=\"font-size: 1.1em;font-weight: bold;\" href=\"<?php echo wpbc_up_link(); ?>\" target=\"_blank\"><?php if ( wpbc_get_ver_sufix() == '' ) { _e('Upgrade Now' ,'booking'); } else { _e('Upgrade Now' ,'booking'); } ?></a></li>\n </ul>\n </span>\n <?php\n }", "title": "" }, { "docid": "777d85d078e07d6c879096a51a0ee931", "score": "0.52860254", "text": "protected function showRev() {\n\t\t$sql = \"SELECT\t\tauthor,\n\t\t\t\t\tmsg\n\t\t\tFROM\t\twcf\".WCF_N.\"_projectSvn svn\n\t\t\tWHERE\t\tgroupID = \".$this->groupID.\"\n\t\t\tAND \t\trevision = \".$this->rev;\n\n\t\t$row = WCF::getDB()->getFirstRow($sql);\n\t\techo '<div class=\"timeline-event-bubble-title\"><a href=\"#\" style=\"float:left\" onclick=\"return timeBack(this)\">&laquo;</a>'.$this->rev.'</div>';\n\t\techo '<div class=\"timeline-event-bubble-body\">';\n\t\techo \"<b>\".$row['author'].\"</b><br />\".$row['msg'];\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "7f19271cf1c37da10b4586b88b8cbc48", "score": "0.5272413", "text": "function render()\n {\n\t\t$value = $this->getValue();\n\t\t\n\t\t$layoutselec = new XoopsFormSelect('', $this->getName().'_type', $value['type']);\n\t\t$layoutselec->setClass(\"width_toggle\");\n\t\t$layoutselec->addOption(0, _AM_TMANAGER_LAYOUTFIXED);\n\t\t$layoutselec->addOption(1, _AM_TMANAGER_LAYOUTFLUID);\n\t\t$width = new XoopsFormNumber('', $this->getName().'_nbr', $value['nbr'], $value['type']==0?'px':'% ', false);\n\t\t\n\t\treturn \t$layoutselec->render().\" \".\n\t\t\t\t$width->render();\n }", "title": "" }, { "docid": "752127fd5932b4d65e0ad3860a0d4d8f", "score": "0.52710915", "text": "protected function renderDropdown() {\n $config = $this->dropdown;\n $config['clientOptions'] = false;\n $config['view'] = $this->getView();\n\n return Dropdown::widget($config);\n }", "title": "" }, { "docid": "7c0bcc4987348881bad89fb8e371d046", "score": "0.5270377", "text": "public function environmentMenu()\n {\n return view('vendor.installer.environment');\n }", "title": "" }, { "docid": "3467f52824935832d5e53ea924f834f7", "score": "0.5248986", "text": "public function renderMenu(){\n $navigation = App_Backoffice_Navigation::getInstance()->getNavigation();\n $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();\n \n $menu = array();\n foreach ($navigation as $tab) {\n $tab = $tab['main'];\n \n if(isset($tab['action'])){\n $url = $baseUrl . '/' . $tab['controller'] . '/' . $tab['action'];\n }else{\n $url = $baseUrl . '/' . $tab['controller'];\n }\n \n if (isset($tab['active']) && $tab['active']) {\n $li = sprintf($this->_linkSelectedTemplate, $url, $tab['label']);\n } else {\n $li = sprintf($this->_linkTemplate, $url, $tab['label']);\n }\n \n $menu[] = $li;\n }\n \n $xhtml = '<ul id=\"nav\" class=\"prefix_1\">' . PHP_EOL . implode(PHP_EOL, $menu) . PHP_EOL . '</ul>';\n \n return $xhtml;\n }", "title": "" }, { "docid": "0659b61263007442dc3e8620d88d8e92", "score": "0.52407044", "text": "private function htmlgetListConsole()\n {\n $html = \"\";\n\n foreach ($this->administrator->getListConsole() as $key => $console) {\n $html .= '<option value=\"' . $console['id'] . '\">' . $console['name'] . '</option>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "170e1a57a82ee315986f2f8091dbae29", "score": "0.5234909", "text": "function draw_optiontype_pulldown($name, $default = '') {\r\n global $products_options_types_list;\r\n $values = array();\r\n foreach ($products_options_types_list as $id => $text) {\r\n $values[] = array('id' => $id, 'text' => $text);\r\n }\r\n return zen_draw_pull_down_menu($name, $values, $default);\r\n}", "title": "" }, { "docid": "893b6e6fc5d9fc93e19b20f0fb0b4b33", "score": "0.5232643", "text": "protected function displayReleases()\n {\n if (!$this->command) {\n return;\n }\n\n $key = 0;\n $rows = [];\n $releases = $this->releasesManager->getValidationFile();\n\n // Append the rows\n foreach ($releases as $name => $state) {\n $icon = $state ? '✓' : '✘';\n $color = $state ? 'green' : 'red';\n $date = DateTime::createFromFormat('YmdHis', $name)->format('Y-m-d H:i:s');\n $date = sprintf('<fg=%s>%s</fg=%s>', $color, $date, $color);\n\n // Add color to row\n $rows[] = [$key, $name, $date, $icon];\n ++$key;\n }\n\n // Render table\n $this->command->comment('Here are the available releases :');\n $this->command->table(\n ['#', 'Path', 'Deployed at', 'Status'],\n $rows\n );\n\n return $rows;\n }", "title": "" }, { "docid": "31625c70f76f7690099a3a11cf68b2c1", "score": "0.5230596", "text": "private function makeSelect()\n {\n echo \"<select name=\\\"$this->name\\\">\";\n $this->makeOptions($this->optionsArray);\n echo \"</select>\";\n }", "title": "" }, { "docid": "882f9312f844e59313ef31ae4f0a16d0", "score": "0.52207166", "text": "public function render()\n {\n return view('components.menu');\n }", "title": "" }, { "docid": "882f9312f844e59313ef31ae4f0a16d0", "score": "0.52207166", "text": "public function render()\n {\n return view('components.menu');\n }", "title": "" }, { "docid": "c1ba15dca495f29fe464dd1104bd2959", "score": "0.52203643", "text": "private function _optionsHTML()\n {\n $result = '';\n foreach ($this->options() as $key => $label) {\n $selected = ResourceTable::getSearchValue($this->index()) == $key ? ' selected=\"selected\"' : '';\n $result .= '<option value=\"'.$key.'\"'.$selected.'>'.$label.'</option>';\n }\n return $result;\n }", "title": "" }, { "docid": "9bcc47da4b94d2e8a531dc9d7e90c0e2", "score": "0.5219778", "text": "public function render()\n {\n return view('components.tipo-stock-chooser');\n }", "title": "" }, { "docid": "88c5fd3cb797e5aadb21630e4b91475a", "score": "0.52167755", "text": "function hide_version_admin ( $default ) {\n global $current_user, $wp_version;\n if ( !in_array($current_user->ID, cbstdsys_opts('a_admin_user_IDs') ) ) {\n return 'CB-STD-SYS Version '.CB_STD_SYS_VERSION;\n } else {\n return 'WP-'.$default.' ('.$wp_version.') &amp; CB-STD-SYS Version <a href=\"'. admin_url( 'theme-editor.php?file=/themes/cb-std-sys/inc/changelog.php&theme=cb-std-sys&dir=theme' ) . '\">'.CB_STD_SYS_VERSION.'</a>'; \n }\n }", "title": "" }, { "docid": "6988f7495a6f42959d82e2c07f4e4582", "score": "0.520683", "text": "private function makeSelect()\n {\n echo \"<label for=\\\"$this->sName\\\">Favorite planet: </label>\";\n echo \"<select name=\\\"$this->sName\\\">\";\n $this->makeOptions($this->optionsArray);\n echo \"</select>\";\n echo \"<br>\";\n }", "title": "" }, { "docid": "f04be70ed374071bfc850b8f39189a3e", "score": "0.5191449", "text": "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\t$index = 0;\r\n\t\t$optGroups = '';\r\n\t\t$options = '';\r\n\t\tforeach( $this->options as $value => $text ){\r\n\t\t\t$index++;\r\n\t\t\t$isInOptGroup = false;\r\n\r\n\t\t\tforeach( $this->optGroups as $optGroupLabel => $optGroupIndices ){\r\n\t\t\t\t$pos = array_search($index, $optGroupIndices);\r\n\t\t\t\tif( $pos !== false ){\r\n\t\t\t\t\t$isInOptGroup = true;\r\n\r\n\t\t\t\t\tif( count($optGroupIndices) > 1 ){\r\n\t\t\t\t\t\tif( $pos == 0 ){\r\n\t\t\t\t\t\t\t$optGroups .=\r\n\t\t\t\t\t\t\t\t'<optgroup label=\"'.HtmlFormTools::auto_htmlspecialchars($optGroupLabel, $this->needsUtf8Safety()).'\">'\r\n\t\t\t\t\t\t\t\t.$this->printOption($index, $value, $text)\r\n\t\t\t\t\t\t\t;\r\n\t\t\t\t\t\t} elseif( $pos == (count($optGroupIndices)-1) ){\r\n\t\t\t\t\t\t\t$optGroups .=\r\n\t\t\t\t\t\t\t\t$this->printOption($index, $value, $text)\r\n\t\t\t\t\t\t\t\t.'</optgroup>'\r\n\t\t\t\t\t\t\t;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$optGroups .= $this->printOption($index, $value, $text);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$optGroups .=\r\n\t\t\t\t\t\t\t'<optgroup label=\"'.HtmlFormTools::auto_htmlspecialchars($optGroupLabel, $this->needsUtf8Safety()).'\">'\r\n\t\t\t\t\t\t\t.$this->printOption($index, $value, $text)\r\n\t\t\t\t\t\t\t.'</optgroup>'\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\r\n\t\t\tif( !$isInOptGroup ){\r\n\t\t\t\t$options .=\t$this->printOption($index, $value, $text);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$printJavascriptValidationCode = $this->printJavascriptValidationCode();\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.(!empty($printJavascriptValidationCode) ? ' '.parent::JSENABLEDCLASS : '').'\">'\r\n\t\t\t\t\t.'<select'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.($this->multiple ? $this->printNameArray() : $this->printName())\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.' size=\"'.$this->size.'\"'\r\n\t\t\t\t\t\t.$this->printMultiple()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t\t\t.$optGroups\r\n\t\t\t\t\t\t.$options\r\n\t\t\t\t\t.'</select>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t\t.$printJavascriptValidationCode\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "604557bf61c9f10b7c1ba8482965a841", "score": "0.5183999", "text": "protected function render() {\n\t\t$id = 'customize-control-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );\n\t\t$class = 'customize-control has-switchers customize-control-' . $this->type;\n\t\techo '<li id=\"' . esc_attr( $id ) . '\" class=\"' . esc_attr( $class ) . '\">';\n\t\t$this->render_content();\n\t\techo '</li>';\n\t}", "title": "" }, { "docid": "8010ec0e142d4d3324e6668568c9e1c4", "score": "0.5182614", "text": "public function render()\n {\n return view('adminhub::livewire.pages.products.variants.show')\n ->layout('adminhub::layouts.app', [\n 'title' => 'Edit Variant',\n ]);\n }", "title": "" }, { "docid": "031e051f9ee180393ca058a9aa62db0c", "score": "0.51816404", "text": "public function render_content() {\n\t\t?>\n\t\t\n\t\t\t<div class=\"options-control-inputs\">\n\t\t\t\t<colors v-bind:value=\"data\" v-bind:options=\"choices\" v-on:change=\"triggerChange\"></colors>\n\t\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "fb6018ccadf6992a9d736be269ba4311", "score": "0.51776856", "text": "function printAlbumsSelector() {\n\tglobal $_zp_gallery;\n\t$albumlist;\n\tgenAlbumUploadList($albumlist);\n\t\t?>\n\t<select id=\"albumselector\" name=\"albumselect\">\n\t<?php\n\tforeach($albumlist as $key => $value) {\n\t\t$albumobj = new Album($_zp_gallery,$key);\n\t\t$albumname = $albumobj->name;\n\t\t$level = substr_count($albumname,\"/\");\n\t\t$arrow = \"\";\n\t\tfor($count = 1; $count <= $level; $count++) {\n\t\t\t$arrow .= \"&raquo; \";\n\t\t}\n\t\techo \"<option value='\".html_encode($albumobj->name).\"'>\";\n\t\techo $arrow.$albumobj->getTitle().unpublishedZenphotoItemCheck($albumobj).\"</option>\";\n\t}\n\t?>\n\t</select>\n\t<?php\n}", "title": "" }, { "docid": "f36a54d058045595300944ca48788e10", "score": "0.5174947", "text": "public function admin_options()\n {\n ?>\n <h3><?php _e('Sellix', 'woocommerce'); ?></h3>\n\n <table class=\"form-table\">\n <?php\n $this->generate_settings_html();\n ?>\n </table>\n <?php\n }", "title": "" }, { "docid": "a6e96daf54fb3d1621a4a9ae8220ad79", "score": "0.51738894", "text": "function ucp_build_menu()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$content = \"\";\n\n\t\t$this->ipsclass->load_template( 'skin_ucp' );\n\t\t$this->ipsclass->load_language('lang_downloads');\n\n\t\t//-----------------------------------------\n\t\t// Get links\n\t\t//-----------------------------------------\n\n\t\t$content .= $this->ipsclass->compiled_templates['skin_ucp']->menu_bar_new_link( \"{$this->ipsclass->base_url}autocom=downloads&amp;req=ucp_files\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->ipsclass->lang['ucp_manage_files'] );\n\n\t\t$content .= $this->ipsclass->compiled_templates['skin_ucp']->menu_bar_new_link( \"{$this->ipsclass->base_url}autocom=downloads&amp;req=ucp_favs\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->ipsclass->lang['ucp_manage_favs'] );\n\n\t\t$content .= $this->ipsclass->compiled_templates['skin_ucp']->menu_bar_new_link( \"{$this->ipsclass->base_url}autocom=downloads&amp;req=ucp_subs\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->ipsclass->lang['ucp_manage_subs'] );\n\n\t\tif ( $content )\n\t\t{\n\t\t\treturn $this->ipsclass->compiled_templates['skin_ucp']->menu_bar_new_category( $this->ipsclass->lang['ucp_menu_cat'], $content );\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "7f5f93e84ffd242813f3f44f414e3724", "score": "0.5168046", "text": "function updateDropdowns(){\n\n showRecentChats(1);\n}", "title": "" }, { "docid": "8442c1c11f78fc8d18c8b4f3f4aeb70e", "score": "0.5166445", "text": "public function index()\n {\n $products = Product::has('options')->get();\n return view('admin.option.index', compact('products'));\n }", "title": "" }, { "docid": "f07f5a688de7e59ba2a01accdc41be61", "score": "0.51646817", "text": "public function render_content() {\n\n // Hackily add in the data link parameter.\n $animation_style = pofo_animation_style_customizer();\n\n if(!empty($animation_style)) {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <select <?php $this->link(); ?>>\n <?php\n foreach ( $animation_style as $value => $label ){\n echo '<option value=\"' . esc_attr( $value ) . '\"' . selected( $this->value(), $value, false ) . '>' . $label . '</option>';\n }\n ?>\n </select>\n </label>\n <?php\n }\n }", "title": "" }, { "docid": "27e186f8e77a55eb7d4f5fbbab96da05", "score": "0.5155408", "text": "public function renderMenu(): string\n {\n return array_reduce(\n $this->widgets,\n function (string $html, WidgetInterface $widget) {\n return $html . $widget->renderMenu();\n },\n ''\n );\n }", "title": "" }, { "docid": "5a8e0fa4ad41ec195a95a4f67ed1bbb0", "score": "0.51503795", "text": "function drawWidget()\n\t{\n\t\t$mediaService = new MediaService();\n\t\t$fileArray = $mediaService->listMedia();\n\t\t\n\t\t?>\n\t\t<select name=\"<?php echo $this->getName()?>\" id=\"<?php echo $this->getName()?>\">\n\t\t\t<option value=\"\"></option>\n\t\t\t<?php foreach($fileArray as $file)\n\t\t\t{ \n\t\t\t\t/* @var $file File */\n\t\t\t\t$selected = \"\";\n\t\t\t\tif ($file->getHttpPath() == $this->getValue()) $selected = \"selected=\\\"selected\\\"\";\n\t\t\t?>\t\t\t\n\t\t\t<option <?php echo $selected?> value=\"<?php echo $file->getHttpPath()?>\"><?php echo $file->getTitle()?></option>\n\t\t\t<?php }?>\n\t\t</select>\n\t\t<?\n\t}", "title": "" }, { "docid": "32c1ff5ee2634260e02777e06db92633", "score": "0.51494056", "text": "function showSamsungDropDownMenu($samsungModels, $samsungModelsID, $getSamsungModelsKeys) {\n\n$beginMdSelArea = <<<EOF\n <div class=\"md-sel-area\"\nEOF;\n\n $endMdSelArea = <<<EOF\n </div>\nEOF;\n\n global $brandName;\n \n $BCE = $getSamsungModelsKeys[0];\n $GT_BC = $getSamsungModelsKeys[1];\n $GT_EI = $getSamsungModelsKeys[2];\n $GT_MPS = $getSamsungModelsKeys[3];\n $IJetMS = $getSamsungModelsKeys[4];\n $SGH_ABC = $getSamsungModelsKeys[5];\n $SGH_D = $getSamsungModelsKeys[6];\n $SGH_E = $getSamsungModelsKeys[7];\n $SGH_FG = $getSamsungModelsKeys[8];\n $SGH_IJ = $getSamsungModelsKeys[9];\n $SGH_LM = $getSamsungModelsKeys[10];\n $SGH_PSUV = $getSamsungModelsKeys[11];\n $SGH_X = $getSamsungModelsKeys[12];\n $SGH_Z = $getSamsungModelsKeys[13];\n $Ultra = $getSamsungModelsKeys[14];\n \n$brandBanner = <<<EOF\n<input type=\"hidden\" name=\"brand-name\" value=\"$brandName\" />\nEOF;\n\n// General models content box\n\t\t$startModelsBox = <<<EOF\n\t<div class=\"models-content-box\">\nEOF;\n\t\t$endModelsBox = <<<EOF\n\t</div>\nEOF;\n\n// ---- B | C | E ----\n\t$divBCEHeader = <<<EOF\n\t<div style=\"top: 0px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$BCE\"><span>$BCE</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startBCEModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-BCE-model\" name=\"select-BCE-model\">\nEOF;\n\n\t$endBCEModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- GT-B | GT-C ----\n\t$divGT_BCHeader = <<<EOF\n\t<div style=\"width: 400px; left: 175px; top: 20px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$GT_BC\"><span>$GT_BC</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startGT_BCModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-GTBC-model\" name=\"select-GTBC-model\">\nEOF;\n\n\t$endGT_BCModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- GT-E | GT-I ----\n\t$divGT_EIHeader = <<<EOF\n\t<div style=\"width: 400px; left: 175px; top: 40px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$GT_EI\"><span>$GT_EI</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startGT_EIModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-GTEI-model\" name=\"select-GTEI-model\">\nEOF;\n\n\t$endGT_EIModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- GT-M | GT-P | GT-S ----\n\t$divGT_MPSHeader = <<<EOF\n\t<div style=\"width: 400px; left: 175px; top: 60px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$GT_MPS\"><span>$GT_MPS</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startGT_MPSModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-GTMPS-model\" name=\"select-GTMPS-model\">\nEOF;\n\n\t$endGT_MPSModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- I | Jet | M | S----\n\t$divIJetMSHeader = <<<EOF\n\t<div style=\"width: 400px; left: 175px; top: 80px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$IJetMS\"><span>$IJetMS</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startIJetMSModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-IJMS-model\" name=\"select-IJMS-model\">\nEOF;\n\n\t$endIJetMSModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-A | SGH-B | SGH-C ----\n\t$divSGH_ABCHeader = <<<EOF\n\t<div style=\"width: 500px; left: 120px; top: 100px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_ABC\"><span>$SGH_ABC</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_ABCModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-ABC-model\" name=\"select-SGH-ABC-model\">\nEOF;\n\n\t$endSGH_ABCModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-D ----\n\t$divSGH_DHeader = <<<EOF\n\t<div style=\"top: 120px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_D\"><span>$SGH_D</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_DModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-D-model\" name=\"select-SGH-D-model\">\nEOF;\n\n\t$endSGH_DModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-E ----\n\t$divSGH_EHeader = <<<EOF\n\t<div style=\"top: 140px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_E\"><span>$SGH_E</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_EModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-E-model\" name=\"select-SGH-E-model\">\nEOF;\n\n\t$endSGH_EModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-F | SGH-G ----\n\t$divSGH_FGHeader = <<<EOF\n\t<div style=\"top: 160px; width: 400px; left: 175px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_FG\"><span>$SGH_FG</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_FGModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-FG-model\" name=\"select-SGH-FG-model\">\nEOF;\n\n\t$endSGH_FGModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-I | SGH-J ----\n\t$divSGH_IJHeader = <<<EOF\n\t<div style=\"top: 180px; width: 400px; left: 175px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_IJ\"><span>$SGH_IJ</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_IJModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-IJ-model\" name=\"select-SGH-IJ-model\">\nEOF;\n\n\t$endSGH_IJModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-L | SGH-M ----\n\t$divSGH_LMHeader = <<<EOF\n\t<div style=\"top: 200px; width: 400px; left: 175px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_LM\"><span>$SGH_LM</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_LMModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-LM-model\" name=\"select-SGH-LM-model\">\nEOF;\n\n\t$endSGH_LMModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-P | SGH-S | SGH-U | SGH-V ----\n\t$divSGH_PSUVHeader = <<<EOF\n\t<div style=\"top: 220px; left: 10px; width: 720px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_PSUV\"><span>$SGH_PSUV</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_PSUVModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-PSUV-model\" name=\"select-SGH-PSUV-model\">\nEOF;\n\n\t$endSGH_PSUVModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-X ----\n\t$divSGH_XHeader = <<<EOF\n\t<div style=\"top: 240px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_X\"><span>$SGH_X</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_XModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-X-model\" name=\"select-SGH-X-model\">\nEOF;\n\n\t$endSGH_XModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- SGH-Z ----\n\t$divSGH_ZHeader = <<<EOF\n\t<div style=\"top: 260px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$SGH_Z\"><span>$SGH_Z</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startSGH_ZModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-SGH-Z-model\" name=\"select-SGH-Z-model\">\nEOF;\n\n\t$endSGH_ZModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- Ultra ----\n\t$divUltraHeader = <<<EOF\n\t<div style=\"top: 280px;\" class=\"header-box\">\n\t\t<div style=\"\" class=\"header-content\"><h3><a href=\"#\" title=\"$Ultra\"><span>$Ultra</span></a></h3></div>\n\t</div>\nEOF;\n\n\t$startUltraModelSelect = <<<EOF\n\t<div class=\"model-select-positioning\"><select class=\"app select-model\" id=\"select-Ultra-model\" name=\"select-Ultra-model\">\nEOF;\n\n\t$endUltraModelSelect = <<<EOF\n\t</select>\n</div>\nEOF;\n\n// ---- Display B | C | E contents ----\n\t//print $startModelsBox;\n\tprint $divBCEHeader;\n\tprint $beginMdSelArea.' style=\"top: 10px;\">';\n\tprint $startBCEModelSelect;\n\tfor ($a=0; $a<sizeof($samsungModels[\"B | C | E\"]); $a++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"BCE\"][\"category_id\"][$a]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"B | C | E\"][$a];\n\t\tprint \"</option>\";\n\t}\n\tprint $endBCEModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-BCE-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\n// ---- Display GT-B | GT-C contents ----\n\t//print $startModelsBox;\n\tprint $divGT_BCHeader;\n\tprint $beginMdSelArea.' style=\"top: 30px;\">';\n\tprint $startGT_BCModelSelect;\n\tfor ($b=0; $b<sizeof($samsungModels[\"GT-B | GT-C\"]); $b++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"GTBC\"][\"category_id\"][$b]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"GT-B | GT-C\"][$b];\n\t\tprint \"</option>\";\n\t}\n\tprint $endGT_BCModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-GTBC-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display GT-E | GT-I contents ----\n\t//print $startModelsBox;\n\tprint $divGT_EIHeader;\n\tprint $beginMdSelArea.' style=\"top: 50px;\">';\n\tprint $startGT_EIModelSelect;\n\tfor ($c=0; $c<sizeof($samsungModels[\"GT-E | GT-I\"]); $c++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"GTEI\"][\"category_id\"][$c]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"GT-E | GT-I\"][$c];\n\t\tprint \"</option>\";\n\t}\n\tprint $endGT_EIModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-GTEI-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display GT-M | GT-P | GT-S contents ----\n\t//print $startModelsBox;\n\tprint $divGT_MPSHeader;\n\tprint $beginMdSelArea.' style=\"top: 70px;\">';\n\tprint $startGT_MPSModelSelect;\n\tfor ($d=0; $d<sizeof($samsungModels[\"GT-M | GT-P | GT-S\"]); $d++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"GTMPS\"][\"category_id\"][$d]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"GT-M | GT-P | GT-S\"][$d];\n\t\tprint \"</option>\";\n\t}\n\tprint $endGT_MPSModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-GTMPS-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display I | Jet | M | S contents ----\n\t//print $startModelsBox;\n\tprint $divIJetMSHeader;\n\tprint $beginMdSelArea.' style=\"top: 90px;\">';\n\tprint $startIJetMSModelSelect;\n\tfor ($e=0; $e<sizeof($samsungModels[\"I | Jet | M | S\"]); $e++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"IJMS\"][\"category_id\"][$e]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"I | Jet | M | S\"][$e];\n\t\tprint \"</option>\";\n\t}\n\tprint $endIJetMSModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-IJMS-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-A | SGH-B | SGH-C contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_ABCHeader;\n\tprint $beginMdSelArea.' style=\"top: 110px;\">';\n\tprint $startSGH_ABCModelSelect;\n\tfor ($f=0; $f<sizeof($samsungModels[\"SGH-A | SGH-B | SGH-C\"]); $f++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHABC\"][\"category_id\"][$f]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-A | SGH-B | SGH-C\"][$f];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_ABCModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SABC-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-D contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_DHeader;\n\tprint $beginMdSelArea.' style=\"top: 130px;\">';\n\tprint $startSGH_DModelSelect;\n\tfor ($g=0; $g<sizeof($samsungModels[\"SGH-D\"]); $g++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHD\"][\"category_id\"][$g]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-D\"][$g];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_DModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SD-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-E contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_EHeader;\n\tprint $beginMdSelArea.' style=\"top: 150px;\">';\n\tprint $startSGH_EModelSelect;\n\tfor ($h=0; $h<sizeof($samsungModels[\"SGH-E\"]); $h++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHE\"][\"category_id\"][$h]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-E\"][$h];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_EModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SE-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-F | SGH-G contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_FGHeader;\n\tprint $beginMdSelArea.' style=\"top: 170px;\">';\n\tprint $startSGH_FGModelSelect;\n\tfor ($i=0; $i<sizeof($samsungModels[\"SGH-F | SGH-G\"]); $i++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHFG\"][\"category_id\"][$i]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-F | SGH-G\"][$i];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_FGModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SFG-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-I | SGH-J contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_IJHeader;\n\tprint $beginMdSelArea.' style=\"top: 190px;\">';\n\tprint $startSGH_IJModelSelect;\n\tfor ($j=0; $j<sizeof($samsungModels[\"SGH-I | SGH-J\"]); $j++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHIJ\"][\"category_id\"][$j]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-I | SGH-J\"][$j];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_IJModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SIJ-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-L | SGH-M contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_LMHeader;\n\tprint $beginMdSelArea.' style=\"top: 210px;\">';\n\tprint $startSGH_LMModelSelect;\n\tfor ($k=0; $k<sizeof($samsungModels[\"SGH-L | SGH-M\"]); $k++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHLM\"][\"category_id\"][$k]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-L | SGH-M\"][$k];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_LMModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SLM-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-P | SGH-S | SGH-U | SGH-V contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_PSUVHeader;\n\tprint $beginMdSelArea.' style=\"top: 230px;\">';\n\tprint $startSGH_PSUVModelSelect;\n\tfor ($l=0; $l<sizeof($samsungModels[\"SGH-P | SGH-S | SGH-U | SGH-V\"]); $l++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHPSUV\"][\"category_id\"][$l]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-P | SGH-S | SGH-U | SGH-V\"][$l];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_PSUVModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SPSUV-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-X contents ----\n\t//print $startModelsBox;\n\tprint $divSGH_XHeader;\n\tprint $beginMdSelArea.' style=\"top: 250px;\">';\n\tprint $startSGH_XModelSelect;\n\tfor ($m=0; $m<sizeof($samsungModels[\"SGH-X\"]); $m++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHX\"][\"category_id\"][$m]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-X\"][$m];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_XModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SX-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\t//print \"<br><br><br>\";\n\t\n// ---- Display SGH-Z contents ----\n\t\n\tprint $divSGH_ZHeader;\n\tprint $beginMdSelArea.' style=\"top: 270px;\">';\n\tprint $startSGH_ZModelSelect;\n\tfor ($n=0; $n<sizeof($samsungModels[\"SGH-Z\"]); $n++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"SGHZ\"][\"category_id\"][$n]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"SGH-Z\"][$n];\n\t\tprint \"</option>\";\n\t}\n\tprint $endSGH_ZModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-SZ-model\");\n\tprint $endMdSelArea;\n\t\n\t\n// ---- Display Ultra contents ----\n\t//print $startModelsBox;\n\tprint $divUltraHeader;\n\tprint $beginMdSelArea.' style=\"top: 290px;\">';\n\tprint $startUltraModelSelect;\n\tfor ($o=0; $o<sizeof($samsungModels[\"Ultra\"]); $o++) {\n\t\tprint \"<option class='models-option-style' value='\";\n\t\tprint base64_encode($samsungModelsID[\"Ultra\"][\"category_id\"][$o]);\n\t\tprint \"'>\";\n\t\tprint $samsungModels[\"Ultra\"][$o];\n\t\tprint \"</option>\";\n\t}\n\tprint $endUltraModelSelect;\n\tprint submitButton($faceText=\"find&raquo;\", $style=\"\" ,$pos=\"relative\", $submit=\"submit-Ultra-model\");\n\tprint $endMdSelArea;\n\t//print $endModelsBox;\n\n\tprint $brandBanner;\t\t\t\t\t\t\t\t\t\t\t\t\t\n}", "title": "" }, { "docid": "08b9730bcaea81ec9ce547ded1421592", "score": "0.5136937", "text": "public function render()\n {\n return view('components.generic.links.select-link-dt');\n }", "title": "" }, { "docid": "bd7c296b892439f9f6d0a854dd9cb730", "score": "0.5134107", "text": "public function render()\n {\n $items = MenuModel::tree();\n\n if (View::exists('components.cmenu')):\n return view('components.cmenu', ['items' => $items]);\n else:\n return View::file(__DIR__ . '/views/components/cmenu.blade.php', ['items' => $items]);\n endif;\n }", "title": "" }, { "docid": "e0e1589061082e4e99b1902642604aeb", "score": "0.5132433", "text": "protected function showVersion()\n {\n echo <<<VERSION\n ____ ___ ____ _ ___\n | _ \\_ _| / ___| | |_ _|\n | | | | | | | | | | |\n | |_| | | | |___| |___ | |\n |____/___| \\____|_____|___|\n\n\\033[32mDI CLI\\033[0m version \\033[33m{$this->getCurrentVersion()}\\033[0m by \\033[32mJoris Fritzsche.\\033[0m\n\nVERSION;\n }", "title": "" }, { "docid": "e724f39057d0bf62a336b91ecedb4280", "score": "0.51236624", "text": "public function render()\n {\n $menu = $this->documentation->get('menu');\n\n return view('components.menu', [\n 'menu' => $menu\n ]);\n }", "title": "" }, { "docid": "0648bf66c7bcf071826ce842cdac5909", "score": "0.5118147", "text": "public function index()\n {\n $dropdowns=SecondDropdown::latest()->get();\n return view('second_dropdown.index',compact('dropdowns'));\n }", "title": "" }, { "docid": "c57b40c6216223ac930a30bd4f4fd308", "score": "0.51098806", "text": "protected function renderSortDropdown()\n {\n $attributes = empty($this->attributes) ? array_keys($this->attributes) : $this->attributes;\n $list=[];\n if (empty($this->label))\n \t$this->label = 'Sort';\n foreach ($attributes as $attribute=>$options) {\n $directions = $this->sort->getAttributeOrders();\n if (($params = $this->sort->params) === null) {\n $request = Yii::$app->getRequest();\n $params = $request instanceof Request ? $request->getQueryParams() : [];\n }\n $params[0] = $this->sort->route === null ? Yii::$app->controller->getRoute() : $this->sort->route;\n if (isset($directions[$attribute])) {\n if($directions[$attribute] === SORT_DESC){\n $params[$this->sortParam] = $attribute;\n $list[$this->createUrl($params)] = key($options['asc']);\n $params[$this->sortParam] = '-'.$attribute;\n $value = $this->createUrl($params);\n $list[$value] = key($options['desc']);\n }else{\n $params[$this->sortParam] = $attribute;\n $value = $this->createUrl($params);\n $list[$value] = key($options['asc']);\n $params[$this->sortParam] = '-'.$attribute;\n $list[$this->createUrl($params)] = key($options['desc']);\n }\n\n unset($directions[$attribute]);\n }else{\n $params[$this->sortParam] = $attribute;\n $list[$this->createUrl($params)] = key($options['asc']);\n $params[$this->sortParam] = '-'.$attribute;\n $list[$this->createUrl($params)] = key($options['desc']);\n }\n };\n $this->functionJS();\n $options = ['text' => 'Please select', 'prompt'=>'Сортировка', 'options' => ['class' => 'prompt', 'label' => 'Select'],\n 'onchange'=>'sort(this, this.options[this.selectedIndex].value)'\n ];\n echo Html::dropDownList('dropSort', !empty($value) ? $value : '', $list, $options);\n\t}", "title": "" }, { "docid": "109beacd5dcee748868063452bab3585", "score": "0.5109084", "text": "public function render_content()\n {\n if (!empty($this->cats)) {\n?>\n <label>\n <span class=\"customize-category-select-control\"><?php\n echo esc_html($this->label); ?></span>\n <select <?php\n $this->link(); ?>>\n <?php\n foreach ($this->cats as $cat) {\n printf('<option value=\"%s\" %s>%s</option>', $cat->term_id, selected($this->value(), $cat->term_id, false), $cat->name);\n }\n?>\n </select>\n </label>\n <?php\n }\n }", "title": "" }, { "docid": "416c235d9ac27a9f7a92c1a977aec140", "score": "0.5107693", "text": "public function getLabSelect()\n\t{\n\t\t$lcs = LabConfig::getAllLabs();\n\t\tforeach($lcs as $lc)\n{\necho \"<option value='$lc->id'>$lc->name</option>\";\n}\n\t}", "title": "" }, { "docid": "2ea0e95b9a86034f0c0f7f4b46c10998", "score": "0.51051354", "text": "public function render_dropdown($params = array())\n {\n $settings_id = (!empty($params['settings_id']) ? $params['settings_id'] : 'theme-settings');\n $options = get_option($settings_id);\n\n $name = (!empty($params['label_for']) ? $params['label_for'] : '');\n $value = (!empty($options[$name]) ? $options[$name] : '');\n\n $html = sprintf('<select name=\"%1$s[%2$s]\" id=\"%2$s\">', $settings_id, $name);\n $html .= '<option value=\"\">Select One</option>';\n\n if(!empty($params['options']))\n {\n foreach($params['options'] as $key => $val)\n $html .= sprintf('<option value=\"%s\" %s>%s</option>', $key, selected($key, $value, false), $val);\n }\n\n $html .= '</select>';\n\n echo $html;\n }", "title": "" }, { "docid": "40dd8a2b6246a9e4829a5397b354d48b", "score": "0.510504", "text": "public function getUpdatedMenu()\n {\n $menus = $this->readYaml('app/config/menu.yml');\n\n $menus['main'][] = ['label' => 'Showcases Listing', 'path' => 'showcases/'];\n\n return $this->getYamlString($menus, 5);\n }", "title": "" }, { "docid": "68a0d237f0e6506da7b9706f7eceea01", "score": "0.51023674", "text": "private function services_dropdown()\n {\n\n //services list\n //needs to be pulled from a db in a future update\n $servicesList = array(\n \"Engine oil\",\n \"Transmission\",\n \"Front diff\",\n \"Lube\",\n \"Carb\",\n \"Battery\",\n \"Valve adjustment\",\n \"Shocks\",\n \"Radiator\",\n \"Thermostat\",\n \"Belt\",\n \"Primary clutch\",\n \"Secondary clutch\",\n \"Brakes\",\n \"Tires\",\n \"Other\",\n );\n\n\n echo \"<td><select name='service'>\";\n //loop over all the serves in the list\n foreach ($servicesList as $serviceItem) {\n echo \"<option value='\".$serviceItem.\"'>\".$serviceItem.\"</option>\";\n }\n\n echo \"</select></td>\";\n\n }", "title": "" }, { "docid": "bbe181a84633d0a092635bb6dca997ba", "score": "0.50995165", "text": "private function BuildDropDown($item) {\n $this->output .= '<li class=\"dropdown\">';\n $this->output .= '<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-collapse\"></i> ';\n $this->output .= SimpleXMLWithAddOns::GetAttributeValueString($item, \"label\");\n $this->output .= '<b class=\"caret\"></b></a>';\n $this->output .= '<ul class=\"dropdown-menu\">';\n foreach ($item->links->link as $link) {\n $this->BuildLiWithLink($link);\n }\n $this->output .= '</ul>';\n $this->output .= '</li>';\n }", "title": "" }, { "docid": "9373c942d876d3b6070ca6487f1436aa", "score": "0.50987977", "text": "function install_new_version_options() {\n\n // if ( get_option( 'install_youzer_2.1.5_options' ) ) {\n // return false;\n // }\n\n // $main_widgets = get_option( 'yz_profile_main_widgets' );\n\n // if ( ! empty( $main_widgets ) ) {\n // \t$main_widgets[] = array( 'reviews' => 'visible' );\n // \tupdate_option( 'yz_profile_main_widgets', $main_widgets );\n // }\n\n // // Mark New Options As Installed\n // update_option( 'install_youzer_2.1.5_options', 1 );\n\n }", "title": "" }, { "docid": "98c9d73681e8ce9936c0c3c41439037f", "score": "0.50981194", "text": "public function versionsAction()\n {\n $versions = [\n 'versions' => $this->versionInformation\n ];\n\n $response = $this->getResponse()\n ->setStatusCode(Response::HTTP_OK)\n ->setContent(json_encode($versions));\n\n $response->headers->set('Content-Type', 'application/json');\n\n return $response;\n }", "title": "" } ]
b95ed33d6603e8a10547ae8113c04fb6
Sets the merchant code
[ { "docid": "542e319a2a9d658e0e5f99e60f231aec", "score": "0.5760914", "text": "public function setMerchant($merchant)\n {\n if (!is_string($merchant)) {\n throw new InvalidArgumentException('The merchant code must be a string');\n }\n\n if (empty($merchant)) {\n throw new InvalidArgumentException('The merchant code value is invalid');\n }\n\n $this->merchant = $merchant;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "c06d788878e3b3f5f2914bd3478deac3", "score": "0.8372849", "text": "public function setMerchantCode($merchant_code);", "title": "" }, { "docid": "1b52f1738e7dbe66a919115ea6cbe22e", "score": "0.75131476", "text": "public function setMerchantIdentifier();", "title": "" }, { "docid": "6dbce8c50591f3f4d4e4b25f148da809", "score": "0.74317694", "text": "public function setMerchantCode($value)\n {\n return $this->setParameter('MerchantCode', $value);\n }", "title": "" }, { "docid": "ab72e72798a6c4225db6a5e130e131f5", "score": "0.7355937", "text": "public function setMerchantData($merchant_data);", "title": "" }, { "docid": "3baa3cf88ccf43a6071656aa754c73af", "score": "0.6965419", "text": "public function setMerchantCode($merchant_code) {\n if (strlen($merchant_code) != 9) {\n throw new SermepaException('The specified Ds_Merchant_MerchantCode: ' . $merchant_code . ' is not valid.', Sermepa::BAD_PARAM);\n }\n return $this->set('DsMerchantMerchantCode', $merchant_code);\n }", "title": "" }, { "docid": "cdb0ff215a2f35821870b26c2101dc3c", "score": "0.67519414", "text": "public function setMerchantKey($key) {\n $this->merchant_key = $key;\n }", "title": "" }, { "docid": "d488b5e0c7cc4226c349224eb9f7bbfe", "score": "0.67061776", "text": "public function __construct($merchant_code = '') {\n if ($merchant_code) {\n $this->setField('MerchantCode', $merchant_code);\n }\n }", "title": "" }, { "docid": "adec116f8ba25c549e3954558355dd18", "score": "0.6702096", "text": "public function setMerchantName($merchant_name);", "title": "" }, { "docid": "1b2a4be6e6998753bc69ec183cec0213", "score": "0.66883016", "text": "public function setMerchantURL($merchant_url);", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.6642073", "text": "public function setCode($code);", "title": "" }, { "docid": "47c66cfd477fde2c167b04ca0642df89", "score": "0.6642073", "text": "public function setCode($code);", "title": "" }, { "docid": "1d39d4d058236b6254439ee61730427c", "score": "0.66145223", "text": "public function getMerchantCode();", "title": "" }, { "docid": "f7f4b24b39620ee5d65e38886c371cc9", "score": "0.6596675", "text": "public function getMerchantCode() {\n return $this->DsMerchantMerchantCode;\n }", "title": "" }, { "docid": "226fc810c01bdb31a88807e51948d5c0", "score": "0.6523993", "text": "public function setCode($code) {\r\n $this->code = $code;\r\n }", "title": "" }, { "docid": "3714d1e3dca25199136222a5f6935ae8", "score": "0.65219724", "text": "public function set_customer_code($value) {\r\n $this->customer_code = $value;\r\n data::add(\"customer_code\", $this->customer_code !== \"\" ? $this->customer_code : NODATA, $this->table_fields);\r\n }", "title": "" }, { "docid": "2bc25c9dcd3f46fbf8037c566643cacc", "score": "0.651538", "text": "public function getMerchantCode()\n {\n return $this->getParameter('MerchantCode');\n }", "title": "" }, { "docid": "a241e15c49cde6eead4be3bcd8183306", "score": "0.65096325", "text": "public function setMerchantIdentifier($identifier)\n {\n self::$merchantIdentifier = $identifier;\n }", "title": "" }, { "docid": "2796f05554ffc699d4b90f704170c014", "score": "0.64820904", "text": "public function setCode($code = null) {\n\n if ($code === null) {\n $this->data->code = uniqid();\n }\n\n $this->data->code = $code;\n }", "title": "" }, { "docid": "dfbcdea9dce79355fafbb79e30368fbc", "score": "0.6472758", "text": "public function setMerchantKey($merchant_key = ''){\n $this->merchant_key = $merchant_key;\n }", "title": "" }, { "docid": "04dba91112b3119b5be28dbd5a4c0309", "score": "0.6457702", "text": "public function setCode($value) {\n \t\treturn $this->setData('code',$value);\n \t}", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.64467216", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.64467216", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.64467216", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.64467216", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "62f09411141e1763c8123eb90cd2a1fc", "score": "0.64467216", "text": "public function setCode($code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "ba96512bdc36540c57edc0ba358f0fc0", "score": "0.6439781", "text": "public function setMerchantTag(string $merchant_tag): void\n {\n $this->_merchant_tag = $merchant_tag;\n }", "title": "" }, { "docid": "fec510159e467d16d31c1f4e339a0c06", "score": "0.6426216", "text": "public function setMerchantAccessCode($access)\n {\n self::$accessCode = $access;\n }", "title": "" }, { "docid": "5253438fa1c15c4908ca6861504693a4", "score": "0.641089", "text": "public function setMerchantPassword($merchant_password);", "title": "" }, { "docid": "2ad547eb72558c0d0bb82ba3e765faab", "score": "0.6385061", "text": "public function getMerchantCode()\n {\n return (string) $this->_xml['merchantCode'];\n }", "title": "" }, { "docid": "803d8878bac29d7c1f171c501b9cab95", "score": "0.63836646", "text": "public function testSetAndGetMerchant()\n {\n $this->assertTrue($this->paystack->merchantEmail('[email protected]'));\n $this->assertEquals('[email protected]', $this->paystack->merchantEmail());\n\n $this->assertEquals($this->paystack->merchantEmail(), $this->paystack->merchantEmail());\n }", "title": "" }, { "docid": "64a08fc5d160d8e08a2b85a9112207f1", "score": "0.63817227", "text": "function setManufacturerCode($value)\n {\n $this->setAttribute('ManufacturerCode', $value);\n }", "title": "" }, { "docid": "c3b49e2bb99d5ac64578ff27c6668f59", "score": "0.63747364", "text": "public function setCode(string $code): void\n {\n $this->_code = $code;\n }", "title": "" }, { "docid": "865b7bcb14a4044416762c10f43e077d", "score": "0.63540727", "text": "public function setCode(string $code): void\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "865b7bcb14a4044416762c10f43e077d", "score": "0.63540727", "text": "public function setCode(string $code): void\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "7194e999db7d0c04005b32178c5f12b1", "score": "0.63286847", "text": "public function setMerchantOrderId(){\n $this->merchant_oid = $this->randomKeyGenerate();\n }", "title": "" }, { "docid": "80cb011ec332a0e34d07aea0b8e3cd6b", "score": "0.63159126", "text": "public function setOptionMerchantData(string $optionMerchantData)\n {\n $this->optionMerchantData = $optionMerchantData;\n }", "title": "" }, { "docid": "da6d8f775cca3b4551562145aa328d32", "score": "0.6303831", "text": "public function setMerchantcode($fuc='')\n {\n if ($this->isEmpty($fuc)) {\n throw new TpvException('Please add Fuc');\n }\n\n $this->_setParameters['DS_MERCHANT_MERCHANTCODE'] = $fuc;\n\n return $this;\n }", "title": "" }, { "docid": "fce66fd37b7197f3ea55756dfbc7a103", "score": "0.6281935", "text": "public function getMerchantAccountCode(): string;", "title": "" }, { "docid": "099f708f3b56603d16cf38ddc0693210", "score": "0.6215163", "text": "public function setMerchantId($merchant_id = ''){\n $this->merchant_id = $merchant_id;\n }", "title": "" }, { "docid": "3c13078be75d5672cfe8e056f88386ac", "score": "0.61862385", "text": "function set_currency_code($currency_code){\n $this->currency_code = $currency_code;\n return $currency_code;\n }", "title": "" }, { "docid": "df96ec9b5630feddb76dc6b44e0f9cd3", "score": "0.61310047", "text": "public function setMerchantId($value)\n {\n return $this->set('MerchantId', $value);\n }", "title": "" }, { "docid": "df96ec9b5630feddb76dc6b44e0f9cd3", "score": "0.61310047", "text": "public function setMerchantId($value)\n {\n return $this->set('MerchantId', $value);\n }", "title": "" }, { "docid": "df96ec9b5630feddb76dc6b44e0f9cd3", "score": "0.61304116", "text": "public function setMerchantId($value)\n {\n return $this->set('MerchantId', $value);\n }", "title": "" }, { "docid": "df96ec9b5630feddb76dc6b44e0f9cd3", "score": "0.6129444", "text": "public function setMerchantId($value)\n {\n return $this->set('MerchantId', $value);\n }", "title": "" }, { "docid": "df96ec9b5630feddb76dc6b44e0f9cd3", "score": "0.6129444", "text": "public function setMerchantId($value)\n {\n return $this->set('MerchantId', $value);\n }", "title": "" }, { "docid": "f83a39d9e5a002a3edb26ad0a7bf54cc", "score": "0.612557", "text": "public function setSpotifyCode()\n {\n $settingModel = new \\App\\Models\\Setting();\n \n $this->spotifySession->requestAccessToken($this->request->getGet('code'));\n \n $accessToken = $this->spotifySession->getAccessToken();\n $refreshToken = $this->spotifySession->getRefreshToken();\n \n $updateData = [];\n if (!empty($accessToken) && !empty($refreshToken)) {\n $updateData['spotifyAccessToken'] = $accessToken;\n $updateData['spotifyRefreshToken'] = $refreshToken;\n \n $settingModel->updateData($updateData);\n }\n }", "title": "" }, { "docid": "4b390fdd23bb05855b7a19096e3a001c", "score": "0.6120314", "text": "protected static function update_merchant_id( LaterPay_Core_Event $event ) {\n $is_live = null;\n if ( $event->has_argument( 'is_live' ) ) {\n $is_live = $event->get_argument( 'is_live' );\n }\n $merchant_id_form = new LaterPay_Form_MerchantId( $_POST ); // phpcs:ignore\n $merchant_id = $merchant_id_form->get_field_value( 'merchant_id' );\n $merchant_id_type = $is_live ? 'live' : 'sandbox';\n\n if ( ! $merchant_id_form->is_valid( $_POST ) ) { // phpcs:ignore\n $event->set_result(\n array(\n 'success' => false,\n 'message' => sprintf(\n __( 'The Merchant ID you entered is not a valid Laterpay %s Merchant ID!', 'laterpay' ),\n ucfirst( $merchant_id_type )\n ),\n )\n );\n throw new LaterPay_Core_Exception_FormValidation( get_class( $merchant_id_form ), $merchant_id_form->get_errors() );\n }\n\n if ( strlen( $merchant_id ) === 0 ) {\n update_option( sprintf( 'laterpay_%s_merchant_id', $merchant_id_type ), '' );\n $event->set_result(\n array(\n 'success' => true,\n 'message' => sprintf(\n __( 'The %s Merchant ID has been removed.', 'laterpay' ),\n ucfirst( $merchant_id_type )\n ),\n )\n );\n return;\n }\n\n update_option( sprintf( 'laterpay_%s_merchant_id', $merchant_id_type ), $merchant_id );\n $event->set_result(\n array(\n 'success' => true,\n 'message' => sprintf(\n __( '%s Merchant ID verified and saved.', 'laterpay' ),\n ucfirst( $merchant_id_type )\n ),\n )\n );\n return;\n }", "title": "" }, { "docid": "b0c8e377cb6a79ae9773c656d21f544f", "score": "0.60927236", "text": "public function setStoreCode($code)\n\t{\n\t\t$this->store_code = $code;\n\t}", "title": "" }, { "docid": "c9ac2341458aebab727770a8fe1a0a77", "score": "0.6075486", "text": "public function testUpdateMerchant()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "1ba2817a528fc9e8406a6e4dafea4a39", "score": "0.60539806", "text": "public function testSetVerifyCode()\n {\n $service = app('verify_code_service');\n $phone_number = '13838383333';\n\n $code = $service->setVerifyCodeForPhoneNumber($phone_number);\n $this->assertTrue($service->testingVerifyCodeWithPhoneNumber($phone_number, $code));\n $this->assertFalse($service->testingVerifyCodeWithPhoneNumber($phone_number, 'fakecode'));\n }", "title": "" }, { "docid": "a4272cb6a0a8c02c019ac8b924e4fe37", "score": "0.60457563", "text": "public function setCode(int $code)\n {\n $this->code = $code;\n }", "title": "" }, { "docid": "00ced52c290390291d399cb0ad70ceea", "score": "0.603494", "text": "public function field_purchase_code() {\n\t\t$options = get_option( 'rswp-settings' );\n\t\tif ( ! isset( $options['purchase_code'] ) ) {\n\t\t\t$options['purchase_code'] = '';\n\t\t}\n\t\t?>\n\t\t<input type=\"text\" class=\"regular-text\" value=\"<?php echo $options['purchase_code']; ?>\" id=\"purchase_code\"\n\t\t name=\"rswp-settings[purchase_code]\"/>\n\t\t<?php\n\t\techo '<p class=\"description\">' . __( 'Enter your purchase code in order to get automatic updates!', $this->get_textdomain() ) . ' <a target=\"_blank\" href=\"http://bit.ly/X4d4n6\">' . __( 'Click here if you do not know where to find your purchase code.', $this->get_textdomain() ) . '</a></p>';\n\t}", "title": "" }, { "docid": "7d145d20cf4897b6877c601737fe374f", "score": "0.60161227", "text": "public function setPaytrToken(){\n $this->paytr_token = base64_encode(hash_hmac('sha256', implode(\"\", [$this->gethashCode(), $this->getMerchantSalt()]) , $this->getMerchantKey(), true));\n }", "title": "" }, { "docid": "d99d70831d42eeab6d8103bf53dad0bc", "score": "0.6001359", "text": "protected function setCode($value) {\n\t\t$this->code = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "86b70737f75ff8b4a50737f340b8fec6", "score": "0.59911346", "text": "public function setCode(string $code)\n {\n $this->code = $code;\n\n return $this;\n }", "title": "" }, { "docid": "67880a34479a4a986f5ecf1984aaa33d", "score": "0.59760696", "text": "public function setMerchantSalt($merchant_salt = ''){\n $this->merchant_salt = $merchant_salt;\n }", "title": "" }, { "docid": "91108df069830e0b3b4824a09be80014", "score": "0.59718424", "text": "public function setCode(int $code)\n {\n $allowed_codes = [\n 0,\n 1,\n 2\n ];\n\n if (!in_array($code, $allowed_codes)) {\n $code = 1;\n }\n\n $this->code = $code;\n }", "title": "" }, { "docid": "68bd494249ef9e9e339f0a723ba679c8", "score": "0.5923266", "text": "public function setCode(string $code): self\n {\n $this->code = $code;\n\n return $this;\n }", "title": "" }, { "docid": "08b357ba29a00ad012106b43b7495dde", "score": "0.5897302", "text": "public function setMerchantData($merchant_data) {\n if (strlen($merchant_data) > 1024) {\n throw new SermepaException('The specified Ds_Merchant_MerchantData: ' . $merchant_data . ' is too long.', Sermepa::TOOLONG_PARAM);\n }\n return $this->set('DsMerchantMerchantData', $merchant_data);\n }", "title": "" }, { "docid": "694c5aa13051d20b37b25b85a3685b47", "score": "0.5896004", "text": "protected function setCurrencyCode() {\n\t\t//at this point, we can have either currency, or currency_code.\n\t\t//-->>currency_code has the authority!<<-- \n\t\t$currency = false;\n\t\t\n\t\tif ( $this->isSomething( 'currency' ) ) {\n\t\t\t$currency = $this->getVal( 'currency' );\n\t\t\t$this->expunge( 'currency' );\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'currency', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\tif ( $this->isSomething( 'currency_code' ) ) {\n\t\t\t$currency = $this->getVal( 'currency_code' );\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'currency_code', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\t\n\t\t//TODO: This is going to fail miserably if there's no country yet.\n\t\tif ( !$currency ){\n\t\t\trequire_once( dirname( __FILE__ ) . '/nationalCurrencies.inc' );\n\t\t\t$currency = getNationalCurrency($this->getVal('country'));\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'country', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\t\n\t\t$this->setVal( 'currency_code', $currency );\n\t}", "title": "" }, { "docid": "e7ee90c239fc079a91e74ca2c7e6885b", "score": "0.58934003", "text": "public function merchantId(?string $value): self\n {\n $this->instance->setMerchantId($value);\n return $this;\n }", "title": "" }, { "docid": "5df6f7213ed74c5b78c184051b11daff", "score": "0.5870787", "text": "private function setCode($code)\n\t{\n\t $this->code = self::createGroupcodeFromName($code);\n\t}", "title": "" }, { "docid": "c2bb5463da4be5b58b177f0f0b8a6a5c", "score": "0.5863228", "text": "public function setCode(string $code)\n {\n self::validateLength(self::CODE, $code, 20);\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "e9e01a420ac85a44b4cbdcd3375d7db6", "score": "0.5861764", "text": "public function getMerchantId(){\n return $this->merchant_id;\n }", "title": "" }, { "docid": "744af1b3301dd6f76d3158f91fa717fe", "score": "0.58539265", "text": "public function setCode($code)\n {\n $this->body['code'] = $code;\n return $this;\n }", "title": "" }, { "docid": "c8f9c32d8f3a963fb35e3e1b1a6d4f52", "score": "0.5853753", "text": "public function setCode($code)\n\t{\n\t\t$this->code = $code;\n\t\t$this->setupMessageByCode();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "82bbbbf84be9e1fcf6388ebb82109db4", "score": "0.5834205", "text": "public function setCode($code)\n\t{\n $this->_code = $code;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "65d066bf21b894ff416f44fdd1448a6b", "score": "0.5806274", "text": "public function setCode(string $code): self\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "dcbe4d03e763bacfa326346302a5fcd3", "score": "0.579149", "text": "public function setCode($code)\n {\n $this->_code = $code;\n return $this;\n }", "title": "" }, { "docid": "abc06e49b946af9b2b24dd9fc36150e3", "score": "0.5787211", "text": "public function setCode($value)\n {\n return $this->set(self::CODE, $value);\n }", "title": "" }, { "docid": "abc06e49b946af9b2b24dd9fc36150e3", "score": "0.5787211", "text": "public function setCode($value)\n {\n return $this->set(self::CODE, $value);\n }", "title": "" }, { "docid": "9010892e1ec71fe921fff5495aa7a0ba", "score": "0.5786977", "text": "private function setCode(int $code = 200): RPCAdapter\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "d58362a49036f3905ca32459688164c5", "score": "0.57860684", "text": "public function set_customer_seccode($value) {\r\n $this->customer_seccode = $value;\r\n data::add(\"customer_seccode\", $this->customer_seccode !== \"\" ? $this->customer_seccode : seccode(), $this->table_fields);\r\n }", "title": "" }, { "docid": "8dd98363a9157104b30653d5ae49979d", "score": "0.5782111", "text": "public function setCode(string $code)\n {\n $this->code = $code;\n\n return $this;\n }", "title": "" }, { "docid": "8dd98363a9157104b30653d5ae49979d", "score": "0.5782111", "text": "public function setCode(string $code)\n {\n $this->code = $code;\n\n return $this;\n }", "title": "" }, { "docid": "8dd98363a9157104b30653d5ae49979d", "score": "0.5782111", "text": "public function setCode(string $code)\n {\n $this->code = $code;\n\n return $this;\n }", "title": "" }, { "docid": "6c74c5e827314e21353f5dd7127ad52c", "score": "0.57550126", "text": "public function setCode(string $code) : self\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "067723b54c4f660267501aace6875812", "score": "0.57410336", "text": "protected function set_license_id(){\n\t\t$this->license_id = \\EDD_Software_Licensing::instance()->get_license_by_key( $this->code );\n\t}", "title": "" }, { "docid": "6cad6fbeec93aaad76bd541b4dc8f9b3", "score": "0.5738437", "text": "public function setSuiteCode($code);", "title": "" }, { "docid": "600cd88b3a1885a0e8c51d68caefc814", "score": "0.5738267", "text": "public function testSetCode() {\n\n $obj = new TypeIntervenants();\n\n $obj->setCode(\"code\");\n $this->assertEquals(\"code\", $obj->getCode());\n }", "title": "" }, { "docid": "48370e95f6c61950a12b9a0e7aa187ef", "score": "0.57321894", "text": "public function setCurrencyCode(?string $value): void {\n $this->getBackingStore()->set('currencyCode', $value);\n }", "title": "" }, { "docid": "48370e95f6c61950a12b9a0e7aa187ef", "score": "0.57321894", "text": "public function setCurrencyCode(?string $value): void {\n $this->getBackingStore()->set('currencyCode', $value);\n }", "title": "" }, { "docid": "939efe71f746e1597b1f7d0efa19d767", "score": "0.5725577", "text": "public function setCarrierCode($code);", "title": "" }, { "docid": "b18a0d96d085033337ac366873aa4643", "score": "0.57239044", "text": "public function setMerchant(ElggEntity $merchant);", "title": "" }, { "docid": "08993cacf082003a89c3ac05a7613932", "score": "0.5723304", "text": "function Merchant()\n\t{\n\t}", "title": "" }, { "docid": "4d39b3b1251f782b242405cdeb078099", "score": "0.5718236", "text": "public function setClientCode() {\n \n $arrForClientCode = array();\n $arrForClientCode = explode(\"_\", $_SERVER['REQUEST_URI']);\n\t \n\t if(!empty($arrForClientCode[1])){\n\t\t\t $this->clientCode = $arrForClientCode[1];\n\t }\t\t\n\t }", "title": "" }, { "docid": "64534289e1305d7371ef22768abd50dd", "score": "0.57129955", "text": "public static function setOriginPostalCode($code) {\n\t\t\tself::$originPostalCode = $code;\n\t\t}", "title": "" }, { "docid": "c3692e2e4ca31569e94938f46358ca92", "score": "0.57083714", "text": "public function getMerchantKey(){\n return $this->merchant_key;\n }", "title": "" }, { "docid": "423e20e0d22b816ebf353fb048b4ccb8", "score": "0.57009214", "text": "public function setCode($v)\n\t{\n\t\tif ($this->code !== $v) {\n\t\t\t$this->code = $v;\n\t\t\t$this->modifiedColumns[] = MLUseLanguagePeer::CODE;\n\t\t}\n\t\t\t\t\n\t}", "title": "" }, { "docid": "bc7c8fa3c9b2859dbe8e3af3b2c466f3", "score": "0.56897", "text": "public function setMerchantId($value)\n {\n return $this->setParameter('merchantId', $value);\n }", "title": "" }, { "docid": "bc7c8fa3c9b2859dbe8e3af3b2c466f3", "score": "0.56897", "text": "public function setMerchantId($value)\n {\n return $this->setParameter('merchantId', $value);\n }", "title": "" }, { "docid": "83852d83df4a97b37865ea655baa28b1", "score": "0.5682818", "text": "public function setCode($code)\n {\n $this->Code = $code;\n return $this;\n }", "title": "" }, { "docid": "724f8d92cf5f09099d3f4f01636d0036", "score": "0.56823665", "text": "public function __construct(Merchant $merchant)\n {\n $this->merchant = $merchant;\n\n }", "title": "" }, { "docid": "87f630f0066de369fe5130221c9decef", "score": "0.56649333", "text": "public function setCode($code) {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" }, { "docid": "fa2b4e8b6949bffa708a019c003c5e8e", "score": "0.56640273", "text": "public function setCode($code)\n {\n $this->code = $code;\n return $this;\n }", "title": "" } ]
3b139acd2f5b8c714481f2cda959d924
echo "Testing Analytics: Analytics::getSEOStats()";
[ { "docid": "e5dc456225fd05f8e3b32d559cb69b99", "score": "0.743808", "text": "public function testGetSeoStats()\n {\n// $stats = $this->analytics->getSeoStats('google.com');\n// print_r($stats->getAll());\n }", "title": "" } ]
[ { "docid": "fedbd2349aaa2a5e0272933b3bc2e182", "score": "0.69145644", "text": "public function testGetStats()\n {\n\n }", "title": "" }, { "docid": "9b2cfde4b469527646278b6c397c39bd", "score": "0.6739175", "text": "public function testAnalyticsProfanity()\n {\n }", "title": "" }, { "docid": "926a1b8f5514ed1d1844263ffa0f6bc7", "score": "0.67391014", "text": "function displayStats()\n {\n echo \"Stats Displayed \\n\";\n }", "title": "" }, { "docid": "97a6276179fbd68dbfc96ee5bc397e33", "score": "0.63358676", "text": "public function testAnalyticsSentiment()\n {\n }", "title": "" }, { "docid": "97c52c4192550ebd2d8de06b0387f6e6", "score": "0.6311128", "text": "public function testAnalyticsHateSpeech()\n {\n }", "title": "" }, { "docid": "05b02f0e7900e9f74dfccb6f30aba660", "score": "0.62335193", "text": "public function testAnalyticsSubjectivity()\n {\n }", "title": "" }, { "docid": "18bad1c98d1cf524e8daaa07e6dcc829", "score": "0.62319165", "text": "public function DisplayStatistics();", "title": "" }, { "docid": "5ff68aecbc4b8a6d471d1db09f01c8d8", "score": "0.62274796", "text": "public function ga()\n\t{\n\t}", "title": "" }, { "docid": "098275131dacb4729c45ea6fb101057b", "score": "0.6226401", "text": "function stats()\n {\n }", "title": "" }, { "docid": "d36f89e7a3aa60e5b88cfdd73c65dc59", "score": "0.62144077", "text": "public function apitest()\r\n {\r\n $analyticsData = Analytics::fetchMostVisitedPages(Period::days(7));\r\n \r\n //fetch visitors and page views for the past week\r\n $analyticsDataMost = Analytics::fetchVisitorsAndPageViews(Period::days(7));\r\n \r\n }", "title": "" }, { "docid": "a415053e6c1a8b37ab2638e647fbe045", "score": "0.61465436", "text": "function bb_google_analytics() {\n\techo '<script src=\"http://www.google-analytics.com/ga.js\" type=\"text/javascript\"></script>';\n\techo '<script type=\"text/javascript\">';\n\techo 'var pageTracker = _gat._getTracker(\"UA-XXXXX-X\");';\n\techo 'pageTracker._trackPageview();';\n\techo '</script>';\n}", "title": "" }, { "docid": "740afff4292dd044845ae186f302efbc", "score": "0.6139111", "text": "public function TestFunction(){\r\n\t\treturn 'This is a TEST!';\r\n\t}", "title": "" }, { "docid": "f05fb4dccce2cbe0dcf3e4691e292fe2", "score": "0.6120502", "text": "public function testAnalyticsSimilarity()\n {\n }", "title": "" }, { "docid": "47338acfa04eaa94403a0b4cfae1df81", "score": "0.60555375", "text": "function test()\n\t{\n\t\treturn \"Test method calling\";\n\t}", "title": "" }, { "docid": "83b7c61ba478fc05893272cd2995e895", "score": "0.5996656", "text": "public function dashboard()\n\t{\n\t\tvar_dump('Hello');\n\t}", "title": "" }, { "docid": "005b0eb4d6421ad4e4a24c4dd475f58d", "score": "0.5992047", "text": "public function stats();", "title": "" }, { "docid": "c3c377f6ee640c0569900e73f72cd591", "score": "0.59674877", "text": "function hs_stats() {\n\t\t$hs_settings = get_option('hs_settings');\t\n\t\techo '\t\n\t\t\t<div class=\"wrap hs_wrap\" style=\"max-width: 1040px;\">\n\t\t\t\t<h2>'.__('Hubspot Stats').'</h2>\n\t\t\t\t<iframe id=\"hs_dashboard\" src=\"http://app.hubspot.com/analytics/sources?portalId='.$hs_settings[\"hs_portal\"].'\" scrolling=\"auto\" style=\"width: 100%; height: 1100px; border: 1px solid #bfbfbf;\"></iframe>\n\t\t\t</div>\n\t\t\t';\n\t}", "title": "" }, { "docid": "ba180f0139b3d2ae17f541c637cebd10", "score": "0.59413904", "text": "public function testDashboard()\n {\n }", "title": "" }, { "docid": "6568276349e2afb4030c4bb3deb9fa4f", "score": "0.5935776", "text": "function tk_analytics(){\r\n\t$output = get_option(TK . '_google_analytics');\r\n\tif ( $output <> \"\" ) \r\n\t\techo stripslashes($output) . \"\\n\";\r\n}", "title": "" }, { "docid": "185eaa5264bd601dbc083c6704d8758d", "score": "0.59268737", "text": "public function testHealthGet()\n {\n }", "title": "" }, { "docid": "e275771ad4fcb0a52564c16228c58f7f", "score": "0.5874625", "text": "public function testAnalysisRuleGet()\r\n {\r\n\r\n }", "title": "" }, { "docid": "d95853d85abe921ce8895f0e084b16de", "score": "0.582347", "text": "function zcms_header()\n{\n return ZSEO::getInstance()->__toString();\n}", "title": "" }, { "docid": "bc5882fa59e9bee20e4b8d5c6a3c6fb2", "score": "0.5823324", "text": "public function testStuff()\n {\n }", "title": "" }, { "docid": "e9da743c5395f513b19be42e57bf996f", "score": "0.58139926", "text": "function analytics() { \n\n?>\n\t<script type=\"text/javascript\">\t\n\t\tvar _gaq = _gaq || [];\n\t\t_gaq.push(['_setAccount', 'UA-20023247-14']);\n\t\t_gaq.push(['_trackPageview']);\n\t\t(function() {\n\t\tvar ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n\t\tga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n\t\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n\t\t})();\n\t</script>\n<?php \n}", "title": "" }, { "docid": "7a16686197b64f8bb9cd6faa75341b52", "score": "0.5792098", "text": "public function main()\r\n {\r\n\t\techo \"test\"; \r\n }", "title": "" }, { "docid": "92a260b53e24c722d5e8570ef87d84e8", "score": "0.5770834", "text": "public function test()\n {\n }", "title": "" }, { "docid": "92a260b53e24c722d5e8570ef87d84e8", "score": "0.5770834", "text": "public function test()\n {\n }", "title": "" }, { "docid": "f0d19f3a0994685a2556de1d344203d6", "score": "0.57671756", "text": "public function test()\n {\n \n echo \"Hello world!\";\n\n }", "title": "" }, { "docid": "7019e6a2b56a7b2a9b97e34f75cfa926", "score": "0.57584584", "text": "public function test();", "title": "" }, { "docid": "4b051117466bd68b6bb543161739908f", "score": "0.5756493", "text": "function ossap_stats_design_output($type, $context = 'default'){\n //declare and set the variables\n $output ='';\n $app_name = 'OSSAP Statistics';\n $metrics_pageviews = 'ga:pageviews';\n $sort_pageviews = '-ga:pageviews';\n $analytics_id = _ossap_stats_get_analytics_id($context);\n\n //set start and end dates for day, week and month\n //start and end dates for day are same. For week start date is 8 days before\n //likewise for month it is 31 days earlier. The end date\n //remains same as end date for day\n $start_date = $end_date = date('Y-m-d', strtotime('- 1 day'));\n $weeklyStartDate = date('Y-m-d', strtotime('- 8 day'));\n $monthlyStartDate = date('Y-m-d', strtotime('- 31 day'));\n\n //get credentials\n $service = ossap_stats_check_credentials($context);\n\n //max_results is set to 28\n $max_results = 28;\n\n //set values depending on the type of the parameter\n if ($type == 'sites'){\n $dimensions = 'ga:hostname';\n }\n else if ($type == 'pages') {\n $dimensions = 'ga:hostname,ga:pagePath';\n }\n else if ($type == 'sessions') {\n $metrics_pageviews = 'ga:sessions,ga:pageviews';\n }\n\n //set optional parameters like sort, dimensions etc\n $optparams = array ('sort' => $sort_pageviews,'max-results' => $max_results);\n if(isset($dimensions)) {\n $optparams['dimensions'] = $dimensions;\n }\n\n try {\n //get results from the service object for all three intervals\n $dailyResults = $service->data_ga->get($analytics_id, $start_date, $end_date, $metrics_pageviews, $optparams);\n $weeklyResults = $service->data_ga->get($analytics_id, $weeklyStartDate, $end_date, $metrics_pageviews, $optparams);\n $monthlyResults = $service->data_ga->get($analytics_id, $monthlyStartDate, $end_date, $metrics_pageviews, $optparams);\n\n } catch (Exception $e) {\n watchdog(WATCHDOG_ERROR, \"Unable to get data from Google Data, {$analytics_id}, {$start_date}, {$end_date}, {$metrics}, {$optparams}\");\n return array('rows' => array());\n }\n\n //add the results to $results array with interval as key\n $results = array(\n 'day' => $dailyResults,\n 'week' => $weeklyResults,\n 'month' => $monthlyResults\n );\n //return the results\n return $results;\n}", "title": "" }, { "docid": "819e6e5ddb72523d397f17b5d9e2a09c", "score": "0.5752368", "text": "public function testGeneral()\n {\n }", "title": "" }, { "docid": "805b7bd25149c58d5a69ae428553807c", "score": "0.5742349", "text": "public function testDistibutionReleasesInstallAnalytics()\n {\n }", "title": "" }, { "docid": "2a1e8fd997f5ec653734cda23c90109d", "score": "0.5739691", "text": "public static function usage()\n {\n }", "title": "" }, { "docid": "5402c9bcdcb8a69896a9fd73985b8672", "score": "0.5738377", "text": "public function getStats();", "title": "" }, { "docid": "2e0b85f2446ef29efebf319dcff79755", "score": "0.57227045", "text": "public function test9()\n {\n }", "title": "" }, { "docid": "6d9c3cf38c9b3a3d6433689919f54749", "score": "0.5709126", "text": "public function getTest()\n {\n }", "title": "" }, { "docid": "0a90e975eee330e20d581427d06483b9", "score": "0.5706328", "text": "public function test_print_sample()\n {\n \t$info = $this->class_instance->wp_simple_plugin();\n \t$this->assertEquals($info,\"Yo this is an example plugin\");\n }", "title": "" }, { "docid": "8db02ed8857e50dc69b46874f7c19757", "score": "0.5697028", "text": "public function testDataSourceSoapsCountGet()\n {\n\n }", "title": "" }, { "docid": "9e2f0f13bf2af9b3e8145ed8a912d866", "score": "0.5687953", "text": "protected function intro(){\n //this fucntion cannot be accessed outside the class \n echo \"the fruit is a this \";\n }", "title": "" }, { "docid": "8d84ad77bac23c589772efcd9a12a6e4", "score": "0.5678394", "text": "function testBasic() {\n\t\t# PHP-level error messages\n\t\t$this->get_page('sitemap.xml');\n\t}", "title": "" }, { "docid": "836d345613b74aadc36d73b6803b7ac4", "score": "0.5675839", "text": "public function practice(){\n return \"Practice\";\n }", "title": "" }, { "docid": "252fc9e6f2ae6070b39c7cdd2b7a6ed5", "score": "0.56690824", "text": "public function test(){\r\n\t\techo 'Mabuhay Philippines!';\r\n\t}", "title": "" }, { "docid": "38223ff329789c992bc8aeb346b99c6b", "score": "0.566612", "text": "function usage()\n{\n\treturn '';\n}", "title": "" }, { "docid": "1f1090c8027353aa9c9d2e3bcd9f3502", "score": "0.56638306", "text": "public function testYourTest() {\n print __METHOD__ . \"\\n\";\n\n // Your test here\n\n }", "title": "" }, { "docid": "908c9e83cb654a8aa83039411a4e53e4", "score": "0.5650564", "text": "function ga_code() {\n\t\t$options = get_option('kb_theme_options');\n\t\t$gaCode = $options['analytics'];\n\t\t\n\t\tif ($gaCode != '') {\n\t\t\techo $gaCode;\n\t\t}\n\t}", "title": "" }, { "docid": "21f5fc29397a279b6542ed6020f3cd6c", "score": "0.5645768", "text": "public function testMe()\n {\n }", "title": "" }, { "docid": "27472c9de18cc1412642906f3fc978e9", "score": "0.5639616", "text": "function google_analytics($ua = '')\n {\n $out = \"<!-- Google Webmaster Tools & Analytics -->\\n\";\n $out .= '<script type=\"text/javascript\">';\n $out .= ' var _gaq = _gaq || [];';\n $out .= \" _gaq.push(['_setAccount', '$ua']);\";\n $out .= \" _gaq.push(['_trackPageview']);\";\n $out .= ' (function() {';\n $out .= \" var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\";\n $out .= \" ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\";\n $out .= \" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\";\n $out .= \" })();\";\n $out .= \"</script>\";\n return $out;\n }", "title": "" }, { "docid": "8660799c1ecb284908aafa8a5fe043d0", "score": "0.5626231", "text": "function display_site_info()\n{\n?>\n <br><br>\n<?php\n}", "title": "" }, { "docid": "c9615810af79051c6157d04544ac2388", "score": "0.56201875", "text": "public function testBasicTest()\n {\n\n }", "title": "" }, { "docid": "59ea824e0613ff28c71b8fa71d969ede", "score": "0.5601299", "text": "public function test()\n {\n \n }", "title": "" }, { "docid": "754e20ba209708346ad16a9d942d0bbf", "score": "0.55981106", "text": "public function testCampaignDetails()\n {\n }", "title": "" }, { "docid": "816009e71ad64d5dba47cdfb1f78d239", "score": "0.5597205", "text": "function karma_analytics(){\n\t\n\t$GLOBALS['google'] = get_option('ka_google_analytics');\n\t if($GLOBALS['google'] != '')\n\t\techo stripslashes($GLOBALS['google']) . \"\\n\";\n}", "title": "" }, { "docid": "1e1283a1f632316cc46d64503816c255", "score": "0.55919135", "text": "public function testPageload()\n {\n $response = $this->get('/analytics');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "860f5e2f96925f3bb5f25f740a504e73", "score": "0.55900943", "text": "function labs_stats_tracker() {\n $options = get_option('labs_options');\n\t$stats_tracker = $options['stats_tracker'];\n if (!empty($stats_tracker)) {\n echo $stats_tracker;\n\t}\n}", "title": "" }, { "docid": "ad1da55e6184c7d2e7aff90176dd724c", "score": "0.55896354", "text": "function admin_summary() { }", "title": "" }, { "docid": "7b8eb9d4c331b46ff1257760c198c80e", "score": "0.5571291", "text": "public function testDashboardLookml()\n {\n }", "title": "" }, { "docid": "9e00fed49413205962b300ec3fba9b38", "score": "0.5553453", "text": "public function testGetAlertingInteractionstatsAlert()\n {\n }", "title": "" }, { "docid": "1ddd41f29f540bfeca0fdf7852df947b", "score": "0.55427545", "text": "public static function echoTrackingScript()\n {\n if (isset(Yii::app()->params['googleAnalytics']))\n if (isset(Yii::app()->params['googleAnalytics']['id'])) {\n ?>\n <script type=\"text/javascript\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '<?php echo Yii::app()->params['googleAnalytics']['id']; ?>']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script');\n ga.type = 'text/javascript';\n ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ga, s);\n })();\n </script>\n <?php\n }\n }", "title": "" }, { "docid": "4c51b227a9c7a20c0c29026313987e42", "score": "0.5541293", "text": "public function actionIndex(){\n try{\n // $Topleaders = ServiceFactory::getSkiptaPostServiceInstance()->GetGoogleAnalyticsData();exit;\n // $Topleaders = ServiceFactory::getSkiptaPostServiceInstance()->SaveTopLeadersOfTheDay();exit;\n $segmentId = (int)$this->tinyObject->SegmentId;\n $Topleaders = ServiceFactory::getSkiptaPostServiceInstance()->GetTopLeadersOfTheDay($segmentId);\n $Stats = ServiceFactory::getSkiptaUserServiceInstance()->getAnalyticsStats($segmentId);\n $NewsAvailable=Yii::app()->params['News'];\n $this->render('index',array(\"stats\"=>$Stats,\"Topleaders\"=>$Topleaders,\"NewsAvailable\"=>$NewsAvailable));\n } catch (Exception $ex) {\n Yii::log(\"AnalyticsController:actionIndex::\".$ex->getMessage().\"--\".$ex->getTraceAsString(), 'error', 'application');\n }\n }", "title": "" }, { "docid": "41d90624fe8552a0e78c6be362dba2ae", "score": "0.5537427", "text": "function pageGenerator()\n{\n echo \"<h1>Welcome to the home page of Plug-in</h1>\";\n}", "title": "" }, { "docid": "d05984d9d3ebeee2955e541163b0126c", "score": "0.5531227", "text": "function yourls_api_url_stats($shorturl) {\n\t\t$keyword = str_replace( YOURLS_SITE . '/' , '', $shorturl ); // accept either 'http://ozh.in/abc' or 'abc'\n\t\t$keyword = self::yourls_sanitize_string( $keyword );\n\n\t\t$return = self::yourls_get_link_stats( $keyword );\n\t\t$return['simple'] = 'Need either XML or JSON format for stats';\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "80b9fc20ff0f6373d5775ad0ed3a526b", "score": "0.5526021", "text": "public function haha(){\n echo \"smile\";\n }", "title": "" }, { "docid": "a607e954d800f6cdb1d6a7429e15e357", "score": "0.5515509", "text": "public function printMethodName() {\n echo \"This is \" . __METHOD__ . \" method.<br />\\n\";\n }", "title": "" }, { "docid": "d6c31b3db5fa32d79251705004d07bc1", "score": "0.55089647", "text": "function smcln_sm_summary() {\n?>\n\t<div class=\"sm-stats-table\">\n\t\t<h4>Searches in the Last 7 Days</h4>\n\t\t<?php tguy_sm_summary_table(7); ?>\n\t</div>\n\t<div class=\"sm-news\" style=\"display:none\"></div>\n\t<ul class=\"subsubsub\">\n\t\t<li><a href=\"index.php?page=<?php echo plugin_basename(__FILE__); ?>\">Full Dashboard</a> |</li>\n\t\t<?php if (current_user_can(TGUY_SM_OPTIONS_CAPABILITY)) : ?>\n\t\t<li><a href=\"options-general.php?page=<?php echo plugin_basename(__FILE__); ?>\">Settings</a> |</li>\n\t\t<?php endif; ?>\n\t\t<li><a href=\"http://thunderguy.com/semicolon/donate/\">Donate</a></li>\n\t</ul>\n<?php\n}", "title": "" }, { "docid": "c50808db7033a2c448f9e4e4f3c7d967", "score": "0.55075556", "text": "function ns_google_analytics() { ?>\n\n<!-- Global site tag (gtag.js) - Google Analytics -->\n\n<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-7020140-3\"></script>\n<script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'UA-7020140-3');\n</script>\n <?php\n }", "title": "" }, { "docid": "f749c7901e89175f8405d969a0ab625b", "score": "0.55056465", "text": "function testFunction(){\n return \"Test function 1.\";\n }", "title": "" }, { "docid": "ded2260eadc0124905a59f2fd7213a6d", "score": "0.55000734", "text": "protected function test(){//protected function\n\t\t\techo \"Testing 1.2.3.4... can you read me????<br><br>\";\n\t\t}", "title": "" }, { "docid": "9cf8ff0a48d957a9f6ba6c860446a8a6", "score": "0.54943407", "text": "function getSummary()\n {\n return 'The page you were looking for doesn\\'t exist.';\n }", "title": "" }, { "docid": "26ba8622e8e69319e711f041af0ac426", "score": "0.54908794", "text": "function test_test(){\r\n\t//var_dump($rvps->rvps_get_products());\r\n\t//rvps_products_view();\r\n}", "title": "" }, { "docid": "22c4b9d82ce6f9f6d909fe5c621b4845", "score": "0.54861015", "text": "public function index() {\n\t\techo new UnitTest;\n\t}", "title": "" }, { "docid": "a033f85a5a4920d509f33839859ea457", "score": "0.5484515", "text": "public function testMethod()\n {\n return 'SKU: ' . $this->getSku();\n }", "title": "" }, { "docid": "f7f80de6630d902b3bedbaa2810a9cb3", "score": "0.54821277", "text": "public function testOtherStuff()\n {\n }", "title": "" }, { "docid": "906c54c838cc5682bd5690fb54a0cd8d", "score": "0.5481286", "text": "function add_google_analytics_code() {\n if(isset($this->options['add_google_analytics'])) {\n print '<script>' . PHP_EOL;\n print \"(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '\" . $this->options['add_google_analytics'] . \"', 'auto');ga('send', 'pageview');\" . PHP_EOL;\n print '</script>' . PHP_EOL;\n }\n }", "title": "" }, { "docid": "dd58527b11d8dc2feb1fdc36cb139d29", "score": "0.54799753", "text": "public function moreTesting() {\n\t\techo \"ChildClass::moreTesting() called<br />\";\n\t}", "title": "" }, { "docid": "734f4b5f5d2ead34ce5ba2c8188cc280", "score": "0.547975", "text": "static function HelloWorld()\n\t{\n\t\treturn 'Hola mundo';\n\t}", "title": "" }, { "docid": "c25449a3eff3db14db64848247c5dbc5", "score": "0.5474431", "text": "function run_bet_stats() {\n\n\t$plugin = new Bet_Stats();\n\t$plugin->run();\n\n}", "title": "" }, { "docid": "8b5e77162f936aaaec4df455ae0c7c85", "score": "0.5471033", "text": "function showUsage()\n{\n reportError('Usage: php run_js_tests.php');\n}", "title": "" }, { "docid": "c5133b3a58906cbd3068de125800d588", "score": "0.5468613", "text": "public function get_name()\n {\n return 'promo-stats';\n }", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.5468012", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.5468012", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.5468012", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.5468012", "text": "public function getSummary();", "title": "" }, { "docid": "6e35524315bc4b823766da183bcdf840", "score": "0.5465925", "text": "public static function stats()\r\n\t{\r\n\t\tif (function_exists('curl_init'))\r\n\t\t{\r\n\t\t\t$data = http_build_query(array(\r\n\t\t\t\t// anonymous reference generated using one-way hash\r\n\t\t\t\t'site' => sha1(ee()->config->item('license_number')),\r\n\t\t\t\t'product' => 'store',\r\n\t\t\t\t'version' => STORE_VERSION,\r\n\t\t\t\t'ee' => APP_VER,\r\n\t\t\t\t'php' => PHP_VERSION,\r\n\t\t\t));\r\n\t\t\tee()->load->library('curl');\r\n\t\t\tee()->curl->simple_post(\"http://hello.exp-resso.com/v1\", $data);\r\n\t\t}\r\n\r\n\t\t// report again in 28 days\r\n\t\tee()->store_config->set_item('report_date', ee()->localize->now + 28*24*60*60);\r\n\t\tee()->store_config->save();\r\n\t\texit('OK');\r\n\t}", "title": "" }, { "docid": "0b0292faeb44c95136160889762c5700", "score": "0.5461772", "text": "public function testAction()\n {\n d_e('This is test page action.');\n }", "title": "" }, { "docid": "375915897e4203d1c9dbb4be183e1c36", "score": "0.5460096", "text": "function mytest()\n{\n\techo greeting;\n}", "title": "" }, { "docid": "cf5ec267409a32430b865137f73f0106", "score": "0.54574615", "text": "public function testExecute()\n {\n\n }", "title": "" }, { "docid": "9a0b260c36ec71cbfaad1cb6e7f52c80", "score": "0.5455038", "text": "public function summaryTitle();", "title": "" }, { "docid": "e73aec785df827d03fa12ec38936720a", "score": "0.5438404", "text": "public function testGetAlertingInteractionstatsAlerts()\n {\n }", "title": "" }, { "docid": "2acf712c00de8ba8b2d578ff18fe353e", "score": "0.543344", "text": "function test() {\n echo \"a::test called\\n\";\n }", "title": "" }, { "docid": "4e121c46979d8b5a13db92134218ac9b", "score": "0.5432176", "text": "public function testAPI()\n {\n return 'Pham Truong Thien An';\n }", "title": "" }, { "docid": "c77c0c1d2c244cf23175ec38d07e402b", "score": "0.5420924", "text": "function agriflex_analytics_code() {\n\n $options = of_get_option();\n $a = agriflex_agency();\n\n if( !is_admin() ) : ?>\n <script type=\"text/javascript\">//<![CDATA[\n // Google Analytics asynchronous\n var _gaq = _gaq || [];\n <?php if( $a['ext-type'] == 'county' ||\n $a['ext-type'] == 'tce' ) : ?>\n _gaq.push(['_setAccount','UA-7414081-1']); //county-co\n _gaq.push(['_trackPageview'],['_trackPageLoadTime']);\n <?php endif; ?>\n\n <?php if( ! empty($options['g-analytics'] ) ) {\n echo \"_gaq.push(['_setAccount','\" . $options['g-analytics'] . \"']); //local \\n\";\n echo \"_gaq.push(['_trackPageview'],['_trackPageLoadTime']);\\n\";\n }\n ?>\n (function() {\n var ga = document.createElement('script');\n ga.type = 'text/javascript';\n ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(ga, s);\n })();\n //]] >\n </script>\n <?php\n endif;\n\n}", "title": "" }, { "docid": "a11d899f3f60b5ddfe42d7a0deb2335a", "score": "0.54177386", "text": "public function test_calculateLoyaltyPoints() {\n\n }", "title": "" }, { "docid": "e03a943aee97d81b595635a69560bc25", "score": "0.5416362", "text": "function ArcadeStats()\n{\n\tglobal $txt, $context;\n\t\n\t$context['sub_template'] = 'arcade_statistics';\n\t$context['page_title'] = $txt['arcade_stats_title'];\n\t\n\t// Load data using functions\n\t$context['arcade']['statistics']['play'] = ArcadeStats_MostPlayed();\n\t$context['arcade']['statistics']['active'] = ArcadeStats_MostActive(); \n\t$context['arcade']['statistics']['rating'] = ArcadeStats_Rating(); \n\t$context['arcade']['statistics']['champions'] = ArcadeStats_BestPlayers(); \n\t$context['arcade']['statistics']['longest'] = ArcadeStats_LongestChampions();\n\t$context['arcade']['statistics']['total'] = ArcadeStats_total_plays();\n\t\n}", "title": "" }, { "docid": "468c203aea2c24d8d44b6fca04835b37", "score": "0.5416091", "text": "public function test_get() {\n\n }", "title": "" }, { "docid": "d04ce757b6e9ad513da35b351627a21e", "score": "0.54133487", "text": "public function testGetDailyEPG()\n {\n }", "title": "" }, { "docid": "4669ff51cb7e7d431d84f25a7e90d4e2", "score": "0.5412247", "text": "public function testSearchDashboards()\n {\n }", "title": "" }, { "docid": "d61162f073c1a82f4c1c2eadac41dccd", "score": "0.54115", "text": "public function google_analytics() {\n\t\tif ( $ga_id = get_option( 'terminally_pixelated_googleanalytics' ) ) : ?>\n\t\t\t<script>\n\t\t\t\t(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=\n\t\t\t\tfunction(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;\n\t\t\t\te=o.createElement(i);r=o.getElementsByTagName(i)[0];\n\t\t\t\te.src='//www.google-analytics.com/analytics.js';\n\t\t\t\tr.parentNode.insertBefore(e,r)}(window,document,'script','ga'));\n\t\t\t\tga('create','<?php echo $ga_id; ?>');ga('send','pageview');\n\t\t\t</script>\n\t\t<?php endif;\n\t}", "title": "" }, { "docid": "58ecda11889bf157042d9e05ab4e0bc8", "score": "0.5408044", "text": "public function summary();", "title": "" }, { "docid": "5f2d1fc0ad3f227f124054de9db5e15f", "score": "0.5406909", "text": "function statisticBrowser($blogId);", "title": "" }, { "docid": "8a311fac611348f687342f9f57861163", "score": "0.54000443", "text": "public function example()\n {\n //\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "f86a56e84330a1be6c745f84784c5f21", "score": "0.0", "text": "public function store(Request $request)\n {\n if(Auth::user()->rol == 6) {\n if($request->ajax())\n {\n if(!empty($request->file('file'))) {\n $file = $request->file('file');\n $nombre = str_replace(':', '_', Carbon::now()->toDateTimeString().$file->getClientOriginalName());\n $nombre = str_replace(' ', '_', $nombre);\n \\Storage::disk('enlaces')->put($nombre, \\File::get($file));\n }\n else {\n $nombre = '';\n }\n EnlacesInteres::create([\n 'nombre' => $request['nombre'], \n 'url' => $request['url'],\n 'path' => $nombre\n ]);\n \n return response()->json([\n 'nuevoContenido' => $request->all()\n ]);\n }\n }\n else {\n Session::flash('message', 'Sin privilegios');\n return Redirect::route('dashboard');\n }\n }", "title": "" } ]
[ { "docid": "79da2146a3794a65b80951c7ea2a2404", "score": "0.66211367", "text": "public function save()\n {\n $this->storage->save();\n }", "title": "" }, { "docid": "f934191a4b4b75a1fb96952dd934d298", "score": "0.6508264", "text": "public function store()\n {\n $this->validate(\n $this->request,\n $this->validationRules('create'),\n [],\n $this->getLabelFields('create')\n );\n\n if ($new = $this->model()->create($this->request->all())) {\n return $this->afterStored($new);\n }\n\n return\n back()\n ->withInput()\n ->with(\n 'error',\n __(\n 'Error when creating :resource_name.',\n ['resource_name' => static::$title]\n )\n );\n\n }", "title": "" }, { "docid": "29b26d3072dbf3730f945274190fe8af", "score": "0.6507538", "text": "public function store(StoreResourceRequest $request)\n {\n abort_if(\n $request->user()->cannot('create', Resource::class),\n 403\n );\n\n // course not found\n Course::where('program_id', auth()->user()->program_id)->findOrFail($request->course_id);\n\n try {\n $batchId = Str::uuid();\n foreach ($request->file as $file) {\n $temporaryFile = TemporaryUpload::firstWhere('folder_name', $file);\n\n if ($temporaryFile) {\n $r = Resource::create([\n 'course_id' => $request->course_id,\n 'user_id' => auth()->id(),\n 'batch_id' => $batchId,\n 'description' => $request->description\n ]);\n\n $r->users()->attach($r->user_id, ['batch_id' => $batchId]);\n\n $r->addMedia(storage_path('app/public/resource/tmp/' . $temporaryFile->folder_name . '/' . $temporaryFile->file_name))\n ->toMediaCollection();\n rmdir(storage_path('app/public/resource/tmp/' . $file));\n\n // event(new ResourceCreated($r));\n\n $temporaryFile->delete();\n }\n }\n\n if ($request->check_stay) {\n return redirect()\n ->route('resources.create')\n ->with('success', 'Resource was created successfully');\n }\n\n return redirect()\n ->route('resources.index')\n ->with('success', 'Resource was created successfully');\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "title": "" }, { "docid": "195678750c701128998da1a792face59", "score": "0.6485103", "text": "public function store()\n\t{\n\t\t$input = Input::only('link', 'description', 'level', 'title', 'categorie_id');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required|url',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer',\n\t\t\t'categorie_id' => 'required|integer'\n\t\t];\n\t\t\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = new Resource($input);\n\t\t\t$user = Auth::user();\n\t\t\t$user->resources()->save($resource);\n\t\t\t$user->save();\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('Your resource was successfully created!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "20369ffaffacb701b25ed702ed26d8a3", "score": "0.64411986", "text": "public function save(): void\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "3d9eb044ff6d55a39b2aa1f967b0a444", "score": "0.6406276", "text": "public function store()\n {\n $this->beginAction('store');\n $this->applyHooks(AuthorizeAction::class);\n $this->gatherInput();\n $this->validateInput();\n $this->createResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "ca58ec6302f4412d3ed2c815a424ff00", "score": "0.640073", "text": "public function store()\n\t{\n\t\t// not yet required!\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
f3d384f3080ab58cfd692bf68d5c86af
Function to convert CSV into associative array
[ { "docid": "2a7a01d8e82cec694f52777eb8d5fad6", "score": "0.6805761", "text": "function csvToArray($file, $delimiter) {\n if (($handle = fopen($file, 'r')) !== FALSE) {\n $i = 0;\n while (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\n for ($j = 0; $j < count($lineArray); $j++) {\n $arr[$i][$j] = $lineArray[$j];\n }\n $i++;\n }\n fclose($handle);\n }\n return $arr;\n}", "title": "" } ]
[ { "docid": "80a1d3be62c1ebd6ffa732649e6d9553", "score": "0.79948664", "text": "function csv_to_associative_array($file, $delimiter = ',', $enclosure = '\"')\n{\n if (($handle = fopen($file, \"r\")) !== false)\n {\n $headers = fgetcsv($handle, 0, $delimiter, $enclosure);\n $lines = [];\n while (($data = fgetcsv($handle, 0, $delimiter, $enclosure)) !== false)\n {\n $current = [];\n $i = 0;\n foreach ($headers as $header)\n {\n $current[$header] = $data[$i++];\n }\n $lines[] = $current;\n }\n fclose($handle);\n return $lines;\n\t}\n}", "title": "" }, { "docid": "f8e6925d8ab44c96ab9fadaba2efbaa0", "score": "0.724876", "text": "function getAssociativeArrayFromCSV($csvFile) {\n\n\t//Attempt to open the file\n\t$csvArray = array();\n\tif (($csvFileHandle = fopen($csvFile, \"r\")) !== FALSE) {\n\t\n\t\twhile (($currentRowData = fgetcsv($csvFileHandle, 1000, \",\")) !== FALSE) {\n\t\t\t$csvArray[$currentRowData[0]] = $currentRowData[1];\n\t\t}\n\t\t\n\t\tfclose($csvFileHandle);\n\t}\n\t\n\t//If file couldn't be opened, show error and exit\n\telse {echo \"CSV couldn't be opened\"; exit();}\n\t\n\t//Return the associative array of CSV data\n\treturn $csvArray;\n}", "title": "" }, { "docid": "9a05aadb32b731a2296c6a310a886f3a", "score": "0.7107215", "text": "Function Csv2Array(){ \n \n $arr_csv = array(); \n \n while ($arr_row = $this->NextLine()){ \n $arr_csv[] = $arr_row; \n } \n \n return $arr_csv; \n }", "title": "" }, { "docid": "d9659f640a50862276ca0ed0b71aa0e5", "score": "0.70653385", "text": "function csv_to_array($filename='', $delimiter=',')\n{\n if(!file_exists($filename) || !is_readable($filename))\n return FALSE;\n\n $header = NULL;\n $data = array();\n if (($handle = fopen($filename, 'r')) !== FALSE)\n {\n while (($row = fgetcsv($handle, 1000, $delimiter)) !== FALSE)\n {\n if(!$header)\n $header = $row;\n else\n $data[] = array_combine($header, $row);\n }\n fclose($handle);\n }\n return $data;\n}", "title": "" }, { "docid": "971c6c6ba84378ebc944597e355b9b07", "score": "0.691375", "text": "function csv_to_JSON($input, $att_delimiter)\n{\n\t$header = null;\n\t$data = array();\n\t$csvData = str_getcsv($input, \"\\n\");\n\tforeach($csvData as $csvLine){\n\t\tif(is_null($header)) $header = explode($att_delimiter, $csvLine);\n\t\telse{\n\t\t\t$items = explode($att_delimiter, $csvLine);\n\t\t\tfor($n = 0, $m = count($header); $n < $m; $n++){\n\t\t\t\t$items[$n] = trim($items[$n]);\n\t\t\t\t$prepareData[$header[$n]] = $items[$n];\n\t\t\t}\n\t\t\t$data[] = $prepareData;\n\t\t}\n\t}\n\t$JSONdata = json_encode($data, JSON_NUMERIC_CHECK);\n\treturn array($header, $JSONdata);\n}", "title": "" }, { "docid": "357ee51924dc812d0571aa23739598a5", "score": "0.6903757", "text": "function read_data2fromcsv($csv){\n\t\t$column_x = $column_y = array();\n\t\t$f = fopen($csv, 'r');\n\t\twhile(($data = fgetcsv($f)) !== FALSE){\n\t\t\t$column_x[] = $data[0];\n\t\t\t$column_y[] = $data[1];\n\t\t} \n\t\tfclose($f);\n\t\treturn array(\"xs\"=>$column_x, \"ys\"=>$column_y);\n\t}", "title": "" }, { "docid": "62112028e69e3bc29ecfbff2d5918976", "score": "0.6886383", "text": "function csvToArray($file, $delimiter) { \n if (($handle = fopen($file, 'r')) !== FALSE) { \n $i = 0; \n while (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) { \n for ($j = 0; $j < count($lineArray); $j++) { \n $arr[$i][$j] = $lineArray[$j]; \n } \n $i++; \n } \n fclose($handle); \n } \n return $arr; \n}", "title": "" }, { "docid": "62112028e69e3bc29ecfbff2d5918976", "score": "0.6886383", "text": "function csvToArray($file, $delimiter) { \n if (($handle = fopen($file, 'r')) !== FALSE) { \n $i = 0; \n while (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) { \n for ($j = 0; $j < count($lineArray); $j++) { \n $arr[$i][$j] = $lineArray[$j]; \n } \n $i++; \n } \n fclose($handle); \n } \n return $arr; \n}", "title": "" }, { "docid": "87b8ad0591683f10e9755f9c2886ff0e", "score": "0.6869387", "text": "function csvToArray($file, $delimiter) { \n if (($handle = fopen($file, 'r')) !== FALSE) { \n $i = 0; \n while (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\n for ($j = 0; $j < count($lineArray); $j++) { \n $arr[$i][$j] = $lineArray[$j]; \n } \n $i++; \n } \n fclose($handle); \n } \n return $arr; \n}", "title": "" }, { "docid": "886b6d0ffa15c824448cb644492f250d", "score": "0.68442404", "text": "function csv2array($csvfile,$fldnames=null,$sep=',',$protect='\"',$filters=null){ \n if(! $csv = file($csvfile) ) \n return FALSE; \n\n # use the first line as fields names \n if( is_null($fldnames) ){ \n $fldnames = array_shift($csv); \n $fldnames = explode($sep,$fldnames); \n $fldnames = array_map('trim',$fldnames); \n if($protect){ \n foreach($fldnames as $k=>$v) \n $fldnames[$k] = preg_replace(array(\"/(?<!\\\\\\\\)$protect/\",\"!\\\\\\\\($protect)!\"),'\\\\1',$v); \n } \n }elseif( is_string($fldnames) ){ \n $fldnames = explode($sep,$fldnames); \n $fldnames = array_map('trim',$fldnames); \n } \n \n $i=0; \n foreach($csv as $row){ \n if($protect){ \n $row = preg_replace(array(\"/(?<!\\\\\\\\)$protect/\",\"!\\\\\\\\($protect)!\"),'\\\\1',$row); \n } \n $row = explode($sep,trim($row)); \n \n foreach($row as $fldnb=>$fldval) \n $res[$i][(isset($fldnames[$fldnb])?$fldnames[$fldnb]:$fldnb)] = $fldval; \n \n if( is_array($filters) ){ \n foreach($filters as $k=>$exp){ \n if(! preg_match($exp,$res[$i][$k]) ) \n unset($res[$i]); \n } \n } \n $i++; \n } \n \n return $res; \n}", "title": "" }, { "docid": "5934d145f219c7bfc0f77146f179c715", "score": "0.6815696", "text": "function csvToArray($file, $delimiter) {\r\n\tif (($handle = fopen($file, 'r')) !== FALSE) {\r\n\t\t$i = 0;\r\n\t\twhile (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\r\n\t\t\tfor ($j = 0; $j < count($lineArray); $j++) {\r\n\t\t\t\t$arr[$i][$j] = $lineArray[$j];\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\tfclose($handle);\r\n\t}\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "5934d145f219c7bfc0f77146f179c715", "score": "0.6815696", "text": "function csvToArray($file, $delimiter) {\r\n\tif (($handle = fopen($file, 'r')) !== FALSE) {\r\n\t\t$i = 0;\r\n\t\twhile (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\r\n\t\t\tfor ($j = 0; $j < count($lineArray); $j++) {\r\n\t\t\t\t$arr[$i][$j] = $lineArray[$j];\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\tfclose($handle);\r\n\t}\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "969cecadbb628b38aaede3f695bbb468", "score": "0.6769652", "text": "function csv_to_array($filename='', $delimiter=',')\n{\n\t// echo \"in function<br>\";\n\n $data = array();\n if (($handle = fopen($filename, 'r')) !== FALSE)\n {\n \t// echo \"hit if\";\n while (($row = fgetcsv($handle, 30000, $delimiter)) !== FALSE)\n {\n \t// echo \"row[0] = \".$row[0].\"<br>\";\n \t// echo \"row[1] = \".$row[1].\"<br>\";\n $data[$row[0]] = $row[1];\n }\n fclose($handle);\n }\n else {\n \t// echo \"hit else\";\n }\n return $data;\n}", "title": "" }, { "docid": "ade9f18efface7dfd7751f9ef5251b12", "score": "0.6745139", "text": "function csv_to_array($filename, $delimiter){\n $rows = array_map('str_getcsv', file($filename));\n $header = array_shift($rows);\n $csv = array();\n foreach ($rows as $row) {\n $csv[] = array_combine($header, $row);\n }\n return $csv;\n }", "title": "" }, { "docid": "2988fd6a7950a0553ae64392c1b4b7d7", "score": "0.66880876", "text": "public static function convertFromCSV($csv) {\r\n\t\tif($csv == \"\")\r\n\t\t\treturn array();\r\n\t\treturn split(',',$csv);\r\n\t}", "title": "" }, { "docid": "4e5a38186f3034b8d94d17a86769d6de", "score": "0.6646087", "text": "public function test_is_the_csv_parser_working_correctly()\n {\n $rawCSVData = 'id,name,lastname,age\n1,amir,alian,26';\n\n $csvToArray = (new CSV($rawCSVData))->toArray();\n\n\n $this->assertIsArray($csvToArray);\n $this->arrayHasKey($csvToArray);\n $this->assertEquals('1', $csvToArray[0]['id']);\n $this->assertEquals('amir', $csvToArray[0]['name']);\n $this->assertEquals('alian', $csvToArray[0]['lastname']);\n $this->assertEquals('26', $csvToArray[0]['age']);\n }", "title": "" }, { "docid": "456dce345fc2ec75a00f12c311aa6428", "score": "0.6613465", "text": "function csv2kv ($path) {\n\t\t$file \t\t\t= fopen('oscc/' . $path, 'r') or die (\"Can't open file oscc/\" . $path);\n\t\t$resultsArray\t= array();\n\n\t\twhile (!feof($file)) {\n\t\t\t$lineArray = fgetcsv($file);\n\t\t\t$resultsArray[$lineArray[0]] = $lineArray[1];\n\t\t}\n\t\tfclose($file);\n\t\treturn $resultsArray;\n\t}", "title": "" }, { "docid": "741d343d2034427c3a52893c3c2c967a", "score": "0.6582655", "text": "function csvToArray($file, $delimiter) {\n\tif (($handle = fopen($file, 'r')) !== FALSE) {\n\t\t$i = 0;\n\t\twhile (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\n\t\t\tfor ($j = 0; $j < count($lineArray); $j++) {\n\t\t\t\t$arr[$i][$j] = $lineArray[$j];\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\tfclose($handle);\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "862781b3c1c452297208a24c2b8291a9", "score": "0.6503848", "text": "private function convertCsv($csv)\n\t{\n\t\t$result;\n\t\t$wholeCSV = str_getcsv($csv, \"\\n\");\n\t\tfor ($i = 1; $i < sizeof($wholeCSV); $i++) { \n\t\t\t$row = explode(\",\", preg_replace('/\\s+/', '', $wholeCSV[$i]));\n\t\t\tif ($this->currentCurency == null) {\n\t\t\t\t$result[array_shift($row)] = array(\n\t\t\t\t\t'Buying' => array_slice($row, 1, 9),\n\t\t\t\t\t'Selling' => array_slice($row, 11, 9)\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$result[] = array(\n\t\t\t\t\t'date' => array_shift($row),\n\t\t\t\t\t'Buying' => array_slice($row, 2, 9),\n\t\t\t\t\t'Selling' => array_slice($row, 12, 9)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9f7029394929f30e2ff7a090a35845ea", "score": "0.6446241", "text": "function parse_csvfileold($file){\n\nreturn;\n $handle = fopen($file,\"r\");\n\n\n $attendees = array();\n $fields = array();\n\n $line = fgets($handle);\n //var_dump ($line);\n $fields = custom_getcsv($line);\n\n //var_dump ($fields);\n\n $i = 0;\n while ($line = fgets($handle)){\n\t $row = custom_getcsv($line);\n\t if ($row[0] != NULL) {\n\t\t foreach ($row as $k=>$value){\n\t\t $attendees[$i][$fields[$k]] = $value;\n\t\t }\n\t }\n\t $i++;\n\n }\n\n fclose ($handle);\n \n return $attendees;\n\n}", "title": "" }, { "docid": "d0f2b2c0471ec05b5b427143890bb234", "score": "0.6421922", "text": "public function getParsedArray()\n {\n $handle = fopen($this->csv_file_path, \"r\");\n $csv_data_array = array();\n\n fgetcsv($handle, 0, \";\"); # пропустить headers\n while (($line = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $csv_data_array[] = $line;\n }\n fclose($handle);\n return $csv_data_array;\n }", "title": "" }, { "docid": "d0f2b2c0471ec05b5b427143890bb234", "score": "0.6421922", "text": "public function getParsedArray()\n {\n $handle = fopen($this->csv_file_path, \"r\");\n $csv_data_array = array();\n\n fgetcsv($handle, 0, \";\"); # пропустить headers\n while (($line = fgetcsv($handle, 0, \";\")) !== FALSE) {\n $csv_data_array[] = $line;\n }\n fclose($handle);\n return $csv_data_array;\n }", "title": "" }, { "docid": "7aed12c5006d94dff2873967d83dcd2c", "score": "0.6417541", "text": "function csvToArray($filepath){\n setlocale(LC_ALL, 'en_US.UTF-8');\n // apertura del file\n if (($handle = fopen($filepath, \"r\")) !== FALSE) {\n $nn = 0;\n // legge una riga alla volta fino alla fine del file\n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n // numero di elementi presenti nella riga letta\n $num_elementi = count($data);\n // popolamento dell'array\n for ($x=0; $x<$num_elementi; $x++) {\n $csvarray[$nn][$x] = $data[$x];\n }\n $nn++;\n }\n // Chiusura del file\n fclose($handle);\n } else {\n echo \"File non trovato\";\n }\n\n return $csvarray;\n }", "title": "" }, { "docid": "0b473c91bc3bd6aed271b93159fba1dc", "score": "0.63901454", "text": "function csv2arr($path) {\n\t\t$file \t\t\t= fopen('oscc/' . $path, 'r') or die (\"Can't open file oscc/\" . $path);\n\t\t$resultsArray\t= array();\n\n\t\twhile (!feof($file)) {\n\t\t\t$lineArray = fgetcsv($file);\n\t\t\tarray_push($resultsArray, $lineArray);\n\t\t}\n\t\tfclose($file);\n\t\treturn $resultsArray;\n\t}", "title": "" }, { "docid": "d385309a3fe3cf445df173f0b174b39e", "score": "0.63504344", "text": "public function convertCsvToArray()\n\t{\n\t // TODO: Abstract common file handling functionality.\n\t\t$tmpName = tempnam(sys_get_temp_dir(), \"TempCSV\");\n\t\t$fp = fopen($tmpName, \"w\");\n\n\t\tfwrite($fp, $this->csv);\n\t\tfseek($fp, 0);\n\n\t\t$csvArr = array_map('str_getcsv', file($tmpName));\n\n\t\tfclose($fp);\n\t\t\n\t\treturn $csvArr;\n\t}", "title": "" }, { "docid": "73b5f1c394b872e2ce74808a655d9a8a", "score": "0.63409257", "text": "function parse_csv_line($line) {\n return array_map('parse_csv_field', explode(',', $line));\n\t}", "title": "" }, { "docid": "910671c70a8d12aee3ebb2d3385cd357", "score": "0.6269952", "text": "static function csv2array($filename, $delimiter=\";\") {\n\t\t$result = array();\n\t\t//echo \"arranca\";\n\t\tif ($content = file_get_contents($filename) ){\n\t\t\t//echo \"open\";\n\t\t\t$rows = explode(\"\\r\\n\", $content);\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t//echo \"row|\";\n\t\t\t\t$cells = explode($delimiter, $row);\n\t\t\t\tif ( is_array($cells) && count($cells) > 1 ) {\n\t\t\t\t\t$result[] = $cells; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//var_dump($result) ;\n\t\treturn $result ; \t\n\t\t\n\t}", "title": "" }, { "docid": "bcd9e2e07b94c051bf1f7428f369a974", "score": "0.6269714", "text": "private function _parseInstrumentsCSV($csv) {\n\t\t$lines = explode(\"\\n\", $csv);\n\n\t\t$records = [];\n\t\t$head = [];\n\t\tfor($n=0; $n<count($lines); $n++) {\n\t\t\tif($cols = @str_getcsv($lines[$n])) {\n\t\t\t\tif(count($cols) < 5) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// First line is the header.\n\t\t\t\tif($n === 0) {\n\t\t\t\t\t$head = $cols;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Combine header columns + values to an associative array\n\t\t\t\t// and then to an object;\n\t\t\t\t$o = (object) array_combine($head, $cols);\n\t\t\t\t$o->last_price = floatval($o->last_price);\n\t\t\t\t$o->strike = floatval($o->strike);\n\t\t\t\t$o->tick_size = floatval($o->tick_size);\n\t\t\t\t$o->lot_size = floatval($o->lot_size);\n\n\t\t\t\tif (!empty($o->expiry) && strlen($o->expiry) == 10) {\n\t\t\t\t\t$o->expiry = new DateTime($o->expiry, new DateTimeZone(\"Asia/Kolkata\"));\n\t\t\t\t}\n\n\t\t\t\t$records[] = $o;\n\t\t\t}\n\t\t}\n\n\t\treturn $records;\n\t}", "title": "" }, { "docid": "84776e76a6fcdb63140566064d3d092f", "score": "0.6262393", "text": "function csv_to_array($file, $delimiter) {\n if(!ini_set('default_socket_timeout', 15))\n echo \"<!-- unable to change socket timeout -->\";\n\n if (($handle = fopen($file, 'r')) !== FALSE) {\n $i = 0;\n while (($lineArray = fgetcsv($handle, 4000, $delimiter, '\"')) !== FALSE) {\n for ($j = 0; $j < count($lineArray); $j++) {\n $arr[$i][$j] = $lineArray[$j];\n }\n $i++;\n }\n fclose($handle);\n }\n else {\n die(\"Problem when accessing to url\");\n }\n\n return $arr;\n}", "title": "" }, { "docid": "44f51eb0cb8093237076859c74032a47", "score": "0.62335646", "text": "public static function _fromCsv($input, bool $firstLineKeys = FALSE,\n\t\t\t\t\t\t\t\t\tstring $delimiter = \",\", string $quote = \"\\\"\"): array {\n\t\tif (is_array($input)) return $input;\n\t\tif (empty($input)) return [];\n\t\tif (!is_string($input))\n\t\t\tthrow new ArrayGeneratorException(\"The given input is not supported as CSV array source!\");\n\t\t$lines = preg_split(\"/$\\R?^/m\", trim($input));\n\t\tif (!is_array($lines))\n\t\t\tthrow new ArrayGeneratorException(\"Error while parsing CSV array source!\");\n\t\t$keyLength = 0;\n\t\tif ($firstLineKeys) {\n\t\t\t$keys = array_shift($lines);\n\t\t\t$keys = str_getcsv($keys, $delimiter, $quote);\n\t\t\t$keys = array_map(\"trim\", $keys);\n\t\t\t$keyLength = count($keys);\n\t\t}\n\t\tforeach ($lines as $ln => $line) {\n\t\t\t$line = str_getcsv($line, $delimiter, $quote);\n\t\t\t$line = array_map(\"trim\", $line);\n\t\t\t// No keys\n\t\t\tif (!isset($keys)) {\n\t\t\t\t$lines[$ln] = $line;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Keys match\n\t\t\tif (count($line) === $keyLength) {\n\t\t\t\t$lines[$ln] = array_combine($keys, $line);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Apply key length to line\n\t\t\t$lines[$ln] = array_pad(array_slice($line, 0, $keyLength), $keyLength, NULL);\n\t\t}\n\t\treturn $lines;\n\t}", "title": "" }, { "docid": "544f471e6ca2239b68eb672b1191e32f", "score": "0.62279487", "text": "private function _parseCSV(String $fname): Array\n\t{\n\t\tini_set('auto_detect_line_endings', true);\n\t\t$csv = new CSV($fname);\n\t\t$csv->setFlags(CSV::READ_CSV | CSV::DROP_NEW_LINE | CSV::SKIP_EMPTY);\n\t\t$rows = [];\n\n\t\tif ($csv->valid()) {\n\t\t\t$headers = $csv->fgetcsv();\n\t\t\t$csv->next();\n\t\t\t$header_size = count($headers);\n\t\t}\n\n\t\twhile ($csv->valid()) {\n\t\t\t$row = $csv->fgetcsv();\n\t\t\t$csv->next();\n\n\t\t\tif (empty($row)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$row = array_pad($row, $header_size, null);\n\t\t\t$row = array_combine($headers, $row);\n\t\t\tif (isset($row['Category Code'], $row['Ad Text'], $row['Filename'])) {\n\t\t\t\tif (! array_key_exists($row['Category Code'], $rows)) {\n\t\t\t\t\t$rows[$row['Category Code']] = [];\n\t\t\t\t}\n\t\t\t\t$rows[$row['Category Code']][] = [\n\t\t\t\t\t'text' => $row['Ad Text'],\n\t\t\t\t\t'image' => self::IMG_DIR . rawurlencode($row['Filename']),\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "64c393fab94a2c26cb96a405a0123f47", "score": "0.6157095", "text": "static public function getArrayData($data)\n {\n $returnData = array();\n foreach ($data as $key => $row) {\n if ($key == 0)\n continue;\n $a = str_getcsv($row);\n $returnData[$a[0]] = $a;\n }\n return $returnData;\n }", "title": "" }, { "docid": "9fa24772e388f8f88facacaa546ba380", "score": "0.614669", "text": "public static function arrayFromFitCSV($line)\n {\n return str_getcsv(substr(trim($line),0,-1));\n }", "title": "" }, { "docid": "a86d019ded4aea9f31a8aea5deabe667", "score": "0.61282086", "text": "function parseCsvRow($row) {\n\t\tlist($user_id, $hash) = explode('@@', $row[$this->indexes['user_id_and_hash']]);\n\t\t$survey_id = Utils::parse_project_id_from_hash($hash);\n\t\t\n\t\tif (empty($row[$this->indexes['timestamp']])) {\n\t\t\t$date_time = '0000-00-00 00:00:00';\n\t\t}\n\t\telse {\n\t\t\t// convert timestamp to utc\n\t\t\t$date_time = strtotime($row[$this->indexes['timestamp']]);\n\t\t\t$date_time = Utils::change_tz_to_utc(date(DB_DATETIME, $date_time), DB_DATETIME, 'America/Chicago');\n\t\t}\n\t\t\n\t\t\n\t\treturn array(\n\t\t\t'hash' => $hash,\n\t\t\t'survey_id' => $survey_id,\n\t\t\t'user_id' => $user_id,\n\t\t\t'timestamp' => $date_time,\n\t\t\t'partner_transaction_id' => $row[$this->indexes['partner_transaction_id']]\n\t\t);\n\t}", "title": "" }, { "docid": "65c5c50ce01e9aae37e6a52fc80999a5", "score": "0.6126425", "text": "function loadCSV($path) {\r\n\t$fieldNames = getColumnNames($path);\r\n\t$data = array();\r\n\t$csv = file_get_contents($path);\r\n\t$document = str_getcsv($csv, \"\\n\");\r\n\t$firstRow = TRUE;\r\n\tforeach($document as $row) {\r\n\t\t$fields = str_getcsv($row, \";\");\r\n\t\t$fields = array_map('convertWindowsToUTF8', $fields);\r\n\t\t$fields = array_map('trim', $fields);\r\n\t\tif($firstRow == TRUE) {\r\n\t\t\t$firstRow = FALSE;\r\n\t\t}\r\n\t\telseif($firstRow == FALSE) {\r\n\t\t\t$item = makeItemFromCSVRow($fields, $fieldNames);\r\n\t\t\t$data[] = $item;\r\n\t\t}\r\n\t}\r\n\treturn($data);\r\n}", "title": "" }, { "docid": "6d1cf36a7fb8426f95739b20ea60e5d9", "score": "0.61261153", "text": "public function asArray($input)\n {\n $aInput = explode(PHP_EOL, $input);\n $labels = $output = [];\n\n foreach ($aInput as $line) {\n if (empty($line)) {\n continue;\n }\n $aLine = str_getcsv(trim($line), ',', '\"');\n if (empty($labels)) {\n $labels = $aLine;\n } else {\n $output[] = array_combine($labels, $aLine);\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "da3cde6c758d8466a14a8754a306ed22", "score": "0.6098729", "text": "function csvToArray($filename = '', $delimiter = ',')\n {\n if (!file_exists($filename) || !is_readable($filename)) {\n return false;\n }\n\n $header = null;\n $data = [];\n if (($handle = fopen($filename, 'r')) !== false) {\n while (($row = fgetcsv($handle, 1000, $delimiter)) !== false) {\n if (!$header) {\n $header = $row;\n } else {\n $data[] = array_combine($header, $row);\n }\n }\n fclose($handle);\n }\n\n return $data;\n }", "title": "" }, { "docid": "f232b9c4402479f7c4b648a92597df8c", "score": "0.6092356", "text": "private function parseCSV()\n {\n $ignoreFirstLine = $this->csvParsingOptions['ignoreFirstLine'];\n\n $finder = new Finder();\n $finder->files()\n ->in($this->csvParsingOptions['finder_in'])\n ->name($this->csvParsingOptions['finder_name'])\n ;\n foreach ($finder as $file) { $csv = $file; }\n\n $rows = array();\n if (($handle = fopen($csv->getRealPath(), \"r\")) !== FALSE) {\n $i = 0;\n while (($data = fgetcsv($handle, null, \";\")) !== FALSE) {\n $i++;\n if ($ignoreFirstLine && $i == 1) { continue; }\n $rows[] = $data;\n }\n fclose($handle);\n }\n \n return $rows;\n }", "title": "" }, { "docid": "65a7605d119a1774386d8af3a50c3d4b", "score": "0.6089979", "text": "protected function nativeReadCsv()\n {\n $row = 0;\n $rawResult = [];\n\n if (false !== ($handle = fopen(\"var/storage/data.csv\", \"r\"))) {\n while (false !== ($data = fgetcsv($handle, 1000, \";\"))) {\n $row++;\n if (1 === $row) {\n continue;\n }\n $num = count($data);\n $item = [];\n for ($c = 0; $c < $num; $c++) {\n $item[] = $data[$c];\n }\n\n $rawResult[] = $item;\n }\n fclose($handle);\n }\n\n foreach ($rawResult as $item) {\n $symbol = mb_substr($item[2], 0, 1, 'UTF-8');\n $amount = mb_substr($item[2], 1);\n $temp = array_merge($item, [$symbol, $amount]);\n $results[] = $temp;\n }\n\n return $results;\n }", "title": "" }, { "docid": "17f3b62bb2263a6ce032020515300e41", "score": "0.6082364", "text": "function importCsv($filename, $useHeader = true, $delimiter = \";\")\n{\n $data = [];\n $header = array();\n if (!file_exists($filename)) {\n throw new \\Exception($filename . ' not found');\n }\n if (($handle = fopen($filename, \"r\")) !== false) {\n while (($line = fgetcsv($handle, 1000, $delimiter)) !== false) {\n if ($useHeader && empty($header)) {\n foreach ($line as $key => $value) {\n $line[$key] = preg_replace('#[^a-zA-Z0-9_]#is', '', $value);\n }\n $header = $line;\n } else {\n foreach ($line as $key => $value) {\n $line[$key] = trim($value);\n }\n $data[] = !empty($header)\n ? (object)array_combine($header, $line)\n : $line\n ;\n }\n }\n fclose($handle);\n }\n return $data;\n}", "title": "" }, { "docid": "e56cecf5223a5f24b9809d5bd05a4478", "score": "0.60461617", "text": "function parseCSV($filename = null){\n $result = array();\n if ($filename != null) {\n $org_path = $this->path;\n $this->setPath($filename);\n }\n $fp = $this->fopen('r');\n if ($fp) {\n while (!feof($fp)) {\n $fields = $this->fgetcsv($fp);\n if (is_array($fields)) {\n foreach ($fields as $i => $field) {\n $fields[$i] = $this->pcharset->convert($field, $this->charset);\n }\n $result[] = $fields;\n }\n }\n fclose($fp);\n }\n if (isset($org_path) && $org_path !== $this->path) {\n $this->setPath($org_path);\n }\n return $result;\n }", "title": "" }, { "docid": "7199475bfe0bdb22032897c2cbc43607", "score": "0.6024967", "text": "protected function getCsvData() : array {\n $file = __DIR__ . '/../../Resources/mock_data/' . self::SOURCE_FILE;\n\n /*\n * This block of code to read csv was copied and pasted from stackoverflow ... don't be shy in searching for help to avoid reinventing the wheel\n */\n $csv = array_map(\"str_getcsv\", file($file,FILE_SKIP_EMPTY_LINES));\n $keys = array_shift($csv);\n\n /*\n * just to avoid problems and to make the attributes a bit nice ( givenName instead of GivenName and remove spaces for example )\n */\n foreach($keys as $i => $key) {\n $keys[$i] = str_replace(\" \", \"\", lcfirst(trim($key)));\n }\n\n foreach ($csv as $i=>$row) {\n $csv[$i] = array_combine($keys, $row);\n }\n /* source: https://stackoverflow.com/questions/5674117/how-do-i-parse-a-csv-file-to-grab-the-column-names-first-then-the-rows-that-rela */\n\n return $csv;\n }", "title": "" }, { "docid": "e56c0d9c46b4a043e144a4bbf75c5716", "score": "0.60175174", "text": "private function getCountriesFromCsv(): array\n {\n /* Check if the file exists. */\n if (!file_exists($this->csvFileCountries)) {\n print sprintf('The given file does not exist (\"%s\").%s', $this->csvFileCountries, PHP_EOL);\n exit(1);\n }\n\n /* Load the content of the file. */\n $csvContent = file_get_contents($this->csvFileCountries);\n\n /* Convert the content of the CSV into an array. */\n $data = [];\n $lines = explode(PHP_EOL, $csvContent);\n\n /* The first line contains the languages, we use these as keys for the array. */\n $languages = str_getcsv(array_shift($lines), ';');\n\n /* Remove the first column, because it does contain the locale header. */\n array_shift($languages);\n\n foreach ($lines as $line) {\n\n /* Ignore empty lines. */\n if (empty($line)) {\n continue;\n }\n\n $values = str_getcsv($line, ';');\n\n /* Use the first column as key. */\n $key = array_shift($values);\n\n $data[$key] = array_combine($languages, $values);\n }\n\n return $data;\n }", "title": "" }, { "docid": "2ad08bbdf491cf6a68b140f501edc36b", "score": "0.5979939", "text": "protected function getCSV()\r\n {\r\n // Using service for converting CSV to PHP Array\r\n $converter = $this->getContainer()->get('import.csvtoarray');\r\n $data = $converter->convert(static::$csvFileName, ';');\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "e57d98496f022363a70746fee26b4683", "score": "0.59515965", "text": "function ArrayFromCsv($file,$delimiter) {\n if (($handle = fopen($file, \"r\")) !== FALSE) {\n $i = 0;\n while (($lineArray = fgetcsv($handle, 4000, $delimiter)) !== FALSE) {\n for ($j=0; $j<count($lineArray); $j++) {\n $data2DArray[$i][$j] = $lineArray[$j];\n }\n $i++;\n }\n fclose($handle);\n }\n return $data2DArray;\n }", "title": "" }, { "docid": "a55cd579a33759e54304e373ef2e540e", "score": "0.59449434", "text": "static function toArray($file,$fldNames=null,$delimiter=null,$enclosure=null){\r\n\t\t$csv = new csv($file,'r',$delimiter,$enclosure);\r\n\t\t$csv->setFieldNames($fldNames);\r\n\t\t$datas = array();\r\n\t\tforeach($csv->setFieldNames() as $row){\r\n\t\t\t$datas[] = $row;\r\n\t\t}\r\n\t\treturn $datas;\r\n\t}", "title": "" }, { "docid": "34162a5a4e0ea8b697605ae2d952ae31", "score": "0.5918287", "text": "public function loadData(): array\n {\n /**\n * This is a violation of dependency injection, but it seems preferable to accepting\n * a filepath as a constructor argument as well as a CsvParser object configured to\n * read from the same file.\n */\n $parser = CsvParser::fromFile( $this->filepath, [ 'encoding' => 'UTF-8' ] );\n $parsedRows = $parser->parse();\n\n $ret = [];\n for ( $i = 1; $i < count( $parsedRows ); $i++ ) {\n $ret[] = array_combine( $parsedRows[ 0 ], $parsedRows[ $i ] );\n }\n\n return $ret;\n }", "title": "" }, { "docid": "a22159760db07885b4a16b1f2ccc132c", "score": "0.589493", "text": "function csv_decode($values)\n {\n $values = explode(',', trim($values, ','));\n return ($values);\n }", "title": "" }, { "docid": "6c0efd4584cfd4514d8fabaf29a8f2bb", "score": "0.5890539", "text": "public function readCsv()\n {\n $csv = $this->file;\n $items = array();\n\n foreach (file($csv) as $row){\n $items[] = str_getcsv($row, ';');\n }\n array_shift($items);\n return $items;\n }", "title": "" }, { "docid": "9423ea8d6a7e7c13a66dbfcd0d4d42ab", "score": "0.58719146", "text": "function dc_commas_to_type_array($csv){\n if($csv){\n $array = dc_commas_to_array($csv);\n foreach($array as $key => $item){\n if(!post_type_exists($item)) unset($array[$key]);\n }\n return $array;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "1114f6e57715d6a820067b09217572d6", "score": "0.58626753", "text": "public function string_to_assoc_array($fields,$values)\n{\n $array_fields = $fields;\n $array_values = $values;\n if(!is_array($fields))\n {\n $array_fields = explode('|', $fields);\n $array_values = explode('|', $values);\n } \n\n return array_combine($array_fields,$array_values);\n}", "title": "" }, { "docid": "d6790a6a62a54424985e15fee89b8f6d", "score": "0.58590513", "text": "function dc_commas_to_term_array($csv,$taxonomy){\n if($csv){\n $array = dc_commas_to_array($csv);\n $array = dc_term_exists_array($array,$taxonomy);\n return $array;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "4734db2c8cd7dbe6f9d9fef25ce94abf", "score": "0.58332366", "text": "public function getRawAsArr(){\n $tempFileContainer = tempnam(sys_get_temp_dir(), 'sadasd');\n file_put_contents($tempFileContainer, $this->getRawData());\n $csvFileRes = fopen($tempFileContainer, \"r+\");\n $rawArrLine = [];\n //parse the csv\n fgetcsv($csvFileRes);//skip first line ,\n while(!feof($csvFileRes)){\n $rawArrLine[] = fgetcsv($csvFileRes);\n }\n fclose($csvFileRes);\n return $rawArrLine;\n }", "title": "" }, { "docid": "11e5e123458d3f24bcbf3f0035778503", "score": "0.58290404", "text": "function loadCSV()\n{\n // the real path...\n $filename = storage_path() . \"/data/recipes.csv\";\n\n // does the file exist?\n if (!file_exists($filename)) return false;\n\n // open the file as read only\n $csvData = fopen($filename, 'rb');\n while (!feof($csvData)) {\n\n if (!isset($header)) {\n $header = fgetcsv($csvData); // our fist row is the header\n } else {\n $data[] = fgetcsv($csvData); // the rest is data\n }\n }\n\n // structures each data row. In other words, maps the field to its value, which is useful for JSON output\n if (isset($data)) {\n foreach ($data as $dataRow) {\n\n // prepare a new array for this row id (column 0)\n $recipes[$dataRow[0]] = [];\n\n // maps each property to its value\n $iProperty = 0;\n foreach ($header as $property) {\n $recipes[$dataRow[0]][$property] = $dataRow[$iProperty++];\n }\n }\n }\n\n // if there are no headers, nor data, then we return false\n if ((!isset($header)) && (!isset($recipes)))\n return false;\n else\n return compact('header', 'recipes');\n}", "title": "" }, { "docid": "67dd21c665af42656307a186e165a83a", "score": "0.58244", "text": "public static function parseCsv($csvString, $header=true, $delimiter=\",\", $enclosure='\"')\n\t{\n\t\t$data = array();\n\t\t$headers = array();\n\t\t$firstLine = true;\n\n\t\t$tmpFile = tmpfile();\n\t\tfwrite($tmpFile, $csvString);\n\t\trewind($tmpFile);\n\n\t\twhile ($parsedLine = fgetcsv($tmpFile, null, \",\", '\"', '\"')) {\n\t\t\tif (!$header) {\n\t\t\t\t$data[] = $parsedLine;\n\t\t\t} else {\n\t\t\t\tif ($firstLine) {\n\t\t\t\t\t$headers = $parsedLine;\n\t\t\t\t} else {\n\t\t\t\t\t$lineData = array();\n\t\t\t\t\tforeach($headers as $i => $headerName) {\n\t\t\t\t\t\t$lineData[$headerName] = $parsedLine[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$data[] = $lineData;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($firstLine) {\n\t\t\t\t$firstLine = false;\n\t\t\t}\n\t\t}\n\t\tfclose($tmpFile);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "aa0cd8431f910aa0067286da523436a7", "score": "0.579303", "text": "public function parseCSVFile( ) \n {\n $lines = explode( \"\\n\", str_replace( '\"', \"\", $this->$filecontent ) );\n $result = array( );\n \n for($i = 0; $i < sizeof( $lines ); $i++)\n {\n $result[$i] = explode( \",\", $lines[$i] );\n }\n \n return $result;\n }", "title": "" }, { "docid": "f973ef6e630977716f96223851f83d8a", "score": "0.57925546", "text": "protected function parseRows($csv) {\n $delimiter = (!empty($this->configuration['delimiter'])) ? $this->configuration['delimiter'] : ',';\n $enclosure = (!empty($this->configuration['enclosure'])) ? $this->configuration['enclosure'] : '';\n $escape = (!empty($this->configuration['escape'])) ? $this->configuration['escape'] : '';\n $header_offset = (!empty($this->configuration['header_offset'])) ? (int) ($this->configuration['header_offset'] - 1) : NULL;\n $headers = $this->getHeaders();\n\n // Create the League CSV reader object to handle parsing and reading.\n if (!class_exists('League\\Csv\\Reader')) {\n throw new RequirementsException('League CSV Reader is required to use the CSV dataparser.');\n }\n $reader = Reader::createFromString($csv);\n $reader->skipEmptyRecords();\n $reader->setDelimiter($delimiter);\n // Set additional options if we have them.\n if (!empty($enclosure)) {\n $reader->setEnclosure($enclosure);\n }\n if (!empty($escape)) {\n $reader->setEscape($escape);\n }\n if (is_numeric($header_offset)) {\n $reader->setHeaderOffset($header_offset);\n }\n\n $data = [];\n foreach ($reader->getRecords($headers) as $index => $row) {\n $this->currentRowIndex = $index;\n if ($this->rowGood($row)) {\n // The number of columns is appropriate for the number of fields.\n $data[] = $this->expandRow($row);\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "a13ccba13648ddf8328b5fcade7ada37", "score": "0.5777282", "text": "public function csvToDataset(): void\n {\n $filesystem = new Filesystem();\n $file = $this->filepath . '/public/csvfiles/' . $this->filename;\n if ($filesystem->exists($file)) { \n $header = NULL;\n if (($handle = fopen($file, 'r')) !== FALSE) {\n while (($row = fgetcsv($handle, 0, \";\")) !== FALSE) {\n if (!$header)\n $header = $row;\n else\n $this->data[] = array_combine($header, $row);\n }\n fclose($handle);\n }\n } else {\n $this->data = [];\n }\n }", "title": "" }, { "docid": "4d719658ec86f9e0bd4e439289749e2f", "score": "0.5775645", "text": "public static function convertCsvToArray($csvContents)\n\t{\n\t\t$csvLines = explode(\"\\n\", $csvContents);\n\n\t\t$results = [];\n\t\tforeach ($csvLines as $line) {\n\t\t\tif(!empty($line)) {\n\t\t\t\t$results[] = explode(\",\", $line);\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "e7f802dc5438b323d58108685c023705", "score": "0.577358", "text": "public function testCsv2ArrayWithDefaultDelimiter() {\n $data = [[\n 'first', 'second', 'third'\n ]];\n $header = [\n 'header1', 'header2', 'header3'\n ];\n Csv::array2csv($data, 'here.csv', $header, ',');\n $this->assertFileExists('here.csv');\n $this->assertEquals(file_get_contents('here.csv'), \"header1,header2,header3\\nfirst,second,third\\n\");\n\n $validData = [[\n 'header1' => 'first',\n 'header2' => 'second',\n 'header3' => 'third'\n ]];\n $data = Csv::csvToArray('here.csv');\n $this->assertEquals($data, $validData);\n unlink('here.csv');\n }", "title": "" }, { "docid": "1da395fc058ff0e051d173b381ae91ea", "score": "0.57698095", "text": "public function testCsv2ArrayWithSpecificDelimiter() {\n $data = [[\n 'first', 'second', 'third'\n ]];\n $header = [\n 'header1', 'header2', 'header3'\n ];\n Csv::array2csv($data, 'here.csv', $header);\n $this->assertFileExists('here.csv');\n $this->assertEquals(file_get_contents('here.csv'), \"header1;header2;header3\\nfirst;second;third\\n\");\n\n $validData = [[\n 'header1' => 'first',\n 'header2' => 'second',\n 'header3' => 'third'\n ]];\n $data = Csv::csvToArray('here.csv', ';');\n $this->assertEquals($data, $validData);\n unlink('here.csv');\n }", "title": "" }, { "docid": "670bff50a36db99bb61b4834052fcf29", "score": "0.5764555", "text": "function parse_csv_line($str,$sep=\",\",$lim='\"'){\r\n $str=trim($str);\r\n $inside=false;\r\n $arr=array();\r\n $tmp=\"\";\r\n $escaped=false;\r\n for($i=0;$i<strlen($str);$i++){\r\n $char=$str[$i];\r\n if($escaped && $inside){\r\n $tmp.=$char;\r\n $escaped=false;\r\n continue;\r\n }\r\n switch($char){\r\n case $sep:\r\n if($inside){\r\n $tmp.=$char;\r\n break;\r\n }\r\n $arr[]=$tmp;\r\n $tmp=\"\";\r\n break;\r\n case $lim:\r\n $inside=(!$inside);\r\n break;\r\n case '\\\\':\r\n $escaped=true;\r\n break;\r\n default:\r\n $tmp.=$char;\r\n } \r\n }\r\n $arr[]=$tmp;\r\n return $arr;\r\n}", "title": "" }, { "docid": "057cc8ec9a2428db37240caecfc5d4b7", "score": "0.5763061", "text": "private function csvToArray($path = '', $delimiter = ',') {\n if (!file_exists($path) || !is_readable($path)) {\n die($path . ' not there');\n }\n\n $data = array();\n if (($handle = fopen($path, 'r')) !== false) {\n $header = fgetcsv($handle, 1000, $delimiter);\n\n while (($row = fgetcsv($handle, 1000, $delimiter)) !== false) {\n if (!$header) {\n $header = $row;\n } else {\n $data[] = array_combine($header, $row);\n }\n }\n fclose($handle);\n }\n\n return $data;\n }", "title": "" }, { "docid": "3663cad659a6a025ba255819a6ff20f8", "score": "0.5753957", "text": "function array_to_csv($input) {\n\t$keystring='';\n\tforeach($input[0] as $key => $key_value) {\n\t\t$keystring .= $key.\";\";\n\t}\n\t$output = substr($keystring,0,-1);\n\tforeach($input as $row) {\n\t\t$valuestring=\"\\r\\n\";\t\n\t\tforeach($row as $key => $key_value){\n\t\t\t$valuestring .= $key_value.\";\";\n\t\t}\n\t\t$output .= substr($valuestring,0,-1);\n\t}\t\n\treturn $output;\t\t\t\t\t\t\t\n}", "title": "" }, { "docid": "c9e00689f118cb0ea5c801e394ffad6b", "score": "0.57522035", "text": "public function csvToArray($filename = '', $delimiter = ',')\n { \n\n if(!file_exists($filename) || !is_readable($filename))\n return FALSE;\n $header = Null;\n $data = array();\n if (($handle = fopen($filename, 'r')) !== FALSE)\n {\n while (($row = fgetcsv($handle, 1000, $delimiter)) !== FALSE)\n {\n if(!$header)\n $header = $row;\n else\n $data[] = array_combine($header, $row);\n }\n fclose($handle);\n }\n return $data;\n }", "title": "" }, { "docid": "4ffb978b9a7294b81fd76ed22bfa333a", "score": "0.57472575", "text": "function parseCSV ( $filename = '' , $delimiter = ',' ) {\n \n if ( is_null($filename) || !file_exists($filename) || !is_readable($filename) )\n return FALSE;\n \n $header = NULL;\n $arrayCSV = array();\n \n if ( $handle = fopen( $filename , 'r' ) ) { //read file\n while ( $row = fgetcsv( $handle, 1000, $delimiter ) ){ //parse row by row\n if ( !$header ) \n $header = $row;\n else\n $arrayCSV[] = array_combine( $header, $row );\n }\n fclose($handle);\n }\n return $arrayCSV;\n }", "title": "" }, { "docid": "2907103c39a47524b0b35fec6a779d80", "score": "0.5733672", "text": "public static function createArrayFromCSV($filepath,$filename, $addHeader = false){\n $file = $filepath.$filename;\n $csv = array_map('str_getcsv', file($file));\n #Remove hidden characters in file\n $csv[0][0] = trim(preg_replace('/[\\x00-\\x1F\\x80-\\xFF]/', '', $csv[0][0]));\n $csv[0][1] = trim(preg_replace('/[\\x00-\\x1F\\x80-\\xFF]/', '', $csv[0][1]));\n array_walk($csv, function(&$a) use ($csv) {\n $a = array_combine($csv[0], $a);\n });\n if($addHeader){\n # remove column header\n array_shift($csv);\n }\n\n return $csv;\n }", "title": "" }, { "docid": "9a78a9540d02cecbfe1a2dde20bec607", "score": "0.5729522", "text": "private function _parseMFInstrumentsCSV($csv) {\n\t\t$lines = explode(\"\\n\", $csv);\n\n\t\t$records = [];\n\t\t$head = [];\n\t\tfor($n=0; $n<count($lines); $n++) {\n\t\t\tif($cols = @str_getcsv($lines[$n])) {\n\t\t\t\tif(count($cols) < 5) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// First line is the header.\n\t\t\t\tif($n === 0) {\n\t\t\t\t\t$head = $cols;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Combine header columns + values to an associative array\n\t\t\t\t// and then to an object;\n\t\t\t\t$o = (object) array_combine($head, $cols);\n\t\t\t\t$o->minimum_purchase_amount = floatval($o->minimum_purchase_amount);\n\t\t\t\t$o->purchase_amount_multiplier = floatval($o->purchase_amount_multiplier);\n\t\t\t\t$o->minimum_additional_purchase_amount = floatval($o->minimum_additional_purchase_amount);\n\t\t\t\t$o->minimum_redemption_quantity = floatval($o->minimum_redemption_quantity);\n\t\t\t\t$o->redemption_quantity_multiplier = floatval($o->redemption_quantity_multiplier);\n\t\t\t\t$o->last_price = floatval($o->last_price);\n\t\t\t\t$o->purchase_allowed = boolval(intval($o->purchase_allowed));\n\t\t\t\t$o->redemption_allowed = boolval(intval($o->redemption_allowed));\n\n\t\t\t\tif (!empty($o->last_price_date) && strlen($o->last_price_date) == 10) {\n\t\t\t\t\t$o->last_price_date = new DateTime($o->last_price_date, new DateTimeZone(\"Asia/Kolkata\"));\n\t\t\t\t}\n\n\t\t\t\t$records[] = $o;\n\t\t\t}\n\t\t}\n\n\t\treturn $records;\n\t}", "title": "" }, { "docid": "fea089a1ae58ce083d5f8d240c5b71f7", "score": "0.5717263", "text": "public function CsvToArray($input, $delimiter = ',', $enclosure = '\"', $columns = 0) {\n\t\t$multiArray = array();\n\t\t$maximumCellCount = 0;\n\n\t\t$rows = GeneralUtility::trimExplode(LF, $input);\n\n\t\tforeach ($rows as $row) {\n\t\t\t$cells = str_getcsv($row, $delimiter, $enclosure);\n\n\t\t\tif (count($cells) > $maximumCellCount) {\n\t\t\t\t$maximumCellCount = count($cells);\n\t\t\t}\n\n\t\t\t$multiArray[] = $cells;\n\t\t}\n\n\t\tif ($columns > $maximumCellCount) {\n\t\t\t$maximumCellCount = $columns;\n\t\t}\n\n\t\tforeach ($multiArray as &$row) {\n\t\t\tfor ($key = 0; $key <= ($maximumCellCount - 1); $key++) {\n\t\t\t\tif ($columns > 0 && $columns < $maximumCellCount && $key >= $columns) {\n\t\t\t\t\tif (array_key_exists($key, $row)) {\n\t\t\t\t\t\tunset($row[$key]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (!array_key_exists($key, $row)) {\n\t\t\t\t\t\t$row[$key] = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $multiArray;\n\t}", "title": "" }, { "docid": "45a68e82b5d0b4dcbd041032d5a79ece", "score": "0.5712217", "text": "public function activityRecordsData()\n {\n $records = array();\n\n if(!$this->converted_to_csv){\n $this->_writeCSVFilesToTmp();\n }\n\n $csv_paths = $this->getCSVPaths();\n $lines = file($csv_paths['records_data']);\n $num_records = count($lines) - 1;\n\n $headers = self::arrayFromFitCSV(SELF::remove_utf8_bom($lines[0]));\n $num_header_columns = count($headers);\n\n for($i = 1; $i <= $num_records; $i++){\n $record_fields = self::arrayFromFitCSV($lines[$i]);\n $num_record_fields = count($record_fields);\n\n if($num_record_fields < $num_header_columns){\n for($j = $num_record_fields; $j < $num_header_columns; $j++){\n $record_fields[$j] = '';\n }\n }\n $records[] = array_combine($headers, $record_fields);\n }\n return $records;\n }", "title": "" }, { "docid": "2420cda59e40a1981f55a54a47685e24", "score": "0.5705656", "text": "private function csvFluxToArray($url){\n $handle = fopen($url, 'r');\n\n $array = array();\n while (false !== $data = fgetcsv($handle, null, ';')) {\n // $data = [<eandCode>, <price>];\n $tmp = array();\n $tmp['ean_code'] = intval($data[0]);\n $tmp['price'] = floatval($data[1]);\n array_push($array, $tmp);\n }\n fclose($handle);\n\n return $array;\n }", "title": "" }, { "docid": "527de6cac97ba2e2fcbbdbd078f01da2", "score": "0.5691135", "text": "public function validCsvWithHeadersDataProvider(): array\n {\n $csvString = <<<CSV\n\"foo\",\"bar\",\"baz\"\n\"fooValue\",\"barValue\",\"bazValue\"\nCSV;\n $expectedArray = [\n [\n 'foo' => 'fooValue',\n 'bar' => 'barValue',\n 'baz' => 'bazValue'\n ]\n ];\n return [[$csvString, $expectedArray]];\n }", "title": "" }, { "docid": "86dfdfcf5dcf775af2d95ae030516762", "score": "0.56907743", "text": "public function prepareArray(): array\n {\n $data = ExchangeDataObject::$data[ExchangeDataObject::$exchange];\n if (!is_array($data)) {\n $data = explode(\"\\n\", $data);\n }\n\n $data = array_filter($data);\n if (array_keys($data) !== range(0, count($data) - 1)) {\n return $data;\n }\n $firstRow = current($data);\n if (!is_array($firstRow)) {\n $firstRow = explode(',', $firstRow);\n }\n $keys = array_keys($firstRow);\n $dataWithKeys = true;\n\n if ($keys == range(0, count($firstRow) - 1)) {\n $dataWithKeys = false;\n $keys = array_map(function($item) {\n return str_replace(' ', '_', strtolower(trim($item)));\n }, $firstRow);\n array_shift($data);\n }\n\n $rows = [];\n foreach ($data as $item) {\n $row = $item;\n if (!is_array($row)) {\n $row = explode(',', $item);\n }\n\n $add = [];\n foreach ($keys as $k => $v) {\n $add[$v] = $row[($dataWithKeys) ? $v : $k];\n }\n array_push($rows, $add);\n }\n\n return $rows;\n }", "title": "" }, { "docid": "3435fca33cd09b145c61b1499d1c3e5d", "score": "0.5662209", "text": "public function getParsedSEOInfoArray()\n {\n $seo_info_array = array();\n $csv_parsed_array = self::getParsedArray();\n foreach ($csv_parsed_array as $parsed_row) {\n array_push($seo_info_array, array($parsed_row[\"0\"], $parsed_row[\"1\"], $parsed_row[\"2\"]));\n }\n\n return $seo_info_array;\n }", "title": "" }, { "docid": "3435fca33cd09b145c61b1499d1c3e5d", "score": "0.5662209", "text": "public function getParsedSEOInfoArray()\n {\n $seo_info_array = array();\n $csv_parsed_array = self::getParsedArray();\n foreach ($csv_parsed_array as $parsed_row) {\n array_push($seo_info_array, array($parsed_row[\"0\"], $parsed_row[\"1\"], $parsed_row[\"2\"]));\n }\n\n return $seo_info_array;\n }", "title": "" }, { "docid": "8112a623ab7d42aa0761853f8783e9e6", "score": "0.5626807", "text": "public function getTitleArray(){\n $handle = fopen(\"file.csv\", \"r\");\n if(!$handle){\n echo \"Fail to open file\";\n exit();\n }\n $this->titleArray=array();\n while (($data = fgetcsv($handle, 1000, \",\")) !== FALSE) {\n $this->titleArray[]=$data[0];\n }\n fclose($handle); \n }", "title": "" }, { "docid": "53991204ed671c4751dd906fbc1b28b1", "score": "0.56195694", "text": "function importcsv($file,$head=false,$delim=\",\",$len=1000) {\n $return = false;\n $handle = fopen($file, \"r\");\n if ($head) {\n $header = fgetcsv($handle, $len, $delim);\n echo $header[0];\n }\n while (($data = fgetcsv($handle, $len, $delim)) !== FALSE) {\n if ($head AND isset($header)) {\n foreach ($header as $key=>$heading) {\n $row[$heading]=(isset($data[$key])) ? $data[$key] : '';\n }\n $return[]=$row;\n } else {\n $return[]=$data;\n }\n }\n fclose($handle);\n return $return;\n}", "title": "" }, { "docid": "4c3450a92f5f1a97293c9a546766c808", "score": "0.55953926", "text": "public static function to_array($attr, $delimiter = ' ', $normalize = FALSE)\n\t{\n\t\t$result = array();\n\t\tif ( ! empty($attr))\n\t\t{\n\t\t\t$result = is_array($attr) ? $attr : explode($delimiter, $attr);\n\n\t\t\tif ($normalize)\n\t\t\t{\n\t\t\t\t$tmp = array();\n\t\t\t\tforeach ($result as $item)\n\t\t\t\t{\n\t\t\t\t\t$item = trim(strtr($str, $delimiter, ' '));\n\t\t\t\t\t$item and $tmp[] = $item;\n\t\t\t\t}\n\t\t\t\t$result = array_unique($tmp);\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5983a040bf5ef074858ae60776c74f52", "score": "0.55846924", "text": "function mapCsvToApiFields($mappingFields, $csvRow)\n{\n $data = [];\n foreach ($mappingFields as $csvField => $apiField) {\n if (isset($csvRow[$csvField]) && $csvRow[$csvField] != '') {\n $data[$apiField] = $csvRow[$csvField];\n }\n }\n\n return $data;\n}", "title": "" }, { "docid": "dabdb1bca26b99c7d58e2e37383bc851", "score": "0.5580718", "text": "public function getDataArr()\n {\n $tempFileContainer = tempnam(sys_get_temp_dir(), 'sadasd');\n file_put_contents($tempFileContainer, $this->getRawData());\n $csvFileRes = fopen($tempFileContainer, \"r+\");\n $agentDataCollection = [];\n //parse the csv\n fgetcsv($csvFileRes);//skip first line ,\n while(!feof($csvFileRes)){\n $currentCsvRow = fgetcsv($csvFileRes);\n if (!isset( $agentDataCollection[$currentCsvRow[1]] )) {\n //collect the agent name\n $agentDataCollection[$currentCsvRow[1]] = [\n 'agent_name'=>$currentCsvRow[1],\n 'submissions'=>0,\n ];\n }\n $agentDataCollection[$currentCsvRow[1]]['submissions'] = $agentDataCollection[$currentCsvRow[1]]['submissions'] +1 ;\n // if agent is in collection\n // add/update value\n }\n fclose($csvFileRes);\n return array_values($agentDataCollection);\n }", "title": "" }, { "docid": "9035c22d857f6dcbd2b6be151efc3676", "score": "0.5574341", "text": "public static function csvToArray($csv_filepath, $format='rows')\n\t{\n\t\tglobal $lang, $table_pk, $longitudinal, $Proj, $user_rights, $project_encoding;\n\n\t\t// Extract data from CSV file and rearrange it in a temp array\n\t\t$newdata_temp = array();\n\t\t$found_pk = false;\n\t\t$i = 0;\n\t\t// Set commas as default delimiter (if can't find comma, it will revert to tab delimited)\n\t\t$delimiter \t = \",\";\n\t\t$removeQuotes = false;\n\t\t$resetKeys = false; // Set flag to reset array keys if any headers are blank\n\n\t\t// CHECKBOXES: Create new arrays with all checkbox fields and the translated checkbox field names\n\t\t$fullCheckboxFields = array();\n\t\tforeach (MetaData::getCheckboxFields(PROJECT_ID) as $field=>$value) {\n\t\t\tforeach ($value as $code=>$label) {\n\t\t\t\t$code = (Project::getExtendedCheckboxCodeFormatted($code));\n\t\t\t\t$fullCheckboxFields[$field . \"___\" . $code] = array('field'=>$field, 'code'=>$code);\n\t\t\t}\n\t\t}\n\t\tif (($handle = fopen($csv_filepath, \"rb\")) !== false)\n\t\t{\n\t\t\t// Loop through each row\n\t\t\twhile (($row = fgetcsv($handle, 0, $delimiter)) !== false)\n\t\t\t{\n\t\t\t\t// Detect if all values are blank in row (so we can ignore it)\n\t\t\t\t$numRowValuesBlank = 0;\n\n\t\t\t\tif ($i == 0)\n\t\t\t\t{\n\t\t\t\t\t## CHECK DELIMITER\n\t\t\t\t\t// Determine if comma- or tab-delimited (if can't find comma, it will revert to tab delimited)\n\t\t\t\t\t$firstLine = implode(\",\", $row);\n\t\t\t\t\t// If we find X number of tab characters, then we can safely assume the file is tab delimited\n\t\t\t\t\t$numTabs = 0;\n\t\t\t\t\tif (substr_count($firstLine, \"\\t\") > $numTabs)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Set new delimiter\n\t\t\t\t\t\t$delimiter = \"\\t\";\n\t\t\t\t\t\t// Fix the $row array with new delimiter\n\t\t\t\t\t\t$row = explode($delimiter, $firstLine);\n\t\t\t\t\t\t// Check if quotes need to be replaced (added via CSV convention) by checking for quotes in the first line\n\t\t\t\t\t\t// If quotes exist in the first line, then remove surrounding quotes and convert double double quotes with just a double quote\n\t\t\t\t\t\t$removeQuotes = (substr_count($firstLine, '\"') > 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Find record identifier field\n\t\t\t\tif (!$found_pk)\n\t\t\t\t{\n\t\t\t\t\tif ($i == 0 && preg_replace(\"/[^a-z_0-9]/\", \"\", $row[0]) == $table_pk) {\n\t\t\t\t\t\t$found_pk = true;\n\t\t\t\t\t} elseif ($i == 1 && preg_replace(\"/[^a-z_0-9]/\", \"\", $row[0]) == $table_pk && $format == 'cols') {\n\t\t\t\t\t\t$found_pk = true;\n\t\t\t\t\t\t$newdata_temp = array(); // Wipe out the headers that already got added to array\n\t\t\t\t\t\t$i = 0; // Reset\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Loop through each column in this row\n\t\t\t\tfor ($j = 0; $j < count($row); $j++)\n\t\t\t\t{\n\t\t\t\t\t// If tab delimited, compensate sightly\n\t\t\t\t\tif ($delimiter == \"\\t\")\n\t\t\t\t\t{\n\t\t\t\t\t\t// Replace characters\n\t\t\t\t\t\t$row[$j] = str_replace(\"\\0\", \"\", $row[$j]);\n\t\t\t\t\t\t// If first column, remove new line character from beginning\n\t\t\t\t\t\tif ($j == 0) {\n\t\t\t\t\t\t\t$row[$j] = str_replace(\"\\n\", \"\", ($row[$j]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If the string is UTF-8, force convert it to UTF-8 anyway, which will fix some of the characters\n\t\t\t\t\t\tif (function_exists('mb_detect_encoding') && mb_detect_encoding($row[$j]) == \"UTF-8\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$row[$j] = utf8_encode($row[$j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Check if any double quotes need to be removed due to CSV convention\n\t\t\t\t\t\tif ($removeQuotes)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Remove surrounding quotes, if exist\n\t\t\t\t\t\t\tif (substr($row[$j], 0, 1) == '\"' && substr($row[$j], -1) == '\"') {\n\t\t\t\t\t\t\t\t$row[$j] = substr($row[$j], 1, -1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Remove any double double quotes\n\t\t\t\t\t\t\t$row[$j] = str_replace(\"\\\"\\\"\", \"\\\"\", $row[$j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Reads as records in rows (default)\n\t\t\t\t\tif ($format == 'rows')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Santize the variable name\n\t\t\t\t\t\tif ($i == 0) {\n\t\t\t\t\t\t\t$row[$j] = preg_replace(\"/[^a-zA-Z_0-9]/\", \"\", $row[$j]);\n\t\t\t\t\t\t\tif ($row[$j] == '') {\n\t\t\t\t\t\t\t\t$resetKeys = true;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif (!isset($newdata_temp[0][$j]) || $newdata_temp[0][$j] == '') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If value is blank, then increment counter\n\t\t\t\t\t\tif ($row[$j] == '') $numRowValuesBlank++;\n\t\t\t\t\t\t// Add to array\n\t\t\t\t\t\t$newdata_temp[$i][$j] = $row[$j];\n\t\t\t\t\t\tif ($project_encoding == 'japanese_sjis')\n\t\t\t\t\t\t{ // Use only for Japanese SJIS encoding\n\t\t\t\t\t\t\t$newdata_temp[$i][$j] = mb_convert_encoding($newdata_temp[$i][$j], 'UTF-8', 'sjis');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Reads as records in columns\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Santize the variable name\n\t\t\t\t\t\tif ($j == 0) {\n\t\t\t\t\t\t\t$row[$j] = preg_replace(\"/[^a-zA-Z_0-9]/\", \"\", $row[$j]);\n\t\t\t\t\t\t\tif ($row[$j] == '') {\n\t\t\t\t\t\t\t\t$resetKeys = true;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($newdata_temp[0][$i] == '') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newdata_temp[$j][$i] = $row[$j];\n\t\t\t\t\t\tif ($project_encoding == 'japanese_sjis')\n\t\t\t\t\t\t{ // Use only for Japanese SJIS encoding\n\t\t\t\t\t\t\t$newdata_temp[$j][$i] = mb_convert_encoding($newdata_temp[$j][$i], 'UTF-8', 'sjis');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If whole row is blank, then skip it\n\t\t\t\tif ($numRowValuesBlank == count($row)) {\n\t\t\t\t\t$resetKeys = true;\n\t\t\t\t\tunset($newdata_temp[$i]);\n\t\t\t\t}\n\t\t\t\t// Increment col counter\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tunset($row);\n\t\t\tfclose($handle);\n\t\t} else {\n\t\t\t// ERROR: File is missing\n\t\t\t$fileMissingText = (!SUPER_USER) ? $lang['period'] : \" (\".APP_PATH_TEMP.\"){$lang['period']}<br><br>{$lang['file_download_13']}\";\n\t\t\treturn \tRCView::div(array('class'=>'red'),\n\t\t\t\t\t\tRCView::b($lang['global_01'].$lang['colon']).\" {$lang['file_download_08']} <b>\\\"\".htmlspecialchars(basename($csv_filepath), ENT_QUOTES).\"\\\"</b>\n\t\t\t\t\t\t{$lang['file_download_12']}{$fileMissingText}\"\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t// If importing records as columns, remove any columns that are completely empty\n\t\tif ($format == 'cols') {\n\t\t\t$recCount = count($newdata_temp);\n\t\t\tfor ($i=1; $i<$recCount; $i++) {\n\t\t\t\t// Set default for each record\n\t\t\t\t$recordEmpty = true;\n\t\t\t\tif (!isset($newdata_temp[$i])) continue;\n\t\t\t\tforeach ($newdata_temp[$i] as $val) {\n\t\t\t\t\t// If found a value, then skip to next record\n\t\t\t\t\tif ($val != '') {\n\t\t\t\t\t\t$recordEmpty = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Remove record\n\t\t\t\tif ($recordEmpty) {\n\t\t\t\t\tunset($newdata_temp[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If record count is now different, then re-index the array\n\t\t\tif ($recCount > count($newdata_temp)) {\n\t\t\t\t$newdata_temp = array_values($newdata_temp);\n\t\t\t}\n\t\t}\n\n\t\t// Give error message if record identifier variable name could not be found in expected places\n\t\tif (!$found_pk)\n\t\t{\n\t\t\tif ($format == 'rows') {\n\t\t\t\t$found_pk_msg = \"{$lang['data_import_tool_134']} (\\\"$table_pk\\\") {$lang['data_import_tool_135']}\";\n\t\t\t} else {\n\t\t\t\t$found_pk_msg = \"{$lang['data_import_tool_134']} (\\\"$table_pk\\\") {$lang['data_import_tool_136']}\";\n\t\t\t}\n\t\t\treturn \"<div class='red' style='margin-bottom:15px;'>\n\t\t\t\t\t\t<b>{$lang['global_01']}:</b><br>\n\t\t\t\t\t\t$found_pk_msg<br><br>\n\t\t\t\t\t\t{$lang['data_import_tool_76']}\n\t\t\t\t\t</div>\";\n\t\t}\n\n\t\t// Shift the fieldnames into a separate array called $fieldnames_new\n\t\t$fieldnames_new = array_shift($newdata_temp);\n\n\t\t//\tEnsure that all record names are in proper UTF-8 format, if UTF-8 (no black diamond characters)\n\t\tif (function_exists('mb_detect_encoding')) {\n\t\t\tforeach ($newdata_temp as $key=>$row) {\n\t\t\t\t$this_record = $row[0];\n\t\t\t\tif (mb_detect_encoding($this_record) == 'UTF-8' && $this_record.\"\" !== mb_convert_encoding($this_record, 'UTF-8', 'UTF-8').\"\") {\n\t\t\t\t\t// Convert to true UTF-8 to remove black diamond characters\n\t\t\t\t\t$newdata_temp[$key][0] = utf8_encode($this_record);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($row);\n\t\t}\n\n\t\t// If any columns were removed, reindex the arrays so that none are missing\n\t\tif ($resetKeys) {\n\t\t\t// Reindex the header array\n\t\t\t$fieldnames_new = array_values($fieldnames_new);\n\t\t\t// Loop through ALL records and reindex each\n\t\t\tforeach ($newdata_temp as $key=>&$vals) {\n\t\t\t\t$vals = array_values($vals);\n\t\t\t}\n\t\t}\n\n\t\t// If longitudinal, get array key of redcap_event_name field\n\t\tif ($longitudinal) {\n\t\t\t$eventNameKey = array_search('redcap_event_name', $fieldnames_new);\n\t\t}\n\n\t\t// Check if DAGs exist\n\t\t$groups = $Proj->getGroups();\n\n\t\t// If has DAGs, try to find DAG field\n\t\tif (!empty($groups)) {\n\t\t\t$groupNameKey = array_search('redcap_data_access_group', $fieldnames_new);\n\t\t}\n\t\t\n\t\t// Determine if using repeating instances\n\t\t$hasRepeatingFormsEvents = $Proj->hasRepeatingFormsEvents();\n\t\t$repeat_instance_index = $repeat_instrument_index = $importHasRepeatingFormsEvents = false;\n\t\tif ($hasRepeatingFormsEvents) {\n\t\t\t$repeat_instrument_index = array_search('redcap_repeat_instrument', $fieldnames_new);\n\t\t\t$repeat_instance_index = array_search('redcap_repeat_instance', $fieldnames_new);\n\t\t\t$importHasRepeatingFormsEvents = ($repeat_instance_index !== false);\n\t\t}\n\n\t\t## PUT ALL UPLOADED DATA INTO $updateitems\n\t\t$updateitems = $invalid_eventids = array();\n\t\tforeach ($newdata_temp as $i => $element)\n\t\t{\n\t\t\t// Trim the record name, just in case\n\t\t\t$newdata_temp[$i][0] = $element[0] = trim($element[0]);\n\t\t\t// Get event_id to add as subkey for record\n\t\t\t$event_id = ($longitudinal) ? $Proj->getEventIdUsingUniqueEventName($element[$eventNameKey]) : $Proj->firstEventId;\n\t\t\tif ($longitudinal && $event_id === false) {\n\t\t\t\t// Invalid unique event name was used.\n\t\t\t\t$invalid_eventids[] = $element[$eventNameKey];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Loop through data array and add each record values to $updateitems\n\t\t\tfor ($j = 0; $j < count($fieldnames_new); $j++) {\n\t\t\t\t// Get this field and value\n\t\t\t\t$this_field = trim($fieldnames_new[$j]);\n\t\t\t\t$this_value = trim($element[$j]);\n\t\t\t\t// Skip if field is blank\n\t\t\t\tif ($this_field == \"\") continue;\n\t\t\t\telseif ($this_field == \"redcap_repeat_instance\" || $this_field == \"redcap_repeat_instrument\") {\n\t\t\t\t\tif ($hasRepeatingFormsEvents) continue;\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Stop if uploading repeating fields when project is not set to repeat forms/events\n\t\t\t\t\t\treturn \"<div class='red' style='margin-bottom:15px;'>\n\t\t\t\t\t\t\t\t\t<b>{$lang['global_01']}{$lang['colon']} {$lang['data_import_tool_252']}</b><br>\n\t\t\t\t\t\t\t\t\t{$lang['data_import_tool_253']}\n\t\t\t\t\t\t\t\t</div>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Is this row a repeating instance?\n\t\t\t\t$rowIsRepeatingInstance = false;\n\t\t\t\tif ($importHasRepeatingFormsEvents) {\t\t\t\t\t\n\t\t\t\t\t$repeat_instance = $element[$repeat_instance_index];\n\t\t\t\t\t$repeat_instrument = $repeat_instrument_index ? $element[$repeat_instrument_index] : \"\";\n\t\t\t\t\t$rowIsRepeatingInstance = ($repeat_instance.$repeat_instrument.\"\" != \"\");\n\t\t\t\t}\n\t\t\t\tif ($rowIsRepeatingInstance) {\n\t\t\t\t\t// Repeating instance\n\t\t\t\t\tif (isset($fullCheckboxFields[$this_field])) {\n\t\t\t\t\t\t// Checkbox\n\t\t\t\t\t\t$updateitems[$element[0]]['repeat_instances'][$event_id][$repeat_instrument][$repeat_instance][$fullCheckboxFields[$this_field]['field']][$fullCheckboxFields[$this_field]['code']] = $this_value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Non-checkbox\n\t\t\t\t\t\t$updateitems[$element[0]]['repeat_instances'][$event_id][$repeat_instrument][$repeat_instance][$this_field] = $this_value;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Regular non-repeating instance\n\t\t\t\t\tif (isset($fullCheckboxFields[$this_field])) {\n\t\t\t\t\t\t// Checkbox\n\t\t\t\t\t\t$updateitems[$element[0]][$event_id][$fullCheckboxFields[$this_field]['field']][$fullCheckboxFields[$this_field]['code']] = $this_value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Non-checkbox\n\t\t\t\t\t\t$updateitems[$element[0]][$event_id][$this_field] = $this_value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Invalid unique event name was used.\n\t\tif (!empty($invalid_eventids)) \n\t\t{\n\t\t\treturn \"<div class='red' style='margin-bottom:15px;'>\n\t\t\t\t\t\t<b>{$lang['global_01']}{$lang['colon']}</b> {$lang['data_import_tool_254']}\n\t\t\t\t\t\t\\\"<b>\".implode(\"</b>\\\", \\\"<b>\", $invalid_eventids).\"</b>\\\"\n\t\t\t\t\t</div>\";\n\t\t}\n\n\t\t// If project has DAGs and redcap_data_access_group column is included and user is IN a DAG, then tell them they must remove the column\n\t\tif ($user_rights['group_id'] != '' && !empty($groups) && in_array('redcap_data_access_group', $fieldnames_new))\n\t\t{\n\t\t\treturn \"<div class='red' style='margin-bottom:15px;'>\n\t\t\t\t\t\t<b>{$lang['global_01']}{$lang['colon']} {$lang['data_import_tool_171']}</b><br>\n\t\t\t\t\t\t{$lang['data_import_tool_172']}\n\t\t\t\t\t</div>\";\n\t\t}\n\t\t// DAG check to make sure that a single record doesn't have multiple values for 'redcap_data_access_group'\n\t\telseif ($user_rights['group_id'] == '' && !empty($groups) && $groupNameKey !== false)\n\t\t{\n\t\t\t// Creat array to collect all DAG designations for each record (each should only have one DAG listed)\n\t\t\t$dagPerRecord = array();\n\t\t\tforeach ($newdata_temp as $thisrow) {\n\t\t\t\t// Get record name\n\t\t\t\t$record = $thisrow[0];\n\t\t\t\t// Get DAG name for this row/record\n\t\t\t\t$dag = $thisrow[$groupNameKey];\n\t\t\t\t// Add to array\n\t\t\t\t$dagPerRecord[$record][$dag] = true;\n\t\t\t}\n\t\t\tunset($thisrow);\n\t\t\t// Now loop through all records and remove all BUT those with duplicates\n\t\t\tforeach ($dagPerRecord as $record=>$dags) {\n\t\t\t\tif (count($dags) <= 1) {\n\t\t\t\t\tunset($dagPerRecord[$record]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If there records with multiple DAG designations, then stop here and throw error.\n\t\t\tif (!empty($dagPerRecord))\n\t\t\t{\n\t\t\t\treturn \"<div class='red' style='margin-bottom:15px;'>\n\t\t\t\t\t\t\t<b>{$lang['global_01']}{$lang['colon']} {$lang['data_import_tool_173']}</b><br>\n\t\t\t\t\t\t\t{$lang['data_import_tool_174']} <b>\".implode(\"</b>, <b>\", array_keys($dagPerRecord)).\"</b>{$lang['period']}\n\t\t\t\t\t\t</div>\";\n\t\t\t}\n\t\t}\n\n\t\treturn $updateitems;\n\t}", "title": "" }, { "docid": "56cad913bc62fe9cd0151d6c17453c50", "score": "0.5554231", "text": "public function convertExcelToArray()\n\t{\n\t\t// TODO: Abstract common file handling functionality.\n \t$tmpName = tempnam(sys_get_temp_dir(), \"TempCSV\");\n file_put_contents($tmpName, $this->csv);\n\n $excel = IOFactory::load($tmpName);\n $csvWriter = IOFactory::createWriter($excel, 'Csv');\n\n $csvWriter->save(\"$tmpName\");\n\n $csv = file_get_contents($tmpName);\n\n $fp = fopen($tmpName, \"w\");\n\n fwrite($fp, $csv);\n fseek($fp, 0);\n\n $csvArr = array_map('str_getcsv', file($tmpName));\n\n fclose($fp);\n\t\treturn $csvArr;\n\t}", "title": "" }, { "docid": "e254f008a1618967a8af723e97d6225a", "score": "0.5529805", "text": "protected function parse()\n { \n $csv = array();\n \n if (file_exists($this->path)) {\n $mode = $this->readmode;\n } else {\n $mode = $this->writemode;\n }\n \n $this->open($this->path, $mode);\n \n if ($this->header) {\n $header = fgetcsv($this->file, $this->length, $this->separator);\n $this->header = $header;\n \n while ($row = fgetcsv($this->file, $this->length, $this->separator, $this->text_delimiter)) {\n $temp = array();\n foreach ($row as $key => $field) {\n if (isset($header[$key]) && !empty($header[$key])) {\n $name = strtolower(str_replace(' ', '_', $header[$key]));\n $temp[$name] = $field;\n }\n }\n $csv[] = (object)$temp;\n } \n } else { \n while ($row = fgetcsv($this->file, $this->length, $this->separator)) {\n $csv[] = $row;\n }\n }\n $this->close();\n \n return $csv;\n }", "title": "" }, { "docid": "d9cc6e04bc74dfcd2de4872519e0904a", "score": "0.5528095", "text": "public static function parse($input) {\n $result = array();\n\n $vars = explode(',', $input);\n foreach ($vars as $var) {\n if (strpos($var, '=') !== false) {\n list($key, $value) = explode('=', $var, 2);\n $value = trim($value);\n } else {\n list($key, $value) = array($var, true);\n }\n $key = trim($key);\n $key = strtolower($key);\n if (!self::isValidKey($key)) {\n // If there are bad keys, just bail, so we don't get silly results for\n // parsing inputs like \"SELECT id, name, size FROM table\".\n return array();\n }\n if (!strlen($value)) {\n unset($result[$key]);\n continue;\n }\n $result[$key] = $value;\n }\n\n return $result;\n }", "title": "" }, { "docid": "545bce9ec2effcf187d81f847571b740", "score": "0.55253965", "text": "protected function getCsvData(): array\n {\n $tableName = $this->table->getName();\n Assert::notNull($tableName);\n\n $tableName = Inflector::pluralize(Inflector::classify($tableName));\n $mc = new ModuleConfig(ConfigType::MIGRATION(), $tableName);\n\n return $mc->parseToArray();\n }", "title": "" }, { "docid": "4205f8898a2e07de9c86797263873e48", "score": "0.5510056", "text": "function str2associative_array($string, $separator = '='){\n\t\tif(!preg_match_all('/^([^'.preg_quote($separator, '/').']+)'.preg_quote($separator, '/').'(.*)\\s*$/m', $string, $matches)){\n\t\t\treturn false;\n\t\t}\n\t\tarray_walk_recursive($matches, create_function('&$val, $key', '$val = trim($val);'));\n\t\treturn array_combine($matches[1], $matches[2]);\n\t}", "title": "" }, { "docid": "e86432dfb861d6857404f7ac5d12abbc", "score": "0.5508225", "text": "function readCsvFile($file) {\n $records = array();\n\n // Get file handler.\n $fileHandle = fopen($file, \"r\");\n\n // Read Header Row.\n $row = fgetcsv($fileHandle);\n $columns = array();\n foreach ($row as $i => $header) {\n $columns[$i] = trim($header);\n }\n\n // Load each row.\n while ($row = fgetcsv($fileHandle)) {\n $record = array();\n foreach ($row as $i => $field) {\n $record[$columns[$i]] = $field;\n }\n // Push into array.\n array_push($records, $record);\n }\n // Close file.\n fclose($fileHandle);\n\n return $records;\n}", "title": "" }, { "docid": "74a6193c7a53c553321e06273c59f4d7", "score": "0.5487514", "text": "function iniString2array($ini_string)\n {\n if (!$ini_string) {\n return array();\n }\n $split = preg_split('/[\\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY);\n $key = $split[1][0] == '\"' ? substr($split[1], 1) : $split[1];\n $value = $split[2][strlen($split[2]) - 1] == '\"' ? substr($split[2], 0, -1) : $split[2];\n // FIXME review if this is really the struct to go with\n $array = array($key => array('operator' => $split[0], 'value' => $value));\n return $array;\n }", "title": "" }, { "docid": "0a3c4c7cf8bbc2a3bc46e79add9c1a79", "score": "0.54845816", "text": "public function load($filePath)\n {\n $reader = new Csv();\n $reader->setDelimiter(\",\");\n\n $spreadsheet = $reader->load($filePath);\n\n $csvData = $spreadsheet->getActiveSheet()->toArray();\n\n $result = null;\n\n if($csvData && is_array($csvData))\n {\n $result = array();\n \n // Get the header\n $header = $csvData[0];\n\n // Loop starting on the first index since record start in the index 1\n for($i = 1; $i < count($csvData); $i++)\n {\n $data = array();\n for($j = 0; $j < count($header); $j++)\n {\n $key = strtolower(str_replace(\" \", \"_\", $header[$j]));\n\n $data[$key] = $csvData[$i][$j];\n }\n \n $result[] = $data;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "e7b88ea479f986db993df4946b261973", "score": "0.54686207", "text": "public function readCSV($file){\n\t\tforeach($this->read($file) as $key=>$line){\n\t\t\t$data[$key] = explode(',',$line);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "99e8d2415acd403cafb1374484b2d6d5", "score": "0.54364794", "text": "private function readCSV() {\n \t$addresses = [];\n \t// Checks to see if the CSV file exists and if there is anything in it\n\t\tif(file_exists($this->filename) && filesize($this->filename) > 0) {\n\t\t\t// Open the file and place the pointer at the beginning of the file\n\t\t\t$handle = fopen($this->filename, 'r');\n\t\t\t// While not at the end of the $handle pointer, get data from the data/addressBook.csv\n\t\t\twhile(!feof($handle)) {\n\t\t\t// Pulls rows from the CSV file\n\t\t\t\t$row = fgetcsv($handle);\n\t\t\t// If rows are not empty, push them into the address book\n\t\t\t\tif(!empty($row)) {\n\t\t\t\t\t$addresses[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Close the file\n\t\t\tfclose($handle);\n\t\t} \n\t\t// Return the $addresses array with the new rows\n\t\treturn $addresses;\n }", "title": "" }, { "docid": "931724e9f932eeaed5fa0f42bcdeed3f", "score": "0.54354835", "text": "public static function csvToArray(string $csvFile): array\n {\n $handle = fopen($csvFile, 'r');\n\n $result = [];\n while (($data = fgetcsv($handle)) !== FALSE) {\n $result[] = $data;\n }\n\n fclose($handle);\n return $result;\n }", "title": "" }, { "docid": "b2f084455d4d156cf2c3c1a1324a3e06", "score": "0.543093", "text": "public static function csv2Arr($fullFpath) {\n\n return ($r = file_get_contents($fullFpath)) ? array_map('str_getcsv', preg_split('/\\r*\\n+|\\r+/', $r)) : array();\n }", "title": "" }, { "docid": "d3e7c9d5f0dc4a1647876d799c2963f0", "score": "0.5416537", "text": "public function getRawData(){\n\t\t$this->fileHandle = fopen($this->filePath, 'r');\n\t\t$line = 0;\n\t\t$header = fgetcsv($fh, 4096, $importModel->delimiter, $importModel->enclosure, $importModel->escape);\n\t\tforeach ($header as $k => $v)\n\t\t\t$header[$k] = @str_replace(array('-', '_', ' '), '', Transliteration::file(mb_convert_encoding($v, $importModel->encode_to, $importModel->encode_from)));\n\n\t\t// Process further if import is submit...\n\t\tif (isset($_POST['import'])){\n\t\t\t$line ++;\n\t\t\tif (empty($header) OR is_null($header[0])) Yii::log(\"The file uploaded must have the first row as header\", 'error');\n\t\t\telse {\n\t\t\t\twhile ($row = fgetcsv($fh, 4096, $importModel->delimiter, $importModel->enclosure, $importModel->escape)){\n\t\t\t\t\t$line++;\n\t\t\t\t\tif (count($row) != count($header)) Yii::trace(\"Data in line #$line is malformed...\", 'error');\n\t\t\t\t\telse {\n\t\t\t\t\t\tforeach ($row as $k => $v){\n\t\t\t\t\t\t\t$attr[$header[$k]] = @mb_convert_encoding($v, $importModel->encode_to, $importModel->encode_from);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$rawData[] = $attr;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfclose($this->fileHandle);\n\t\treturn $rawData;\n\t}", "title": "" }, { "docid": "f38f595e4902e14b2c8d5c902625aa1c", "score": "0.5411536", "text": "public function parseLine($line)\n {\n $pairs = explode(',', $line);\n \n if ($pairs === false || is_array($pairs) === false) {\n throw new IncompatibleLineException($line);\n }\n \n $keyValues = [];\n \n foreach ($pairs as $pair) {\n if (strlen($pair) <= 1) {\n throw new IncompatibleLineException($line);\n }\n \n $parts = explode('=', ltrim($pair), 2);\n \n if ($parts === false || is_array($parts) === false || count($parts) !== 2) {\n throw new IncompatibleLineException($line);\n }\n \n $keyValues[$parts[0]] = $parts[1];\n }\n \n $keyValues['RECORD_IDENTITY'] = 'ALF';\n \n return $keyValues;\n }", "title": "" }, { "docid": "e482c1b02b12638d41eb8ee7ff770ec7", "score": "0.5410397", "text": "function getCsv($csvFile)\n{\n\n $dataArray = array();\n if (($handle = fopen($csvFile, \"r\")) !== false) {\n while (($data = fgetcsv($handle, 1000, \",\")) !== false) {\n $num = count($data);\n $dataArray[] = $data;\n }\n fclose($handle);\n } else {\n print \"Cannot open file '$csvFile'\";\n return (false);\n }\n return ($dataArray);\n}", "title": "" }, { "docid": "533c88f4c85121cd5fd140183e5354ad", "score": "0.5406891", "text": "function parseCsvTable($filePath, $cellDelimiter = ',')\n{\n if (!isFileValid($filePath)) {\n throw new Exception(\"Path to [$filePath] is invalid.\");\n }\n\n $header = null;\n $data = [];\n $handle = fopen($filePath, 'r');\n while ($row = fgetcsv($handle, 1000, $cellDelimiter)) {\n if (!$header) {\n $header = $row;\n } else {\n $data[] = array_combine($header, $row);\n }\n }\n fclose($handle);\n\n return $data;\n}", "title": "" }, { "docid": "aa6380f886bf622c45e1d64fdf9c6ff9", "score": "0.53553873", "text": "public static function unserialize($string, array $options = [])\n {\n $delimiter = (isset($options['delimiter'])) ? $options['delimiter'] : ',';\n $enclosure = (isset($options['enclosure'])) ? $options['enclosure'] : '\"';\n $escape = (isset($options['escape'])) ? $options['escape'] : \"\\\\\";\n $fields = (isset($options['fields'])) ? (bool)$options['fields'] : true;\n $lines = preg_split(\"/((\\r?\\n)|(\\r\\n?))/\", $string);\n $data = [];\n $fieldKeys = [];\n\n foreach ($lines as $i => $line) {\n $line = trim($line);\n if (!empty($line)) {\n if (($i == 0) && ($fields)) {\n $fieldNames = str_getcsv($line, $delimiter, $enclosure, $escape);\n foreach ($fieldNames as $name) {\n $fieldKeys[] = trim($name);\n }\n } else {\n $values = str_getcsv($line, $delimiter, $enclosure, $escape);\n foreach ($values as $key => $value) {\n $values[$key] = stripslashes(trim($value));\n }\n if ((count($fieldKeys) > 0) && (count($fieldKeys) == count($values))) {\n $data[] = array_combine($fieldKeys, $values);\n } else {\n $data[] = $values;\n }\n }\n }\n }\n\n return $data;\n }", "title": "" } ]
6fb03b1e2b68f845503468f15429c2ee
Balu A Converts API data currency to preferred currency
[ { "docid": "c7de2d7f0ad7fc9d0f5be8a567cc8b67", "score": "0.0", "text": "public function search_data_in_preferred_currency($search_result, $currency_obj) {\r\n\r\n $flights = $search_result['JourneyList'];\r\n\r\n $flight_list = array();\r\n foreach ($flights as $fk => $fv) {\r\n foreach ($fv as $list_k => $list_v) {\r\n // debug($list_v);exit;\r\n $flight_list[$fk][$list_k] = $list_v;\r\n $flight_list[$fk][$list_k]['api_original_price_details']['TotalDisplayFare'] = $list_v['Price']['TotalDisplayFare'];\r\n $flight_list[$fk][$list_k]['api_original_price_details']['api_currency'] = $list_v['Price']['Currency'];\r\n $flight_list[$fk][$list_k]['api_original_price_details']['AgentCommission'] = $list_v['Price']['PriceBreakup']['AgentCommission'];\r\n $flight_list[$fk][$list_k]['api_original_price_details']['BasicFare'] = $list_v['Price']['PriceBreakup']['BasicFare'];\r\n $flight_list[$fk][$list_k]['api_original_price_details']['Tax'] = $list_v['Price']['PriceBreakup']['Tax'];\r\n $flight_list[$fk][$list_k]['FareDetails'] = $this->preferred_currency_fare_object($list_v['Price'], $currency_obj);\r\n $flight_list[$fk][$list_k]['PassengerFareBreakdown'] = $this->preferred_currency_paxwise_breakup_object($list_v['Price']['PassengerBreakup'], $currency_obj);\r\n }\r\n }\r\n $search_result['JourneyList'] = $flight_list;\r\n return $search_result;\r\n }", "title": "" } ]
[ { "docid": "b294e758e1e957f2caa8c32f8343c481", "score": "0.6996754", "text": "public function returnBtcEuro() \n\t{\n\t\t$url = \"https://bitpay.com/api/rates\";\n\t\t$json = json_decode(file_get_contents($url));\n\t\t$dollar = $btc = 0;\n\t\tforeach($json as $obj){\n\t\t\tif ($obj->code == 'EUR') \n\t\t\t{\n\t\t\t\treturn number_format(substr((string)$obj->rate, 0, -3));\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "0373dbcf3a0631af6ab5c1da3f46b8b2", "score": "0.69901246", "text": "function country2currency($cc) {\n $map = '{\"BD\": \"BDT\", \"BE\": \"EUR\", \"BF\": \"XOF\", \"BG\": \"BGN\", \"BA\": \"BAM\", \"BB\": \"BBD\", \"WF\": \"XPF\", \"BL\": \"EUR\", \"BM\": \"BMD\", \"BN\": \"BND\", \"BO\": \"BOB\", \"BH\": \"BHD\", \"BI\": \"BIF\", \"BJ\": \"XOF\", \"BT\": \"BTN\", \"JM\": \"JMD\", \"BV\": \"NOK\", \"BW\": \"BWP\", \"WS\": \"WST\", \"BQ\": \"USD\", \"BR\": \"BRL\", \"BS\": \"BSD\", \"JE\": \"GBP\", \"BY\": \"BYR\", \"BZ\": \"BZD\", \"RU\": \"RUB\", \"RW\": \"RWF\", \"RS\": \"RSD\", \"TL\": \"USD\", \"RE\": \"EUR\", \"TM\": \"TMT\", \"TJ\": \"TJS\", \"RO\": \"RON\", \"TK\": \"NZD\", \"GW\": \"XOF\", \"GU\": \"USD\", \"GT\": \"GTQ\", \"GS\": \"GBP\", \"GR\": \"EUR\", \"GQ\": \"XAF\", \"GP\": \"EUR\", \"JP\": \"JPY\", \"GY\": \"GYD\", \"GG\": \"GBP\", \"GF\": \"EUR\", \"GE\": \"GEL\", \"GD\": \"XCD\", \"GB\": \"GBP\", \"GA\": \"XAF\", \"SV\": \"USD\", \"GN\": \"GNF\", \"GM\": \"GMD\", \"GL\": \"DKK\", \"GI\": \"GIP\", \"GH\": \"GHS\", \"OM\": \"OMR\", \"TN\": \"TND\", \"JO\": \"JOD\", \"HR\": \"HRK\", \"HT\": \"HTG\", \"HU\": \"HUF\", \"HK\": \"HKD\", \"HN\": \"HNL\", \"HM\": \"AUD\", \"VE\": \"VEF\", \"PR\": \"USD\", \"PS\": \"ILS\", \"PW\": \"USD\", \"PT\": \"EUR\", \"SJ\": \"NOK\", \"PY\": \"PYG\", \"IQ\": \"IQD\", \"PA\": \"PAB\", \"PF\": \"XPF\", \"PG\": \"PGK\", \"PE\": \"PEN\", \"PK\": \"PKR\", \"PH\": \"PHP\", \"PN\": \"NZD\", \"PL\": \"PLN\", \"PM\": \"EUR\", \"ZM\": \"ZMK\", \"EH\": \"MAD\", \"EE\": \"EUR\", \"EG\": \"EGP\", \"ZA\": \"ZAR\", \"EC\": \"USD\", \"IT\": \"EUR\", \"VN\": \"VND\", \"SB\": \"SBD\", \"ET\": \"ETB\", \"SO\": \"SOS\", \"ZW\": \"ZWL\", \"SA\": \"SAR\", \"ES\": \"EUR\", \"ER\": \"ERN\", \"ME\": \"EUR\", \"MD\": \"MDL\", \"MG\": \"MGA\", \"MF\": \"EUR\", \"MA\": \"MAD\", \"MC\": \"EUR\", \"UZ\": \"UZS\", \"MM\": \"MMK\", \"ML\": \"XOF\", \"MO\": \"MOP\", \"MN\": \"MNT\", \"MH\": \"USD\", \"MK\": \"MKD\", \"MU\": \"MUR\", \"MT\": \"EUR\", \"MW\": \"MWK\", \"MV\": \"MVR\", \"MQ\": \"EUR\", \"MP\": \"USD\", \"MS\": \"XCD\", \"MR\": \"MRO\", \"IM\": \"GBP\", \"UG\": \"UGX\", \"TZ\": \"TZS\", \"MY\": \"MYR\", \"MX\": \"MXN\", \"IL\": \"ILS\", \"FR\": \"EUR\", \"IO\": \"USD\", \"SH\": \"SHP\", \"FI\": \"EUR\", \"FJ\": \"FJD\", \"FK\": \"FKP\", \"FM\": \"USD\", \"FO\": \"DKK\", \"NI\": \"NIO\", \"NL\": \"EUR\", \"NO\": \"NOK\", \"NA\": \"NAD\", \"VU\": \"VUV\", \"NC\": \"XPF\", \"NE\": \"XOF\", \"NF\": \"AUD\", \"NG\": \"NGN\", \"NZ\": \"NZD\", \"NP\": \"NPR\", \"NR\": \"AUD\", \"NU\": \"NZD\", \"CK\": \"NZD\", \"XK\": \"EUR\", \"CI\": \"XOF\", \"CH\": \"CHF\", \"CO\": \"COP\", \"CN\": \"CNY\", \"CM\": \"XAF\", \"CL\": \"CLP\", \"CC\": \"AUD\", \"CA\": \"CAD\", \"CG\": \"XAF\", \"CF\": \"XAF\", \"CD\": \"CDF\", \"CZ\": \"CZK\", \"CY\": \"EUR\", \"CX\": \"AUD\", \"CR\": \"CRC\", \"CW\": \"ANG\", \"CV\": \"CVE\", \"CU\": \"CUP\", \"SZ\": \"SZL\", \"SY\": \"SYP\", \"SX\": \"ANG\", \"KG\": \"KGS\", \"KE\": \"KES\", \"SS\": \"SSP\", \"SR\": \"SRD\", \"KI\": \"AUD\", \"KH\": \"KHR\", \"KN\": \"XCD\", \"KM\": \"KMF\", \"ST\": \"STD\", \"SK\": \"EUR\", \"KR\": \"KRW\", \"SI\": \"EUR\", \"KP\": \"KPW\", \"KW\": \"KWD\", \"SN\": \"XOF\", \"SM\": \"EUR\", \"SL\": \"SLL\", \"SC\": \"SCR\", \"KZ\": \"KZT\", \"KY\": \"KYD\", \"SG\": \"SGD\", \"SE\": \"SEK\", \"SD\": \"SDG\", \"DO\": \"DOP\", \"DM\": \"XCD\", \"DJ\": \"DJF\", \"DK\": \"DKK\", \"VG\": \"USD\", \"DE\": \"EUR\", \"YE\": \"YER\", \"DZ\": \"DZD\", \"US\": \"USD\", \"UY\": \"UYU\", \"YT\": \"EUR\", \"UM\": \"USD\", \"LB\": \"LBP\", \"LC\": \"XCD\", \"LA\": \"LAK\", \"TV\": \"AUD\", \"TW\": \"TWD\", \"TT\": \"TTD\", \"TR\": \"TRY\", \"LK\": \"LKR\", \"LI\": \"CHF\", \"LV\": \"EUR\", \"TO\": \"TOP\", \"LT\": \"LTL\", \"LU\": \"EUR\", \"LR\": \"LRD\", \"LS\": \"LSL\", \"TH\": \"THB\", \"TF\": \"EUR\", \"TG\": \"XOF\", \"TD\": \"XAF\", \"TC\": \"USD\", \"LY\": \"LYD\", \"VA\": \"EUR\", \"VC\": \"XCD\", \"AE\": \"AED\", \"AD\": \"EUR\", \"AG\": \"XCD\", \"AF\": \"AFN\", \"AI\": \"XCD\", \"VI\": \"USD\", \"IS\": \"ISK\", \"IR\": \"IRR\", \"AM\": \"AMD\", \"AL\": \"ALL\", \"AO\": \"AOA\", \"AQ\": \"\", \"AS\": \"USD\", \"AR\": \"ARS\", \"AU\": \"AUD\", \"AT\": \"EUR\", \"AW\": \"AWG\", \"IN\": \"INR\", \"AX\": \"EUR\", \"AZ\": \"AZN\", \"IE\": \"EUR\", \"ID\": \"IDR\", \"UA\": \"UAH\", \"QA\": \"QAR\", \"MZ\": \"MZN\"}';\n $mapAr = json_decode($map, true);\n return $mapAr[$cc];\n \n}", "title": "" }, { "docid": "ee8cab868e75242603b62ff8e57ac86a", "score": "0.6942256", "text": "function conversor_3($to_currency){\n\n// Plugins settings with the access key for every converter\ninclude ('settings.php');\n\n// Initialize CURL:\n$ch = curl_init('http://apilayer.net/api/live?access_key='. $plugin_settings['currencylayer.com_access_key'] .'&currencies='.urlencode($to_currency).'&format=1');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n// Store the data:\n$json = curl_exec($ch);\n$err = curl_error($ch);\ncurl_close($ch);\n\n// Si el CURL dá error\nif ($err) {\n\n\t$converted = array (\n\t\t\"service\" => \"currencylayer.com\", // Service for the currency converter\n\t\t\"status\" => \"ERROR: en la llamada a la URL\" . \"-\" . $err, // Status for this service (\"OK\" is working or \"ERROR: BLABLABLA\" if is not)\n\t\t\"price\" => 0.00 // Valor del Cambio\n\t);\n\n// SI el CURL trae info\n} else {\n\n\t// Decode JSON response:\n\t$exchangeRates = json_decode($json, true);\n\n\t// Si la llamada es exitosa arma el array\n\tif ($exchangeRates[\"success\"] == 1) {\n\n\t\t$val = floatval($exchangeRates['quotes']['USD'.urlencode($to_currency).'']);\n\n\t \t$converted = array (\n\t\t\t\"service\" => \"currencylayer.com\", // Service for the currency converter\n\t\t\t\"status\" => \"OK\", // Status for this service (\"OK\" is working or \"ERROR: BLABLABLA\" if is not)\n\t\t\t\"price\" => number_format($val, 2, '.', '') // Valor del Cambio\n\t \t);\t\n\t// Si el JSON viene con un error tambíen va en el array\n\t} else {\n\n\t \t$converted = array (\n\t\t\t\"service\" => \"currencylayer.com\", // Service for the currency converter\n\t\t\t\"status\" => \"ERROR: en la respuesta del JSON\" . \"-\" . $exchangeRates[\"error\"][\"info\"], // Status for this service (\"OK\" is working or \"ERROR: BLABLABLA\" if is not)\n\t\t\t\"price\" => 0.00 // Valor del Cambio\n\t \t);\t\n\t}\n}\n\nreturn $converted;\n\n}", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.6848445", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.6848445", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.6848445", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.6848445", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.6848445", "text": "public function getCurrency();", "title": "" }, { "docid": "2745798973d16886509a96d9bfd119f5", "score": "0.68305063", "text": "function GetActiveCurrency(){\n\t\n\t}", "title": "" }, { "docid": "312c3071292972a1e47beb9ac5cdef46", "score": "0.68066716", "text": "public function convertCurrency($amount)\n {\n $handle = curl_init(); //Start the cURL\n\n // Set the url\n curl_setopt($handle, CURLOPT_URL, $this->apiURL);\n\n // Set the result output to be a string.\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n\n //Get the data\n $output = curl_exec($handle);\n\n //Convert to stdClass or array\n $responseData = json_decode($output);\n\n //Close cURL\n curl_close($handle);\n\n //Calculate HUF to EUR\n $total = $responseData->rates->EUR * $amount;\n\n //Return and format result\n return number_format($total, 2, '.', '');\n }", "title": "" }, { "docid": "d4aec45c3e88e98b9e214d2cb3871131", "score": "0.67306423", "text": "function convert_currency($amt,$currency_code_from,$currency_code_to){\n $db = Db::getInstance();\n $cur = $db->fetch(\"SELECT rate FROM moneda WHERE currency_code = '\".$db->escape($currency_code_from).\"'\");\n if($cur->num_rows <= 0)\n return false;\n $amt_def_cur = $amt / $cur->row['rate'];\n \n $cur_to = $db->fetch(\"SELECT rate FROM moneda WHERE currency_code = '\".$db->escape($currency_code_to).\"'\");\n if($cur_to->num_rows <= 0)\n return false;\n return $amt_def_cur * $cur_to->row['rate'];\n}", "title": "" }, { "docid": "264aa4434a779275955041568228d652", "score": "0.6727084", "text": "public function getCurrency()\n {\n /*\n * Set your static or dynamic currency\n */\n\n return 'USD';\n }", "title": "" }, { "docid": "5ac0cd1d80c0a4c3960184d6460a38c4", "score": "0.6667975", "text": "public function getCurrency(): Currency;", "title": "" }, { "docid": "ace8a5f5ed62060b68794f8507b352c0", "score": "0.6660144", "text": "function CurrencyConversion($args) {\n $start = microtime(true);\n// для оптимизации трафика и сокращения Look2Book функция убрана!!!\n// используем курсы валют провайдера Amadeus с той же валютой, что и у текущего провайдера\n $args['pid'] = WtDB::Ref()->ProvidersValue(new WtMapArgs('gds', 'Amadeus', 'status', 'Y', 'currency', $this->Currency));\n $RateOfExchange = WtDB::Ref()->CurrencyRateValue(new WtFuncArgs($args));\n if (!$RateOfExchange) {\n $args['pid'] = 17; // Amadeus DE\n $RateOfExchange = WtDB::Ref()->CurrencyRateValue(new WtFuncArgs($args));\n }\n $this->longQueryLog($start, 'CurrencyConversion');\n return $RateOfExchange;\n /* try {\n $RateOfExchange = 1;\n $RateDate = date('Y-m-d');\n\n $this->client->uri = 'http://www.sita.aero/PTS/fare/2005/12/CalculateCurrencyRQ';\n $reqPayloadString = $this->POS .\n '<POS><Source><RequestorID Type=\"6\" ID=\"'.$this->RequestorID.'\" ID_Context=\"Airfare\"/></Source></POS>' .\n '<CurrencyRQInfo FromCurrency=\"' . $args['from'] . '\" ToCurrency=\"' . $args['to'] . '\" RateDate=\"' . $RateDate . '\"/>';\n\n $result = $this->client->SITA_AirfareCalculateCurrencyRQ(new SoapVar($reqPayloadString, XSD_ANYXML));\n $result = XML2Array::createArray($this->client->__getLastResponse());\n $result = $result['SOAP-ENV:Envelope']['SOAP-ENV:Body'];\n $this->writeLog('SITA_AirfareCalculateCurrencyRQ', 'CurrencyConversion', $result);\n\n $ExchangeRates = $result['sita:SITA_AirfareCalculateCurrencyRS']['sita:ExchangeRates']['sita:ExchangeRate'];\n if (isset($ExchangeRates['@value'])) $ExchangeRates = array($ExchangeRates);\n foreach($ExchangeRates as $ExchangeRate) {\n $RateOfExchange = $ExchangeRate['@attributes']['RateOfExchange'];\n if ($ExchangeRate['@attributes']['ExchangeRateType'] == 'IATA_ClearingHouse') { // BankersBuyingRate, BankersSellingRate, IATA_ClearingHouse\n break;\n }\n }\n\n return isset($result['sita:SITA_AirfareCalculateCurrencyRS']['sita:Success']) ? $RateOfExchange : false;\n\n } catch (SoapFault $exception) {\n $this->writeException('CurrencyConversion', $exception);\n return false;\n }*/\n }", "title": "" }, { "docid": "0f26ed257e8a5133c3c033167c660ff6", "score": "0.65952665", "text": "public function getCurrencyInfo();", "title": "" }, { "docid": "df2d69c9810ad7c143ea0fa51ea4e29c", "score": "0.65937924", "text": "private function calculateCurrency($currencyCode , $amountToConvert){\n $endpoint = 'live';\n $access_key = 'e0be2dcc7789103833a32aa33c777ed6';\n\n $from = 'PLN';\n $to = $currencyCode;\n $amount = $amountToConvert;\n\n // initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'&currencies='.$from.','.$to.'&format=1'); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // get the (still encoded) JSON data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $conversionResult = json_decode($json, true);\n $keys = array_keys($conversionResult['quotes']);\n \n //Wartość 1 USD w PLN\n $valueOfPLN = $conversionResult['quotes'][$keys[0]];\n //Wartość 1 USD w jednostkach wybranej waluty\n $valueOfForeign = $value = $conversionResult['quotes'][$keys[1]];\n //Suma posiadanych USD razy wartość wybranej waluty\n $result = ($amount / $valueOfPLN) * $valueOfForeign;\n \n return number_format($result, 2, '.','');\n }", "title": "" }, { "docid": "9e284de8c75573093bd161eecb476feb", "score": "0.65454084", "text": "public function convert()\n {\n// $resEth = $client->request('GET', 'https://api.coinmarketcap.com/v1/ticker/ethereum/?convert=UAH');\n// $Eth = json_decode($resEth->getBody());\n// $resBit = $client->request('GET', 'https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=UAH');\n// $Bit = json_decode($resBit->getBody());\n// $b_prise = $Bit[0]->price_uah;\n// $e_prise = $Eth[0]->price_uah;\n// $resBit = $client->request('GET', 'https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange');\n// $NBU = simplexml_load_string($resBit->getBody());\n $Eth=$this->parser->parse('GET', 'https://api.coinmarketcap.com/v1/ticker/ethereum/?convert=UAH',\"JSON\");\n $Bit=$this->parser->parse('GET', 'https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=UAH',\"JSON\");\n $NBU=$this->parser->parse('GET', 'https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange',\"XML\");\n $b_prise = $Bit[0]->price_uah;\n $e_prise = $Eth[0]->price_uah;\n $usd_prise = null;\n $rub_prise = null;\n $uah_prise=1;\n foreach ($NBU->currency as $currency) {\n switch ($currency->cc) {\n case \"USD\": {\n $usd_prise = $currency->rate;\n break;\n }\n case \"RUB\": {\n $rub_prise = $currency->rate;\n break;\n }\n }\n }\n\n $cur=[$b_prise ,$e_prise,$uah_prise,$rub_prise,$usd_prise];\n $result=[];\n for($i=0;$i<count($cur);$i++) {\n $middle = [];\n for ($j = 0; $j < count($cur); $j++) {\n $middle[]=(double)$cur[$j]/(double)$cur[$i];\n }\n array_push($result,$middle);\n }\n return $result;\n }", "title": "" }, { "docid": "bee47e2eff2c26aac8997298d1989232", "score": "0.65359527", "text": "public function getPriceCurrency();", "title": "" }, { "docid": "0365a22fdb553adb77f47fa84f8d0944", "score": "0.64814544", "text": "function calculateRate($original_currency) {\n\n global $config;\n\n $access_key = $config['access-key'];\n\n $uri = 'http://api.currencylayer.com/live?access_key='.$access_key.'&currencies='.$original_currency;\n $file_content = file_get_contents($uri);\n $api_response = json_decode($file_content, true);\n\n $rate = array_values($api_response['quotes'])[0];\n\n return $rate;\n}", "title": "" }, { "docid": "4df5ad388bdb3d92382ec3ddfce4d6b1", "score": "0.6464475", "text": "function currency_api(){\n\n // set API Endpoint and access key (and any options of your choice)\n $endpoint = 'live';\n $access_key = 'a3d80c268f758bf05160bb14d8fab754';\n\n // Initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // Store the data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $exchangeRates = json_decode($json, true);\n\n// print_r($exchangeRates);\n // Access the exchange rate values, e.g. GBP:\n return $exchangeRates;\n}", "title": "" }, { "docid": "452c60ce14ffa9f4eedba0dc7435280b", "score": "0.64539576", "text": "public function currency() {\n $rest_client = new RESTClient($this->api_key, 'currency', $this->account_type);\n return $rest_client->get(array());\n }", "title": "" }, { "docid": "20ef56310bc848b22d7083fc3f5ede04", "score": "0.64109683", "text": "function currency($selectionB, $value, $USD, $HK, $TW, $CN){\n\t$FinalValue = 0; // Declaring variable, storing the calculated value\n\t$FinalValueString = \"\"; // Declaring variable, storing the string character such as $, HK$ ...\n\t\n\t// Runs the case statement and match it against the \"Convert To\" value and run its specified calculation\n\tswitch($selectionB){\n\t\tcase \"U.S.\":\n\t\t\t$FinalValue = $value * $USD;\n\t\t\t$FinalValueString = \"$\";\n\t\t\t\n\t\t\tbreak;\t\n\t\tcase \"HK\":\n\t\t\t$FinalValue = $value * $HK;\n\t\t\t$FinalValueString = \"HK$\";\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"TW\":\n\t\t\t$FinalValue = $value * $TW;\n\t\t\t$FinalValueString = \"NT$\";\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"CN\":\n\t\t\t$FinalValue = $value * $CN;\n\t\t\t$FinalValueString = \"¥\";\n\t\t\t\n\t\t\tbreak; \n\t}\n\t\n\t// Format the calculated value and turn it into a string currency format\t\n\t$FinalValueString = $FinalValueString . number_format((string) $FinalValue, 2);\n\t\n\treturn $FinalValueString;\n}", "title": "" }, { "docid": "8b6d07ed458612a26305743047fb4c53", "score": "0.63712555", "text": "public function get_currency(){\n\t\t$options = Domainmap_Plugin::instance()->get_options();\n\t\treturn isset( $options[self::RESELLER_ID]['currency'] ) ? $options[self::RESELLER_ID]['currency'] : \"USD\";\n\t}", "title": "" }, { "docid": "bfe91535b53aebe9b6ebeb57c6b46317", "score": "0.63690704", "text": "function _currency_convert ($number = 0, $c_from = \"\", $c_to = \"\") {\n\t\tif (!$number || !$c_from || !$c_to) {\n\t\t\treturn $number;\n\t\t}\n\t\t$c_from\t= strtoupper($c_from);\n\t\t$c_to\t= strtoupper($c_to);\n\t\tif ($c_from == $c_to) {\n\t\t\treturn $number;\n\t\t}\n\t\t$allowed_currencies = array(\n\t\t\t\"GBP\", \"USD\", \"RUB\", \"UAH\", \"MXN\", \"ARS\", \"CHF\", \"CAD\"\n\t\t);\n\t\t$cache_name = \"currency_rates\";\n\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t$rates = main()->get_data($cache_name);\n\t\t}\n\t\tif (empty($rates)) {\n\t\t\tforeach ((array)$allowed_currencies as $currency) {\n\t\t\t\tif ($currency == \"EUR\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$cur_for_url[$currency] = \"EUR\".$currency.\"=X\";\n\t\t\t}\n\t\t\t// Example: http://download.finance.yahoo.com/d/quotes.json?s=EURUSD=X,GBPUSD=X,GBPEUR=X,GBPrub=X&f=sl1\n\t\t\t$url = \"http://download.finance.yahoo.com/d/quotes.json?s=\".implode(\",\", $cur_for_url).\"&f=sl1\";\n\t\t\t$data = common()->get_remote_page($url);\n\t\t\tpreg_match_all(\"#\\\"EUR(?P<cur>[a-z]{3})=X\\\",(?P<rate>[0-9\\.]+)#ims\", $data, $m);\n\t\t\tforeach ((array)$m[\"cur\"] as $i => $currency) {\n\t\t\t\t$currency = trim(strtoupper($currency));\n\t\t\t\t$rate = floatval($m[\"rate\"][$i]);\n\t\t\t\t$eur_rates[$currency] = $rate;\n\t\t\t\t$rates[\"EUR\"][$currency] = $eur_rates[$currency];\n\t\t\t}\n\t\t\tforeach ((array)array_keys($eur_rates) as $currency) {\n\t\t\t\t$c_to_eur\t= $currency == \"EUR\" ? 1 : $eur_rates[$currency];\n\t\t\t\tforeach ((array)array_keys($eur_rates) as $currency2) {\n\t\t\t\t\tif ($currency2 == $currency) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$c2_to_eur\t= $currency2 == \"EUR\" ? 1 : $eur_rates[$currency2];\n\t\n\t\t\t\t\t$v = $c2_to_eur / $c_to_eur;\n\t\t\t\t\t$rates[$currency][$currency2] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Fix converting back to EUR rates\n\t\t\tforeach ((array)$rates as $currency => $_rates) {\n\t\t\t\tif ($currency == \"EUR\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$rates[$currency][\"EUR\"] = 1 / $rates[\"EUR\"][$currency];\n\t\t\t}\n\t\t\tif (main()->USE_SYSTEM_CACHE) {\n\t\t\t\tmain()->put_data($cache_name, $rates);\n\t\t\t}\n\t\t}\n\t\treturn $number * (float)str_replace(\",\", \".\", $rates[$c_from][$c_to]);\n\t}", "title": "" }, { "docid": "a9b6d005280117ee39251a0e6aba265a", "score": "0.6347418", "text": "function convert($amt = NULL, $to = \"\", $from = \"\"){\n\n\t\t\t$amount = urlencode(round($amt,2));\n\t\t\t$from_Currency = urlencode($from);\n\t\t\t$to_Currency = urlencode($to);\n\n\t\t\t$url = \"http://www.google.com/ig/calculator?hl=en&q=$amount$from_Currency=?$to_Currency\";\n\n\t\t\t$ch = curl_init();\n\t\t\t$timeout = 0;\n\t\t\tcurl_setopt ($ch, CURLOPT_URL, $url);\n\t\t\tcurl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n\t\t\t$rawdata = curl_exec($ch);\n\t\t\tcurl_close($ch);\n\t\t\tif(empty($rawdata)){\n\t\t\t\tthrow new Exception('unable to connect to currency conversion service ');\n\t\t\t}\n\n\t\t\t$rawdata = preg_replace( '/(\\{|,\\s*)([^\\s:]+)(\\s*:)/', '$1\"$2\"$3', $rawdata );\n\t\t\t$data = json_decode( $rawdata );\n\t\t\t$to_amount = round( $data->rhs, 2 );\n\t\t\treturn $to_amount;\n\n\t\t}", "title": "" }, { "docid": "3e76a00df2564b007f135189b2647069", "score": "0.6344779", "text": "function FormatCurrency($floatcurr, $curr = \"USD\") {\n\t$currencies['ARS'] = array(2,',','.');\t\t\t//\tArgentine Peso\n\t$currencies['AMD'] = array(2,'.',',');\t\t\t//\tArmenian Dram\n\t$currencies['AWG'] = array(2,'.',',');\t\t\t//\tAruban Guilder\n\t$currencies['AUD'] = array(2,'.',' ');\t\t\t//\tAustralian Dollar\n\t$currencies['BSD'] = array(2,'.',',');\t\t\t//\tBahamian Dollar\n\t$currencies['BHD'] = array(3,'.',',');\t\t\t//\tBahraini Dinar\n\t$currencies['BDT'] = array(2,'.',',');\t\t\t//\tBangladesh, Taka\n\t$currencies['BZD'] = array(2,'.',',');\t\t\t//\tBelize Dollar\n\t$currencies['BMD'] = array(2,'.',',');\t\t\t//\tBermudian Dollar\n\t$currencies['BOB'] = array(2,'.',',');\t\t\t//\tBolivia, Boliviano\n\t$currencies['BAM'] = array(2,'.',',');\t\t\t//\tBosnia and Herzegovina, Convertible Marks\n\t$currencies['BWP'] = array(2,'.',',');\t\t\t//\tBotswana, Pula\n\t$currencies['BRL'] = array(2,',','.');\t\t\t//\tBrazilian Real\n\t$currencies['BND'] = array(2,'.',',');\t\t\t//\tBrunei Dollar\n\t$currencies['CAD'] = array(2,'.',',');\t\t\t//\tCanadian Dollar\n\t$currencies['KYD'] = array(2,'.',',');\t\t\t//\tCayman Islands Dollar\n\t$currencies['CLP'] = array(0,'','.');\t\t\t//\tChilean Peso\n\t$currencies['CNY'] = array(2,'.',',');\t\t\t//\tChina Yuan Renminbi\n\t$currencies['COP'] = array(2,',','.');\t\t\t//\tColombian Peso\n\t$currencies['CRC'] = array(2,',','.');\t\t\t//\tCosta Rican Colon\n\t$currencies['HRK'] = array(2,',','.');\t\t\t//\tCroatian Kuna\n\t$currencies['CUC'] = array(2,'.',',');\t\t\t//\tCuban Convertible Peso\n\t$currencies['CUP'] = array(2,'.',',');\t\t\t//\tCuban Peso\n\t$currencies['CYP'] = array(2,'.',',');\t\t\t//\tCyprus Pound\n\t$currencies['CZK'] = array(2,'.',',');\t\t\t//\tCzech Koruna\n\t$currencies['DKK'] = array(2,',','.');\t\t\t//\tDanish Krone\n\t$currencies['DOP'] = array(2,'.',',');\t\t\t//\tDominican Peso\n\t$currencies['XCD'] = array(2,'.',',');\t\t\t//\tEast Caribbean Dollar\n\t$currencies['EGP'] = array(2,'.',',');\t\t\t//\tEgyptian Pound\n\t$currencies['SVC'] = array(2,'.',',');\t\t\t//\tEl Salvador Colon\n\t$currencies['ATS'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['BEF'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['DEM'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['EEK'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['ESP'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['EUR'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['FIM'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['FRF'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['GRD'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['IEP'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['ITL'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['LUF'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['NLG'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['PTE'] = array(2,',','.');\t\t\t//\tEuro\n\t$currencies['GHC'] = array(2,'.',',');\t\t\t//\tGhana, Cedi\n\t$currencies['GIP'] = array(2,'.',',');\t\t\t//\tGibraltar Pound\n\t$currencies['GTQ'] = array(2,'.',',');\t\t\t//\tGuatemala, Quetzal\n\t$currencies['HNL'] = array(2,'.',',');\t\t\t//\tHonduras, Lempira\n\t$currencies['HKD'] = array(2,'.',',');\t\t\t//\tHong Kong Dollar\n\t$currencies['HUF'] = array(0,'','.');\t\t\t//\tHungary, Forint\n\t$currencies['ISK'] = array(0,'','.');\t\t\t//\tIceland Krona\n\t$currencies['INR'] = array(2,'.',',');\t\t\t//\tIndian Rupee\n\t$currencies['IDR'] = array(2,',','.');\t\t\t//\tIndonesia, Rupiah\n\t$currencies['IRR'] = array(2,'.',',');\t\t\t//\tIranian Rial\n\t$currencies['JMD'] = array(2,'.',',');\t\t\t//\tJamaican Dollar\n\t$currencies['JPY'] = array(0,'',',');\t\t\t//\tJapan, Yen\n\t$currencies['JOD'] = array(3,'.',',');\t\t\t//\tJordanian Dinar\n\t$currencies['KES'] = array(2,'.',',');\t\t\t//\tKenyan Shilling\n\t$currencies['KWD'] = array(3,'.',',');\t\t\t//\tKuwaiti Dinar\n\t$currencies['LVL'] = array(2,'.',',');\t\t\t//\tLatvian Lats\n\t$currencies['LBP'] = array(0,'',' ');\t\t\t//\tLebanese Pound\n\t$currencies['LTL'] = array(2,',',' ');\t\t\t//\tLithuanian Litas\n\t$currencies['MKD'] = array(2,'.',',');\t\t\t//\tMacedonia, Denar\n\t$currencies['MYR'] = array(2,'.',',');\t\t\t//\tMalaysian Ringgit\n\t$currencies['MTL'] = array(2,'.',',');\t\t\t//\tMaltese Lira\n\t$currencies['MUR'] = array(0,'',',');\t\t\t//\tMauritius Rupee\n\t$currencies['MXN'] = array(2,'.',',');\t\t\t//\tMexican Peso\n\t$currencies['MZM'] = array(2,',','.');\t\t\t//\tMozambique Metical\n\t$currencies['NPR'] = array(2,'.',',');\t\t\t//\tNepalese Rupee\n\t$currencies['ANG'] = array(2,'.',',');\t\t\t//\tNetherlands Antillian Guilder\n\t$currencies['ILS'] = array(2,'.',',');\t\t\t//\tNew Israeli Shekel\n\t$currencies['TRY'] = array(2,'.',',');\t\t\t//\tNew Turkish Lira\n\t$currencies['NZD'] = array(2,'.',',');\t\t\t//\tNew Zealand Dollar\n\t$currencies['NOK'] = array(2,',','.');\t\t\t//\tNorwegian Krone\n\t$currencies['PKR'] = array(2,'.',',');\t\t\t//\tPakistan Rupee\n\t$currencies['PEN'] = array(2,'.',',');\t\t\t//\tPeru, Nuevo Sol\n\t$currencies['UYU'] = array(2,',','.');\t\t\t//\tPeso Uruguayo\n\t$currencies['PHP'] = array(2,'.',',');\t\t\t//\tPhilippine Peso\n\t$currencies['PLN'] = array(2,'.',' ');\t\t\t//\tPoland, Zloty\n\t$currencies['GBP'] = array(2,'.',',');\t\t\t//\tPound Sterling\n\t$currencies['OMR'] = array(3,'.',',');\t\t\t//\tRial Omani\n\t$currencies['RON'] = array(2,',','.');\t\t\t//\tRomania, New Leu\n\t$currencies['ROL'] = array(2,',','.');\t\t\t//\tRomania, Old Leu\n\t$currencies['RUB'] = array(2,',','.');\t\t\t//\tRussian Ruble\n\t$currencies['SAR'] = array(2,'.',',');\t\t\t//\tSaudi Riyal\n\t$currencies['SGD'] = array(2,'.',',');\t\t\t//\tSingapore Dollar\n\t$currencies['SKK'] = array(2,',',' ');\t\t\t//\tSlovak Koruna\n\t$currencies['SIT'] = array(2,',','.');\t\t\t//\tSlovenia, Tolar\n\t$currencies['ZAR'] = array(2,'.',' ');\t\t\t//\tSouth Africa, Rand\n\t$currencies['KRW'] = array(0,'',',');\t\t\t//\tSouth Korea, Won\n\t$currencies['SZL'] = array(2,'.',', ');\t\t\t//\tSwaziland, Lilangeni\n\t$currencies['SEK'] = array(2,',','.');\t\t\t//\tSwedish Krona\n\t$currencies['CHF'] = array(2,'.','\\'');\t\t\t//\tSwiss Franc\n\t$currencies['TZS'] = array(2,'.',',');\t\t\t//\tTanzanian Shilling\n\t$currencies['THB'] = array(2,'.',',');\t\t\t//\tThailand, Baht\n\t$currencies['TOP'] = array(2,'.',',');\t\t\t//\tTonga, Paanga\n\t$currencies['AED'] = array(2,'.',',');\t\t\t//\tUAE Dirham\n\t$currencies['UAH'] = array(2,',',' ');\t\t\t//\tUkraine, Hryvnia\n\t$currencies['USD'] = array(2,'.',',');\t\t\t//\tUS Dollar\n\t$currencies['VUV'] = array(0,'',',');\t\t\t//\tVanuatu, Vatu\n\t$currencies['VEF'] = array(2,',','.');\t\t\t//\tVenezuela Bolivares Fuertes\n\t$currencies['VEB'] = array(2,',','.');\t\t\t//\tVenezuela, Bolivar\n\t$currencies['VND'] = array(0,'','.');\t\t\t//\tViet Nam, Dong\n\t$currencies['ZWD'] = array(2,'.',' ');\t\t\t//\tZimbabwe Dollar\n\n\tfunction formatinr($input){\n\t\t//CUSTOM FUNCTION TO GENERATE ##,##,###.##\n\t\t$dec = \"\";\n\t\t$pos = strpos($input, \".\");\n\t\tif ($pos === false){\n\t\t\t//no decimals\n\t\t} else {\n\t\t\t//decimals\n\t\t\t$dec = substr(round(substr($input,$pos),2),1);\n\t\t\t$input = substr($input,0,$pos);\n\t\t}\n\t\t$num = substr($input,-3); //get the last 3 digits\n\t\t$input = substr($input,0, -3); //omit the last 3 digits already stored in $num\n\t\twhile(strlen($input) > 0) //loop the process - further get digits 2 by 2\n\t\t{\n\t\t\t$num = substr($input,-2).\",\".$num;\n\t\t\t$input = substr($input,0,-2);\n\t\t}\n\t\treturn $num . $dec;\n\t}\n\n\tif ($curr == \"INR\"){\n\t\treturn formatinr($floatcurr);\n\t} else {\n\t\treturn number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);\n\t}\n}", "title": "" }, { "docid": "4bc3b07424f767cb52aa3024c71e8867", "score": "0.632667", "text": "public function currency(): string\n {\n return $this->data['currency'];\n }", "title": "" }, { "docid": "3473421409592290e91bfc4ce6bbc637", "score": "0.6319106", "text": "public function convert(){\n\t$this->EE->load->add_package_path(PATH_THIRD.'siteconfig/');\n\t$this->EE->load->library('siteconfig');\n\t\n\t// get the current product price\n\t$number = $this->EE->TMPL->fetch_param('price');\n\t$number = sanitize_number($number);\n\t\n\t\n\t// fetch the conversion values\n\t$from = strtolower($this->EE->TMPL->fetch_param('from'));\n\t$to = strtolower($this->EE->TMPL->fetch_param('to'));\n\t\n\t\n\t// validate now\n\t // no conversions for base currency\n\t\t// check if any posted data exists?\n\tif($to == \"inr\"){\n\t$conversion_rate = 1;\n\t}else{\n\t$conversion_rate = $this->EE->siteconfig->item($to.'_'.$from);\t\n\t}\n\t$conversion_rate = intval($conversion_rate);\n\n\t$price = $number/$conversion_rate;\n\t\n//\treturn number_format($price,2);\n\treturn $this->EE->number->format($price).'/'.$to; \n\t}", "title": "" }, { "docid": "61d8fc57f7d29812d9e1ef8aaafdf4c4", "score": "0.6313683", "text": "function money($key = null, $base = false) {\n\n $currency = $base ? null : \\App\\Currency::find(session('currency'));\n if (!$currency){\n $currency = json_decode(json_encode([\n 'id' => 0,\n 'name' => (is_ltr()? 'Riyal' : 'ريال'),\n 'value' => 1,\n 'symbol' => 'ر.س',\n ]));\n }\n switch ($key){\n case 'value':\n case 'symbol':\n case 'id':\n return $currency->$key;\n case 'name':\n return $currency->id? $currency->trans()->name : $currency->name;\n default:\n\n return $currency;\n }\n}", "title": "" }, { "docid": "0a83fc1ad9e1200b8571d1ccb5cc7a7f", "score": "0.6303067", "text": "function currency_converter($from, $to, $value, $is_live=true)\n {\n\n // This is the default INR value for January 17, 2017.\n $INR = 66.86;\n if( ! $is_live )\n {\n // Get current INR price.\n $URL = \"http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json\";\n $page = file_get_contents($URL);\n $data = json_decode($page, true)[\"list\"][\"resources\"];\n $data = array_filter($data, function($element) {\n return $element[\"resource\"][\"fields\"][\"name\"] == \"USD/INR\";\n });\n $INR = (float)(($data[\"21\"][\"resource\"][\"fields\"][\"price\"]));\n }\n\n $result = null;\n if($from == \"USD\")\n {\n $result = $value * $INR;\n }\n else\n {\n $result = $value / $INR;\n }\n\n return floatval( number_format( $result, 2 ) );\n\n }", "title": "" }, { "docid": "aa8b5795a19dc1cb07f9688d7362115a", "score": "0.62893647", "text": "public function getCurrencyParameter();", "title": "" }, { "docid": "9b997f13a0ea98d2cc363b5a25da588b", "score": "0.6281025", "text": "public function currency()\n {\n $getData = Rajaongkir::setEndpoint('currency')\n ->setBase(env(\"RAJAONGKIR_TYPE\"))\n ->setQuery([])\n ->get();\n\n return response()->json($getData[\"rajaongkir\"]);\n }", "title": "" }, { "docid": "91909716f76f8638448efd7feb6bbdae", "score": "0.62571126", "text": "public function getCurrency(): ?string;", "title": "" }, { "docid": "c34b88073f3c315863d66b0fc87d5643", "score": "0.62474006", "text": "public function getCurrency(){\n return $this->currency;\n }", "title": "" }, { "docid": "71cd7c1d9f6f6d33766bfdfb41f0cafc", "score": "0.6238971", "text": "public function getCurrency(): string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "71cd7c1d9f6f6d33766bfdfb41f0cafc", "score": "0.6238971", "text": "public function getCurrency(): string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "e270a9713647f1ac9bdfebb5a1ea4124", "score": "0.6236681", "text": "function currencyExchangeddsgdfgd214($currencyArr) \r\n { \r\n\tglobal $Config;\t\r\n\r\n\tforeach($currencyArr as $currency)\r\n\t{\t\r\n\t\t$from_Currency = urlencode($Config['Currency']);\r\n\t\t$to_Currency = urlencode($currency);\r\n\r\n\t\r\n\r\n$from_Currency = urlencode($from_Currency);\r\n$to_Currency = urlencode($to_Currency);\r\n$encode_amount = 1;\r\n\r\n\r\n\t\t\t$url = \"https://xecdapi.xe.com/v1/convert_to.json/?to=\".$from_Currency.\"&from=\".$to_Currency.\"&amount=1\";\r\n\r\n\t\t\t$cinit = curl_init();\r\n\t\t\tcurl_setopt($cinit, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($cinit, CURLOPT_HEADER,0);\r\n\t\t\tcurl_setopt($cinit, CURLOPT_USERAGENT, \"MozillaXYZ/1.0\");\r\n\t\t\tcurl_setopt($cinit, CURLOPT_USERAGENT, $_SERVER[\"HTTP_USER_AGENT\"]);\r\n\t\t\tcurl_setopt($cinit, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\tcurl_setopt($cinit, CURLOPT_TIMEOUT, 30);\r\n\t\t\tcurl_setopt($cinit, CURLOPT_CUSTOMREQUEST, 'GET'); \r\n\r\n\t\t\tcurl_setopt($cinit, CURLOPT_USERPWD, \"virtualstackssystemsllc303099069:p6g9avhdeo5kic0h20l5fsji63\");//xe\r\n \r\n\r\n\t\t\t$response = curl_exec($cinit);\r\n\t\t\t$httpCode = curl_getinfo($cinit, CURLINFO_HTTP_CODE); \r\n\t\t\t$info = curl_getinfo($cinit);\r\n\t\t\t$err = curl_error($cinit); \r\n\t\t\tcurl_close($cinit); \r\n\t\t\tif($err){\r\n\t\t\t\t$converted_amount = '';\r\n\t\t\t}else{\r\n\t\t\t\t//echo '<br><br>Response: '.$response; \r\n \t\t\t\t$converted_amount = '0';\r\n\t\t\t\t$jsonCardArray = json_decode($response, true);\t\r\n\t\t\t\tif(!empty($jsonCardArray['from'][0]['mid'])){\r\n\t\t\t\t\t$converted_amount = round($jsonCardArray['from'][0]['mid'],4);\r\n\t\t\t\t\tif($converted_amount>0){\r\n\t\t\t\t\t\t$converted_amount = number_format($converted_amount, 2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t/*$get = explode(\"<span class=bld>\",$response);\r\n\t\t\t\tif(!empty($get[1]))$get = explode(\"</span>\",$get[1]); \r\n\t\t\t\t#$converted_amount = preg_replace(\"/[^0-9\\.]/\", null, $get[0]);\t\t\t\t\r\n\t\t\t\t$converted_amount = (float)trim($get[0]);*/\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n$res[$currency] = $converted_amount;\r\n\r\n\r\n\r\n}\r\nreturn $res;\r\n\r\n }", "title": "" }, { "docid": "9ccf8529a4975e4c90ee8a3f469eff7a", "score": "0.6236398", "text": "function WCNY_convert_price($price, $currency = null) {\n\n\t$conversionRate = WCNY_get_CNY_to_currency_exchange_rate();\n\t$convertedPrice = round( $price * $conversionRate, 2);\n\n\tif ($currency !== null) {\n\t\t$convertedPrice = $currency.' '.number_format($convertedPrice, 2);\n\t}\n\n\treturn $convertedPrice;\n\n}", "title": "" }, { "docid": "fd3f35f32cc87d4efca0b521cfe6cdb8", "score": "0.62170994", "text": "public function getCurrencyCode() {\n\t\t// return $this -> ip_info($_SERVER[\"REMOTE_ADDR\"], \"Location\");\n\t\t$get_remote_ip_info = $this -> ip_info($_SERVER[\"REMOTE_ADDR\"], \"Location\");\n\n\t\t$country_currency = GetCurrency::where(array('country' => $get_remote_ip_info['country_code'])) -> first();\n\t\t// print_r($country_currency);\n\t\tif (!empty($country_currency)) {\n\t\t\t$currency_code = $country_currency -> currency;\n\t\t} else {\n\t\t\t$currency_code = 'INR';\n\t\t}\n\n\t\t$user_currency = $currency_code;\n\n\t\treturn $user_currency;\n\t}", "title": "" }, { "docid": "02ec480a30bb924404d97bff1532faba", "score": "0.61998546", "text": "public function getDefaultCurrency() : InternetbsResponse\n {\n return $this->api->apiRequest('/Account/DefaultCurrency/Get');\n }", "title": "" }, { "docid": "30b25fb2c34a73656d3252ffd47a612e", "score": "0.6186803", "text": "public function Convert($currencyFrom, $currencyTo)\n {\n\n $webservices = array(\n new ConvertCurrency(\n \"http://webservicex.net/CurrencyConvertor.asmx/ConversionRate\",\n \"FromCurrency\",\n \"ToCurrency\",\n ResponseType::XML,\n false\n ),\n new ConvertCurrency(\n \"http://currencyconverter.kowabunga.net/converter.asmx/GetConversionRate\",\n \"CurrencyFrom\",\n \"CurrencyTo\",\n ResponseType::XML,\n true\n ),\n new ConvertCurrency(\n \"https://api.fixer.io/latest\",\n \"base\",\n \"symbols\",\n ResponseType::JSON,\n true\n ),\n );\n\n /**\n * Loop door webservices\n */\n foreach ($webservices as $webservice) {\n\n $parameters = array(\n $webservice->convertFromParam => $currencyFrom,\n $webservice->convertToParam => $currencyTo,\n 'RateDate' => (new \\DateTime())->format('m-d-Y'),\n );\n\n /**\n * Eigenlijk moet er om de zoveel tijd gekeken worden of een webservice nog up is en een correct antwoord geeft\n * de webservicex api geeft altijd -1 als antwoord, dus daarom wordt deze overgeslagen\n */\n if(!$webservice->available){\n continue;\n }\n\n $output = 0;\n /**\n * Geef elke webservice 5 seconde om te reageren\n */\n Unirest\\Request::timeout(5);\n\n try {\n $response = Unirest\\Request::get(\n $webservice->url,\n null,\n $parameters\n );\n\n switch ($webservice->responseType) {\n case ResponseType::XML:\n /**\n * Controleer op valide xml\n */\n libxml_use_internal_errors(true);\n $xml = simplexml_load_string($response->body);\n if (false === $xml) {\n return 0;\n }\n\n $output = doubleval(simplexml_load_string($response->body));\n break;\n case ResponseType::JSON:\n\n $output = doubleval($response->body->rates->$currencyTo);\n break;\n default:\n return 0;\n };\n\n /**\n * Als webservice een negatieve waarde teruggeeft de loop door laten gaan zodat een andere webservice een correct antwoord kan teruggeven\n */\n if ($output <= 0) {\n continue;\n }\n\n /**\n * Zet precision om 4 punten achter de komma\n */\n return number_format($output, 4);\n\n } catch (\\Exception $e) {\n\n /**\n * Als webservice niet binnen 5 seconde reageert (en bij andere excepties) de loop door laten gaan\n */\n continue;\n }\n\n }\n\n /**\n * Als geen enkele webservice heeft gereageerd dan 0 teruggeven\n */\n return 0;\n }", "title": "" }, { "docid": "9a04df4987b97fbfa42bb899c97bcbed", "score": "0.6179853", "text": "function convertCurrencies($query){\n //check query if it has currency in the query\n if(strpos($query, \"dollars to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 359.500;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\" NGN at rate of 359.500/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"naira to dollars\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $dollars = $digit[0] * 0.00278164;\n $dollars = money_format(\"%i\", $dollars);\n echo $dollars.\" USD at rate of 0.0278164/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"euros to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 428.747;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\"NGN at rate of 428.747/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"naira to euros\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $euro = $digit[0] * 0.00233162;\n $euro = money_format(\"%i\", $euro);\n echo $euro.\" EUR at rate of 0.00233162/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"naira to pounds\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $pounds = $digit[0] * 0.00204860;\n $pounds = money_format(\"%i\", $pounds);\n echo $pounds.\" GBP at rate of 0.00204860/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"pounds to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 486.676;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\" NGN at rate of 486.676/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"australian dollars to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 0.00371190;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\" NGN at rate of 0.00371190/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"naira to australian dollars\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $aud = $digit[0] * 269.403;\n $aud = money_format(\"%i\", $aud);\n echo $aud.\" AUD at rate of 269.403/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"canadian dollars to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 0.00360388;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\" NGN at rate of 0.00360388/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \" naira to canadian dollars\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $cad = $digit[0] * 277.479;\n $cad = money_format(\"%i\", $cad);\n echo $cad.\" CAD at rate of 277.479/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"naira to rupees\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $rupee = $digit[0] * 5.36198;\n $rupee = money_format(\"%i\", $rupee);\n echo $rupee.\" INR at rate of 5.36198/1\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }elseif (strpos($query, \"rupee to naira\") !== false){\n $digit = divideString(\" \",$query);\n if(is_numeric($digit[0])){\n $naira = $digit[0] * 277.479;\n $naira = money_format(\"%i\", $naira);\n echo $naira.\" NGN at rate of 277.479\"; exit();\n }else{\n echo \"Ensure that the value you input is a number.\"; exit();\n }\n }\n }", "title": "" }, { "docid": "959306d70e97ae269aa334dead71ac1a", "score": "0.617505", "text": "public function currencies()\n {\n\n\n // parse inputs\n $resourcePath = \"/currencies\";\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n $method = \"GET\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array());\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n\n\n\n\n\n\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } else if (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n\n // make the API Call\n try\n {\n list($response, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, $method,\n $queryParams, $httpBody,\n $headerParams\n );\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n\n }", "title": "" }, { "docid": "435c230360a04f268e6b7d6e202896e2", "score": "0.61690587", "text": "public static function setCurrency(){\n if(!Sys::get('config')->db_auto_connect)\n return false;\n\n $db = Db::getInstance();\n\n if(!empty($_REQUEST['currency'])){\n $moneda = $db->fetch(\"SELECT * FROM currency WHERE currency_code = '\".$db->escape($_REQUEST['currency']).\"' AND active = 1\");\n if($moneda->num_rows <= 0)\n return;\n if(ThisUser::isLogged()){\n $User = Usuario::find(ThisUser::get(\"id_user\"));\n $User->currency = $_REQUEST['currency'];\n $User->save();\n }\n $_SESSION['currency'] = $_REQUEST['currency']; \n }else{\n if(!empty($_SESSION['currency']))\n return;\n if(ThisUser::isLogged() && ThisUser::get(\"currency\") != \"\"){\n if(ThisUser::get(\"currency\") != \"\")\n $_SESSION['currency'] = ThisUser::get(\"currency\");\n }else{\n $geo = $db->fetch(\"SELECT m.* FROM geolocation INNER JOIN currency m USING(iso_3166_2) WHERE ('\".$db->escape(ip2long($_SERVER['REMOTE_ADDR'])).\"' BETWEEN ip_start AND ip_end) AND m.active = 1\");\n if($geo->num_rows > 0){\n $_SESSION['currency'] = $geo->row['currency_code'];\n }\n }\n }\n }", "title": "" }, { "docid": "f1513c432e53a6b3026027b040c57d39", "score": "0.6161981", "text": "function currency_code_gopay()\n{\n return \"CZK\";\n}", "title": "" }, { "docid": "6a83005a828dbd5da7200f1017ba1334", "score": "0.61607796", "text": "function GetUSDCPrice() {\n $agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';\n $gecko_url = 'https://api.coingecko.com/api/v3/coins/usd-coin';//\n $g = curl_init();\n curl_setopt($g, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($g, CURLOPT_VERBOSE, true);\n curl_setopt($g, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($g, CURLOPT_USERAGENT, $agent);\n curl_setopt($g, CURLOPT_ENCODING, '');\n \n curl_setopt($g, CURLOPT_URL,$gecko_url);\n $gOutput = curl_exec ($g);\n $gData = json_decode($gOutput, true);\n curl_close ($g); \n return $gData['market_data']['current_price']['usd'];\n \n}", "title": "" }, { "docid": "01f9c7c8f4386a2105d292a8a510e4cd", "score": "0.6141221", "text": "public function changeCurrency($price, Currency $toConvert);", "title": "" }, { "docid": "8fb4b55dfbbc753ae8e3cdd75f246d87", "score": "0.61387116", "text": "public static function get_currency():string { return self::$currency; }", "title": "" }, { "docid": "963c186537a1e04393402125d3144f7f", "score": "0.61382693", "text": "private function get_centralbank_data($url){\n // create curl resource \n $ch = curl_init(); \n\n // set url \n curl_setopt($ch, CURLOPT_URL, $url); \n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17');\n curl_setopt($ch, CURLOPT_AUTOREFERER, true); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n // $output contains the output string \n $output = curl_exec($ch); \n\n $data = json_decode($output,true);\n\n // close curl resource to free up system resources \n curl_close($ch); \n\n $rate=str_replace(',','',$data['rates'][\"USD\"]);\n\n \n \n return [\n \"title\" => \"Central Bank\",\n \"currency\" =>\"USD\",\n \"buy\" => intval($rate),\n \"sell\" => intval($rate),\n 'created_at'=>date('Y-m-d H:i:s'),\n 'updated_at'=> date('Y-m-d H:i:s')\n ];\n }", "title": "" }, { "docid": "874d68c2306d487e6e5540928cd673c4", "score": "0.6133623", "text": "function currency_usd($price = 0, $type = 'html') { \r\n\t\tif($price >= 0) {\r\n $code = \"$\";\r\n \r\n $currency = 20000;\r\n $price = round($price/$currency, 2);\r\n\t\t\t\t$price = $code .\" \" .$price; \r\n\t\t\t\treturn $price;\r\n \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b3aab7e228a7bbdfb646173a3fe93672", "score": "0.6132195", "text": "public function testCurrencyExchangeConvertCurrency()\n {\n }", "title": "" }, { "docid": "46db905da7fa143ff98137af85fa4cd6", "score": "0.61294013", "text": "public static function GetCurrency()\n {\n $val=\\Config::get('paypal.currency');\n if($val)\n return $val;\n else\n return 'USD';\n }", "title": "" }, { "docid": "4b149fc17b652a99b5422f5a193272b4", "score": "0.61217344", "text": "function wccp_get_rate( $coin = 'btc' ) {\n\t$rate_api_url = \n'ADD API URL HERE';\n\tif ( 'ltc' == $coin ) {\n\t\t$rate_api_url = \n'ADD API URL HERE';\n\t}\t\n\t\n\tif ( 'doge' == $coin ) {\n\t\t$rate_api_url = \n'ADD API URL HERE';\n\t}\n\t \n\tif ( 'dash' == $coin ) {\n\t\t$rate_api_url = \n'ADD API URL HERE';\n\t}\n\t$rate_request = wp_remote_get( $rate_api_url );\n\tif ( 200 == $rate_request['response']['code'] ) {\n\t\t$current_currency = get_woocommerce_currency();\n\t\t$response = json_decode( $rate_request['body'], true );\n\t\tforeach ( $response as $key => $data ) {\n\t\t\tif ( $current_currency == $data['code'] ) {\n\t\t\t\treturn $data['rate'];\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "1e48f9fa40e78cd8b717dbf5b8fa91f3", "score": "0.61134535", "text": "function currency2($voucher, $editable = true) {\n global $_lib;\n\n $html = '';\n\n #Converted to local currency from foreign currency\n $is_foreign = $voucher->ForeignCurrencyID && $voucher->ForeignAmount && $voucher->ForeignConvRate;\n\n $currencies = exchange::getActiveCurrencies();\n\n if (!empty($currencies)) {\n $in_or_out = ($voucher->AmountIn > 0 ? 'in' : ($voucher->AmountOut > 0 ? 'out' : ''));\n\n $html = '';\n\n $html .= '<td>';\n\n $voucher_foreign_currency = $voucher->ForeignCurrencyID;\n if($editable) {\n $select_options = '<option value=\"\">'. exchange::getLocalCurrency() .'</option>';\n foreach ($currencies as $currency) {\n if ($voucher_foreign_currency && $currency->CurrencyISO == $voucher_foreign_currency)\n $select_options .= '<option value=\"'. $currency->CurrencyISO .'\" selected=\"selected\">'. $currency->CurrencyISO .'</option>';\n else\n $select_options .= '<option value=\"'. $currency->CurrencyISO .'\">'. $currency->CurrencyISO .'</option>';\n }\n $html .= '<select name=\"voucher.ForeignCurrencyID\" onchange=\"onCurrencyChange(this)\">'. $select_options .'\"</select>';\n } else {\n $html .= $voucher_foreign_currency;\n }\n $html .= '</td>';\n\n $foreign_amount_in = ($in_or_out == 'in' ? $voucher->ForeignAmount : 0);\n $foreign_amount_out = ($in_or_out == 'out' ? $voucher->ForeignAmount : 0);\n\n #AmountIn\n $html .= '<td>';\n if($editable) {\n $html .= $_lib['form3']->text(array('name' => 'voucher.ForeignAmountIn', 'value' => $_lib['format']->Amount($foreign_amount_in), 'class' => 'number currency_field', 'OnChange' => \"this.value = toAmountString(toNumber(this.value)); allowOnlyCreditOrDebit(this, 'credit')\", 'width' => '12', 'style' => ($is_foreign ? 'text-align: right;' : 'display: none;')));\n } else {\n $html .= '<div style=\"width: 80px !important;\">'. $_lib['format']->Amount($foreign_amount_in) .'</div>';\n }\n $html .= '</td>';\n\n #AmountOut\n $html .= '<td>';\n if($editable) {\n $html .= $_lib['form3']->text(array('name' => 'voucher.ForeignAmountOut', 'value' => $_lib['format']->Amount($foreign_amount_out), 'class' => 'number currency_field', 'OnChange' => \"this.value = toAmountString(toNumber(this.value)); allowOnlyCreditOrDebit(this, 'debit')\", 'width' => '12', 'style' => ($is_foreign ? 'text-align: right;' : 'display: none;')));\n } else {\n $html .= '<div style=\"width: 80px !important;\">'. $_lib['format']->Amount($foreign_amount_out) .'</div>';\n }\n $html .= '</td>';\n\n if($editable) {\n $html .= '<td>'.'<div class=\"currency_field\" style=\"'. ($is_foreign ? '' : 'display: none;') .'\">'.'<input class=\"number currency_rate\" type=\"text\" name=\"voucher.ForeignConvRate\" size=\"10\" value=\"'. $_lib['format']->Amount($voucher->ForeignConvRate) .'\" onchange=\"this.value = toAmountString(toNumber(this.value))\"> = 100'. exchange::getLocalCurrency() .'</div></td>';\n } else {\n $html .= '<td style=\"text-align: right;\">'. ($is_foreign ? $_lib['format']->Amount($voucher->ForeignConvRate) .' = 100NOK' : '') .'</td>';\n }\n } else {\n $html .= '<td colspan=\"4\"></td>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "67004d462bae99e851413e2c26e2e381", "score": "0.610482", "text": "public function currencyconversion()\n {\n $currency_conversion_data = [];\n $currency_conversion_history_data = [];\n $httpAdapter = new \\Ivory\\HttpAdapter\\FileGetContentsHttpAdapter();\n $chainProvider = new \\Swap\\Provider\\ChainProvider([\n new \\Swap\\Provider\\YahooFinanceProvider($httpAdapter),\n new \\Swap\\Provider\\GoogleFinanceProvider($httpAdapter)\n ]);\n $swap = new \\Swap\\Swap($chainProvider);\n $currency_list = Currency::select('id', 'code')->get();\n $active_currencies = Currency::select('id', 'code')->where('is_active', '=', 1)->get();\n foreach ($currency_list as $currency) {\n foreach ($active_currencies as $active_currency) {\n $currency_conversion_data['currency_id'] = $currency->id;\n $currency_conversion_data['converted_currency_id'] = $active_currency->id;\n $rate = $swap->quote($currency->code . '/' . $active_currency->code);\n $currency_conversion_data['rate'] = (double)$rate->getValue();\n $currency_conversion_list = CurrencyConversion::where('currency_id', '=', $currency->id)\n ->where('converted_currency_id', '=', $active_currency->id)->first();\n if ($currency_conversion_list) {\n $currency_conversion_data['id'] = $currency_conversion_list->id;\n $currency_conversion_history_data['rate_before_change'] = $currency_conversion_list->rate;\n $currency_conversion_history_data['currency_conversion_id'] = $currency_conversion_list->id;\n $validator = Validator::make($currency_conversion_data, CurrencyConversion::GetValidationRule());\n if ($validator->passes() && $currency_conversion_list) {\n $currency_conversion_list->update($currency_conversion_data);\n }\n } else {\n $currency_conversion_history_data['rate_before_change'] = 0.00;\n $validator = Validator::make($currency_conversion_data, CurrencyConversion::GetValidationRule());\n if ($validator->passes()) {\n $currency_conversion = CurrencyConversion::create($currency_conversion_data);\n $currency_conversion_history_data['currency_conversion_id'] = $currency_conversion->id;\n }\n }\n $currency_conversion_history_data['rate'] = (double)$rate->getValue();\n $validator = Validator::make($currency_conversion_history_data, CurrencyConversionHistory::GetValidationRule());\n if ($validator->passes()) {\n CurrencyConversionHistory::create($currency_conversion_history_data);\n }\n }\n }\n }", "title": "" }, { "docid": "214bf210417235c6d6058a2bde243bd1", "score": "0.6102628", "text": "public function getCurrency()\n {\n return $this->data['currency'] ?? null;\n }", "title": "" }, { "docid": "c6907e84dbb0cfcd9afc0df64ec287da", "score": "0.6101738", "text": "public function convertCurrency($value) {\n return $this->recalc ? (($value*$this->arDefault['rate'])/$this->arCurrent['rate']) : $value;\n }", "title": "" }, { "docid": "7bd9760913329200a43bf3c83dc7ee67", "score": "0.60963964", "text": "function FormatCurrency($decimal, $formatToBD = false) {\n\t\tif($formatToBD) {\n\t\t\tif($decimal == 'Gratuit' || $decimal == 'gratuit'){\n\t\t\t\treturn 0.00;\n\t\t\t} else {\n\t\t\t\treturn str_replace(',', '.', $decimal);\n\t\t\t}\n\t\t} else {\n\t\t\tif($decimal == 0.00) {\n\t\t\t\treturn \"Gratuit\";\n\t\t\t} else {\n\t\t\t\t$value = strval($decimal);\n\t\t\t\tfor($i = 0; $i < strlen($value); ++$i) {\n\t\t\t\t\tif ($value[$i] != '0') {\n\t\t\t\t\t\tif ($value[$i] == '.') {\n\t\t\t\t\t\t\t$value = substr($value, $i-1);\n\t\t\t\t\t\t\tstr_replace('.', ',', $value);\n\t\t\t\t\t\t\treturn ($value . ' $');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value = substr($value, $i);\n\t\t\t\t\t\tstr_replace('.', ',', $value);\n\t\t\t\t\t\treturn ($value . ' $');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "title": "" }, { "docid": "cd60660f33996fcf5fb9cb6f8db9e838", "score": "0.6095913", "text": "function convert_bookingdata_to_application_currency($booking_price_details) {\r\n $converted_price_details = array();\r\n $application_default_currency = admin_base_currency();\r\n $currency_obj = new Currency(array('module_type' => 'flight', 'from' => get_api_data_currency(), 'to' => admin_base_currency()));\r\n $converted_price_details['FareDetails'] = $this->preferred_currency_fare_object($booking_price_details, $currency_obj, $application_default_currency);\r\n //PassengerBreakup\r\n $converted_price_details['PassengerFareBreakdown'] = $this->preferred_currency_paxwise_breakup_object($booking_price_details['PassengerBreakup'], $currency_obj);\r\n return $converted_price_details;\r\n }", "title": "" }, { "docid": "9dbf66436c51562e0abaa2db765b7516", "score": "0.60926193", "text": "function usaCurrencyFormat($float){\n $fmt = new NumberFormatter( 'en_US', NumberFormatter::CURRENCY );\n return $fmt->formatCurrency($float, 'USD');\n}", "title": "" }, { "docid": "15cb791bf0cc5d2ca9aeac073c85c67c", "score": "0.6086943", "text": "public function getCurrency(){\n return $this->_currency;\n }", "title": "" }, { "docid": "cb4646518a1c1b4fc57462a57d82a424", "score": "0.6069005", "text": "function currency($cur)\r\n{\r\n $currency = $cur;\r\n $sql = 'SELECT * FROM `countries` WHERE currency = ?';\r\n $exR = getSingleRecord($sql, 's', [$currency]);\r\n return $exR['UG_rate'];\r\n}", "title": "" }, { "docid": "61057e890a9deb8b43e9f32b6ba7c0f2", "score": "0.6059349", "text": "public function dataForCurrencyConvertingToBaseCurrency(): array\n {\n return [\n ['1200.11', 'BASE', '1200.11'],\n ['1200.11', 'FIRST', '1043.85'],\n ['1200.11', 'SECOND', '9.27'],\n ];\n }", "title": "" }, { "docid": "7ca3877897dc52c4e7f99d4a0efef5f0", "score": "0.6023528", "text": "private function ProductCurrency() {\n\t\t$csvilog = JRequest::getVar('csvilog');\n\t\t$csvilog->AddMessage('debug', JText::_('DEBUG_PRODUCT_CURRENCY'));\n\t\tif (!isset($this->product_currency)) {\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$q = \"SELECT vendor_currency FROM #__vm_vendor WHERE vendor_id='\".$this->vendor_id.\"' \";\n\t\t\t$db->setQuery($q);\n\t\t\t$this->product_currency = $db->loadResult();\n\t\t\t$csvilog->AddMessage('debug', JText::_('DEBUG_PRODUCT_CURRENCY'), true);\n\t\t}\n\t}", "title": "" }, { "docid": "765eed8596d849b9dc50f27dc54432c5", "score": "0.601408", "text": "public function getConversionRate() \n {\n\t\t\ttry{\n\t\t\t\t$guj_request = $this->guzzle_client->get($this->url);\t\n\t\t\t}\n\t\t\tcatch(Exception $e) {\n\t\t\t\treturn ['status' => false, 'msg' => \"Something went wrong try again. If error persist contact admin.\"];\n\t\t\t}\n\t\t\tif($guj_request->getStatusCode() == 200){\n\t\t\t\t$res = $guj_request->getBody();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // Get the actual response without headers\n\t\t\t\t$res_json = json_decode($res, true);\n\t\t\t\tif($res_json['success']){\n\t\t\t\t\treturn ['status' => true, 'res' => $res];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn ['status' => false, 'msg' => \"Error in getting latest currency conversion rate. Contact admin.\"];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ['status' => false, 'msg' => \"Something went wrong try again. If error persist contact admin.\", 'status_code' => $guj_request->getStatusCode()];\n\t\t\t}\n }", "title": "" }, { "docid": "deadc86b08b9e8d5d25d69550bdad117", "score": "0.6004696", "text": "public function getCurrency(): string\n {\n\n return $this->currency;\n }", "title": "" }, { "docid": "9ba73be4ad23ca88d92c17f073878963", "score": "0.60006493", "text": "function wc_2c2p_get_store_currency_code()\n {// Geolocation must be enabled @ Woo Settings\n\n $location = WC_Geolocation::geolocate_ip();\n if (strtoupper($location['country']) == \"NP\") {\n return 524;\n } else {\n return 840;\n }\n /* $objWC_2c2p_currency = new WC_2c2p_currency();\n $currenyCode = get_option('woocommerce_currency');\n\n\n if (!isset($currenyCode))\n return \"\";\n foreach ($objWC_2c2p_currency->get_currency_code() as $key => $value) {\n // echo($key.'='.$currenyCode.'?');echo($key == $currenyCode?'true':'false');echo('<br>');\n if ($key == $currenyCode) {\n //echo('asdds'); exit();\n\n // var_dump($value['Num']);exit;\n\n return $value['Num'];\n }\n return \"\";\n }*/\n }", "title": "" }, { "docid": "7849e86adf2a45120a72f9347c419646", "score": "0.59899896", "text": "public function getCurrency()\n {\n return 'mxn';\n }", "title": "" }, { "docid": "8d810077b32115e9d7686f61f0e02b21", "score": "0.5979575", "text": "function get_admin_base_currency()\r\n\t{\r\n\t\treturn $this->cache[$this->set_admin_base_currency()];\r\n\t}", "title": "" }, { "docid": "a97b8fef3de6605de188a02a6d55a7fd", "score": "0.59782845", "text": "function getRate()\n{\n\t$currency_symbol_from = $_POST[\"currency_symbol_from\"];\n\t$currency_symbol_to = $_POST[\"currency_symbol_to\"];\n\t$log_it = $_POST[\"log_it\"];\n\tif (empty($currency_symbol_from) || empty($currency_symbol_to)) {\n\t\techo 0;\n\t\twp_die();\n\t}\n\n\t$currencyServerData = new CurrencyServerData();\n\t$rate = $currencyServerData->getRate($currency_symbol_from, $currency_symbol_to);\n\tif ($log_it!=\"false\") {\n\t\tLogger::log(\"convert from $currency_symbol_from to $currency_symbol_to\");\n\t}\n\n\techo $rate;\n\twp_die();\n}", "title": "" }, { "docid": "8774c54d40bb4a878c5d72813f0e559c", "score": "0.5976925", "text": "public function getCurrencies();", "title": "" }, { "docid": "4a371a3de17008682eb349ca72e0cea4", "score": "0.5976789", "text": "function convert_rmb_to_usd($paypal_args){\n \n if ($paypal_args['currency_code'] == 'CNY'){\n foreach ($paypal_args as $key => $paypal_arg) {\n \tif (false !== strpos($key, 'amount')) {\n \t\t$paypal_args[$key] = WCNY_convert_price($paypal_args[$key]);\n \t}\n }\n }\n $paypal_args['currency_code'] = 'USD';\n\n return $paypal_args;\n}", "title": "" }, { "docid": "5a68263572af27c87f3339ae798daf67", "score": "0.5975401", "text": "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "title": "" }, { "docid": "fff6c7f91b52ff1476d12f4daf663e29", "score": "0.59714335", "text": "public function getCurrency ()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "43ab56563763f04bbb27d5ae82332e7d", "score": "0.5959311", "text": "public function convert(string $amount, string $fromCurrency, string $toCurrency): string;", "title": "" }, { "docid": "d56b9d12bebcbf32a609d3d7f705d9ad", "score": "0.5955257", "text": "protected function getDefaultCurrencyOfExtraCharge(): string\n {\n return 'RUB';\n }", "title": "" }, { "docid": "b60e271360d86ed24d811f02339e7386", "score": "0.59470445", "text": "public function getCurrency()\n\t{\n\t\treturn $this->getKeyValue('Currency'); \n\n\t}", "title": "" }, { "docid": "190853870c82aae3dd18cd7d766004c9", "score": "0.59459186", "text": "function acquire_currency_conversion($post_graph){\n $acquires = [];\n foreach($post_graph->resources() as $id => $data){\n if($data->isA(\"asext:Acquire\")){\n $acquires[] = $data->getUri();\n }\n }\n if(empty($acquires)){\n return $post_graph;\n }\n foreach($acquires as $uri){\n $cost = structure_cost($post_graph->get($uri, \"asext:cost\")->getValue());\n $amount = $cost[\"value\"];\n $currency = $cost[\"currency\"];\n\n if($amount == \"0\"){\n $usd = $eur = $gbp = 0;\n }else{\n $date = $post_graph->get($uri, \"as:published\")->getValue();\n $datef = $date->format(\"Y-m-d\");\n\n $eur = $post_graph->get($uri, \"asext:amountEur\");\n if(isset($eur)) { $eur = $eur->getValue(); }\n $usd = $post_graph->get($uri, \"asext:amountUsd\");\n if(isset($usd)) { $usd = $usd->getValue(); }\n $gbp = $post_graph->get($uri, \"asext:amountGbp\");\n if(isset($gbp)) { $gbp = $gbp->getValue(); }\n\n // Get conversion rates\n $existing = read_rates($date);\n\n // Check if EUR already posted\n if(!isset($eur) && $currency == \"EUR\"){\n $eur = $amount;\n }\n if(!isset($eur)){\n // Get conversion rates for EUR\n // Fetch and store exchange rate if not already\n if(!isset($existing[\"EUR\"][$currency])){\n $rates = get_fixer_rates($date, $currency);\n write_rates($date, $rates);\n }\n // Convert to EUR\n $eur = convert_any_to_eur($amount, $currency, $date);\n }\n\n // Check if USD already posted\n if(!isset($usd) && $currency == \"USD\"){\n $usd = $amount;\n }\n // If EUR was set we can try to get USD from EUR\n if(isset($eur) && !isset($usd)){\n $usd = convert_eur_to_any($eur, \"USD\", $date);\n }\n if(!isset($usd)){\n // Get conversion rates for USD\n // Fetch and store exchange rate if not already\n if(!isset($existing[\"USD\"][$currency])){\n $usdrates = get_currencylayer_rates($date, $currency);\n write_rates($date, $usdrates, \"USD\");\n }\n // Convert to USD\n $usd = convert_any_to_usd($amount, $currency, $date);\n }\n\n // If USD got set but EUR didn't, try to get EUR from USD\n if(isset($usd) && !isset($eur)){\n $eur = convert_any_to_eur($usd, \"USD\", $date);\n }\n\n // Check if GBP already posted\n if(!isset($gbp) && $currency == \"GBP\"){\n $gbp = $amount;\n }\n // If EUR was set we can try to get GBP from EUR\n if(isset($eur) && !isset($gbp)){\n $gbp = convert_eur_to_any($eur, \"GBP\", $date);\n }\n // If USD was set we can try to get GBP from USD\n if(isset($usd) && !isset($gbp)){\n $gbp = convert_eur_to_any($usd, \"GBP\", $date);\n }\n\n }\n if(isset($eur)){\n $post_graph->add($uri, \"asext:amountEur\", $eur);\n }\n if(isset($usd)){\n $post_graph->add($uri, \"asext:amountUsd\", $usd);\n }\n if(isset($gbp)){\n $post_graph->add($uri, \"asext:amountGbp\", $gbp);\n }\n }\n return $post_graph;\n}", "title": "" }, { "docid": "993491aa69ded9791411aa47a7bfd5a2", "score": "0.5944938", "text": "public function getDefaultCurrency() : string\n {\n //====================================================================//\n // Get Shop Informations\n /** @var null|string $currency */\n $currency = $this->getParameter(\"currency\", \"EUR\", \"ShopInformations\");\n\n return (string) $currency;\n }", "title": "" }, { "docid": "0c29d89b3ccbcbbcaa1d2a80fe610619", "score": "0.59402525", "text": "function convert_currency($amount, $from, $to)\n{\n $url = 'http://www.google.com/finance/converter?'.\n 'a=' .strip_tags(trim($amount)).'&'.\n 'from='.strip_tags(trim($from)) .'&'.\n 'to=' .strip_tags(trim($to));\n\n if (!empty($_SERVER['HTTP_USER_AGENT']))\n {\n $user_agent = $_SERVER['HTTP_USER_AGENT'];\n }\n else\n {\n $user_agent = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)';\n }\n\n $request = curl_init();\n $time_out = 0;\n\n curl_setopt($request, CURLOPT_URL, $url);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_USERAGENT, $user_agent);\n curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $time_out);\n\n $response = curl_exec($request);\n curl_close($request);\n\n preg_match('#\\<span class=bld\\>(.+?)\\<\\/span\\>#s', $response, $converted);\n\n $converted = trim($converted[0]);\n\n if (empty($converted))\n {\n return FALSE;\n }\n else\n {\n return (string) $converted;\n }\n\n return (string) $response;\n}", "title": "" }, { "docid": "4664b578f4a4d3eb07aa081f75cf34dd", "score": "0.5936088", "text": "public function getCurrencyInfo() { return $this->currencyInfo; }", "title": "" }, { "docid": "4664b578f4a4d3eb07aa081f75cf34dd", "score": "0.5936088", "text": "public function getCurrencyInfo() { return $this->currencyInfo; }", "title": "" }, { "docid": "885de74ed25657ae0ed3fb2a8439dc15", "score": "0.59354186", "text": "public function convert($amount, $currency)\n {\n \t$rates_arr = $this->curencyWebservice->getExchangeRatesFor($currency);\n\t\t\t\n\t\t$rate \t\t= $rates_arr['GBP']; // get the exchange rate for this currency to pounds\n\t\treturn number_format($amount*$rate,2);\n }", "title": "" }, { "docid": "dd47e447b83addd860d7610a3f448a6a", "score": "0.59339595", "text": "function wccp_currency( $currencies ) {\n $currencies['BTC'] = esc_html__( 'Bitcoin', 'woocommerce' );\n $currencies['LTC'] = esc_html__( 'Litecoin', 'woocommerce' );\n $currencies['DOGE'] = esc_html__( 'Dogecoin', 'woocommerce' );\n $currencies['DASH'] = esc_html__( 'Dash', 'woocommerce' );\n return $currencies;\n}", "title": "" }, { "docid": "753ccfa1ec3a83839c546c1a8131c19a", "score": "0.59019667", "text": "function currency($voucher, $accountplan, $vb, $class) {\n global $_lib, $tabindex;\n\n $html = '<td class=\"' . $class1 . '\"><nobr>' . $_lib['format']->Amount(array('value'=>($vb->sumin - $vb->sumout), 'return'=>'value'));\n if($accountplan->EnableCurrency) {\n $tabindexin = '';\n $tabindexout = '';\n if($AmountField == 'in')\n {\n $tabindexin = $tabindex++;\n }\n else\n {\n $tabindexout = $tabindex++;\n }\n }\n $html .= '</nobr>';\n\n $html .= '<td>';\n if($accountplan->EnableCurrency) {\n $html .= $_lib['form3']->text(array('name' => 'voucher.ForeignAmountIn', 'value' => $_lib['format']->Amount($voucher->ForeignAmountIn), 'class' => 'number', 'size' => '6', 'tabindex' => $tabindexin, 'accesskey' => 'N')) . $accountplan->Currency;\n };\n $html .= '</td>';\n\n $html .= '<td>';\n if($accountplan->EnableCurrency) {\n $html .= $_lib['form3']->text(array('name' => 'voucher.ForeignAmountOut', 'value' => $_lib['format']->Amount($voucher->ForeignAmountOut), 'class' => 'number', 'size' => '6', 'tabindex' => $tabindexout, 'accesskey' => 'T')) . $accountplan->Currency;\n }\n $html .= '</td>';\n\n return $html;\n }", "title": "" }, { "docid": "817c44aaa17a018439ed403f4c19f908", "score": "0.5890144", "text": "public function get_currency_alphabetic_code() {\n\t\treturn 'EUR';\n\t}", "title": "" }, { "docid": "e0bdb24da6d54821db2e94d6d03c39fd", "score": "0.5888707", "text": "protected function _company_currency()\n\t{\n\t\t$beans_settings = $this->beans_settings();\n\n\t\tif( ! $beans_settings ) \n\t\t\treturn '$';\n\n\t\treturn $beans_settings->company_currency;\n\t}", "title": "" }, { "docid": "0a5c2d90bbaaf6248e65778cf846918f", "score": "0.58869976", "text": "public function getRate($currency);", "title": "" }, { "docid": "87796d3f292742ae7f94ecde2908a733", "score": "0.5886868", "text": "public function currency(Request $request)\n {\n $value = $request->input('value', null);\n $from = $request->input('from', null);\n $to = $request->input('to', null);\n $round = intval($request->input('round', 2));\n $currencies = config('currency.currencies');\n\n $listUrl = route('misc.currency', 'currency') . '?list';\n\n if ($request->exists('list')) {\n return Helper::text('Available currencies: ' . implode(', ', $currencies));\n }\n\n if (empty($value)) {\n return Helper::text('The \"value\" parameter has to be specified');\n }\n\n if (empty($from)) {\n return Helper::text('The \"from\" parameter has to be specified');\n }\n\n if (empty($to)) {\n return Helper::text('The \"to\" parameter has to be specified');\n }\n\n $value = floatval(str_replace(',', '', $value));\n $from = strtoupper(trim($from));\n $to = strtoupper(trim($to));\n\n if ((int) $value === 0) {\n $value = 1;\n }\n\n if (!in_array($from, $currencies)) {\n return Helper::text(sprintf('Invalid \"from\" currency specified (%s) - Available currencies can be found here: %s', $from, $listUrl));\n }\n\n if (!in_array($to, $currencies)) {\n return Helper::text(sprintf('Invalid \"to\" currency specified (%s) - Available currencies can be found here: %s', $to, $listUrl));\n }\n\n $apiUrl = sprintf('https://api.exchangerate.host/latest?base=%s&symbols=%s', $from, $to);\n try {\n $convert = Helper::get($apiUrl);\n }\n catch (Exception $ex) {\n Log::error('/misc/currency request error: ' . $ex->getMessage());\n return Helper::text('An error has occurred retrieving exchange rates');\n }\n\n if (empty($convert)) {\n return Helper::text('An error has occurred retrieving exchange rates');\n }\n\n if ($convert['success'] === false) {\n if (!empty($convert['error'])) {\n return Helper::text('An error occurred retrieving exchange rates: ' . $convert['error']['type']);\n }\n\n return Helper::text('An error has occurred retrieving exchange rates.');\n }\n\n $calculate = round($value * $convert['rates'][$to], $round);\n return Helper::text(sprintf('%s %s = %s %s', $value, $from, $calculate, $to));\n }", "title": "" }, { "docid": "a105b39469d7f4defc85a200307b071c", "score": "0.5885935", "text": "public function getCurrency()\n {\n return null;\n }", "title": "" }, { "docid": "957e6dbaf1394b569b67f8108f277019", "score": "0.5885443", "text": "function prepareCurrency($val=0,$decPlaces = 2){\n\t$val = floatval(preg_replace(\"[^-0-9\\.]\",\"\",$val));\n\t$val = number_format($val,$decPlaces,'.',',');\n\t$display = ($this->cSymbolPosition == 'pre' ? $this->currencySymbol : '') . $val . ($this->cSymbolPosition == 'post' ? $this->currencySymbol : '');\n\treturn $display;\n}", "title": "" }, { "docid": "147326d849cb051356e8137403ff5133", "score": "0.587217", "text": "public abstract function getCurrencySymbol(): string;", "title": "" }, { "docid": "9a492c41c6b89f39c0e25d6d9f54b34d", "score": "0.5854088", "text": "public function dataForCurrencyConvertingFromBaseCurrency(): array\n {\n return [\n ['1200.11', 'BASE', '1200.11'],\n ['1200.11', 'FIRST', '1379.77'],\n ['1200.11', 'SECOND', '155451'],\n ];\n }", "title": "" }, { "docid": "cb7fdd49a1ccb89466f85955a6a88e80", "score": "0.5850671", "text": "private function getDefaultCurrency()\n {\n \treturn $this->db->get_where($this->c_table, array( \"default\" => 1 ))->row_array();\n }", "title": "" }, { "docid": "a002ee1465b46a765852e400b1ed62b9", "score": "0.58400476", "text": "public function getCurrencyConversion()\n {\n return $this->currency_conversion;\n }", "title": "" }, { "docid": "7a6c357ddc426e0cd835e84b83c32412", "score": "0.5832091", "text": "function wpsc_format_currency( $amt, $args = '' ) {\n\t$defaults = array(\n\t\t'display_currency_symbol' => true,\n\t\t'display_decimal_point' => true,\n\t\t'display_currency_code' => false,\n\t\t'isocode' => false,\n\t\t'currency_code' => false,\n\t);\n\n\t$args = wp_parse_args( $args );\n\n\t// Either display symbol or code, not both\n\tif ( array_key_exists( 'display_currency_symbol', $args ) ) {\n\t\t$args['display_currency_code'] = ! $args['display_currency_symbol'];\n\t} elseif ( array_key_exists( 'display_currency_code', $args ) ) {\n\t\t$args['display_currency_symbol'] = ! $args['display_currency_code'];\n\t}\n\n\t$r = wp_parse_args( $args, $defaults );\n\textract( $r );\n\n\t$currencies_without_fractions = array( 'JPY', 'HUF', 'VND' );\n\n\tif ( $isocode ) {\n\t\t$currency = new WPSC_Country( $isocode );\n\t} else {\n\t\t$currency = new WPSC_Country( get_option( 'currency_type' ) );\n\t}\n\n\t$currency_code = $currency->get_currency_code();\n\n\t// No decimal point, no decimals\n\tif ( ! $display_decimal_point || in_array( $currency_code, $currencies_without_fractions ) ) {\n\t\t$decimals = 0;\n\t} else {\n\t\t$decimals = 2; // default is 2\n\t}\n\n\t$decimals = apply_filters( 'wpsc_modify_decimals' , $decimals, $isocode );\n\t$decimal_separator = apply_filters( 'wpsc_format_currency_decimal_separator' , wpsc_get_option( 'decimal_separator' ), $isocode );\n\t$thousands_separator = apply_filters( 'wpsc_format_currency_thousands_separator', wpsc_get_option( 'thousands_separator' ), $isocode );\n\n\t// Format the price for output\n\t$formatted = number_format( $amt, $decimals, $decimal_separator, $thousands_separator );\n\n\tif ( ! $display_currency_code ) {\n\t\t$currency_code = '';\n\t}\n\n\t$symbol = $display_currency_symbol ? $currency->get_currency_symbol() : '';\n\t$symbol = esc_html( $symbol );\n\t$symbol = apply_filters( 'wpsc_format_currency_currency_symbol', $symbol, $isocode );\n\n\t$currency_sign_location = get_option( 'currency_sign_location' );\n\n\t// Rejig the currency sign location\n\tswitch ( $currency_sign_location ) {\n\t\tcase 1:\n\t\t\t$format_string = '%3$s%1$s%2$s';\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t$format_string = '%3$s %1$s%2$s';\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\t$format_string = '%1$s%2$s %3$s';\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\tdefault:\n\t\t\t$format_string = '%1$s %2$s%3$s';\n\t\t\tbreak;\n\t}\n\t$currency_code = apply_filters( 'wpsc_format_currency_currency_code', $currency_code, $isocode );\n\n\t// Compile the output\n\t$output = trim( sprintf( $format_string, $currency_code, $symbol, $formatted ) );\n\treturn $output;\n}", "title": "" }, { "docid": "cafdac9f4ee75450b41da8e0c3b409cd", "score": "0.5831157", "text": "protected function getDefaultCurrencyOfMinimalPrice(): string\n {\n return 'RUB';\n }", "title": "" }, { "docid": "320e91ef8702a65f1e9deb192ac7ef9b", "score": "0.5829094", "text": "function getdata($value)\n{\n\tglobal $db;\n\t$sql_cat=\"SELECT * FROM `as_currency_converter` WHERE `currency`='$value'\";\n\t$res_cat=$db->select_data($sql_cat);\n\treturn $res_cat[0]['rate'];\n}", "title": "" }, { "docid": "0bc8c21d669da0757aaf85fa74c651df", "score": "0.5827309", "text": "function format_currency($value, $symbol=true)\n{\n\t//return numfmt_format_currency($fmt, round($value,2), config_item('currency_iso'));\t\n\t$fmt = numfmt_create( 'vi', 2 );\n return numfmt_format_currency($fmt, round($value,2), 'VND');\n}", "title": "" }, { "docid": "41bac837db43879852641280dec3d90d", "score": "0.5826861", "text": "public function getCurrencyCode()\n {\n return $this->params['currency_code'];\n }", "title": "" }, { "docid": "9c80dc0ba15feb5d437c095d1a8c2ba1", "score": "0.5824833", "text": "function create_conversion_1() {\n $post_data = $this->input->post();\n $currency1 = strtoupper($post_data['source']);\n $currency2 = strtoupper($post_data['target']);\n $amount = $post_data['sourceAmount'];\n $auth = $this->get_auth_1();\n $url = \"https://devapi.currencycloud.com/v2/conversions/create\";\n $curl = curl_init();\n\n $headers = array(\n \"X-Auth-Token: $auth\",\n 'Content-Type: application/json'\n );\n $data = array(\n 'sell_currency' => \"$currency1\",\n 'buy_currency' => \"$currency2\",\n 'fixed_side' => \"sell\",\n 'amount' => $amount,\n 'term_agreement' => true\n );\n $data_string = json_encode($data);\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);\n\n $output = curl_exec($curl);\n\n curl_close($curl);\n// echo '<pre>';\n// print_r($output);\n// echo '</pre>';die;\n return $output;\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "1b798e12cc75bdb6f29ed2aaac119be1", "score": "0.0", "text": "public function destroy($id)\n {\n $user = User::whereId($id)->first();\n $user->delete();\n return redirect()->back()->with('success', 'user deleted');\n }", "title": "" } ]
[ { "docid": "b3402eab0e6e7fcae87ea6d302ba7755", "score": "0.6850561", "text": "public function DELETE() {\r\n // delete the cached resource, if it exists\r\n if ($this->HEAD($this->getURI())) {\r\n // load the resource, then delete it\r\n $this->bind($this->getStorage()->delete($this->getURI()));\r\n // mark changed\r\n $this->changed();\r\n }\r\n // return\r\n return $this->resource;\r\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "927318d3938d4582d26e3e1b37ebd064", "score": "0.64233065", "text": "public function delete($storagePath);", "title": "" }, { "docid": "0fde60a4a832f83bd9545fcf3a9f0ab4", "score": "0.63617754", "text": "abstract protected function destroyResource();", "title": "" }, { "docid": "faba92f0be7607f0097b4e53a426fedc", "score": "0.6179998", "text": "public function removeStorage($id) {\n\t\t$allStorages = $this->readConfig();\n\n\t\tif (!isset($allStorages[$id])) {\n\t\t\tthrow new NotFoundException('Storage with id \"' . $id . '\" not found');\n\t\t}\n\n\t\t$deletedStorage = $allStorages[$id];\n\t\tunset($allStorages[$id]);\n\n\t\t$this->writeConfig($allStorages);\n\n\t\t$this->triggerHooks($deletedStorage, Filesystem::signal_delete_mount);\n\n\t\t// delete oc_storages entries and oc_filecache\n\t\ttry {\n\t\t\t$rustyStorageId = $this->getRustyStorageIdFromConfig($deletedStorage);\n\t\t\t\\OC\\Files\\Cache\\Storage::remove($rustyStorageId);\n\t\t} catch (\\Exception $e) {\n\t\t\t// can happen either for invalid configs where the storage could not\n\t\t\t// be instantiated or whenever $user vars where used, in which case\n\t\t\t// the storage id could not be computed\n\t\t\t\\OCP\\Util::writeLog(\n\t\t\t\t'files_external_moe',\n\t\t\t\t'Exception: \"' . $e->getMessage() . '\"',\n\t\t\t\t\\OCP\\Util::ERROR\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "6a08f90e572a14a3c01e60869b338dc1", "score": "0.6066186", "text": "public function destroy(Resource $resource)\n {\n //\n $this->authorize('delete', $resource);\n \n //\n $resource->delete();\n \n if(request()->wantsJson()) {\n return response([], 204);\n }\n \n return redirect('/resources');\n }", "title": "" }, { "docid": "15547d48f16617b6e604a8cc0f0c7ff3", "score": "0.6064962", "text": "public function deleteresource() {\n $objectType = $this->uri->segment(4);\n $objectId = $this->uri->segment(5);\n $fieldName = $this->uri->segment(6);\n $fileId = $this->uri->segment(7);\n CmsService::instance()->unsetFileFromObject($objectType, $objectId, $fieldName, $fileId);\n redirect(getEditActionForType($objectType, $objectId));\n }", "title": "" }, { "docid": "9162d9ba896538427a8e1773f7d8e162", "score": "0.60375607", "text": "public function destroy(Resource $resource)\n { \n $resource->delete();\n return redirect()->route('admin.resources.index')\n ->with('success', \"Ресурс удален!\");\n }", "title": "" }, { "docid": "3ff3eb4c888091d51777732571bf9ca6", "score": "0.60349095", "text": "public function delete()\n\t{\n\t\t$this->data = null;\n\n\t\t$this->app['files']->delete($this->path);\n\t}", "title": "" }, { "docid": "1a074782e571df2a192ef1524212c70b", "score": "0.598511", "text": "public function destroy($id)\n {\n $file = Image::whereId($id)->first();\n // dd($file->path);\n if($file) {\n Storage::delete('public/' . $file->path);\n $file->delete();\n }\n }", "title": "" }, { "docid": "0970be01760e0e449ee46eafae6afae6", "score": "0.5966808", "text": "function removeStorage (Storage $storage) {\n\t\t$storages = new ArrayObject(array(), ArrayObject::STD_PROP_LIST);\n\t\tforeach($this->storages as $st) {\n\t\t\tif ($st !== $storage) {\n\t\t\t\t$storages[] = $st;\n\t\t\t}\n\t\t}\n\t\t$this->storages = $storages;\n\t}", "title": "" }, { "docid": "f3905bdbcab5c96ef9e916065a987c60", "score": "0.59465545", "text": "public function remove() {\n\t\t$this->removeImage();\n\t\t$this->delete();\n\t}", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "0698cf26bce52e43c195f1fad0967e6d", "score": "0.5913288", "text": "public function delete() {\n $this->fs->delete($this);\n }", "title": "" }, { "docid": "4fb02ae20521d64ccdc1eac1271f8260", "score": "0.590333", "text": "public function delete()\n {\n \\File::delete([\n storage_path() . '/' . $this->path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "1a2c14d0b44aa237e13ac45586b67eba", "score": "0.59004754", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $resources = $this->resourceRepository->findSimilarResources($resource);\n if (count($resources) > 1) {\n $message = sprintf('Did not unpublish resource %s with SHA1 hash %s because it is used by other Resource objects.', $resource->getFilename(), $resource->getSha1());\n $this->messageCollector->append($message, Error::SEVERITY_NOTICE);\n return;\n }\n $this->unpublishFile($this->getRelativePublicationPathAndFilename($resource));\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "0d73bf0782eda25b96970857b212cfff", "score": "0.5886981", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void;", "title": "" }, { "docid": "79ce20b0e69714bb06975a21a79e987f", "score": "0.5854394", "text": "public function destroy(int $id)\n {\n $copy = $this->findById($id);\n\n app('db')->transaction(function () use ($copy) {\n $this->repository->destroy($copy->id);\n\n // Physically remove file from storage\n if (file_exists($copy->getFullLocalPath()) && unlink($copy->getFullLocalPath()) === false) {\n throw new FailedToRemoveFromStorageException('Failed to remove the file from storage');\n }\n });\n\n return $copy;\n }", "title": "" }, { "docid": "2ef703b87d6f9b65ea849ba60a25d1f1", "score": "0.5847894", "text": "public function deleteResource($path) {\n\t\t$url = $this->restUrl . '/resource' . $path;\n\t\t$result = $this->prepAndSend($url, array(200), 'DELETE');\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f89b6fc617f359aa945932d418c3c622", "score": "0.58316517", "text": "public function destroy(ResourceFile $resourceFile)\n {\n //\n }", "title": "" }, { "docid": "28bcd6f8e6860de51cbfe673db10e4a5", "score": "0.58216614", "text": "public function addResourceToDelete(ResourceReference $resource)\r\n {\r\n $this->resourcesToDelete[] = $resource;\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "d1335db4dedf75baf1e49487a53c90ce", "score": "0.5774422", "text": "public function remove(string $path);", "title": "" }, { "docid": "2536f3c707dfeb6706a820453b721bc6", "score": "0.57129586", "text": "public function destroy($id)\n {\n $serie=Serie::find($id);\n //delete related file from storage\n $serie->delete();\n return redirect()->route('series.index');\n }", "title": "" }, { "docid": "594986c2072c40bbbef41829c66f5e39", "score": "0.56989014", "text": "public function destroy($id)\n {\n $item = slider::findOrFail($id);\n unlink('storage/' . $item->picture);\n $item->delete();\n\n return redirect()->route('slider');\n }", "title": "" }, { "docid": "74e6c0a4ecd0e1ac5045775357fa48b9", "score": "0.5696829", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n $resource->delete();\n return redirect(back());//cambiar\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "40574d2596130d06f5fe2ee4ceccb66b", "score": "0.5674429", "text": "public function removeObject(StoredInterface $object);", "title": "" }, { "docid": "b2d81a752b54a0616aa754491d87cfb0", "score": "0.5658517", "text": "public function destroy($id)\n {\n $data = Article::find($id);\n \n $fileName = $data->image;\n Storage::delete($fileName);\n $data->delete();\n return redirect()->route('article.index');\n }", "title": "" }, { "docid": "b00ceccc5abdc295d4f38a54fc3ef687", "score": "0.5655932", "text": "public function destroy(Request $request)\n {\n $request->validate([\n 'path' => 'required|string'\n ]);\n\n if (Storage::exists($request->path)) {\n Storage::delete($request->path);\n }\n }", "title": "" }, { "docid": "5a70b194bf3f4758be24fd2d2e8969b5", "score": "0.56523496", "text": "public function destroy($id)\n {\n $upload = Upload::findOrFail($id);\n Storage::delete($upload->location);\n $upload->delete();\n }", "title": "" }, { "docid": "f836dfbf25c901118ec1aef1ddf8d708", "score": "0.56470925", "text": "public function destroy($id)\n\t{\n\t\t$res = Resource::find($id);\n\t\t$res->delete();\n\n\t\tSession::flash('success', '删除资源成功');\n\t\treturn redirect()->route('admin.resource.index');\n\t}", "title": "" }, { "docid": "786a12a689855596655493143a37b27e", "score": "0.5645049", "text": "public function unlink(string $path)\n {\n return Storage::delete($path);\n }", "title": "" }, { "docid": "475d22992dbf16ddbbde7e840f8642e6", "score": "0.56246966", "text": "public function remove() { }", "title": "" }, { "docid": "645b206cb0ef45a3942664a6e15fcf5b", "score": "0.56037223", "text": "public function delete($resource, array $conditions);", "title": "" }, { "docid": "c94904da66f47b4ed4ee2a440f4f4028", "score": "0.55946094", "text": "public function remove_bookable_resource() {\n\t\tcheck_ajax_referer( 'delete-bookable-resource', 'security' );\n\n\t\t$post_id = absint( $_POST['post_id'] );\n\t\t$resource_id = absint( $_POST['resource_id'] );\n\t\t$product = get_wc_product_booking( $post_id );\n\t\t$resource_ids = $product->get_resource_ids();\n\t\t$resource_ids = array_diff( $resource_ids, array( $resource_id ) );\n\t\t$product->set_resource_ids( $resource_ids );\n\t\t$product->save();\n\t\tdie();\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "9065fbf2778793732e085d8f00072e64", "score": "0.5579296", "text": "public function destroy($id)\n {\n $file=students_file::find($id);\n unlink(public_path($file->file_path.\"/\".$file->file_name));\n students_file::destroy($id);\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "6dbd2a82e80175a2ecec0fb020266770", "score": "0.5577625", "text": "public function destroy($id)\n {\n //\n $filename = File::where('id',$id)->pluck('name')->toArray(); \n $image_path = 'uploads/'.$filename[0];\n unlink($image_path); \n $file = File::destroy($id);\n return Response::json($file);\n }", "title": "" }, { "docid": "1d0074fade303d75155eb2ad3252af0f", "score": "0.55738467", "text": "public function _unlink($resource, $exp_time = null)\n {\n if (isset($exp_time)) {\n if (time() - @filemtime($resource) >= $exp_time) {\n return @unlink($resource);\n }\n } else {\n return @unlink($resource);\n }\n }", "title": "" }, { "docid": "aea09d85d9c53e815b918c3f257179a1", "score": "0.5571349", "text": "function remove_object($location_id, $filename) {\n $location = $this->get_location($location_id);\n\n if ($s3 = $this->s3_bucket_factory($location)) {\n $target = $this->s3_compute_bucket_name_and_uri($location, $filename);\n return $s3->deleteObject($target['bucket_name'], $target['uri']);\n }\n\n }", "title": "" }, { "docid": "3f0c158bd398730260750b138d392138", "score": "0.5568787", "text": "public function destroy($id)\n\t{\n\n $image = Image::find($id);\n $image->delete();\n\n\t}", "title": "" }, { "docid": "60b0d79f549613bd513e106a06d9bcf1", "score": "0.555708", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name==='file') {\n $this->resources['file'] = array('class'=>'Dwoo_Template_File', 'compiler'=>null);\n }\n }", "title": "" }, { "docid": "d607312000ff1629a7d194da09363f78", "score": "0.55405146", "text": "public function __invoke(Asset $asset): void\n {\n $this->authorize('delete', $asset);\n\n $asset->unlink();\n\n abort(Response::HTTP_NO_CONTENT);\n }", "title": "" }, { "docid": "71db8be3bb0bf671c5cd2c4be28e45ae", "score": "0.55401355", "text": "public function delete($resource, array $options = [])\n {\n return $this->api('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "a1412b0535ee0309739c031f67bf249e", "score": "0.55388325", "text": "public function unlink() {\r\n\t\t\r\n\t\tif(!empty($this->path)) unlink($this->path);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6a9b08fae5306520b3efd6f2532b1bca", "score": "0.553763", "text": "public function destroy($id)\n {\n $find = Product::find($id);\n $photo = $find->product_image;\n\n if($photo){\n unlink($photo);\n $delete = Product::where('id',$id)->delete();\n }else{\n $delete = Product::where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "306e91148ba7988dd22824148b9d4401", "score": "0.55344576", "text": "public function destroy($id)\n {\n $previousImage = Article::find($id)->image;\n Storage::delete('images/'.$previousImage);\n unlink(public_path('storage/images/'.$previousImage));\n\n $article=Article::where('article2_id',$id)->delete();\n if($article){\n return Redirect::to('/');\n }\n\n\n }", "title": "" }, { "docid": "103f82f6cdde92b309955b018f86aa59", "score": "0.5534417", "text": "public function delete($resource, array $headers = array())\n {\n return $this->sendRequest($resource, 'DELETE', array(), $headers);\n }", "title": "" }, { "docid": "0e38bf52f188fa4c9103fccdd3cd72a7", "score": "0.5527166", "text": "public function delete($resource, $resourceId = null)\n {\n $resourcePath = \"/$resource\";\n\n $resourceIdPath = (isset($resourceId)) ? \"/$resourceId\" : \"\";\n\n $relationshipsPath = \"\";\n if (isset($resource['relationship'])) {\n $relationshipsPath = \"/relationships/{$resource['relationship']}\";\n }\n\n $uri = \"{$resourcePath}{$resourceIdPath}{$relationshipsPath}\";\n $res = $this->request(\"DELETE\", $uri);\n return $res->getBody();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "a50d19c729bcd0ecae4f0c64627ba229", "score": "0.552693", "text": "public function delete() {\n $filename = self::getFilename($this->key);\n \n \tif (is_file($filename)) {\n \t\tunlink($filename);\n \t}\n \tunset(self::$members[$this->key]);\n }", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "1ae9665ebaf1561d52881b50b774ab80", "score": "0.55193347", "text": "private function eliminarArchivoLocal($ruta){\n \\Storage::delete($ruta);\n }", "title": "" }, { "docid": "c67d90f9a81cb44bc5cd1369d206c5db", "score": "0.55190516", "text": "public function delete()\n {\n parent::delete();\n\n if (Arr::get($this->diskOptions, 'cleanup') && $pointer = $this->resolvePointer()) {\n $this->resolveDisk()->delete($pointer);\n }\n }", "title": "" }, { "docid": "d47025184711b99fdfa1771fa94c618f", "score": "0.55053926", "text": "public function destroy($id)\n {\n // dd($id);\n $del = File::find($id);\n Storage::delete($del->path);\n $del->delete();\n\n return redirect('/file')->with('success', 'Foto Berhasil Dihapus');\n }", "title": "" }, { "docid": "dd9001e86e2eb451896dd8ecbc002381", "score": "0.5503835", "text": "public function destroy($id)\n {\n $slider = Slider::where('id',$id)->first()->delete();\n unlink(public_path('back/images/slider/'.$slider->image));\n return redirect()->back()->with('success','Slider has been deleted successfully.');\n }", "title": "" }, { "docid": "0cb0536ff08f2e6e88e57744bc820000", "score": "0.55017096", "text": "public function removeUpload()\n {\n if($file = $this->getAbsolutePath())\n {\n unlink($file);\n }\n }", "title": "" }, { "docid": "b655cddc3659b7f9fcba7a39d960e97e", "score": "0.5498977", "text": "public function destroy( $id ) {\n\t\t$file = $this->getFile( $id );\n\t\tif ( $file->exists() ) {\n\t\t\t$file->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "5a6876b5136ed6a1bc2b6449e6e1d452", "score": "0.54987067", "text": "public function free()\r\n {\r\n if ($this->check()) {\r\n if ($this->enabled) {\r\n $this->remove();\r\n }\r\n\r\n event_free($this->resource);\r\n $this->resource = null;\r\n }\r\n }", "title": "" }, { "docid": "41a09fcd3175ce9019613caec36a1001", "score": "0.54935354", "text": "public function deleteAction(Request $request, Resource $resource)\n {\n $form = $this->createDeleteForm($resource);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($resource);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'danger', 'resource.delete.flash' );\n }\n\n return $this->redirect($request->headers->get('referer'));\n }", "title": "" }, { "docid": "6ca167089eb695c6ef41cc95554f73ea", "score": "0.54930675", "text": "function deleteResource()\n {\n ///////////////////\n include_once(\"../Config/database.php\");\n $db = new DATABASE_CONFIG();\n $db_object = (object) $db;\n $db_array = $db_object->{'default'};\n $response['db_info'] = $db_array['host'];\n $mysqli = new mysqli($db_array['host'], $db_array['login'], $db_array['password'], $db_array['database']);\n\n if ($mysqli->connect_error) {\n die('Connect Error (' . $mysqli->connect_errno . ') '\n . $mysqli->connect_error);\n }\n //Delete the resource with the id\n $sql = $mysqli->prepare(\"DELETE FROM collections\n WHERE collections.id = ?\");\n $sql->bind_param(\"s\", $_POST['id']);\n $sql->execute();\n $result = $sql->get_result();\n // $result = $mysqli->query($sql);\n //while($row = mysqli_fetch_assoc($result))\n //$collections[] = $row;\n $results['id'] = $_POST['id'];\n $results['sql'] = $sql;\n $results['result'] = $result;\n $this->json(200, $results);\n }", "title": "" }, { "docid": "4c0f515601b2c4f626f4641a8eba9243", "score": "0.5490852", "text": "public function destroy($id)\n {\n $gallery = Gallery::findOrFail($id);\n\n\n $path = storage_path('app\\images\\\\'.$gallery->nom_image);\n\n // dd($path);\n\n $real_path = Storage::delete($path);\n\n // dd($real_path);\n\n $gallery->delete();\n\n return redirect()->back()->with(['message'=>'image supprimée', 'class'=>'alert-danger']);\n }", "title": "" }, { "docid": "64230229b26e85085a8e553e0f231391", "score": "0.5488363", "text": "public function remove($key)\n {\n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "d42b7a0376cce8423fa6db882ff0f69d", "score": "0.5483016", "text": "public function remove(string $id);", "title": "" } ]
edbecff067d25ba84b360795c5a58166
Returns all the settings fields
[ { "docid": "bac6476a3c4604a3caa129a3659b9f83", "score": "0.0", "text": "function get_settings_fields() {\n $settings_fields = array(\n 'genaral_options' => array(\n array(\n 'name' => 'layout',\n 'label' => __( 'Gallery Layout', 'ewpg-creo' ),\n \n 'type' => 'select',\n 'default' => 'vertical',\n 'options' => array(\n 'vertical' => 'Vertical Left',\n 'vertical_r' => 'Vertical Right',\n 'horizontal' => 'Horizontal'\n )\n ),\n array(\n 'name' => 'thum2show',\n 'label' => __( 'Thumbnails To Show', 'ewpg-creo' ),\n 'type' => 'number',\n 'desc' => __('Number of thumbails to show in gallery','ewpg-creo'),\n 'default' => '4',\n 'sanitize_callback' => 'sanitize_text_field'\n ),\n\n array(\n 'name' => 'thumscrollby',\n 'label' => __( 'Thumbnails Scroll By', 'ewpg-creo' ),\n 'desc' => __('Number of thumbails for scrolling when arrows are clicked','ewpg-creo'),\n 'type' => 'number',\n 'default' => '3',\n 'sanitize_callback' => 'sanitize_text_field'\n ),\n\n \n array(\n 'name' => 'lightbox',\n 'label' => __( 'LightBox For Thumbnails', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n \n array(\n 'name' => 'infinite',\n 'label' => __( 'Infinite', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'dragging',\n 'label' => __( 'Mouse Dragging', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'rtl',\n 'label' => __( 'RTL Mode', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n \n array(\n 'name' => 'autoplay',\n 'label' => __( 'Autoplay', 'ewpg-creo' ),\n 'desc' => __('Autoplay will not work if lightbox for thumbnail is enabled','ewpg-creo'),\n 'type' => 'checkbox',\n \n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n \n array(\n 'name' => 'autoplaySpeed',\n 'label' => __( 'AutoPlay Timeout', 'ewpg-creo' ),\n 'desc' => __( '1000 = 1 Sec', 'ewpg-creo' ),\n 'type' => 'text',\n 'default' => '4000',\n \n ),\n \n array(\n 'name' => 'nav_icon_color',\n 'label' => __( 'Navigation Icon Color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#fff'\n ),\n array(\n 'name' => 'nav_bg_color',\n 'label' => __( 'Navigation Background Color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#000000'\n ),\n ),\n \n 'single_options' => array(\n\n \n array(\n 'name' => 'hide_nav',\n 'label' => __( 'Navigation Arrow', 'ewpg-creo' ),\n 'desc' => __( 'Navigation Arrow Always Visiable', 'ewpg-creo' ),\n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'fade',\n 'label' => __( 'Fade Effect', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'swipe',\n 'label' => __( 'Swipe To Slide', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'true',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'dots',\n 'label' => __( 'Dots', 'ewpg-creo' ),\n 'desc' => __( 'Note: This option will not work if \"LightBox For Gallery\" Trun on under the \"General options\" Tab', 'ewpg-creo' ),\n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'resize_height',\n 'label' => __( 'Resize Height', 'ewpg-creo' ),\n 'desc' => __( 'If you Gallery has multiple Image size, you need to Enable it for avoid White space Under the gallery', 'ewpg-creo' ),\n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'hide_gallery',\n 'label' => __( 'Hide Thumbnails', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n\n\n array(\n 'name' => 'zoom_start',\n 'label' => __( 'Woocommerce Zoom', 'ewpg-creo' ),\n 'desc' => __( 'Turn on Woocommerce Default Zoom for Single Products', 'ewpg-creo' ),\n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n \n \n \n \n \n ),\n 'lightbox_options' => array(\n array(\n 'name' => 'disable_lightbox',\n 'label' => __( 'Disable Lightbox', 'ewpg-creo' ),\n 'desc' => 'Enable it for Disable Lightbox.<br/> Note: below options are not working if this option is Enable.',\n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'arrowsColor',\n 'label' => __( 'Lightbox Navigation Arrows Color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#fff'\n ),\n array(\n 'name' => 'bgcolor',\n 'label' => __( 'Lightbox Image Border Color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#fff'\n ),\n array(\n 'name' => 'lightbox_framewidth',\n 'label' => __( 'Image Frame Width', 'ewpg-creo' ),\n 'desc' => __( 'Option to display lightbox image in your screen<br>By default: 900(in Pixel)', 'ewpg-creo' ),\n 'type' => 'number',\n 'default' => '900',\n \n ),\n array(\n 'name' => 'borderwidth',\n 'label' => __( 'Image Border Width', 'ewpg-creo' ),\n 'desc' =>__('In Pixel','ewpg-creo'),\n 'type' => 'number',\n 'default' => '3',\n 'sanitize_callback' => 'sanitize_text_field'\n ),\n array(\n 'name' => 'spinColor',\n 'label' => __( 'Preloader color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#fff'\n ),\n array(\n 'name' => 'spinner1',\n 'label' => __( 'Preloader', 'ewpg-creo' ),\n \n 'type' => 'select',\n 'default' => 'cube-grid',\n 'options' => array(\n 'rotating-plane' => 'Rotating Plane',\n 'double-bounce' => 'Double Bounce',\n 'wave' => 'Wave',\n 'cube-grid' => 'Cube Grid',\n 'three-bounce' => 'Three Bounce',\n )\n ),\n\n \n\n array(\n 'name' => 'lightbox_infinite',\n 'label' => __( 'Infinite', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'false',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n \n array(\n 'name' => 'numeratio',\n 'label' => __( 'Show Navigation number', 'ewpg-creo' ),\n \n 'type' => 'checkbox',\n 'default' => 'true',\n 'options' => array(\n 'true' => 'Yes',\n 'false' => 'No'\n )\n ),\n array(\n 'name' => 'titlePosition',\n 'label' => __( 'Title Position', 'ewpg-creo' ),\n \n 'type' => 'select',\n 'default' => 'bottom',\n 'options' => array(\n 'top' => 'Top',\n 'bottom' => 'Bottom'\n )\n ),\n array(\n 'name' => 'titleBackground',\n 'label' => __( 'Title background color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#000000'\n ),\n array(\n 'name' => 'titleColor',\n 'label' => __( 'Title Text Color', 'ewpg-creo' ),\n \n 'type' => 'color',\n 'default' => '#fff'\n ),\n \n ),\n \n \n 'wedevs_advanced' => array(\n \n array(\n 'name' => 'support',\n 'desc' => __( '\n \n \n <p class=\"about-description\">Every month, we try to release a new update for this Plugin with bugs fixed.<br>\n If you found any problems in this Plugin please let us know. we will try to fix it ASAP.<br></p><br>\n\n\n \n \n <a target=\"_blank\" href=\"#\"><span class=\"dashicons dashicons-sos\" style=\"\n text-decoration: none;\n font-size: 19px;\n \"></span> Plugin Support</a>\n </span></strong>\n ', 'ewpg-creo' ),\n 'type' => 'html'\n ),\n \n )\n );\n\n return $settings_fields;\n \n \n }", "title": "" } ]
[ { "docid": "e5e041c62fc0d509da8e4b0bda75d2ed", "score": "0.9024309", "text": "public function get_settings_fields();", "title": "" }, { "docid": "5372989f835698edf6d6d5ecacb606f8", "score": "0.8075094", "text": "public function feed_settings_fields() {\n\n\t\t\t// Maybe initialize settings.\n\t\t\tif ( method_exists( $this, 'init_settings' ) ) {\n\t\t\t\t$this->init_settings();\n\t\t\t}\n\n//\t\t\t// Manager\n//\t\t\t$settings_mgr = new \\WPS\\Plugins\\GravityForms\\AddOn\\Settings( $this );\n//\n//\t\t\t// Settings.\n//\t\t\t$settings = Settings::get_instance( $this );\n\n\t\t\t// Settings.\n\t\t\t$settings = Settings::get_instance( $this );\n\n\t\t\t$fields = $settings->get_feed_settings_fields();\n\n\t\t\t/**\n\t\t\t * Filter the setting fields that appears on the feed page.\n\t\t\t *\n\t\t\t * @since 3.0.beta1.1\n\t\t\t *\n\t\t\t * @param array $fields An array of setting fields.\n\t\t\t * @param array $form Form object to which the current feed belongs.\n\t\t\t *\n\t\t\t * @see https://gist.github.com/spivurno/15592a66497096338864\n\t\t\t */\n\t\t\t$fields = apply_filters( 'gform_cpt_feed_settings_fields', $fields, $this->get_current_form() );\n\n\t\t\t// sections cannot be an associative array\n\t\t\treturn array_values( $fields );\n\n\t\t}", "title": "" }, { "docid": "336059141005e5f073a06dd1d44ad066", "score": "0.76022375", "text": "public function get_fields() {\n\n\t\t/**\n\t\t * Filter page/api config fields/options.\n\t\t *\n\t\t * @since 0.1\n\t\t * @var array\n\t\t */\n\t\treturn apply_filters( 'content_views_civicrm_remote_settings_options', [\n\t\t\t'server' => __( 'Server url', 'content-views-civicrm' ),\n\t\t\t'path' => __( 'Path (REST url)', 'content-views-civicrm' ),\n\t\t\t'key' => __( 'Site key', 'content-views-civicrm' ),\n\t\t\t'api_key' => __( 'API key', 'content-views-civicrm' )\n\t\t] );\n\n\t}", "title": "" }, { "docid": "bc96212906aa5ce074dc8a2cb760dc99", "score": "0.75607127", "text": "public function plugin_settings_fields()\n {\n return array(\n array(\n \"title\" => \"Pre-Populate Settings\",\n \"fields\" => array(\n array(\n \"name\" => \"parameters\",\n \"tooltip\" => \"Example: utm_source,utm_campaign,utm_medium\",\n \"label\" => \"Query Parameters\",\n \"type\" => \"text\",\n \"class\" => \"large\",\n ),\n array(\n \"name\" => \"cookieExpiration\",\n \"tooltip\" => \"Cookie Expiration in days. Set to 0 for session duration. You can use decimals for parts of a day (0.5 = 12 hours).\",\n \"label\" => \"Cookie Expiration\",\n \"type\" => \"text\",\n \"class\" => \"large\",\n )\n )\n ),\n );\n }", "title": "" }, { "docid": "2d08d3c3e8e51a988755434d1897beb2", "score": "0.7517265", "text": "public static function get_all() {\n\t\treturn self::$_fields;\n\t}", "title": "" }, { "docid": "8616990857dda7b2852615a086282ea6", "score": "0.74316883", "text": "public function getAllSettings(){\n return $this->_settings;\n }", "title": "" }, { "docid": "6bd25c1d41955288ecd213c7750615f7", "score": "0.73830944", "text": "public function get_settings_fields() {\n\n $settings_fields = array(\n $this->config['prefix'] . '_options' => array(\n array(\n 'name' => $this->config['prefix'] . '_license_key',\n 'label' => __( 'License Key', 'whmcs-licensing-example' ),\n 'desc' => __( 'Enter the license key that you were provided after purchase.', 'whmcs-licensing-example' ),\n 'type' => 'text'\n )\n )\n );\n\n return $settings_fields;\n\n }", "title": "" }, { "docid": "173fb7dd64c49c084b31a935f9fa65a9", "score": "0.7276479", "text": "public function getAll() {\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "612386552b3e6ccd82d0802cc1d8b2fb", "score": "0.7256525", "text": "public function plugin_settings_fields() {\n\t\t\t\t\t\t\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'description' => $this->plugin_settings_description(),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'account_url',\n\t\t\t\t\t\t'label' => esc_html__( 'Account URL', 'gravityformsbatchbook' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'small',\n\t\t\t\t\t\t'after_input' => '.batchbook.com',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'validate_account_url' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'api_token',\n\t\t\t\t\t\t'label' => esc_html__( 'API Token', 'gravityformsbatchbook' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'save',\n\t\t\t\t\t\t'messages' => array(\n\t\t\t\t\t\t\t'success' => esc_html__( 'Batchbook settings have been updated.', 'gravityformsbatchbook' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "73567ee52bba2ca284b86b97c877d47f", "score": "0.71582", "text": "public function plugin_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Campaign Monitor Account Information', 'gravityformscampaignmonitor' ),\n\t\t\t\t'description' => sprintf(\n\t\t\t\t\t'<p>%s</p>',\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\tesc_html__( 'Campaign Monitor is an email marketing software for designers and their clients. Use Gravity Forms to collect customer information and automatically add it to your client\\'s Campaign Monitor subscription list. If you don\\'t have a Campaign Monitor account, you can %1$ssign up for one here.%2$s', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'<a href=\"http://www.campaignmonitor.com\" target=\"_blank\">',\n\t\t\t\t\t\t'</a>'\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'apiKey',\n\t\t\t\t\t\t'label' => esc_html__( 'API Key', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'description' => esc_html__( \"To locate your API key, in your Campaign Monitor account, click on your profile image and then select 'Account settings'. On the Account settings page click 'API keys' and then click 'Show API key'. If you haven't generated one yet, click 'Generate API key' instead.\", 'gravityformscampaignmonitor' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\n\t}", "title": "" }, { "docid": "521a532647c51bf528d4bbb294fd6578", "score": "0.7156308", "text": "public function getSettings()\n {\n $setting = Setting::firstOrFail();\n return $this->getForm($setting);\n }", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.7111052", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.7111052", "text": "public function getSettings();", "title": "" }, { "docid": "67b529fe3773161d3066f4ba266043ee", "score": "0.70359343", "text": "protected function getFields(){\n\n $prefix = 'fields['.$this->id.']';\n $countryOptions = $this->getCountryOptions();\n\n return array(\n\n Field::text(\n $prefix.'[label]',\n 'Label',\n array(\n 'defaultValue' => $this->getProperty( 'label', 'Label' )\n )\n ),\n\n Field::text(\n $prefix.'[placeholder]',\n 'Placeholder',\n array(\n 'defaultValue' => $this->getProperty( 'placeholder' )\n )\n ),\n\n Field::text(\n $prefix.'[defaultValue]',\n __('Default value','chefforms'),\n array(\n 'defaultValue' => $this->getProperty( 'defaultValue' )\n )\n ),\n\n Field::select(\n $prefix.'[countrySelect]',\n __( 'Country dropdown', 'chefforms' ),\n $countryOptions,\n array(\n 'defaultValue' => $this->getProperty( 'countrySelect' )\n )\n ),\n\n Field::checkbox(\n $prefix.'[required]',\n __('Required?','chefforms'),\n array(\n 'defaultValue' => $this->getProperty( 'required' )\n )\n ),\n\n Field::hidden(\n $prefix.'[validation]',\n array(\n 'defaultValue' => $this->validation\n )\n ),\n\n Field::hidden(\n $prefix.'[type]',\n array(\n 'defaultValue' => $this->type\n )\n ),\n\n Field::hidden(\n $prefix.'[deletable]',\n array(\n 'defaultValue' => ( $this->deletable ? 'true' : 'false' )\n )\n ),\n\n Field::hidden(\n $prefix.'[position]',\n array(\n 'class' => array( 'field-input', 'position-input' ),\n 'defaultValue' => $this->position\n )\n ),\n\n Field::hidden(\n $prefix.'[row]',\n array(\n 'class' => array( 'field-input', 'row-input' ),\n 'defaultValue' => $this->row\n )\n )\n\n\n\n );\n }", "title": "" }, { "docid": "c00667e52424883b41e13aa2668bb376", "score": "0.7029292", "text": "function fb_get_main_settings_fields() {\n\t$children = array(\n\t\tarray('name' => 'app_id',\n\t\t\t'label' => 'App ID',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App ID.', 'facebook' ),\n\t\t\t),\n\t\tarray('name' => 'app_secret',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App Secret.', 'facebook' ),\n\t\t\t),\n\t\tarray('name' => 'app_namespace',\n\t\t\t'type' => 'text',\n\t\t\t'help_text' => __( 'Your App Namespace.', 'facebook' ),\n\t\t\t),\n\t\t);\n\n\tfb_construct_fields('settings', $children);\n}", "title": "" }, { "docid": "613e2dbb125ac485aebb2b3978fe1021", "score": "0.702493", "text": "public function feed_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => esc_html__( 'Campaign Monitor Feed', 'gravityformscampaignmonitor' ),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feedName',\n\t\t\t\t\t\t'label' => esc_html__( 'Name', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Name', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\tesc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformscampaignmonitor' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'client',\n\t\t\t\t\t\t'label' => esc_html__( 'Client', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'onchange' => 'jQuery(this).parents(\"form\").submit();',\n\t\t\t\t\t\t'hidden' => $this->is_clients_hidden(),\n\t\t\t\t\t\t'choices' => $this->get_clients_as_choices(),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Client', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the Campaign Monitor client you would like to add your contacts to.', 'gravityformscampaignmonitor' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'contactList',\n\t\t\t\t\t\t'label' => esc_html__( 'Contact List', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'choices' => $this->get_lists_as_choices(),\n\t\t\t\t\t\t'onchange' => 'jQuery(this).parents(\"form\").submit();',\n\t\t\t\t\t\t'dependency' => array( $this, 'has_selected_client' ),\n\t\t\t\t\t\t'no_choices' => sprintf(\n\t\t\t\t\t\t\tesc_html__( 'No clients found. Please configure one or more clients in your %sCampaign Monitor%s account.', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\t'<a href=\"http://www.campaignmonitor.com\" target=\"_blank\">',\n\t\t\t\t\t\t\t'</a>'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Contact List', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the Campaign Monitor list you would like to add your contacts to.', 'gravityformscampaignmonitor' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'listFields',\n\t\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t\t'dependency' => 'contactList',\n\t\t\t\t\t\t'field_map' => $this->get_custom_fields_as_field_map(),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Map Fields', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\tesc_html__( 'Associate your Campaign Monitor custom fields to the appropriate Gravity Form fields by selecting the appropriate form field from the list.', 'gravityformscampaignmonitor' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'optin',\n\t\t\t\t\t\t'label' => esc_html__( 'Conditional Logic', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'dependency' => 'contactList',\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Conditional Logic', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t\tesc_html__( 'When conditional logic is enabled, form submissions will only be exported to Campaign Monitor when the condition is met. When disabled all form submissions will be exported.', 'gravityformscampaignmonitor' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'resubscribe',\n\t\t\t\t\t\t'label' => esc_html__( 'Options', 'gravityformscampaignmonitor' ),\n\t\t\t\t\t\t'type' => 'option_resubscribe',\n\t\t\t\t\t\t'dependency' => 'contactList',\n\t\t\t\t\t\t'onclick' => \"if(this.checked){jQuery('#campaignmonitor_resubscribe_warning').slideDown();} else{jQuery('#campaignmonitor_resubscribe_warning').slideUp();}\",\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'save',\n\t\t\t\t\t\t'dependency' => 'contactList',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\n\t}", "title": "" }, { "docid": "2df8bcbd6a1f74240ba6a52cdb714c23", "score": "0.7024402", "text": "public static function & all(){\n return static::$fields;\n }", "title": "" }, { "docid": "b2adc66ff7ffb7ca0d64877b7c25d9f4", "score": "0.70237577", "text": "public function get_fields() {\n\t\t$this->maybe_load_fields();\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "fea1598cf841a2496356443f2f62f985", "score": "0.70208186", "text": "static function get_fields() { return array(); }", "title": "" }, { "docid": "85a38643ea76cbc2c41fc5fd0bcd0846", "score": "0.7010124", "text": "protected function fields() {\n $fields = array();\n return $fields;\n }", "title": "" }, { "docid": "62962744d801d0a8b2fd7ae52ef55382", "score": "0.7008174", "text": "public function get_fields() {\n return $this->fields;\n }", "title": "" }, { "docid": "2bc400605140eee3217ec074e65b2db8", "score": "0.7004266", "text": "function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "114bc32f932b8a00072e502c0b76ccae", "score": "0.70007014", "text": "private function getSettings()\n {\n return $this->db->select([\n [\"current_animation AS currentAnimation\", \"load_order AS loadOrder\", \"people_watched AS peopleWatched\"], // values\n \"general_settings\", // table\n [], // conditions\n 1 // limit\n ]);\n }", "title": "" }, { "docid": "8fb1b7cc04c59b0f51bd7e40d7e22b03", "score": "0.6998685", "text": "public function fields(){\n\t\treturn array();\n\t}", "title": "" }, { "docid": "d7687dfad9f0173c7e89b7b152801ef5", "score": "0.69869477", "text": "private function getGeneralFields()\n\t{\n\t\t// System defaults\n\t\t$items = array(\n\t\t\t'date_format' \t\t=> array(\n\t\t\t\t'text' \t\t\t=> Lang::get('dashboard.date_format'),\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t\t'description' \t=> Lang::get('dashboard.date_format_desc')\n\t\t\t),\n\t\t);\n\n\t\t// Merge the default setting with the user created one\n\t\t$items = array_merge($items, Config::get('cms/settings.general'));\n\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "9960ba39703fb62b15bf8552879a781a", "score": "0.6986605", "text": "public function all()\n {\n $rawSettings = parent::all();\n\n $settings = [];\n foreach ($rawSettings as $setting) {\n $settings[$setting->name] = $setting;\n }\n\n return $settings;\n }", "title": "" }, { "docid": "c843443daf9520a3bc45cc11b62996d7", "score": "0.69832987", "text": "public static function getAllFields() {\n $all_fields = CodonCache::read('allfields');\n if ($all_fields === false) {\n $all_fields = DB::get_results('SELECT * FROM ' . TABLE_PREFIX . 'customfields');\n CodonCache::write('allfields', $all_fields, 'long');\n }\n\n return $all_fields;\n }", "title": "" }, { "docid": "a8e3d0abcaac29dd4e4dc3806a615195", "score": "0.698202", "text": "public function getAllSettings()\n {\n if ($this->allFields !== null) {\n return $this->allFields;\n }\n\n $configFieldsKeys = $this->getConfigSettingsKeys();\n $databaseFieldsKeys = $this->getDatabaseSettingsKeys();\n\n $configFiedlsNotInDatabase = array_diff($configFieldsKeys, $databaseFieldsKeys);\n\n $configValues = $this->getConfigSettingsFields();\n $databaseValues = $this->getDatabaseSettingsFields();\n\n foreach ($databaseValues as $databaseValue) {\n\n $this->allFields[$databaseValue->key] = [\n 'value' => $databaseValue->value,\n 'default' => isset($configValues[$databaseValue->key]['default']) ? $configValues[$databaseValue->key]['default'] : null,\n 'group' => [\n 'label' => isset($configValues[$databaseValue->key]['group']['label']) ? $configValues[$databaseValue->key]['group']['label'] : 'No group',\n 'slug' => isset($configValues[$databaseValue->key]['group']['slug']) ? $configValues[$databaseValue->key]['group']['slug'] : 'no-group',\n ],\n ];\n }\n\n foreach ($configFiedlsNotInDatabase as $item) {\n $this->allFields[$item] = [\n 'value' => null,\n 'default' => isset($configValues[$item]['default']) ? $configValues[$item]['default'] : null,\n 'group' => [\n 'label' => isset($configValues[$item]['group']['label']) ? $configValues[$item]['group']['label'] : 'No group',\n 'slug' => isset($configValues[$item]['group']['slug']) ? $configValues[$item]['group']['slug'] : 'no-group',\n ],\n ];\n }\n\n return $this->allFields;\n }", "title": "" }, { "docid": "ca6651c141a56f1cd999b365c1ba474b", "score": "0.6962622", "text": "public function getGeneralSettingsTabFields()\n {\n $criteria_groups = array(\n array(\n 'id' => 1,\n 'name' => $this->l('Buyer')\n ),\n array(\n 'id' => 2,\n 'name' => $this->l('Any Customer')\n ),\n );\n $mod_opt = array(\n array(\n 'id' => 1,\n 'name' => $this->l('Automatic')\n ),\n array(\n 'id' => 2,\n 'name' => $this->l('Manual')\n ),\n );\n $form_fields = array(\n 'form' => array(\n 'id_form' => 'kbrc_general_settings',\n 'legend' => array(\n 'title' => $this->l('General Settings'),\n 'icon' => 'icon-gears'\n ),\n 'input' => array(\n array(\n 'label' => $this->l('Enable/Disable the module'),\n 'type' => 'switch',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[enable]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable or Disable the plugin functionality'),\n ),\n array(\n 'label' => $this->l('Delete Customer Data On Delete Request for GDPR'),\n 'type' => 'switch',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[GDPR_compatibility_status]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'desc' => $this->l('Enable/Disable to delete customer data on GDPR module delete request.'),\n 'hint' => $this->l('Enable this to delete customer data on GDPR module delete request.'),\n ),\n array(\n 'label' => $this->l('Enable/Disable Privacy Policy'),\n 'type' => 'switch',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[enable_gdpr_policy]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('Enable/Disable to display consent checkbox from frontend.'),\n ),\n array(\n 'label' => $this->l('Privacy Policy Text'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Enter the privacy policy text'),\n 'desc' => $this->l('This text will be displayed when user writes new review'),\n 'name' => 'gdpr_policy_text',\n 'required' => true,\n ),\n array(\n 'label' => $this->l('Privacy Policy Page URL'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Enter the URL of the privacy policy page'),\n 'desc' => $this->l('Enter the URL of the page where you have define privacy policy.'),\n 'name' => 'gdpr_policy_url',\n// 'required' => true,\n ),\n array(\n 'label' => $this->l('Enable Incentives'),\n 'type' => 'switch',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[incentive_enable]',\n 'values' => array(\n array(\n 'value' => 1,\n ),\n array(\n 'value' => 0,\n ),\n ),\n 'hint' => $this->l('If enable then allows incentives to customer.'),\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Incentive Amount'),\n 'hint' => $this->l('Default incentive amount to customer whose reviews has been accepted.'),\n 'name' => 'kbreviewincentives[incentive_amount]',\n 'col' => 2,\n 'required' => true,\n ),\n array(\n 'label' => $this->l('Incentive Criteria'),\n 'type' => 'select',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[incentive_criteria]',\n 'hint' => $this->l('Allow incentives and reminder to selected group.'),\n 'is_bool' => true,\n 'options' => array(\n 'query' => $criteria_groups,\n 'id' => 'id',\n 'name' => 'name',\n ),\n 'required' => false,\n ),\n array(\n 'label' => $this->l('Moderation'),\n 'type' => 'select',\n 'class' => 'general_setting_tab',\n 'name' => 'kbreviewincentives[moderation]',\n 'hint' => $this->l('Evaluate review before posting on product page.'),\n 'desc' => $this->l('If automatic then reviews will be automatically approved and if manual then admin will approve or disapprove it.'),\n 'is_bool' => true,\n 'options' => array(\n 'query' => $mod_opt,\n 'id' => 'id',\n 'name' => 'name',\n ),\n 'required' => false,\n ),\n array(\n 'label' => $this->l('Email Subject (When review is accepted and incentives are included)'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Subject of email which will be sent to customers When review is accepted and incentives are included.'),\n 'name' => 'WITH_COUPON_EMAIL_SUBJECT',\n 'required' => true,\n ),\n array(\n 'type' => 'textarea',\n 'label' => $this->l('Email Template (When review is accepted and incentives are included)'),\n 'name' => 'WITH_COUPON_EMAIL_TEMP',\n 'id' => 'WITH_COUPON_EMAIL_TEMP',\n 'required' => true,\n 'cols' => '9',\n 'rows' => '20',\n 'class' => 'col-lg-9',\n 'lang' => true,\n 'autoload_rte' => true,\n 'desc' => $this->l('Do not remove {amount}, {customer_name}, {coupon_code}, {shop_url}, {shop_email} tags in this email template. ')\n ),\n array(\n 'label' => $this->l('Email Subject (When review is accepted and incentives are excluded)'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Subject of email which will be sent to customers When review is accepted and incentives are not allowed.'),\n 'name' => 'WITHOUT_COUPON_EMAIL_SUBJECT',\n 'required' => true,\n ),\n array(\n 'type' => 'textarea',\n 'label' => $this->l('Email Template (When review is accepted and incentives are excluded)'),\n 'name' => 'WITHOUT_COUPON_EMAIL_TEMP',\n 'id' => 'WITHOUT_COUPON_EMAIL_TEMP',\n 'required' => true,\n 'cols' => '9',\n 'rows' => '20',\n 'class' => 'col-lg-9',\n 'lang' => true,\n 'autoload_rte' => true,\n 'desc' => $this->l('Do not remove {shop_name}, {customer_name}, {product_name}, {shop_url}, {shop_email}, {product_link} tags in this email template. ')\n ),\n array(\n 'label' => $this->l('Email Subject (When admin disapproves a review.)'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Subject of email which will be sent to customers When admin disapproves a review.'),\n 'name' => 'REJECT_REVIEW_EMAIL_SUBJECT',\n 'required' => true,\n ),\n array(\n 'type' => 'textarea',\n 'label' => $this->l('Email Template (When admin disapproves a review.)'),\n 'name' => 'REJECT_REVIEW_EMAIL_TEMP',\n 'id' => 'REJECT_REVIEW_EMAIL_TEMP',\n 'required' => true,\n 'cols' => '9',\n 'rows' => '20',\n 'class' => 'col-lg-9',\n 'lang' => true,\n 'autoload_rte' => true,\n 'desc' => $this->l('Do not remove {shop_name}, {customer_name}, {shop_url}, {shop_email} tags in this email template. ')\n ),\n array(\n 'label' => $this->l('Email Subject (Inform to admin when a new review is posted)'),\n 'type' => 'text',\n 'lang' => true,\n 'hint' => $this->l('Subject of email which will be sent to admin when a new review will be posted.'),\n 'class' => 'optn_email_subject',\n 'name' => 'ADMIN_EMAIL_SUBJECT',\n 'required' => true,\n ),\n array(\n 'type' => 'textarea',\n 'label' => $this->l('Email Template (Inform to admin when a new review is posted)'),\n 'name' => 'ADMIN_EMAIL_TEMP',\n 'id' => 'ADMIN_EMAIL_TEMP',\n 'required' => true,\n 'cols' => '9',\n 'rows' => '20',\n 'class' => 'col-lg-9',\n 'lang' => true,\n 'autoload_rte' => true,\n 'desc' => $this->l('Do not remove {shop_name}, {shop_url}, {shop_email}, {product_name}, {review_content} tags in this email template. ')\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right kbrc_general_settings_btn'\n ),\n ),\n );\n\n return $form_fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.69351244", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.69351244", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.69341683", "text": "public function getFields();", "title": "" }, { "docid": "35517251216a0ee294b86af15172fcfd", "score": "0.6931756", "text": "protected function fields()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "753a14c40a848cde5babd660e98529aa", "score": "0.69221145", "text": "public function fields() {\n $fields = parent::fields();\n $custom_fields = $this->getCustomFields();\n\n return $fields + $custom_fields;\n }", "title": "" }, { "docid": "f5e38776f47d6b08a60dbb26a091b139", "score": "0.69123477", "text": "function get_all_fields() {\n\t\tif ( empty($this->data['fields']) ){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn $this->data['fields'];\n\t\t}\n\t}", "title": "" }, { "docid": "62e5315072838c6b1133bc017911a125", "score": "0.6906508", "text": "public function get_fields() : array {\n return $this->fields;\n }", "title": "" }, { "docid": "2962406928445975315d6e26d27c5307", "score": "0.6893055", "text": "public function get_edit_form_fields()\n {\n //any that are just for an AS?\n return parent::get_edit_form_fields();\n }", "title": "" }, { "docid": "23702e5b5f8154853923cd1b80930acb", "score": "0.6885065", "text": "public static function getDetails(){\n return DB::table('settings')->pluck(\"value\", \"key\");\n }", "title": "" }, { "docid": "71199ee8e1d34f69e0d7adfbddd4e7fa", "score": "0.6884523", "text": "protected function settings() {\n return array();\n }", "title": "" }, { "docid": "f033b7bd48ca10bbec567d874cf14c45", "score": "0.6884439", "text": "public function getFields(){\n return $this->_fields;\n }", "title": "" }, { "docid": "6e62a1c909159bf9d7509a0e91e99371", "score": "0.6863348", "text": "private function getSettings(){\n\n return $this->db->from('epg_setting')->where(array('status' => 1))->get()->all();\n }", "title": "" }, { "docid": "0bd57dca4ec2c68a0c75413cf4c2d9d5", "score": "0.6859324", "text": "public static function getSettings()\n {\n return [\n 'login' => 'editor',\n 'legalTemplates' => ['skyscraper'],\n 'legalFields' => ['images'], // <-- the title field is not legal\n 'access' => [\n 'templates' => [\n [\n 'name' => 'skyscraper',\n 'roles' => ['editor'],\n ]\n ],\n 'fields' => [\n [\n 'name' => 'title',\n 'viewRoles' => ['editor'],\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "0166fb2d3a7219e3d029cde5f57368f6", "score": "0.685276", "text": "public function fields()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "161af78b49575b7706f6d547bce0a3bb", "score": "0.68444544", "text": "public static function get_fields() {\n\t\tif ( empty( self::$fields ) ) {\n\t\t\tself::set_fields();\n\t\t}\n\n\t\treturn self::$fields;\n\t}", "title": "" }, { "docid": "4a973b79bb2500a51ccf5afe97a008b6", "score": "0.6834057", "text": "public static function getGeneralFields(): array\n {\n return [\n 'default_image' => get_field('default_image', 'options') ?? '',\n 'email' => get_field('email', 'options') ?? '',\n 'phone' => get_field('phone', 'options') ?? '',\n 'address' => get_field('address', 'options') ?? '',\n 'mapUrl' => get_field('map_url', 'options') ?? '',\n ];\n }", "title": "" }, { "docid": "e323975279541c2d40d73b095f94aeb2", "score": "0.6828605", "text": "public static function fields()\n {\n return array();\n }", "title": "" }, { "docid": "8dc0c921d79c9c35079a7dbdcc53daf4", "score": "0.6821445", "text": "public function Get_Entry_Fields() {\n return $this->store_fields;\n }", "title": "" }, { "docid": "2367ec4b58236bd9e159a6737377e715", "score": "0.68214196", "text": "public function getFields() {\n\n $fields = get_option( 'wpas_custom_fields', [] );\n\n return ( empty( $fields ) ) ? [] : $fields;\n\n }", "title": "" }, { "docid": "fd35169ed4cc9c7b01fe013375a60926", "score": "0.68170184", "text": "private function sociallogin_getsettings () {\n $lr_settings = array ();\n $db = JFactory::getDBO ();\n\t $sql = \"SELECT * FROM #__LoginRadius_settings\";\n $db->setQuery ($sql);\n $rows = $db->LoadAssocList ();\n if (is_array ($rows)) {\n foreach ($rows AS $key => $data) {\n $lr_settings [$data ['setting']] = $data ['value'];\n }\n }\n return $lr_settings;\n }", "title": "" }, { "docid": "21e9e49005ea83520e7e257d6d7ec694", "score": "0.68166983", "text": "public function findAll(){\n return $this->panelSetting->all();\n }", "title": "" }, { "docid": "84317aba78883883855660f30c85a58f", "score": "0.6815977", "text": "public function getSettings()\n {\n if (!$this->settings) {\n $settings = array (\n 'bProcessing' => true,\n 'bServerSide' => true,\n 'sAjaxSource' => $this->sAjaxSource,\n 'aoColumns' => array(),\n );\n\n // list fields\n $fields = $this->getFields();\n\n foreach ($fields as $field) {\n $settings['aoColumns'][] = array (\n 'mDataProp' => $field,\n 'sDefaultContent' => '',\n 'sType' => 'natural',\n );\n }\n\n $this->settings = $settings;\n }\n return json_encode($this->settings);\n }", "title": "" }, { "docid": "d50db738ec0204d377c824191589aafb", "score": "0.6804453", "text": "public function getSettings() {\n return $this->settings;\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6800585", "text": "public function fields();", "title": "" }, { "docid": "05fc815d9b04fd628d44d9d99e23475f", "score": "0.6799638", "text": "public function feed_settings_fields() {\n\t\t\n\t\t/* Build base fields array. */\n\t\t$base_fields = array(\n\t\t\t'title' => '',\n\t\t\t'fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'feed_name',\n\t\t\t\t\t'label' => esc_html__( 'Feed Name', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t'default_value' => $this->get_default_feed_name(),\n\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Name', 'gravityformsbatchbook' ) .'</h6>' . esc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsbatchbook' )\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t\n\t\t/* Build person fields array. */\n\t\t$person_fields = array(\n\t\t\t'title' => esc_html__( 'Person Details', 'gravityformsbatchbook' ),\n\t\t\t'fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'person_standard_fields',\n\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t'field_map' => $this->standard_fields_for_feed_mapping(),\n\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Map Fields', 'gravityformsbatchbook' ) .'</h6>' . esc_html__( 'Select which Gravity Form fields pair with their respective Batchbook fields. Batchbook custom fields must be a text field type to be mappable.', 'gravityformsbatchbook' )\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'person_custom_fields',\n\t\t\t\t\t'label' => '',\n\t\t\t\t\t'type' => 'dynamic_field_map',\n\t\t\t\t\t'field_map' => $this->custom_fields_for_feed_mapping(),\n\t\t\t\t\t'disable_custom' => true\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'person_tags',\n\t\t\t\t\t'label' => esc_html__( 'Tags', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'class' => 'medium merge-tag-support mt-position-right mt-hide_all_fields',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'person_about',\n\t\t\t\t\t'label' => esc_html__( 'About', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'class' => 'medium merge-tag-support mt-position-right mt-hide_all_fields',\n\t\t\t\t),\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'update_person',\n\t\t\t\t\t'label' => esc_html__( 'Update Person', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'checkbox_and_select',\n\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Update Person', 'gravityformsbatchbook' ) .'</h6>' . esc_html__( 'If enabled and an existing person is found, their contact details will either be replaced or appended. Job title and company will be replaced whether replace or append is chosen.', 'gravityformsbatchbook' ),\n\t\t\t\t\t'checkbox' => array(\n\t\t\t\t\t\t'name' => 'person_update_enable',\n\t\t\t\t\t\t'label' => esc_html__( 'Update Person if already exists', 'gravityformsbatchbook' ),\n\t\t\t\t\t),\n\t\t\t\t\t'select' => array(\n\t\t\t\t\t\t'name' => 'person_update_action',\n\t\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'and replace existing data', 'gravityformsbatchbook' ),\n\t\t\t\t\t\t\t\t'value' => 'replace'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'label' => esc_html__( 'and append new data', 'gravityformsbatchbook' ),\n\t\t\t\t\t\t\t\t'value' => 'append'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\t\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'champion',\n\t\t\t\t\t'label' => esc_html__( 'Mark as Champion', 'gravityformsbatchbook' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => 'person_mark_as_champion',\n\t\t\t\t\t\t\t'label' => esc_html__( 'Mark Person as Champion', 'gravityformsbatchbook' ),\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/* Build conditional logic fields array. */\n\t\t$conditional_fields = array(\n\t\t\t'title' => esc_html__( 'Feed Conditional Logic', 'gravityformsbatchbook' ),\n\t\t\t'fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'feed_condition',\n\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t'label' => esc_html__( 'Conditional Logic', 'gravityformsbatchbook' ),\n\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable', 'gravityformsbatchbook' ),\n\t\t\t\t\t'instructions' => esc_html__( 'Export to Batchbook if', 'gravityformsbatchbook' ),\n\t\t\t\t\t'tooltip' => '<h6>' . esc_html__( 'Conditional Logic', 'gravityformsbatchbook' ) . '</h6>' . esc_html__( 'When conditional logic is enabled, form submissions will only be exported to Batchbook when the condition is met. When disabled, all form submissions will be posted.', 'gravityformsbatchbook' )\n\t\t\t\t),\n\t\t\t\t\n\t\t\t)\n\t\t);\n\t\t\n\t\treturn array( $base_fields, $person_fields, $conditional_fields );\n\t\t\n\t}", "title": "" }, { "docid": "3853725c20ba5dc1d1ec7bb584097dd4", "score": "0.67965037", "text": "function getAllRegistrationFields() {\n return Registrationfield::getAllRegistrationFields();\n}", "title": "" }, { "docid": "806f52f8adee4afc31a71ab0db21a872", "score": "0.67889297", "text": "public function getFields () {\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "0a97ce82b160790ad760482059b897a5", "score": "0.678757", "text": "public static function getFields();", "title": "" }, { "docid": "93a07bdbca4784f6fc8bc5733d2a7df6", "score": "0.6779374", "text": "public function load_settings_fields() {\n\t\t\t$this->settings_fields_loaded = true;\n\n\t\t\tif ( ! empty( $this->setting_option_fields ) ) {\n\t\t\t\tforeach ( $this->setting_option_fields as $setting_option_key => &$setting_option_field ) {\n\t\t\t\t\t$setting_option_field = $this->load_settings_field( $setting_option_field );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5c5fa20eff24ae479b7806e732b7a58f", "score": "0.67764366", "text": "public function list_fields()\r\n {\r\n return array();\r\n }", "title": "" }, { "docid": "d2950928b1da55bee1b390132a66cdc4", "score": "0.67724574", "text": "function get_all_form_settings() {\n\t\tif(empty($this->data['form']) OR !isset($this->data['form'])){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn $this->data['form'];\n\t\t}\n\t}", "title": "" }, { "docid": "91a7ed00258defb671ea3813742b675f", "score": "0.6771361", "text": "public function getFields()\n {\n return $this->getData(self::FIELDS);\n }", "title": "" }, { "docid": "9af648cc04fa3e0a396606718df1a1e0", "score": "0.67581373", "text": "public function getSettings(): array\n {\n return $this->settings;\n }", "title": "" }, { "docid": "a9ca0134b3a0549ea596523729dee724", "score": "0.67579", "text": "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "title": "" }, { "docid": "fde21cb0e6ca6b6f21e2bb9a2784cad6", "score": "0.6751597", "text": "public function settings()\r\n {\r\n if (empty($this->__settings)) \r\n {\r\n $this->__settings = \\Mailer\\Models\\Settings::fetch();\r\n }\r\n \r\n return $this->__settings;\r\n }", "title": "" }, { "docid": "8c06c256e461f9e99d7eb8be6404d0c5", "score": "0.6748731", "text": "public function fields()\n {\n return [\n 'id',\n 'title_id',\n 'first_name',\n 'last_name',\n 'other_name',\n 'opd_number',\n 'home_phone',\n 'address',\n 'personal_phone',\n 'work_phone',\n 'type_id',\n 'gender_id',\n 'marital_status_id',\n 'region_id',\n 'city',\n 'dob',\n 'reg_date',\n 'description',\n 'status',\n 'updated_at',\n ];\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.67479914", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "4f8361b99ade3c91a0b8a544a4c18b2f", "score": "0.67475474", "text": "public static function getSettings(){\n\t\tglobal $MabBase;\n\t\treturn $MabBase->get_settings();\n\t}", "title": "" }, { "docid": "8ae8f49683442fba5720e03b90f63fb8", "score": "0.6746582", "text": "public function getAllSettings()\n {\n $res = [];\n\n $res[] = $this->createSettingModel(SettingKeys::AUTHORIZATION_CODE_VALID_TIME);\n $res[] = $this->createSettingModel(SettingKeys::DEVICE_AUTHENTICATION_REQUIRED);\n $res[] = $this->createSettingModel(SettingKeys::AUTHORIZATION_CODE_LENGTH);\n\n return $res;\n }", "title": "" }, { "docid": "3de3b3999889141a0481d6d6d23d6786", "score": "0.67464805", "text": "public function get_form_fields(): array;", "title": "" }, { "docid": "e0426a55d01a693558a46ec84ec0518a", "score": "0.67449725", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "e0426a55d01a693558a46ec84ec0518a", "score": "0.67449725", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "5ffd1cd926c805b4173c6540e1a53738", "score": "0.6740246", "text": "public function get_fields() {\r\n $fields = $this->db->list_fields('CUPU_Integrator');\r\n return $fields;\r\n }", "title": "" } ]
492918162916ea611008bf50ad87b3ae
Carry out the API requests.
[ { "docid": "138d5e438d1d2a61613b5afc41aed45d", "score": "0.0", "text": "private function request($url, $additionalcUrlHeaders = NULL, $additionalHeaders = NULL){\r\n\t\t\t$accountData = $this->getUserData($this->username);\r\n\r\n\t\t\t$ch = curl_init();\r\n\t curl_setopt($ch, CURLOPT_URL, self::API_URL.$url);\r\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t curl_setopt($ch, CURLOPT_POST, 1);\r\n\t curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');\r\n\t if(isset($additionalcUrlHeaders)){\r\n\t \tforeach($additionalcUrlHeaders as $addcUrlHeaders){\r\n\t \t\t$key = key($addcUrlHeaders);\r\n\t \t\tcurl_setopt($ch, $key, $addcUrlHeaders[$key]);\r\n\t \t}\r\n\t }\r\n\t $headers = array();\r\n\t if(isset($additionalHeaders)){\r\n\t \tforeach($additionalHeaders as $addHeaders){\r\n\t \t\t$headers[] = $addHeaders;\r\n\t \t}\r\n\t }\r\n\t $headers[] = \"Host: api.musical.ly\";\r\n\t $headers[] = \"X-Requested-With: XMLHttpRequest\";\r\n\t $headers[] = \"User-Agent: Musical.ly/20170420008 (iPhone; iOS 9.0.1; Scale/2.00)\";\r\n\t $headers[] = \"X-Request-Sign3: I6dbcd2882dacaeec7583547249f15ead22328d3f7\";\r\n\t $headers[] = \"Country: US\";\r\n\t $headers[] = \"Language: en-US\";\r\n\t $headers[] = \"Version: 5.5.3\";\r\n\t $headers[] = \"Os: iOS 9.0.1\";\r\n\t $headers[] = \"Build: 20170420008\";\r\n\t $headers[] = \"Slider-Show-Cookie: \".$accountData['slider_cookie'];\r\n\t $headers[] = \"Authorization: M-TOKEN \\\"hash\\\"=\\\"\".$accountData['authentication_hash'].\"\\\" \\\"status\\\"=\\\"000\\\"\";\r\n\t $headers[] = \"Mobile: iPhone8,1\";\r\n\t $headers[] = \"Slider-Show-Session: 2fd93ff1bd1647a093c897c3aee912b5\";\r\n\t $headers[] = \"Accept-Language: en-US;q=1\";\r\n\t $headers[] = \"X-Request-Id: 3E488C11-A010-4B8E-99A0-F5799365609C\";\r\n\t $headers[] = \"Timezone: IST\";\r\n\t $headers[] = \"Network: WiFi\";\r\n\t $headers[] = \"Accept: application/json\";\r\n\t $headers[] = \"X-Request-Info3: eyJvc3R5cGUiOiJpb3MiLCJvcyI6ImlPUyA5LjAuMSIsIlgtUmVxdWVzdC1JRCI6IjNFNDg4QzExLUEwMTAtNEI4RS05OUEwLUY1Nzk5MzY1NjA5QyIsInNsaWRlci1zaG93LWNvb2tpZSI6ImJsODJNekl5TURBeE5UQXpNemMzTkRBNE1EcDFhakZvYVUweFJqRTJMMXAwWlZCdlRsVlRaVEpSUFQwNlpUazNPRE5sTXpjMVpUZzROV0ZsTURBd05tWXdZMk16T0RobVpUSmhNamM2TmpNeU1qQXdNVFV3TXpNM056UXdPREEiLCJtZXRob2QiOiJQT1NUIiwiZGV2aWNlaWQiOiIyZmQ5M2ZmMWJkMTY0N2EwOTNjODk3YzNhZWU5MTJiNSIsInZlcnNpb24iOiI1LjUuMyIsInRpbWVzdGFtcCI6IjE0OTQxMDc1MzAwMDAiLCJ1cmwiOiJodHRwczpcL1wvYXBpLm11c2ljYWwubHlcL3Jlc3RcL2dyYXBoXC9vcGVyYXRpb25zXC9mcmllbmRzaGlwXC82Njg0ODI3NDU3NzQxNjE5MiJ9\";\r\n\t $headers[] = \"Content-Type: application/x-www-form-urlencoded\";\r\n\t curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\n\t $result = curl_exec($ch);\r\n\t curl_close ($ch);\r\n\t return $result;\r\n\t\t}", "title": "" } ]
[ { "docid": "f278a2f62ed10213d2ae748650857bdc", "score": "0.6305836", "text": "public function processRequests();", "title": "" }, { "docid": "3cc73dcb57467f64a55a7abf1fcfbafb", "score": "0.61361206", "text": "public function all()\n {\n $this->web();\n $this->api();\n }", "title": "" }, { "docid": "ff31b3a2b9f9e39f33a50582941758c1", "score": "0.59577554", "text": "function beforeRequest() {\n\t// TODO\n\t$this->furnhack->beforeRequest($this);\n\n\tKCAPIPerm::beforeRequest($this);\n\n\tif (explode(\"?\",$this->uri)[0]===\"/kcsapi/api_req_quest/clearitemget\" && isset($this->post[\"api_quest\"])) {\n\t\t$erruser = $this->post['api_token'];\n\t\tif (isset($this->user)) {\n\t\t\t$dmmnames = json_decode(file_get_contents(\"dmm-names.json\"),true);\n\t\t\t$erruser = $dmmnames[$this->user->dmmid];\n\t\t}\n\t\tdate_default_timezone_set(\"Asia/Shanghai\");\n\t\tforeach ($this->post as $key => $value) {\n\t\t\tif ($key === 'api_token') {\n\t\t\t\t$value = substr($value, 0, 8);\n\t\t\t}\n\t\t}\n\t}\n\n\t// start2 emergency solution\n\tif (explode(\"?\",$this->uri)[0]===\"/kcsapi/api_start2\" && file_exists(\"start2.json\") && !isset($this->post[\"nocache\"])) {\n\n\t\t// Check 304 first\n\t\t$filehash = substr(sha1_file(\"start2.json\"), -8);\n\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH'])) { // TODO use header variables\n\t\t\t$reqtags = explode(\"-\", substr($_SERVER['HTTP_IF_NONE_MATCH'], 1, -1));\n\t\t\t$reqhash = $reqtags[1];\n\t\t\t$reqtime = $reqtags[0];\n\t\t\tif (time() - intval($reqtime) < 86400 && $filehash === $reqhash) {\n\t\t\t\t// Cache within 1 day AND start2 not changed\n\t\t\t\theader(\"HTTP/1.1 304 Not Modified\");\n\t\t\t\tdie();\n\t\t\t}\n\t\t}\n\t\theader(\"Etag: \\\"\".time().\"-\".$filehash.\"\\\"\");\n\n\t\t$this->response = json_decode(file_get_contents(\"start2.json\"),true);\n\t\tif ($this->response) {\n\t\t\t$this->req_type = \"REWRITTEN\";\n\t\t\t$this->errno = 1;\n\t\t} else {\n\t\t\tunlink(\"start2.json\");\n\t\t}\n\t}\n\t$this->viewer->beforeRequest($this);\n\t$this->accessDeny();\n\n}", "title": "" }, { "docid": "e395d4e408d23238e46bc6598cec6176", "score": "0.59234136", "text": "public function run() {\n date_default_timezone_set( 'UTC' );\n\n // Create PSR-7 compliant request with all request data.\n $request = $this->buildRequest();\n // Create an empty PSR-7 compliant response.\n $response = new Zend\\Diactoros\\Response();\n // Create emitter to send responses back to client.\n $emitter = new Zend\\Diactoros\\Response\\SapiEmitter();\n // Build container with required objects added to it.\n $container = new League\\Container\\Container();\n $container->share( 'request', $request );\n $container->share( 'response', $response );\n\n // Set up the auto injector. This is not a service locator!\n $injector = new Auryn\\Injector();\n\n // Map interfaces to concrete implementation classes.\n $injector->alias( League\\Container\\ContainerInterface::class, League\\Container\\Container::class );\n $injector->alias( Psr\\Http\\Message\\ResponseInterface::class, Zend\\Diactoros\\Response::class );\n $injector->alias( Psr\\Http\\Message\\ServerRequestInterface::class, Zend\\Diactoros\\ServerRequest::class );\n $injector->alias( Ramsey\\Uuid\\UuidFactoryInterface::class, Ramsey\\Uuid\\UuidFactory::class );\n\n // TODO: Add loading of configuration file\n // TODO: Add setup of database connection / database abstraction layer\n\n // Set up objects which should be reused.\n $injector->share( $container );\n $injector->share( $request );\n $injector->share( $emitter );\n $injector->share( $injector );\n\n // Type hinting for auto completion in IDE.\n /** @var League\\Route\\RouteCollection $routeCollection */\n /** @var League\\Route\\Strategy\\StrategyInterface $routeStrategy */\n\n // Create collection to add all routing in this API.\n $routeCollection = $injector->make( League\\Route\\RouteCollection::class );\n $routeStrategy = $injector->make( League\\Route\\Strategy\\StrategyInterface::class );\n $routeCollection->setStrategy( $routeStrategy );\n\n try {\n $this->registerRoutePatterns( $routeCollection );\n $this->registerRoutes( $routeCollection, $injector );\n $response = $routeCollection->dispatch( $container->get( 'request' ), $container->get( 'response' ) );\n }\n catch( League\\Route\\Http\\Exception\\NotFoundException $e ){\n\n // TODO: Add exception handling for when the request matches no known routes\n\n }\n catch( \\Exception $e ) {\n\n // TODO: Add exception handling for when an unexpected error occurs\n\n }\n finally {\n $emitter->emit( $response );\n }\n }", "title": "" }, { "docid": "2f9514cad1def96c829ee31f369a01c1", "score": "0.59142894", "text": "public function run() { \n \n $this->_phlyty->get(API_PATH . '/brands', function() {\n\n $curlArray = array(\n 'headerInformation' => array(\n 'token_secret: ' . 'abc',\n 'environment: ' . 'development' \n ),\n 'customRequest' => 'GET'\n );\n\n $sendRequisitions = new SendRequests();\n \n $response = $sendRequisitions->set($curlArray)->requests(API_DB . '/brands');\n \n// var_dump ($responseData);exit;\n \n $response['headerInformation'] = (empty($response['headerInformation'])) ? null : $response['headerInformation'];\n $this->_response->set('statusNumber', $response['headerInformation'])\n ->processDataReturn(json_decode($response['return']));\n });\n\n $this->_phlyty->post(API_PATH . '/brands', function() {\n\n $requestPost = $this->_phlyty->request()->getPost()->toArray();\n $curlArray = array(\n 'customRequest' => 'POST',\n 'postInformation' => $requestPost\n );\n\n $classRegras = \"\\\\Regras\\\\\" . CONTROLLER;\n $regras = new $classRegras($this->_phlyty);\n $regras->validatePost($requestPost);\n\n $sendRequisitions = new SendRequests();\n $response = $sendRequisitions->set($curlArray)->requests(API_DB . '/brands');\n $response['headerInformation'] = (empty($response['headerInformation'])) ? null : $response['headerInformation'];\n $this->_response->set('statusNumber', $response['headerInformation'])\n ->processDataReturn($response['return']);\n\n $requestPost = $this->_phlyty->request()->getPost()->toArray();\n $curlArray = array(\n 'customRequest' => 'POST',\n 'postInformation' => $requestPost\n );\n\n $classRegras = \"\\\\Regras\\\\\" . CONTROLLER;\n $regras = new $classRegras($this->_phlyty);\n $regras->validatePost($requestPost);\n\n $sendRequisitions = new SendRequests();\n $response = $sendRequisitions->set($curlArray)->requests(API_DB . '/brands');\n $response['headerInformation'] = (empty($response['headerInformation'])) ? null : $response['headerInformation'];\n $this->_response->set('statusNumber', $response['headerInformation'])\n ->processDataReturn($response['return']);\n });\n\n\n\n $this->_phlyty->run();\n }", "title": "" }, { "docid": "9f4bca34ec3d77f4d33a5617897eecb4", "score": "0.5820902", "text": "public function sendApiRequest() {}", "title": "" }, { "docid": "aaa6f2a25aba152672e9345f37c09fa4", "score": "0.5787418", "text": "public function processApi();", "title": "" }, { "docid": "b108d09bf2b70a78ecbe515a5654ea6a", "score": "0.5779957", "text": "public function testMultipleRequests()\n\t{\n\t\t// initial get request\n\t\t$this->testPerformGetRequest();\n\t\t\n\t\t// head following get\n\t\t$this->testPerformHeadRequest();\n\t\t\n\t\t// post following head\n\t\t$this->testPerformPostRequest();\n\t\t\n\t\t// get following post\n\t\t$this->testPerformGetRequest();\n\t\t\n\t\t// post following get\n\t\t$this->testPerformPostRequest();\n\t\n\t\t// head following post\n\t\t$this->testPerformHeadRequest();\n\t\t\n\t\t// get following post\n\t\t$this->testPerformGetRequest();\t\t\n\t}", "title": "" }, { "docid": "d26609a8fc4577e972f261a6bb0ff853", "score": "0.57123405", "text": "public function SendRequests()\r\n {\r\n $requests[] = $this->oContracts->GetRequest();\r\n $requests[] = $this->oExchanges->GetRequest();\r\n $requests[] = $this->oUsers->GetRequest();\r\n $requests[] = $this->oAccounts->GetRequest();\r\n $requests[] = $this->oGroups->GetRequest();\r\n $requests[] = $this->oTrades->GetRequest();\r\n\r\n // Send the queries to the API for processing\r\n $this->oApi->sendRequests($requests);\r\n }", "title": "" }, { "docid": "24e1480761aeff015d72777a78fb09f5", "score": "0.5706688", "text": "public function go() \r\n {\r\n while (count($this->requests) > 0 || count($this->timeouts) > 0) {\r\n \r\n //echo count($this->requests) . ' / ' . count($this->timeouts) . \" - r/t \\n\";\r\n // check timeouts...\r\n $i = 0;\r\n $ts = microtime(true);\r\n while ($i < count($this->timeouts)) {\r\n $t = $this->timeouts[$i];\r\n if ($t['from'] + $t['delay'] < $ts) {\r\n $t = $this->timeouts[$i];\r\n array_splice($this->timeouts, $i, 1);\r\n\r\n $args = array();//?\r\n call_user_func_array($t['callback'], $args);\r\n\r\n usleep(1000);\r\n continue 2; //!\r\n }\r\n $i++;\r\n }\r\n //...\r\n\r\n $active = 1;\r\n while ($active > 0) {\r\n $i = count($this->requests);\r\n while ($i > 0 && $active > 0) {\r\n $i--;\r\n $mrc = curl_multi_exec($this->requests[$i]->multiHandle, $active);\r\n }\r\n if ($active > 0) {\r\n usleep(1000);\r\n continue 2; //!\r\n }\r\n }\r\n\r\n $completed = $this->requests[$i];\r\n $content = curl_multi_getcontent($completed->handle);\r\n \r\n // http://stackoverflow.com/questions/4017911/curl-and-redirects-returning-multiple-headers\r\n $curlInfo = curl_getinfo($completed->handle);\r\n $headerSize = $curlInfo[\"header_size\"];\r\n $responseHeaders = substr($content, 0, $headerSize);\r\n $content = substr($content, $headerSize);\r\n //?\r\n\r\n curl_multi_remove_handle($completed->multiHandle, $completed->handle);\r\n curl_multi_close($completed->multiHandle);\r\n\r\n $this->requests[$i] = $this->requests[count($this->requests) - 1];\r\n array_pop($this->requests);\r\n\r\n if ((count($this->requests) < $this->maxRequests) && (count($this->queue) > 0)) {\r\n $x = array_pop($this->queue);\r\n $this->_request($x); \r\n }\r\n\r\n if (curl_error($completed->handle)) {\r\n $completed->emit(self::ERROR, curl_error($completed->handle), $completed->url, $completed->handle);\r\n } else {\r\n $completed->emit(self::SUCCESS, $content, $completed->url, $completed->handle); \r\n }\r\n $completed->emit(self::COMPLETE, $content, $completed->url, $completed->handle, $responseHeaders);\r\n\r\n curl_close($completed->handle);\r\n }\r\n }", "title": "" }, { "docid": "0204400ef53d43ca744ee97784d0d572", "score": "0.5673771", "text": "public function finishAllRequests()\n {\n $this->waitForOutstandingRequestsToDropBelow(1);\n }", "title": "" }, { "docid": "5eee94ae37c7d7d859d8b8597438fc2f", "score": "0.565432", "text": "function route_request() {\n $this->request_path = trim($_SERVER['PATH_INFO'],'/');\n $this->request_body = file_get_contents('php://input');\n $method = $_SERVER['REQUEST_METHOD'];\n\t\tob_start();\n\n file_put_contents('logs/php_api.log', PHP_EOL . \"New request received:\" . date(DATE_ATOM ) . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"method: \" . $method . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"path: \" . $this->request_path . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"query string: \" . $_SERVER['QUERY_STRING'] . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"body: \" . $this->request_body . PHP_EOL, FILE_APPEND | LOCK_EX);\n switch ($method) {\n case 'GET':\n $this->doGet();\n break;\n case 'PUT':\n $this->doPut();\n break;\n case 'POST':\n $this->doPost();\n break;\n case 'DELETE':\n $this->doDelete();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "cb078a219498b58c2f8c5363542bfda7", "score": "0.56324464", "text": "function afterRequest() {\n\t// start2 emergency solution\n\tif ($this->uri===\"/kcsapi/api_start2\" && !file_exists(\"start2.json\")) {\n\t\tfile_put_contents(\"start2.json\", json_encode($this->response));\n\t}\n\t// TODO\n\tif ($this->errno ==1 ) {\n\t\trequire_once 'KCViewer.class.php';\n\t\t$user = new KCUser();\n\t\t$user->initWithToken($this->post['api_token']);\n\t\t$this->viewer->afterRequest($this);\n\n\t\tKCLogger::request($this);\n\t\t$this->furnhack->afterRequest($this);\n\t}\n\n}", "title": "" }, { "docid": "b432915b657c15bf27c3bd3dc6ed295d", "score": "0.5629961", "text": "function processRequest(){\n\n\t\t// defaults\n\t\t$default = array('endpoint'=>'','object_id'=>'','page'=>'1','per_page'=>'10','mediatype'=>'');\n\t\t\n\t\t//first check params\n\t\tif(checkParams()){\n\t\t\t$apibridge = new APIBridge;\n\t\t\tif( $apibridge->apiCheckCookie() === FALSE ):\n\t\t\t\t$content = $apibridge->apiConnect();\n\t\t\tendif;\n\t\t\t\n\t\t\t$params = array_replace($default, $_GET);\n\t\t\t// replace the following url with your own API url.\n\t\t\t$response = $apibridge->apiCall( \"{$params['endpoint']}/{$params['object_id']}/{$params['page']}/{$params['per_page']}/{$params['type']}\" );\n\t\t}else{\n\t\t\t$response = json_encode(array('status'=>0,'message'=>'Invalid request.'));\n\t\t}\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "ed9a915a98e007fd3fb22874354cf722", "score": "0.55934113", "text": "abstract public function collect(Request $request, Response $response);", "title": "" }, { "docid": "c186fa778389b217ff66031d0d270088", "score": "0.5546095", "text": "public function process() {\n\t\t$request = array(\n\t\t\t'ip' => $_SERVER['REMOTE_ADDR'],\n\t\t\t'method' => strtoupper( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ),\n\t\t\t'scheme' => is_ssl() ? 'https' : 'http',\n\t\t\t'host' => wp_unslash( $_SERVER['HTTP_HOST'] ),\n\t\t\t'path' => isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : '/',\n\t\t\t'query' => isset( $_SERVER['QUERY_STRING'] ) ? wp_unslash( $_SERVER['QUERY_STRING'] ) : '',\n\t\t\t'headers' => $this->get_headers( wp_unslash( $_SERVER ) ),\n\t\t);\n\n\t\tksort( $request['headers'] );\n\n\t\t$request['url'] = sprintf( '%s://%s%s', $request['scheme'], $request['host'], $request['path'] );\n\n\t\t$this->data['request'] = $request;\n\n\t\t$headers = array();\n\t\t$raw_headers = headers_list();\n\t\tforeach ( $raw_headers as $row ) {\n\t\t\tlist( $key, $value ) = explode( ':', $row, 2 );\n\t\t\t$headers[ trim( $key ) ] = trim( $value );\n\t\t}\n\n\t\tksort( $headers );\n\n\t\t$response = array(\n\t\t\t'status' => self::http_response_code(),\n\t\t\t'headers' => $headers,\n\t\t);\n\n\t\t$this->data['response'] = $response;\n\t}", "title": "" }, { "docid": "b76357f44d493c959e1ef9faee6c5360", "score": "0.55210465", "text": "private function setupApiRequest(){\n //clean request URI (remove not relevant path parts)\n $apiPath = str_replace($this->baseFolder, \"\", strtolower($_SERVER['REQUEST_URI']));\n //parse the ApiRequest\n $this->apiRequest = ApiRequest::ParseRequest($apiPath, $_SERVER['REQUEST_METHOD'], json_decode(file_get_contents('php://input'), true), $this->authHeaderKey);\n //check if the debug mode is enabled\n $this->debugMode = $this->apiRequest->params['debug'] ?? false || $this->debugMode;\n //initialize the session\n $this->session = new ApiSession($this->apiRequest->authKey);\n }", "title": "" }, { "docid": "1f446472c5a98c4fbae42046b1ed2e5a", "score": "0.5518607", "text": "public function initRequesters()\n\t{\n\t\t$this->collRequesters = array();\n\t}", "title": "" }, { "docid": "b4026b3ebb4ef933ecf86626ca4489e3", "score": "0.55175614", "text": "public function run() {\n\t\t\n\t\t$method = '';\n\t\t$return_code = 0;\n\t\t$http_method = (isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : '');\n\t\tif($http_method == 'POST') {\n\t\t\t$method = 'add';\n\t\t\t$return_code = 201;\n\t\t} elseif($http_method == 'GET') {\n\t\t\t$method = 'get';\n\t\t\t$return_code = 200;\n\t\t} elseif($http_method == 'PUT') {\n\t\t\t$method = 'update';\n\t\t\t$return_code = 204;\n\t\t} elseif($http_method == 'DELETE') {\n\t\t\t$method = 'delete';\n\t\t\t$return_code = 204;\n\t\t} else {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'Invalid request');\n\t\t}\n\t\t\n\t\t$params = array();\n\t\tif($http_method == 'POST' || $http_method == 'PUT') { \n\t\t\t$raw = file_get_contents(\"php://input\");\n\t\t\t$json = json_decode($raw, true);\n\t\t\tif(!is_array($json)) $this->_return_error(400, 'INVALID REQUEST', 'The JSON data sent to the api is invalid');\n\t\t}\n\t\t\n\t\t// get URL\n\t\t$url_path = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '');\n\t\tif(!preg_match('^\\/?remote\\/api\\/v(\\d+)\\/(\\w+)(?:\\/(\\d+)|\\/)?(?:\\?.*)$/', $url_path, $parts)) {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'The url you called is not a valid REST url.');\n\t\t}\n\t\t$this->api_version = $parts[1];\n\t\tif($this->api_version != 1) {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'Invalid API version called.');\n\t\t}\n\t\t$section = $parts[2];\n\t\t$primary_id = (isset($parts[3]) ? $parts[3] : 0);\n\t\t$qry = (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');\n\t\t$get = array();\n\t\tparse_str($qry, $get);\n\t\t\n\t\t$method = $section . '_' . $method;\n\t\t\n\t\t\n\t\tif(array_key_exists($method, $this->methods) == false) {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'Method ' . $method . ' does not exist');\n\t\t}\n\n\t\t$class_name = $this->methods[$method];\n\t\tif(array_key_exists($class_name, $this->classes) == false) {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'Class ' . $class_name . ' does not exist');\n\t\t}\n\n\t\tif(method_exists($this->classes[$class_name], $method) == false) {\n\t\t\t$this->_return_error(400, 'INVALID REQUEST', 'Method ' . $method . ' does not exist in the class it was expected (' . $class_name . ')');\n\t\t}\n\t\t\n\t\t$methObj = new ReflectionMethod($this->classes[$class_name], $method);\n\t\tforeach($methObj->getParameters() as $param) {\n\t\t\t$pname = $param->name;\n\t\t\tif($pname == 'session_id') $params[] = (isset($get['session_id']) ? $get['session_id'] : '');\n\t\t\telseif($pname == 'primary_id' && $primary_id) $params[] = $primary_id;\n\t\t\telseif($pname == 'params' && is_array($json)) $params[] = $json;\n\t\t\telseif(isset($json[$pname])) $params[] = $json[$pname];\n\t\t\telse $params[] = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$this->_return_json($return_code, call_user_func_array(array($this->classes[$class_name], $method), $params));\n\t\t} catch(ISPConfigRemoteException $e) {\n\t\t\t$this->_return_error(500, 'REQUEST ERROR', $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "f97233ca3c395362a0fa47cb496e5605", "score": "0.55055654", "text": "private function fetch()\n {\n $this->setup();\n\n //ready to execute api calls\n $promises = $this->buildPromiseRequest();\n\n //call the api\n $result = Promise\\settle($promises)->wait();\n\n //format the result and return it\n $this->format($result);\n }", "title": "" }, { "docid": "6e534884edb36de4318e9e228cfd329b", "score": "0.5500639", "text": "protected function makeRequest()\n {\n }", "title": "" }, { "docid": "c2d3c6db9fa99174e98dc106cd38ba27", "score": "0.5496148", "text": "private function requests_fetch_objects () {\n \treturn $this->fetch_multiple_objects (\"requests\", \"processed\", 0);\n\t}", "title": "" }, { "docid": "4ea396a95c9199f617c3b63ec4e1df99", "score": "0.5482359", "text": "private function makeRequest() {\r\n\t\t$data_raw = \"\";\r\n\t\tforeach ($this->data as $key => $value){\r\n\t\t\t$data_raw = $data_raw . $key . \"=\" . urlencode($value) . \"&\";\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->api_url);\r\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_raw);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t \r\n\t\t$this->response = trim(curl_exec($ch));\r\n\t\tcurl_close($ch);\r\n\t}", "title": "" }, { "docid": "c6783a27f77a84a874318eed183054fa", "score": "0.5481232", "text": "abstract protected function getAPI();", "title": "" }, { "docid": "98312f4dc4d32113563a2edfd413711c", "score": "0.54574686", "text": "public function execute()\n {\n ob_start();\n\n $this->response = $this->getResponse();\n try {\n $this->request = $this->getRequest();\n $this->request_headers = $this->request->request_headers;\n\n if ($this->min_version > $this->request->version || $this->max_version < $this->request->version) {\n throw new ServiceApiExceptionIncorrectVersion(\"Please change your url to reflect version between {$this->min_version} and {$this->max_version}\");\n }\n\n $dbm = DBManagerFactory::getDatabaseManager();\n if (empty($dbm)) {\n Log::fatal('Unable to connect to Database - terminating');\n throw new ServiceApiExceptionError('Database Configuration Error');\n }\n\n $clientInfo = $this->authenticateUser();\n if (empty($clientInfo)) {\n throw new ServiceApiExceptionNotAuthorized(\"Account Not Authorized\");\n }\n\n $route = $this->findRoute($this->request);\n if ($route == false) {\n throw new ServiceApiExceptionNoMethod('Could not find any route that accepted a path like: '.$this->request->rawPath);\n }\n\n // Get the request args early for use in current user api\n $argArray = $this->getRequestArgs($route);\n unset($argArray['__url']);\n\n $options = array();\n foreach($argArray as $k => $v) {\n if (strlen($k) > 2 && substr($k,0,2) == \"__\") {\n $options[substr($k,2)] = $v;\n unset($argArray[$k]);\n }\n }\n\n $headers = array();\n foreach ($this->special_headers as $header) {\n if(isset($this->request_headers[$header])) {\n $headers[$header] = $this->request_headers[$header];\n }\n }\n\n if(!empty($headers)) {\n $options['_headers'] = $headers;\n }\n\n $this->request->setArgs($argArray)->setRoute($route);\n\n $apiClass = $this->loadApiClass($route);\n $apiMethod = $route['method'];\n\n // Customer_Id Available to All Service Instances\n $apiClass->customer_id = $clientInfo->id;\n $apiClass->credentials = $clientInfo->toArray();\n\n $this->handleErrorOutput('php_error_before_api');\n\n $result = $apiClass->$apiMethod($this, $argArray, $options);\n\n $this->response->setContent($result);\n $this->respond($route, $argArray);\n\n if (empty($route['rawReply'])) {\n $this->handleErrorOutput('php_error_after_api');\n }\n } catch ( Exception $e ) {\n $this->handleException($e);\n }\n\n $this->response->send();\n }", "title": "" }, { "docid": "ee673e0222f95e8f328609fbcbb2b0f4", "score": "0.5456002", "text": "private function initializeRequest() {\n\t\t$this->responseBody = \"\";\n\t\t$this->responseHeaders = array();\n\t\tcurl_setopt($this->curl, CURLOPT_HTTPHEADER, $this->headers);\t\t\n\t}", "title": "" }, { "docid": "505a48176102799de16119e2dd87934b", "score": "0.545436", "text": "public function execute()\n {\n $status = 400;\n $responseBody = null;\n\n try {\n $this->setRequest();\n\n $response = $this->processAPI();\n\n $responseBody = $response->getResult();\n $status = $response->getCode();\n unset($response);\n } catch (\\Exception $e) {\n $status = 500;\n\n error_log($e->getMessage());\n $responseBody = ['error' => 'internal error'];\n } finally {\n if ($this->enableHeaders) {\n // @codeCoverageIgnoreStart\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n // @codeCoverageIgnoreEnd\n }\n http_response_code($status);\n echo json_encode($responseBody);\n // OWASP security : clear variables, especially on exception\n $this->clearRequestParameters();\n }\n }", "title": "" }, { "docid": "b18a5f1ed6e717a19cf3c32d48ecf1ca", "score": "0.5445017", "text": "function RunDBRequests() {\n\t\t//var_dump(OESQLBase::SQLInstance());\n\t\t//$tm = microtime(true);\n\t\t$arResults = OESQLBase::SQLInstance()->runSQLPack($this->RequestPack); //!!fix same name ??\n\t\t//echo \"<span style='color:blue'>==TIME</span>::\".(round((microtime(true) - $tm)*10000)*0.1).\" for runSQLPack<br/>\";\n\t\t$fusionContainer = null;\n\t\t$cName = $this->_ResultName();\n\t\tif (!empty($arResults)) {\n\t\t\tforeach ($arResults as &$container) { \n\t\t\t\t//var_dump($container);\n\t\t\t\t$container->SetName($cName);\n\t\t\t\t// Manage primary keys columns with non-standard names:\n\t\t\t\tif (isset($this->Params['PKeys'])) {\n\t\t\t\t\tforeach($this->Params['PKeys'] as $pkey) {\n\t\t\t\t\t\t$container->SetPrimaryKey($pkey);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$fusionContainer) \n\t\t\t\t\t$fusionContainer =& $container;\n\t\t\t\telse { // merge containers into one:\n\t\t\t\t\t$fusionContainer->AddFromContainer($container);\n\t\t\t\t}\n\t\t\t\t//break;//!! now only one container per action //!!fix merge several containers\n\t\t\t}\n\t\t\tunset($container); // break the reference (see php manual)\n\t\t}\n\t\t\n\t\t//echo $fusionContainer->Name.':';var_dump($fusionContainer->Values);\n\t\t\n\t\t//foreach ($arResults as $tr) {echo $tr->toJSON(); }\n\t\n\t\t$this->Manager->addContainer($fusionContainer);\n\t\t//echo \"Request completed, results:\";//var_dump($this->Manager->dataContainers[3]);\n\t}", "title": "" }, { "docid": "ae5cd0d9ad9becfdbb9fc17b2b0d8266", "score": "0.543805", "text": "protected function buildRequests()\n {\n $requestClass = \"$this->apiTitle\".\"Request\";\n $this->requestBuilder->initialResource($requestClass, \"requestReplacer\")\n ->callArtisan()\n ->build($this->column);\n return $this->paths[\"{{ request_path }}\"] = KMFileFacade::getClassNameSpace(\"Requests\", $requestClass);\n }", "title": "" }, { "docid": "673a7cd09e140b5f13d2ce98644e78d4", "score": "0.54359", "text": "public function serviceProviderRequests()\n {\n try {\n $requests = [];\n $services = Service_Provider::with('estate')->with('category')->get();\n\n foreach($services as $service)\n {\n $status = $service->status;\n if($status == 0)\n {\n array_push($requests, $services);\n }\n }\n\n $res[\"status_code\"] = 200;\n $res[\"message\"] = \"Success!\";\n $res[\"requests\"] = $requests;\n\n return response()->json($res, $res[\"status_code\"]);\n }\n catch (\\Exception $e)\n {\n $res[\"status_code\"] = 501;\n $res[\"message\"] = \"Failed!\";\n $res[\"error\"] = $e->getMessage();\n\n return response()->json($res, $res[\"status_code\"]);\n }\n }", "title": "" }, { "docid": "9aa9cea32fa4318ffa5c029bdf0f1c5a", "score": "0.54292876", "text": "protected function do_api_action(){\n\t\t\t\n\t}", "title": "" }, { "docid": "7ce80ceae9cb6273be5967979e525c34", "score": "0.54106635", "text": "public function prepare() {\n\n\t\t$this->setMethod();\n\n\t\t$requestMethods = array_merge($this->requestMethods, ['RAW']);\n\n\t\tforeach($requestMethods as $requestMethod) {\n\n\t\t\tif(array_key_exists($requestMethod, $this->requestData) === false) {\n\n\t\t\t\t$this->requestData[$requestMethod] = [];\n\n\t\t\t}\n\n\t\t\tswitch($requestMethod) {\n\t\t\t\tcase 'RAW' :\n\n\t\t\t\t\t$this->requestData[$requestMethod] = array_merge($this->requestData[$requestMethod], $_REQUEST);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'GET' :\n\n\t\t\t\t\t$this->requestData[$requestMethod] = array_merge($this->requestData[$requestMethod], $_GET);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'POST' :\n\n\t\t\t\t\t$this->requestData[$requestMethod] = array_merge($this->requestData[$requestMethod], $_POST);\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\n\t\t\t\t\tparse_str(file_get_contents('php://input'), $requestData);\n\t\t\t\t\t$this->requestData[$requestMethod] = array_merge($this->requestData[$requestMethod], $requestData);\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\t$this->requestData = $this->cleanParameters($this->requestData);\n\n\t}", "title": "" }, { "docid": "457cf4e75b5d65a040297ad2ca7416a1", "score": "0.5407614", "text": "function run() {\n foreach ($this->receptors as $r) {\n\t\t\ttry {\n\t\t\t\t$r->run($this->request, $this->response);\n\t\t\t} catch(Exception $error) {\n\t\t\t\t$this->response->raise($error);\n\t\t\t}\n }\n\t\t$this->response->out();\n }", "title": "" }, { "docid": "bb0ec4b1348790e23979fc0276a33453", "score": "0.53749824", "text": "function _multiRequest($data) {\n\t\t$curly = array();\n\n\t\t// data to be returned\n\t\t$result = array();\n\n\t\t// multi handle\n\t\t$mh = curl_multi_init();\n\n\t\t// loop through $data and create curl handles\n\t\t// then add them to the multi-handle\n\t\tforeach ($data as $id => $url) {\n\n\t\t\t$curly[$id] = curl_init();\n\n\t\t\tcurl_setopt($curly[$id], CURLOPT_URL, $url);\n\t\t\tcurl_setopt($curly[$id], CURLOPT_HEADER, 0);\n\t\t\tcurl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($curly[$id], CURLOPT_TIMEOUT, 10);\n\t\t\tcurl_setopt($curly[$id], CURLOPT_SSL_VERIFYPEER, false);\n\t\t\tcurl_multi_add_handle($mh, $curly[$id]);\n\t\t}\n\n\t\t// execute the handles\n\t\t$running = null;\n\t\tdo {\n\t\t\tcurl_multi_exec($mh, $running);\n\t\t} while($running > 0);\n\n\n\t\t// get content and remove handles\n\t\tforeach($curly as $id => $c) {\n\t\t\t$result[$id] = curl_multi_getcontent($c);\n\t\t\tcurl_multi_remove_handle($mh, $c);\n\t\t\t// to get the error code: print_r(curl_multi_info_read($mh));\n\t\t}\n\n\t\t// all done\n\t\tcurl_multi_close($mh);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8fa8fbe620a393347abe84a8a670f82a", "score": "0.5370357", "text": "function getAPI()\n {\n $client = new GuzzleHttpClient();\n\n // get all promises requests from providers\n $promises = $this->getPromises($this->providers, $client);\n\n // Wait Async Request to Respond\n $responses = Promise\\Utils::settle($promises)->wait();\n\n // Accessing body from Responses\n $responsesBodyArr = $this->getResponsesBody($responses);\n\n // convert strings To Json Arrays & Merge Them into One Array\n $jsonArrays = $this->getJsonArrays($responsesBodyArr);\n\n return $jsonArrays;\n }", "title": "" }, { "docid": "0ea6aae3df20ad0443882878d96a90c9", "score": "0.53605676", "text": "public function processAPI(){\n if (method_exists($this, $this->endpoint)) {\n return $this->_response($this->{$this->endpoint}($this->args));\n }\n else { \n return $this->_response(\"No endpoint: $this->endpoint\", 404);\n }\n }", "title": "" }, { "docid": "4a1382e1cd52a66765967882103b01ce", "score": "0.535654", "text": "public function __construct()\r\n {\r\n header(\"Expires: Sat, 07 Apr 1979 05:00:00 GMT\");\r\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\r\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\r\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\r\n header(\"Pragma: no-cache\");\r\n header('Content-Type: application/json');\r\n \r\n // make sure request contains the user security identifier \r\n if(!isset($_POST['sid']))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Missing SID. Please request an API user account.\"),\"400 Bad Request\"); \r\n }\r\n \r\n // make sure some data was passed in\r\n if(!isset($_POST['payload']) || trim($_POST['payload']) == \"\")\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Missing payload. Request does not include any information.\"),\"400 Bad Request\"); \r\n }\r\n \r\n // make sure the request is signed\r\n if(!isset($_POST['signature']))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Unsigned Request. Please include Hashed Message Authentication Code.\"),\"403 Forbidden\"); \r\n }\r\n \r\n // look up user (do this on every request incase account status has changed)\r\n $this->user = ORM::for_table('api_accounts')->where('sid',$_POST['sid'])->find_one();\r\n if(!$this->user)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Invalid SID. The given value does not belong to a known user.\"),\"403 Forbidden\"); \r\n }\r\n \r\n // if user has white-listed an IP address (or addresses), make sure they are using it.\r\n if($this->user->valid_ip_list != \"\")\r\n {\r\n $ips = explode(\",\", $this->user->valid_ip_list);\r\n if(!in_array($_SERVER['REMOTE_ADDR'], $ips))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Requesting IP address not assoicated with given user.\"),\"403 Forbidden\"); \r\n }\r\n }\r\n \r\n // make sure user's account has access to the API\r\n if($this->user->active != 1)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"This user is not currently authorized to access the API.\"),\"403 Forbidden\"); \r\n }\r\n\r\n // check that the signature matches the user\r\n $this->users_key = decrypt($this->user->api_key);\r\n $expected = base64_encode(hash_hmac(hash_algo, print_r($_POST['payload'],true), $this->users_key ));\r\n \r\n if($_POST['signature'] !== $expected)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Invalid HMAC signature. Please refer to documentation for proper hashing method.\"),\"403 Forbidden\"); \r\n }\r\n \r\n $_POST['payload'] = json_decode($_POST['payload'],true); // (parm 2 = \"true\" to keep it an assoc array)\r\n\t}", "title": "" }, { "docid": "f3ad9b05a6e8e1b38c5dbc8eaf7aaffe", "score": "0.53517205", "text": "public function processRequest(IRequest $request): IResponse\n {\n $this->lastRequest = $request;\n foreach ($this->preRequestMiddlewares as $middleware) {\n $middleware->handle($request);\n }\n $request->incrementTries();\n\n /**\n * TODO:: fix smelly code : token is only used in child class @see OAuthClient\n */\n $configurationHeaders = $this->configuration->defaultHeaders($this->token ?? null);\n $options = $request->requestOptions();\n if (isset($options[RequestOptions::HEADERS])) {\n $options[RequestOptions::HEADERS] = array_merge($options[RequestOptions::HEADERS], $configurationHeaders);\n } else {\n $options[RequestOptions::HEADERS] = $configurationHeaders;\n }\n\n try {\n $response = $this->guzzleClient->request($request->httpType()->getValue(), $request->toUri(), $options);\n $parsedData = JSONParsing::responseToJson($response);\n\n if (isset($this->postRequestMiddlewares[$response->getStatusCode()])) {\n foreach ($this->postRequestMiddlewares[$response->getStatusCode()] as $middleware) {\n $parsedData = $middleware->handle($request, $response, $parsedData);\n }\n }\n } catch (BadResponseException $e) {\n /**\n * Check status code.\n */\n $response = $e->getResponse();\n $this->processThrottleData($response);\n\n if (!isset($this->postRequestMiddlewares[$response->getStatusCode()])) {\n throw new SDKException($e->getMessage(), $e->getCode(), $e);\n }\n $parsedData = JSONParsing::responseToJson($response);\n\n foreach ($this->postRequestMiddlewares[$response->getStatusCode()] as $middleware) {\n $parsedData = $middleware->handle($request, $response, $parsedData);\n }\n } catch (RequestException $e) {\n if ($request->requestType()->is(RequestType::HTTP_GET())\n && $request->tries() < 3) {\n return $this->processRequest($request);\n }\n\n throw new TooManyRetriesException($e->getMessage(), $e->getCode(), $e);\n } catch (GuzzleException $e) {\n throw new SDKException($e->getMessage(), $e->getCode(), $e);\n }\n\n /**\n * @var $data BaseResponse\n */\n $data = $request->processResponse($parsedData);\n\n if ($data instanceof BaseResponse) {\n $data->setRawData($parsedData);\n }\n\n if ($data instanceof IRateLimitedResponse) {\n $this->processThrottleData($response);\n $data->setRateLimit($this->rateLimit);\n }\n\n $request->setResponse($data);\n\n return $data;\n }", "title": "" }, { "docid": "097be8a78f4f2175650cf8f429887fc6", "score": "0.5344553", "text": "protected function runRequest()\n {\n if (is_null($response = $this->getResponseFromCache())){\n try {\n $response = $this->requestThroughApiClient();\n $this->putResponseToCache($response);\n } catch (\\Exception $apiClientException){\n throw new ApiRequestException($apiClientException->getMessage(), $apiClientException->getCode());\n }\n }\n if ($response->code == self::SUCCESS_RESPONSE_CODE){\n return $response->result;\n } else {\n throw new ApiRequestException($response->result, $response->code);\n }\n }", "title": "" }, { "docid": "dc954ffd9ec2e14819593a4607c9539f", "score": "0.53315806", "text": "public function processAPI() {\n if (method_exists($this, $this->endpoint)) {\n if ($this->action != null){\n return $this->result($this->{$this->endpoint}($this->params, $this->action));\n }\n return $this->result($this->{$this->endpoint}($this->params));\n }\n //If doen't exit : error 404\n return $this->result(\"No Endpoint: $this->endpoint\", 404);\n }", "title": "" }, { "docid": "08b3181923e16ebe28592d8f002e5ac1", "score": "0.5308426", "text": "private function _dudeItUp() {\n\t\t$this->_helper->viewRenderer->setRender('index');\n $this->_helper->layout()->setLayout('plain');\n \t$config = Esquire_Config_Factory::getApplicationConfig();\n $logger = Esquire_Log_Factory::getLogger($config); \n $client = new Zend_Http_Client();\n \n $front = Zend_Controller_Front::getInstance();\n\t\t$request = $front->getRequest();\n\n\t\t$uri = $config->service->url . $request->getRequestUri();\n\t\t\n\t\t$request->setParam('_skipCustomRouting', true);\n\t\t$request->setParam('controller', null);\n\t\t$request->setParam('action', null);\n\t\t\n\t\tif ($request->getMethod() == 'GET') {\n\t\t\t$client->setParameterGet($request->getParams());\n\t\t} else if ($request->getMethod() == 'PUT') {\n\t\t\t$client->setRawData($request->getRawBody(), 'application/json');\n\t\t\t$client->setParameterPost($request->getParams());\n\t\t\t$uri .= http_build_query($request->getParams());\n\t\t} else {\n\t\t\t$client->setParameterPost($request->getParams());\n\t\t}\n\n\t\t$client->setUri($uri);\n\t\t$client->setMethod($request->getMethod());\n $timeout = $config->zend->http->timeout;\n $client->setConfig(array('timeout' => $timeout));\n\t\t\n\t\t$response = $client->request();\n\t\t\n\t\t$this->getResponse()\n\t\t->setHttpResponseCode($response->getStatus());\n\t\t\n\t\t$data = json_decode($response->getBody(), true);\n\t\t\t\t\n\t\t$this->view->response = $response;\n }", "title": "" }, { "docid": "4d600a36b72bd0668ec7f43eedb06158", "score": "0.52979296", "text": "public static function makeRequestXML()\n {\n $lastLeadImportTime = (\\App\\Acre::all()->count())\n ? \\App\\Acre::orderBy('received_at', 'desc')->first()->received_at\n : null;\n\n // $start_date = $lastLeadImportTime ? $lastLeadImportTime : Carbon::now()->today()->toDateTimeString();\n $start_date = Carbon::now()->subDays(2)->toDateTimeString();\n\n $end_date = Carbon::now()->toDateTimeString();\n\n foreach(Api::where('type','acers')->whereHas('user_group')->where('status','active')->get() as $acer_api){\n dd($acer_api);\n // $url = \"http://www.99acres.com/99api/v1/getmy99Response/OeAuXClO43hwseaXEQ/uid/\";\n $request = \"<?xml version='1.0'?><query><user_name>\".Config::get('settings.acres.user_name').\"</user_name><pswd>\".Config::get('settings.acres.password').\"</pswd><start_date>\".$start_date.\"</start_date><end_date>\".$end_date.\"</end_date></query>\";\n \n $url = $acer_api->url;\n $request = \"<?xml version='1.0'?><query><user_name>\".$acer_api->user_name.\"</user_name><pswd>\".$acer_api->password.\"</pswd><start_date>\".$start_date.\"</start_date><end_date>\".$end_date.\"</end_date></query>\";\n \n $allParams = array('xml'=>$request);\n \n $leads = Acre::get99AcresLeads($allParams,$url);\n dd($leads);\n Acre::processResponseXML($leads, $acer_api->id);\n }\n \n }", "title": "" }, { "docid": "b90c3bcc3b730c5369153b62a2966346", "score": "0.5290168", "text": "abstract public function rest_api_init();", "title": "" }, { "docid": "745543c5dab7ab4395d11c9bfd519b81", "score": "0.52897096", "text": "public function api_try() {\n\t\t$this->api_in ();\n\t}", "title": "" }, { "docid": "d4f60ad6f5490a61087043db10f04315", "score": "0.52891153", "text": "public function processApi(){\r\n\r\n\r\n\t\tif($_REQUEST['rquest']==\"update\"){\r\n\t\t\t$this->updatePrices();\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "9d7f2285e3f2ccc6fb54dbd0119c89bf", "score": "0.5287409", "text": "public function reset_requests()\n\t{\n\t\t$this->_request_stack = array();\n\t}", "title": "" }, { "docid": "212d8419a524700d874024c7eb3379f4", "score": "0.5285666", "text": "function makeRequest(){\n $request = $client->createRequest('GET', $this->apiRequestUrl);\n $request->setHeader('Content-Type', 'application/json');\n $request->setHeader('Cache-Control: no-cache');\n $request->setHeader('Fk-Affiliate-Id',$this->fkAffiliateToken);\n $request->setHeader('Fk-Affiliate-Token',$this->fkAffiliateToken);\n $response = $client->send($request);\n \n if(($responseCode==410)||($responseCode==403)||($responseCode==401)){\n returnApiError($responseCode);\n }\n \n return $response->xml();\n }", "title": "" }, { "docid": "74bf4f22e2c78e6660a746e58bf3413d", "score": "0.5285073", "text": "public function execute() {\n\n\t\tforeach ($this->batch as $index => $batchedRequest) {\n\n\t\t\tif (!isset($batchedRequest['relative_url'])) {\n\t\t\t\tthrow new HttpException(400, \"A relative URL was not provided for the request at index \".$index.\".\");\n\t\t\t}\n\t\t\t\n\t\t\t$requestName = !empty($batchedRequest['name']) ? $batchedRequest['name'] : count($this->responses);\n\n\t\t\t$this->parseURLTokens($batchedRequest);\n\t\t\t\n\t\t\t$this->responses[$requestName] = $this->handleBatchedRequest($batchedRequest);\n\t\t\t\n\t\t}\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "bee0f5c7100b4708bfa43b766eef5757", "score": "0.5284403", "text": "protected function _processRequest()\n {\n }", "title": "" }, { "docid": "547244d31f193ec3424365ee18afdf95", "score": "0.5284082", "text": "public function executeRequest() {\n if($this->method == \"get_pixels\") {\n \treturn $this->getPixels();\n }\n if($this->method == \"get_seat_pixel\") {\n \treturn $this->getSeatPixel();\n }\n else {\n \t$this->response->setStatusCode(405, \"Method Not Found\");\n\t\t\t\t\treturn $this->response;\n }\n }", "title": "" }, { "docid": "4acfd5fdb002a3bf2df056a7c434e8de", "score": "0.5268767", "text": "public function executeAll(array $requests) : int {\n\t\t\t$this->server->publish('requestOpened');\n\n\t\t\t$http_code = 200;\n\n\t\t\t$dispatcher = curl_multi_init();\n\t\t\t$resources = array();\n\t\t\t$count = count($requests);\n\n\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t$request = $requests[$i];\n\n\t\t\t\t$this->server->publish('requestInitiated', $request);\n\n\t\t\t\t$resource = curl_init();\n\n\t\t\t\tcurl_setopt($resource, CURLOPT_HEADER, false);\n\t\t\t\tif (isset($request->headers) && !empty($request->headers)) {\n\t\t\t\t\t$headers = array();\n\t\t\t\t\tforeach ($request->headers as $name => $value) {\n\t\t\t\t\t\t$headers[] = \"{$name}: {$value}\";\n\t\t\t\t\t}\n\t\t\t\t\tcurl_setopt($resource, CURLOPT_HTTPHEADER, $headers);\n\t\t\t\t}\n\n\t\t\t\tcurl_setopt($resource, CURLOPT_FOLLOWLOCATION, 1);\n\t\t\t\tcurl_setopt($resource, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\t\t\t\tcurl_setopt($resource, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($resource, CURLOPT_CONNECTTIMEOUT, 5);\n\t\t\t\tcurl_setopt($resource, CURLOPT_TIMEOUT, 120);\n\t\t\t\tcurl_setopt($resource, CURLOPT_URL, $request->url);\n\t\t\t\tif (preg_match('/^https/', $request->url)) {\n\t\t\t\t\tcurl_setopt($resource, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\t\t}\n\n\t\t\t\t$method = strtoupper($request->method);\n\t\t\t\tswitch ($method) {\n\t\t\t\t\tcase 'GET':\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'POST':\n\t\t\t\t\t\tcurl_setopt($resource, CURLOPT_POST, 1);\n\t\t\t\t\t\tif (isset($request->body)) {\n\t\t\t\t\t\t\t$body = $request->body;\n\t\t\t\t\t\t\tif (is_array($body)) {\n\t\t\t\t\t\t\t\t$body = http_build_query($body);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurl_setopt($resource, CURLOPT_POSTFIELDS, $body);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcurl_setopt($resource, CURLOPT_CUSTOMREQUEST, $method);\n\t\t\t\t\t\tif (isset($request->body)) {\n\t\t\t\t\t\t\t$body = $request->body;\n\t\t\t\t\t\t\tif (is_array($body)) {\n\t\t\t\t\t\t\t\t$body = http_build_query($body);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcurl_setopt($resource, CURLOPT_POSTFIELDS, $body);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isset($request->options) && !empty($request->options)) {\n\t\t\t\t\tforeach ($request->options as $name => $value) {\n\t\t\t\t\t\tcurl_setopt($resource, $name, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isset($request->credentials) && !empty($request->credentials)) {\n\t\t\t\t\tcurl_setopt($resource, CURLOPT_HTTPAUTH, $request->credentials['method'] ?? CURLAUTH_ANY);\n\t\t\t\t\tif (isset($request->credentials['username']) && isset($request->credentials['password'])) {\n\t\t\t\t\t\tcurl_setopt($resource, CURLOPT_USERPWD, sprintf('%s:%s', $request->credentials['username'], $request->credentials['password']));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$resources[$i] = curl_copy_handle($resource);\n\t\t\t\tcurl_multi_add_handle($dispatcher, $resources[$i]);\n\t\t\t}\n\n\t\t\t$running = null;\n\t\t\tdo {\n\t\t\t\tcurl_multi_exec($dispatcher, $running);\n\t\t\t}\n\t\t\twhile ($running);\n\n\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t$resource = $resources[$i];\n\t\t\t\t$request = $requests[$i];\n\n\t\t\t\tcurl_multi_remove_handle($dispatcher, $resource);\n\t\t\t\t$body = curl_multi_getcontent($resource);\n\t\t\t\tif (curl_errno($resource)) {\n\t\t\t\t\t$error = curl_error($resource);\n\t\t\t\t\t@curl_close($resource);\n\t\t\t\t\t$status = 503;\n\t\t\t\t\t$response = HTTP\\Response::factory([\n\t\t\t\t\t\t'body' => $error,\n\t\t\t\t\t\t'headers' => [\n\t\t\t\t\t\t\t'http_code' => $status,\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'status' => $status,\n\t\t\t\t\t\t'statusText' => HTTP\\Response::getStatusText($status),\n\t\t\t\t\t\t'url' => $request->url,\n\t\t\t\t\t]);\n\t\t\t\t\t$this->server->publish('requestFailed', $response);\n\t\t\t\t\t$this->server->publish('requestCompleted', $response);\n\t\t\t\t\t$http_code = max($http_code, $status);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$headers = curl_getinfo($resource);\n\t\t\t\t\t@curl_close($resource);\n\t\t\t\t\t$status = $headers['http_code'];\n\t\t\t\t\t$response = HTTP\\Response::factory([\n\t\t\t\t\t\t'body' => $body,\n\t\t\t\t\t\t'headers' => $headers,\n\t\t\t\t\t\t'status' => $status,\n\t\t\t\t\t\t'statusText' => HTTP\\Response::getStatusText($status),\n\t\t\t\t\t\t'url' => $request->url,\n\t\t\t\t\t]);\n\t\t\t\t\tif (($status >= 200) && ($status < 300)) {\n\t\t\t\t\t\t$this->server->publish('requestSucceeded', $response);\n\t\t\t\t\t\t$this->server->publish('requestCompleted', $response);\n\t\t\t\t\t\t$http_code = max($http_code, $status);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->server->publish('requestFailed', $response);\n\t\t\t\t\t\t$this->server->publish('requestCompleted', $response);\n\t\t\t\t\t\t$http_code = max($http_code, $status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurl_multi_close($dispatcher);\n\n\t\t\t$this->server->publish('responseReceived', $http_code);\n\n\t\t\treturn $http_code;\n\t\t}", "title": "" }, { "docid": "944f7673d2fe3aa2d198d38ef5a3c17e", "score": "0.5267651", "text": "public function generateReqs ( ) { }", "title": "" }, { "docid": "2a5b54ff481dcc8942c4a30eace181ba", "score": "0.5246084", "text": "function multi_curl(){\n $mh = curl_multi_init();\n for($i=0;$i<$this->max_reqs;$i++){\n $chandle = array_shift($this->chandles);\n if(is_resource($chandle))\n curl_multi_add_handle($mh, $chandle);\n if($i == count($this->chandles)) break;\n }\n /** Start curling.. */\n $running = null;\n do{\n while(($execrun = curl_multi_exec($mh, $running)) == CURLM_CALL_MULTI_PERFORM);\n if($execrun != CURLM_OK)\n break;\n usleep(1000);\n // check for finished requests.. call the callback function and que up another request if we have any left..\n while ($done = curl_multi_info_read($mh)) {\n if(is_resource($done['handle'])){\n // get the info and content returned on the request\n $info = curl_getinfo($done['handle']);\n $output = curl_multi_getcontent($done['handle']);\n // send the return values to the callback function.\n $callback = array($this,'mcurl_callback');\n $this->finishcnt++;\n if(is_callable($callback)) {\n $key = (string) $done['handle'];\n $key = $this->reqmap[$key];\n $request = $this->requrls[$key];\n unset($this->requrls[$key]);\n unset($this->reqmap[$key]);\n call_user_func($callback, $output, $info, $request, count($this->requrls),\n count($_SESSION['wpplginzr_mcurl_batches']));\n }\n // remove the curl handle that just completed\n curl_multi_remove_handle($mh, $done['handle']);\n // add the next curl handle if any are left..\n if (count($this->chandles)){\n $chandle = array_shift($this->chandles);\n if(is_resource($chandle)){\n curl_multi_add_handle($mh, $chandle);\n $key = (string) $chandle;\n $this->reqmap[$key] = $i;\n $i++;\n }\n }\n }\n }\n }while($running > 0);\n curl_multi_close($mh);\n }", "title": "" }, { "docid": "78cd1de27404448fe0b2a8bf6add9e3d", "score": "0.5236539", "text": "public function runRequestFilters();", "title": "" }, { "docid": "6e711ed6943102359815d886d9b4211c", "score": "0.5228149", "text": "private function init() {\n $apiParts = $this->request->getApiParts();\n $this->requestedId = array_shift($apiParts);\n $this->apiParts = $apiParts;\n \n $this->siteDriver = Datastore::getSiteDriver();\n }", "title": "" }, { "docid": "3bf3e07f0611a5cdcfd219327811fc3a", "score": "0.52270895", "text": "protected function go()\n {\n\n if (!$this->endpoint) {\n abort(401, \"Endpoint is required\");\n }\n\n if ($this->apiType == 'soap') {\n $body = $this->soapBody;\n array_walk($this->data, function ($value, $key) use ($body) {\n if ($this->soapBodyAvoidNamespace) {\n return $body->addChild($key, $value, $this->soapNamespace);\n } else {\n return $body->addChild($key, $value, $this->soapNamespace);\n }\n\n });\n\n $this->soapBody = $body;\n\n // self::log($this->soapRoot->asXML());\n }\n\n try {\n if (is_null($this->data)) {\n $result = $this->client->get($this->baseUrl . $this->endpoint);\n } else {\n if ($this->apiType == 'rest') {\n $result = $this->client->request('POST', $this->baseUrl . $this->endpoint, [\n $this->sendMethod => $this->data,\n 'query' => $this->queryString,\n ]);\n }\n if ($this->apiType == 'soap') {\n $result = $this->client->request('POST', $this->baseUrl . $this->endpoint, [\n $this->sendMethod => $this->soapRoot->asXML(),\n 'query' => $this->queryString,\n ]);\n }\n\n }\n\n $this->response = $this->rawResponse = $result->getBody(true);\n } catch (\\GuzzleHttp\\Exception\\BadResponseException $e) {\n // Log::debug($e);\n if ($e->hasResponse()) {\n $this->response = $this->rawResponse = $e->getResponse()->getBody(true);\n }\n }\n\n return $this->process();\n }", "title": "" }, { "docid": "4c498ae25917dd7a428f6df246b72b90", "score": "0.52256817", "text": "public function schedule()\n {\n // Loop through each request\n foreach ($this as $Request) {\n if (($Response = $this->getInfo()) instanceof IResponse) {\n\n // Is request Running? next.\n if (isset($Response['Running']) ? (bool) $Response['Running'] : false) {\n continue;\n\n // Is request Finished? next.\n } elseif (isset($Response['Finished']) ? (bool) $Response['Finished'] : false) {\n continue;\n\n // Retrieve resources\n } elseif (is_resource($Handle = $this->_lock($Request->URI['host']))) {\n // Start request\n $this->_start($Request, $Handle);\n }\n }\n }\n }", "title": "" }, { "docid": "f1f5932dc3fa97b22ee2549df15df22a", "score": "0.5223516", "text": "private function run()\n {\n //get the needed controller\n //@todo Fixed controller, create controller factory if necessary\n $apiCtrl = $this->apiControllers[\"entity\"] ?? null;\n\n if ($apiCtrl == null) {\n //no controller is found\n $this->setState(HttpResponseCodes::NotFound);\n return;\n }\n\n //inject the context\n $apiCtrl->setContext($this);\n \n //the apictrl handles if the request has the permission\n if (!$apiCtrl->hasPermission()) {\n $this->createMessageResponse(false, \"You haven't the permissions to do this action\");\n $this->setState(HttpResponseCodes::Unauthorized);\n return;\n }\n\n //run the right method for the call\n switch ($this->apiRequest->method) {\n case 'GET':\n //decide between geting a specific record or \"all\" records\n if ($this->apiRequest->requestedId != null) {\n $this->response = $apiCtrl->getById($this->apiRequest->requestedId, $this->apiRequest->params);\n } else {\n $this->response = $apiCtrl->get($this->apiRequest->params);\n }\n break;\n case 'PUT':\n $this->response = $apiCtrl->update($this->apiRequest->requestedId, $this->apiRequest->input);\n break;\n case 'POST':\n //decide between creating a record or call an action\n if ($this->apiRequest->action != null) {\n $this->response = $apiCtrl->invokeAction($this->apiRequest->action, $this->apiRequest->requestedId, $this->apiRequest->input);\n } else {\n $this->response = $apiCtrl->create($this->apiRequest->input);\n }\n break;\n case 'DELETE':\n $this->response = $apiCtrl->delete($this->apiRequest->requestedId, $this->apiRequest->input);\n break;\n default:\n $this->createMessageResponse(false, \"Not supported Method: \" . $this->apiRequest->method);\n $this->setState(HttpResponseCodes::MethodNotAllowed);\n return;\n }\n }", "title": "" }, { "docid": "9d50093882e93736566a389a17141cd3", "score": "0.5221919", "text": "public function all()\n {\n //Reference URL\n //https://github.com/chrisbjr/api-guard\n //This is for generating API Key\n // echo $apiKey = \\Chrisbjr\\ApiGuard\\Models\\ApiKey::make();\n //opions for make:=> make($userId = null, $level = 10, $ignoreLimits = false)\n //This is for calling API Through curl\n //curl --header \"X-Authorization: 7643eaac6ba7550ff5300952e72dea839fde4f85\" http://localhost/api/api/v1/books\n \n $books = Book::all();\n return $this->response->withCollection($books, new BookTransformer);\n }", "title": "" }, { "docid": "cc9e8ff0372658c561e354aae806739c", "score": "0.52212954", "text": "public function prepareRequest()\n {\n $this->getRequest()->getCriterion()->set('payment_method', $this->getClassName());\n if ($this->_brand !== null) {\n $this->getRequest()->getAccount()->setBrand($this->_brand);\n }\n\n $uri = $this->getPaymentUrl();\n $this->_requestArray = $this->getRequest()->convertToArray();\n\n if ($this->_dryRun === false and $uri !== null and is_array($this->_requestArray)) {\n list($this->_responseArray, $this->_response) =\n $this->getRequest()->send($uri, $this->_requestArray, $this->getAdapter());\n }\n }", "title": "" }, { "docid": "199eb17ce12a767460216265351bc106", "score": "0.52106535", "text": "function rest_preload_api_request( $memo, $path ) {\n\t// array_reduce() doesn't support passing an array in PHP 5.2,\n\t// so we need to make sure we start with one.\n\tif ( ! is_array( $memo ) ) {\n\t\t$memo = [];\n\t}\n\n\tif ( empty( $path ) ) {\n\t\treturn $memo;\n\t}\n\n\t$method = 'GET';\n\tif ( is_array( $path ) && 2 === count( $path ) ) {\n\t\t$method = end( $path );\n\t\t$path = reset( $path );\n\n\t\tif ( ! in_array( $method, [ 'GET', 'OPTIONS' ], true ) ) {\n\t\t\t$method = 'GET';\n\t\t}\n\t}\n\n\t$path_parts = wp_parse_url( $path );\n\tif ( false === $path_parts ) {\n\t\treturn $memo;\n\t}\n\n\t$request = new WP_REST_Request( $method, untrailingslashit( $path_parts['path'] ) );\n\t$embed = false;\n\tif ( ! empty( $path_parts['query'] ) ) {\n\t\t$query_params = [];\n\t\tparse_str( $path_parts['query'], $query_params );\n\t\t$embed = isset( $query_params['_embed'] ) ? $query_params['_embed'] : false;\n\t\t$request->set_query_params( $query_params );\n\t}\n\n\t$response = rest_do_request( $request );\n\tif ( 200 === $response->status ) {\n\t\t$server = rest_get_server();\n\t\t$data = $server->response_to_data( $response, $embed );\n\n\t\tif ( 'OPTIONS' === $method ) {\n\t\t\t$response = rest_send_allow_header( $response, $server, $request );\n\n\t\t\t$memo[ $method ][ $path ] = [\n\t\t\t\t'body' => $data,\n\t\t\t\t'headers' => $response->headers,\n\t\t\t];\n\t\t} else {\n\t\t\t$memo[ $path ] = [\n\t\t\t\t'body' => $data,\n\t\t\t\t'headers' => $response->headers,\n\t\t\t];\n\t\t}\n\t}\n\n\treturn $memo;\n}", "title": "" }, { "docid": "027f57061a9e3d015d661be8616faf52", "score": "0.52094156", "text": "public function initPilotRequests()\n\t{\n\t\t$this->collPilotRequests = array();\n\t}", "title": "" }, { "docid": "f3340867b394793f35f798ff37306e08", "score": "0.5206042", "text": "private function router() {\n /* Get all request variables */\n \n $requestParams = Rest::getRequestParams();\n \n \n $filename = $requestParams['url'];\n \n \n $request = Rest::getRequestMethod();\n \n \n $class = new getTweets();\n \n //$class = new $requestParams['url']();\n \n switch ($request) {\n case 'GET':\n $class->get($requestParams);\n break;\n case 'POST':\n $class->post($requestParams);\n case 'PUT':\n $class->put($requestParams);\n case 'DELETE':\n $class->delete($requestParams);\n default:\n throw new \\InvalidArgumentException(\"Method not allowed\");\n break;\n }\n \n }", "title": "" }, { "docid": "1e674c2dc5f1f91f673ab5249363b614", "score": "0.52044237", "text": "function private_request_get()\n {\n\n if ( ! class_exists('HelpSpotAPI'))\n\t\t{\n\t\t\trequire PATH_THIRD.'helpspot_ee_manager/HelpSpotAPI'.EXT;\n\t\t}\n \t $api = new HelpSpotAPI(array(\n \"helpSpotApiURL\" => trim($this->url, \"/\").\"/api/index.php\",\n 'username' => $this->login,\n\t\t\t\t\t\t\t\t 'password' => $this->password,\n 'cacheDir' => PATH_THIRD.'helpspot_ee_manager/cache'\n )); \n if ($this->EE->TMPL->fetch_param('id')!='')\n {\n $params['xRequest'] = $this->EE->TMPL->fetch_param('id');\n }\n\n if (empty($params))\n {\n return $this->EE->TMPL->no_results();\n }\n $params['cacheRequest'] = ($this->EE->TMPL->fetch_param('cache')=='on')?true:false;\t\n\n $result = $api->privateRequestGet($params);\t\n\n $responce = $result[\"request\"];\n $out = '';\n $count = 0;\n\n $total = count($responce[\"request_history\"][\"item\"]);\n\n if ($total==0)\n {\n $cond['no_results'] = TRUE;\n $out = $this->EE->functions->prep_conditionals($this->EE->TMPL->tagdata, $cond);\n return $out;\n }\n \n $tagdata = $this->EE->TMPL->tagdata;\n $items = $responce[\"request_history\"][\"item\"];\n if ($this->EE->TMPL->fetch_param('sort')=='asc')\n {\n krsort($items);\n }\n\n preg_match_all(\"/\".LD.\"items\".RD.\"(.*?)\".LD.\"\\/items\".RD.\"/s\", $tagdata, $rows);\n \n foreach($rows[0] as $row_key => $row_tag)\n {\n \t$row_chunk = $rows[0][$row_key];\n \n \t$row_chunk_content = $rows[1][$row_key];\n \n \t$row_inner = '';\n \n \t// loop over the row_data\n \tforeach ($items as $item)\n \t{\n \t\tif ($item[\"fPublic\"]==1) \n {\n $row_template = $row_chunk_content;\n \n \t\t$row_template = $this->EE->TMPL->swap_var_single('request_item_text', stripslashes($item[\"tNote\"]), $row_template);\n $row_template = $this->EE->TMPL->swap_var_single('request_item_date', $item[\"dtGMTChange\"], $row_template);\n $row_template = $this->EE->TMPL->swap_var_single('request_item_author', $item[\"xPerson\"], $row_template);\n $row_template = $this->EE->TMPL->swap_var_single('request_item_files', $item[\"files\"], $row_template);\n \n \t\t\n \t\t$row_inner .= $row_template;\n }\n \t}\n\n \t$tagdata = str_replace($row_chunk, $row_inner, $tagdata);\n }\n $out = $tagdata; \n \n $out = $this->EE->TMPL->swap_var_single('request_id', $responce[\"xRequest\"], $out);\n $out = $this->EE->TMPL->swap_var_single('request_status', $responce[\"xStatus\"], $out);\n $out = $this->EE->TMPL->swap_var_single('request_category', $responce[\"xCategory\"], $out);\n $out = $this->EE->TMPL->swap_var_single('request_dateopen', $responce[\"dtGMTOpened\"], $out);\n $out = $this->EE->TMPL->swap_var_single('request_dateclose', $responce[\"dtGMTClosed\"], $out);\n $out = $this->EE->TMPL->swap_var_single('request_lastreplyby', ($responce[\"iLastReplyBy\"]!='0')?$out[\"iLastReplyBy\"]:'', $out);\n $out = $this->EE->TMPL->swap_var_single('request_items_total', $total, $out);\n \n $cond = array();\n $cond['no_results'] = FALSE;\n $cond['request_open'] = ($responce[\"fOpen\"]==1)?TRUE:FALSE;\n $cond['request_urgent'] = ($responce[\"fUrgent\"]==1)?TRUE:FALSE;\n $out = $this->EE->functions->prep_conditionals($out, $cond);\n \n\n return $out;\n }", "title": "" }, { "docid": "f10ee9937c6e811518469b88f9add2db", "score": "0.5203654", "text": "public function activateAndAssertAllAPI() {\n foreach (array_keys($this->apis) as $bname) {\n $this->activateAndAssertAPI($bname);\n }\n }", "title": "" }, { "docid": "a746eb10ea7aa2bfd165ee37be2cc321", "score": "0.5198357", "text": "public function settle($request);", "title": "" }, { "docid": "a61940b74950af281d8fe98c17b8aca0", "score": "0.5195773", "text": "public function api_marshalled() {\n\t\t$this->layout = 'ajax';\n\n\t\t$data = array();\n\t\t$request = array();\n\n\t\t// Fetch the request from the user\n\t\tif (!is_null($this->request->query)) {\n\t\t\t$request = $this->request->query;\n\t\t}\n\n\t\t$user = $this->Auth->user('id');\n\n\t\tif (empty($request)) {\n\t\t\t$this->response->statusCode(400);\n\t\t\t$data['error'] = 400;\n\t\t\t$data['message'] = 'Bad request, empty query specified.';\n\t\t} else if (!array_key_exists('project', $request)) {\n\t\t\t$this->response->statusCode(400);\n\t\t\t$data['error'] = 400;\n\t\t\t$data['message'] = 'Bad request, no project specified.';\n\t\t} else if (is_null($user) || $user < 1 || !($project = $this->_projectCheck($request['project']))) {\n\t\t\t$this->response->statusCode(403);\n\t\t\t$data['error'] = 403;\n\t\t\t$data['message'] = 'You are not authorised to access this.';\n\t\t} else {\n\t\t\t$conditions = array('Task.project_id' => $project['Project']['id']);\n\n\t\t\tif (array_key_exists('milestone', $request) && is_numeric($request['milestone']) && $request['milestone'] > 0) {\n\t\t\t\t$this->Task->Milestone->id = $request['milestone'];\n\t\t\t\tif ($this->Task->Milestone->exists()) {\n\t\t\t\t\t$conditions['milestone_id'] = $request['milestone'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ive assumed the user is logged in\n\t\t\tif (array_key_exists('requester', $request)) {\n\t\t\t\tswitch ($request['requester']) {\n\t\t\t\t\tcase 'index':\n\t\t\t\t\t\t$conditions['assignee_id'] = $user;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'nobody':\n\t\t\t\t\t\t$conditions['assignee_id'] = null;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'all':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$conditions['assignee_id !='] = $user;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$conditions['assignee_id'] = $user;\n\t\t\t}\n\n\t\t\t// Ive assumed the user is logged in\n\n\t\t\t// If they want one or more specific task statuses, add some conditions\n\t\t\tif (array_key_exists('statuses', $request)) {\n\t\t\t\t$or = array();\n\n\t\t\t\tforeach (preg_split('/\\s*,\\s*/', trim($request['statuses'])) as $statusId) {\n\n\t\t\t\t\t$status = $this->Task->TaskStatus->findById($statusId);\n\n\t\t\t\t\tif ($status != null) {\n\t\t\t\t\t\t$or[] = array('Task.task_status_id' => $status['TaskStatus']['id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!empty($or)) {\n\t\t\t\t\t$conditions['OR'] = $or;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (array_key_exists('types', $request) && $request['types'] != '' && $types = explode(',', $request['types'])) {\n\t\t\t\t$conditions['task_type_id'] = array();\n\t\t\t\tforeach ($types as $i) {\n\t\t\t\t\tif (is_numeric($i) && $i > 0 && $i < 7) {\n\t\t\t\t\t\t$conditions['task_type_id'][] = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($this->Task->find(\"all\", array('conditions' => $conditions, 'order' => array('task_status_id ASC', 'task_priority_id DESC'))) as $task) {\n\t\t\t\t$data[] = $task;\n\t\t\t}\n\t\t}\n\t\t$this->set('data',$data);\n\t}", "title": "" }, { "docid": "a8bd4477181084b97e024164cf9b1fe4", "score": "0.51922107", "text": "public function processAPI(){\r\n if (method_exists($this, $this->endpoint)){\r\n return $this->_response($this->{$this->endpoint}($this->args));\r\n }\r\n return $this->_response(array(\"error\" => \"No Endpoint : $this->endpoint\"), 404);\r\n }", "title": "" }, { "docid": "33e3227e1e802e8c17bc8de2560c7ea0", "score": "0.51909214", "text": "public function fetch() {\n\n\t\t// Prepare cURL timeouts\n\t\t$this->setCurlOpt(CURLOPT_CONNECTTIMEOUT,0);\n\t\t$this->setCurlOpt(CURLOPT_TIMEOUT,$this->apiTimeout);\n\n\t\t// Setup Header Auth\n\t\tif( empty( $this->apiKey ) ) {\n\t\t\tthrow new AuthenticationException('API Key empty or not specified');\n\t\t} else {\n\t\t\t$this->handle->setHeader('apiKey',$this->apiKey);\n\t\t}\n\n\t\t// Prepare request\n\t\t$payload = array();\n\n\t\tif( empty($this->organizations) && empty($this->venues) ) {\n\t\t\tthrow new InputException('Neither Organization or Venue IDs specified. One of either or both is required.');\n\t\t} else {\n\t\t\tif( !empty($this->organizations) ) {\n\t\t\t\t$payload['organizationId'] = implode(',',$this->organizations);\n\t\t\t}\n\t\t\tif( !empty($this->venues) ) {\n\t\t\t\t$payload['venueIds'] = implode(',',$this->venues);\n\t\t\t}\n\t\t}\n\n\t\t// Send request\n\t\ttry {\n\t\t\t$this->handle->get( $this->apiTransport . $this->apiDomain . self::API_ENDPOINT, $payload);\n\t\t} catch( Exception $e ) {\n\t\t\tthrow new \\Exception( 'Unhandled cURL Exception: ' . $e->getMessage() );\n\t\t}\n\n\t\t// Inspect the results\n\t\tif( $this->handle->error ) {\n\n\t\t\tswitch( (int)$this->handle->error_code ) {\n\t\t\t\tcase 401:\n\t\t\t\tcase 408:\n\t\t\t\t\tthrow new AuthenticationException( $this->handle->error_message );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 403:\n\t\t\t\t\tthrow new AuthorizationException( $this->handle->error_message );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 404:\n\t\t\t\t\tthrow new InputException( $this->handle->error_message );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 405:\n\t\t\t\t\tthrow new RequestException( $this->handle->error_message );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 429:\n\t\t\t\tcase 500:\n\t\t\t\tcase 503:\n\t\t\t\t\tthrow new ServerException( $this->handle->error_message );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new \\Exception( 'Unhandled Response Error Exception: ' . $this->handle->error_code . ' - ' . $this->handle->error_message );\n\t\t\t}\n\n\t\t} else {\n\t\t\tif( is_object( $this->handle->response ) ) {\n\n\t\t\t\t$ret = new Result();\n\t\t\t\t$ret->parseV1ActivitiesResponse( $this->handle->response );\n\t\t\t\treturn $ret;\n\n\t\t\t} else {\n\t\t\t\tthrow new \\Exception( 'Unexpected response from API' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "04cc9b9bacf894eb211e5f27fe510a08", "score": "0.5183016", "text": "function run()\n{\n $api = 'removed';\n $json = fetchJsonFromEndpoint($api);\n $patientDataArray = [];\n foreach ($json as $patientData) {\n $patient = null;\n try {\n $patient = new Patient($patientData[\"dob\"], $patientData[\"patient-id\"], $patientData[\"service-date\"]);\n } catch (Exception $e) {\n continue;\n }\n $patientDataArray[] = buildPatientJson($patient);\n }\n return json_encode(array(\"patients\" => $patientDataArray));\n}", "title": "" }, { "docid": "51c4c58efd98264fa6fb9ae7b82904af", "score": "0.5182551", "text": "public function all()\n {\n $this->forAccessTokens();\n $this->forTransientTokens();\n $this->forClients();\n $this->forPersonalAccessTokens();\n }", "title": "" }, { "docid": "f82d234e0ba6ed1dc00dd98721fce987", "score": "0.51787114", "text": "public function generateApi()\n {\n $this->initialDependencies();\n\n $this->setBaseControllerExists();\n // merge basic options and advanced options.\n //we here want to be advanced options last options to run inside foreach.\n $options = array_merge($this->basicBuildOption, $this->advancedBuildOption);\n foreach ($options as $option) {\n if (method_exists(__CLASS__, $option)) {\n $this->$option();\n }\n }\n // of course we will build controller as a last step\n // because now we have all paths we need\n $this->buildController();\n // at the end we will register some data to credential file in assets\n $this->registerCredential();\n }", "title": "" }, { "docid": "d9724aa41df801208f2eb0a10272d1cd", "score": "0.51775753", "text": "protected function dispatch(){\n\t\n\t\t$verb = $this->http_method;\n\t\t$url_list = preg_split ( '/(\\/)+/', $this->rest_url );\n\t\n\t\t//sanitize $url_list\n\t\t$resource_lIst = array();\n\t\tforeach ($url_list as $url) {\n\t\t\tif( $url != '' ){\n\t\t\t\t$resource_lIst[] = $url ;\n\t\t\t}\n\t\t}\n\t\tif( $this->debug ){\n\t\t\techo \"[[[[ \" , print_r( $resource_lIst, true), \" ]]]] \";\n\t\t}\n\t\n\t\t$resource_url = $resource_lIst [0];\n\t\tif (! empty ( self::$routes [$verb] [$resource_url] )) {\n\t\t\t\t\n\t\t\t$callback = self::$routes [$verb] [$resource_url];\n\t\t\t\t\n\t\t\t// PUT & DELETE requests must have a resource id or search string\n\t\t\t$args = array_splice ( $resource_lIst, 1 );\n\t\t\tif($verb != 'POST' && $verb != 'GET'){\n\t\t\t\tif( count($args) == 0 ){\n\t\t\t\t\terror_400();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t// for PUT or POST requests add payload(body) to end of array\n\t\t\tif($verb == 'POST' || $verb == 'PUT'){\n\t\t\t\t$key_pairs = $this->parseRequestBody() ;\n\t\n\t\t\t\tif( $verb == 'POST' ){\n\t\t\t\t\t$args[0] = $key_pairs ;\n\t\t\t\t}else {\n\t\t\t\t\t$args[] = $key_pairs ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tif( $this->debug ){\n\t\t\t\techo \"[[[[ \" , print_r( $args, true), \" ]]]] [[[[ \" , print_r( $callback, true) , \" ]]]] \";\n\t\t\t}\n\t\t\t\t\n\t\t\tcall_user_func_array ( $callback, $args );\n\t\t} else {\n\t\t\terror_404();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4332e947d021a477943cfda4c4b94483", "score": "0.5174063", "text": "public function nextRequest();", "title": "" }, { "docid": "3ea57067964cc7e5c6414b677d5e6f10", "score": "0.5171089", "text": "abstract protected function request();", "title": "" }, { "docid": "66dc1c93f79283fe969335ae05276739", "score": "0.5159333", "text": "public function boot() {\n\n\t\tRoute::post('batch', function(Request $request) {\n\n\t\t\t$batch = $request->get('batch', []);\n\n\t\t\t$batchedRequest = new BatchedRequest($batch, $request);\n\n\t\t\t$batchedRequest->execute();\n\t\t\t\t\n\t\t\treturn $batchedRequest->getResponses();\n\t\t\n\t\t});\n\n\t}", "title": "" }, { "docid": "1c7ada08fe2f2177c9b1a9cbe62a8f20", "score": "0.5158217", "text": "function execute() {\n $this->bBreak = false;\n if (count($this->aRequests) < $this->nThreads)\n $this->nThreads = count($this->aRequests);\n // the request map that maps the request queue to request curl handles\n $a_handles = $a_reqs_map = array();\n $hcm = curl_multi_init();\n\n // start processing the initial request queue\n for ($i = 0; $i < $this->nThreads; $i++) {\n $a_handles[$i] = $hc = curl_init();\n curl_setopt_array($hc, $this->buildOptions($this->aRequests[$i]));\n curl_multi_add_handle($hcm, $hc);\n // add curl handle of a request to the request map\n $key = (string) $hc;\n $a_reqs_map[$key] = $i;\n }\n\n $n = $this->nThreads;\n do {\n while (($code = curl_multi_exec($hcm, $flag)) == CURLM_CALL_MULTI_PERFORM) ;\n if ($code != CURLM_OK)\n break;\n // a request is just completed, find out which one\n while ($a_done = curl_multi_info_read($hcm)) {\n $hc = $a_done['handle'];\n $output = curl_multi_getcontent($hc);\n $a_info = curl_getinfo($hc);\n if (!(curl_errno($hc) == 0 && intval($a_info['http_code']) == 200))\n $output = 0;\n $key = (string) $hc;\n $i = $a_reqs_map[$key];\n list($url, , $callback, $userdata, $a_opts, ) = $this->aRequests[$i];\n if ($output &&\n (isset($this->aOptions[CURLOPT_HEADER]) || isset($a_opts[CURLOPT_HEADER]))) {\n $k = intval($a_info['header_size']);\n $a_info['response_header'] = substr($output, 0, $k);\n $output = substr($output, $k);\n }\n // remove curl handle of completed request from multi handle:\n curl_multi_remove_handle($hcm, $hc);\n $this->aRequests[$i] = 0;\n if (isset($a_handles[$i]))\n unset($a_handles[$i]);\n // call the callback function and pass response info and user data to it\n if (is_callable($callback)) {\n call_user_func($callback, $output, $url, $a_info, $userdata);\n }\n if ($this->bBreak) {\n foreach ($a_handles as $i => $hc)\n curl_multi_remove_handle($hcm, $hc);\n break;\n }\n // add/start a new request to the request queue\n if ($n < count($this->aRequests) && isset($this->aRequests[$n])) {\n curl_setopt_array($hc, $this->buildOptions($this->aRequests[$n]));\n curl_multi_add_handle($hcm, $hc);\n // add curl handle of a new request to the request map\n $a_reqs_map[$key] = $n;\n $a_handles[$n] = $hc;\n $n++;\n }\n else {\n unset($a_reqs_map[$key]);\n }\n }\n // wait for activity on any connection\n if ($flag && !$this->bBreak)\n curl_multi_select($hcm, $this->nTimeout);\n }\n while (($flag || count($a_reqs_map)) && !$this->bBreak);\n $this->reset();\n curl_multi_close($hcm);\n }", "title": "" }, { "docid": "5094c22fb37b7c679ea43a3937491c2d", "score": "0.5149935", "text": "private function reset() {\n\t $this->setBaseUrl()->setMethod()->setRequest()->setParams()->setHeaders();\n\t}", "title": "" }, { "docid": "302d6381ffd5697be7745e01c5cecc26", "score": "0.51435363", "text": "public function __construct() {\n $this->post_requests = [\n\n ];\n }", "title": "" }, { "docid": "f9160b2555064286bae67734f9273ff0", "score": "0.51394194", "text": "function display_api_request_lists() {\n\t\n\t\t$prefix = WP_SCGC_GE_META_PREFIX;\n\t\t\t\n\t\t//if search is call then pass searching value to function for displaying searching values\n\t\t$args = array();\n\t\t\n\t\t// Taking parameter\n\t\t$orderby \t= isset( $_GET['orderby'] )\t? urldecode( $_GET['orderby'] )\t\t: 'ID';\n\t\t$order\t\t= isset( $_GET['order'] )\t? $_GET['order'] \t: 'DESC';\n\t\t$search \t= isset( $_GET['s'] ) \t\t? sanitize_text_field( trim($_GET['s']) )\t: null;\n\t\t\n\t\t$args = array(\n\t\t\t'posts_per_page'\t\t=> $this->per_page,\n\t\t\t'page'\t\t\t\t\t=> isset( $_GET['paged'] ) ? $_GET['paged'] : null,\n\t\t\t'orderby'\t\t\t\t=> $orderby,\n\t\t\t'order'\t\t\t\t\t=> $order,\n\t\t\t'offset' \t\t\t\t=> ( $this->get_pagenum() - 1 ) * $this->per_page,\n\t\t\t'wp_scgcge_request_list'=> true\n\t\t);\n\t\t\n\t\t//searched by search\n\t\tif( !empty( $search ) ) {\n\t\t\t$args['s']\t= $search;\n\t\t}\n\t\t\n\t\t//searched by post name\n\t\tif(isset($_REQUEST['wp_scgcge_post_id']) && !empty($_REQUEST['wp_scgcge_post_id'])) {\n\t\t\t$args['p']\t= $_REQUEST['wp_scgcge_post_id'];\n\t\t}\n\n\t\t//searched by order id\n\t\tif(isset($_REQUEST['wp_scgcge_order_id']) && !empty($_REQUEST['wp_scgcge_order_id'])) {\n\t\t\t$args['meta_query']\t= array(\n\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'key' => $prefix . 'order_number',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'value' => $_REQUEST['wp_scgcge_order_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t//get api requests list data from database\n\t\t$results = $this->model->wp_scgcge_get_requests_data( $args );\n\n\t\t$data\t= isset( $results['data'] ) ? $results['data'] : '';\n\t\t$total\t= isset( $results['total'] ) ? $results['total'] : 0;\n\t\t\n\t\tif( !empty( $data ) ) {\n\n\t\t\tforeach ($data as $key => $value){\n\n\t\t\t\t$title = $post_type = $edit_link = '';\n\n\t\t\t\t//post title & post type\n\t\t\t\tif( isset( $value[ 'ID' ] ) && !empty( $value[ 'ID' ] ) ) { // Check post parent is not empty\n\t\t\t\t\t$title\t\t= get_the_title( $value[ 'ID' ] );\n\t\t\t\t\t$post_type\t= get_post_type( $value[ 'post_parent' ] );\n\t\t\t\t}\n\t\t\t\t$data[$key]['post_title'] \t= $title;\n\t\t\t\t$data[$key]['post_type'] \t= $post_type;\n\n\t\t\t\t//order number\n\t\t\t\t$order_number = get_post_meta( $value['ID'], $prefix . 'order_number', true );\n\t\t\t\t$data[$key]['order_number'] = $order_number;\n\n\t\t\t\t//status\n\t\t\t\t$status = get_post_meta( $value['ID'], $prefix . 'request_status', true );\n\t\t\t\t$data[$key]['status'] = $status;\n\n\t\t\t\t//user\n\t\t\t\t$user = get_post_meta( $value['ID'], $prefix . 'user_id', true );\n\t\t\t\t$data[$key]['user'] = $user;\n\n\t\t\t\t//action\n\t\t\t\t$view_order_link = '';\n\t\t\t\tif( !empty($order_number) ){\n\t\t\t\t\t$view_order_link = add_query_arg( \n\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t'post' => $order_number ,\n\t\t\t\t\t\t\t'action' => 'edit'\n\t\t\t\t\t\t), admin_url( 'post.php' ) \n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$data[$key]['action'] = $view_order_link; \n\t\t\t}\n\t\t}\n\t\t\n\t\t$result_arr['data']\t\t= !empty($data) ? $data : array();\n\t\t$result_arr['total'] \t= $total; // Total no of data\n\t\t\n\t\treturn $result_arr;\n\t}", "title": "" }, { "docid": "443ca14b8983b16c55c001c217c22d39", "score": "0.5134927", "text": "function processRequest(\\Slim\\Slim $app, \\Pimple $di, stdClass $params){\n\n $CartoDB = new \\CQAtlas\\Helpers\\CartoDB($di);\n\n $from = (isset($params->from))? $params->from : '';\n $query = (isset($params->query))? $params->query : '';\n $type = (isset($params->type))? $params->type : '';\n\n try{\n $Results = $CartoDB->selectAll($from,$query,$type);\n\n }catch (\\Exception $e){\n $Response = new \\CQAtlas\\Helpers\\Response($app->response(),400,$e->getMessage());\n # $Response->addContent(array('trace' => $e->getTrace()[0]));\n $Response->show();\n $app->stop();\n }\n\n $Response = new \\CQAtlas\\Helpers\\Response($app->response());\n $Response->addContent(array('timestamp'=>time(),'results'=>$Results));\n //$Response->show();\n //$output = array_merge($Response->toArray(),array('timestamp'=>time(),'results'=>$Results));\n //$jsonOutput = json_encode($output);\n\n // #### Cache the Response\n $Cache = new \\CQAtlas\\Helpers\\Cache($app, $di);\n $Cache->save($Response->toJson());\n\n $Response->show();\n\n //$app->response()->body($jsonOutput); #echo $jsonOutput;\n}", "title": "" }, { "docid": "a07921602a765df2cc00dec854507cfd", "score": "0.51269627", "text": "public function rest_api_init() {\n\t\t( new REST_Misc_Controller() )->register_routes();\n\t\t( new REST_Products_Controller() )->register_routes();\n\t\t( new REST_Orders_Controller() )->register_routes();\n\t}", "title": "" }, { "docid": "02cfe62c87fcec7f5ef37de3bc6ba935", "score": "0.5126104", "text": "public function getFinishedRequests () {}", "title": "" }, { "docid": "718c8fb14566175cbf6f3adb5f02cb45", "score": "0.5125611", "text": "function forwardRequest() {\n\t// Generate request url\n\t$server = $this->user->server;\n\t$url = \"https://$server\".$this->uri;\n\theader(\"Curl-URL: $url\");\n\t// Curl\n\t$curlSession = curl_init();\n\tcurl_setopt($curlSession, CURLOPT_URL, $url);\n\tcurl_setopt($curlSession, CURLOPT_HEADER, 1);\n\n\t// Post arguments\n\tcurl_setopt($curlSession, CURLOPT_POST, TRUE);\n\tcurl_setopt($curlSession, CURLOPT_POSTFIELDS, http_build_query($this->post)); // TODO\n\tcurl_setopt($curlSession,CURLOPT_ENCODING, '');\n\tcurl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1);\n\n\t// Timeout fix to 3 min: Kadokawa server load\n\tcurl_setopt($curlSession, CURLOPT_TIMEOUT, 180);\n\tset_time_limit(180);\n\n\t// Process headers\n\t// TODO replace some headers\n\t$headers = array();\n\tglobal $config;\n\tforeach ($this->headers as $key => $value) {\n\t\t$value = str_ireplace($config[\"serveraddr\"], $server, $value);\n\t\t$value = str_ireplace(\"keep-alive\", \"close\", $value);\n\t\t$value = str_ireplace(\"home.php\", \"kcs/mainD2.swf?api_token=\".$this->post[\"api_token\"], $value);\n\t\tif (strcasecmp($key, \"Content-Length\")==0) {\n\t\t\t// Let curl automatically generate content length\n\t\t\tcontinue;\n\t\t}\n\t\t$headers[] = \"$key: $value\";\n\t}\n\tcurl_setopt($curlSession, CURLOPT_HTTPHEADER, $headers);\n\n\t$uag = $_SERVER['HTTP_USER_AGENT'];\n\tif (stripos($uag, \"Android\")!==FALSE || stripos($uag, \"Mobile\")!==FALSE || stripos($uag, \"iPhone\")!==FALSE || stripos($uag, \"iPad\")!==FALSE || stripos($uag, \"Phone\")!==FALSE) {\n\t\t// Reset UAG\n\t\tcurl_setopt($curlSession, CURLOPT_USERAGENT, \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36\");\n\t}\n\n\t//Send the request and store the result in an array\n\t$response = curl_exec ($curlSession);\n\n\t// Check that a connection was made\n\tif (curl_error($curlSession)){\n\t // If it wasn't...\n\t $this->req_type = \"FAILURE\";\n\t $this->errmsg = $url.\"|\".curl_error($curlSession);\n\t $this->errno = 502;\n\t return;\n\t} else {\n\n\t\t//clean duplicate header that seems to appear on fastcgi with output buffer on some servers!!\n\t\t$response = str_replace(\"HTTP/1.1 100 Continue\\r\\n\\r\\n\",\"\",$response);\n\n\t\t$ar = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n\n\t\t$header = $ar[0];\n\t\t$body = $ar[1];\n\n\t\t//handle headers - simply re-outputing them\n\t\t//file_put_contents(\"header.log\", $header);\n\t\t$header_ar = explode(chr(10),$header);\n\t\t/*\n\t\tforeach($header_ar as $k=>$v){\n\t\t\tif (strcasecmp($k, 'Transfer-Encoding')==0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (strcasecmp($k, 'Content-Encoding')==0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (strcasecmp($k, 'Content-Length')==0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$v = str_replace($server,$config[\"serveraddr\"],$v); //header rewrite if needed\n\t\t\theader(trim($v));\n\t\t}\n\t\t*/\n\n\t\t$httpCode = curl_getinfo($curlSession, CURLINFO_HTTP_CODE);\n\n\t\tif ($httpCode < 400) {\n\t\t\t// A valid response has been received\n\t\t\t$data = json_decode(substr($body, strlen(\"svdata=\")),true);\n\t\t\tif ($data[\"api_result\"]!=1) {\n\t\t\t\t$this->req_type = \"FAILURE\";\n\t\t\t\t$this->errno = $data[\"api_result\"];\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t$this->response = $data[\"api_data\"];\n\t\t\t\t$this->errno = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t// Server reported an error. Perhaps the server is down\n\t\t\t$this->errno = $httpCode;\n\t\t\t// $this->response = $body;\n\t\t}\n\t}\n\tcurl_close ($curlSession);\n}", "title": "" }, { "docid": "cd23eaa95c3b8fae49499437224384e0", "score": "0.51225835", "text": "public function onRun() {\n $ch = curl_init($this->url);\n if ($this->method !== \"GET\") {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->data);\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, [\"Authorization: Bearer \" . $this->key]);\n curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $result = curl_exec($ch);\n $header_size = curl_getinfo($ch,CURLINFO_HEADER_SIZE);\n $body = substr($result, $header_size);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $error = curl_error($ch);\n curl_close($ch);\n\n if ($error !== \"\") {\n $this->shouldReschdule = true;\n return;\n }\n\n $this->result = (object)[\"response\" => strpos($type, 'json') !== false ? json_decode($body) : $body, \"code\" => (int)$code];\n }", "title": "" }, { "docid": "079e00c2e7df37d5610802e222c83a69", "score": "0.5121173", "text": "function map_uri_to_api(){\n $uri = \\app\\server_utils\\get_uri();\n\n $api = $uri.'.php';\n\n if(file_exists($api)){\n try{\n $GLOBALS['request'] = [];\n $GLOBALS['response'] = \"\";\n\n $api_config = new \\app\\config\\config(\"apis\", $api);\n\n $l = new \\app\\api_logging\\api_log();\n $l->log_request();\n\n header(\"SWAT-version: \".SWAT_VERSION);\n header(\"GUID: {$l->get_guid()}\");\n\n $dump = file_get_contents('php://input');\n\n $GLOBALS['request']['method'] = filter_input(INPUT_SERVER, 'REQUEST_METHOD', FILTER_SANITIZE_STRING);\n $GLOBALS['request']['content_type'] = filter_input(INPUT_SERVER, 'CONTENT_TYPE', FILTER_SANITIZE_STRING);\n $GLOBALS['request']['body'] = json_decode($dump, true);\n $GLOBALS['request']['username'] = $_SERVER['PHP_AUTH_USER'];\n $GLOBALS['request']['password'] = $_SERVER['PHP_AUTH_PW'];\n $GLOBALS['request']['length'] = (int) $_SERVER['CONTENT_LENGTH'];\n\n //check method/verb\n if($GLOBALS['request']['method'] != 'POST'){\n serve_invalid_request(\\app\\http_response_codes\\http_response_code::method_not_allowed, $l);\n }\n\n //check content type\n if($GLOBALS['request']['content_type'] != 'application/json'){\n serve_invalid_request(\\app\\http_response_codes\\http_response_code::unsupported_media_type, $l);\n }\n\n //check json body\n if(!\\app\\json_utils\\is_valid_json($dump) || strlen($dump) != $GLOBALS['request']['length'] || !check_required_fields($api_config->get_array('required_fields'), $GLOBALS['request']['body'])){\n serve_invalid_request(\\app\\http_response_codes\\http_response_code::bad_request, $l);\n }\n\n //api logic\n include $api;\n\n $l->log_response(\\app\\http_response_codes\\http_response_code::ok, $GLOBALS['response'] );\n echo $GLOBALS['response'] ;\n return true;\n }catch(\\Exception $e){\n $l->log_error(\\app\\http_response_codes\\http_response_code::internal_error, $GLOBALS['response'] , $e);\n throw_error(\\app\\http_response_codes\\http_response_code::internal_error);\n die();\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "60c3fd816b579b8d610a7e0a4deedf5a", "score": "0.512027", "text": "public function __destruct()\n {\n $this->finishAllRequests();\n }", "title": "" }, { "docid": "6281e86b87ce4077f79f1cebf18e8f6a", "score": "0.5097482", "text": "public function apiPrepared()\n {\n $files = File::orderBy('created_at', 'desc')->where('is_published', 1)->get();\n $allFiles = [];\n\n foreach ($files as $file) {\n array_push($allFiles, [\n 'file_identifier' => CryptoService::url_encode($file->name).'/'.CryptoService::url_encode($file->location),\n 'file_name' => $file->name,\n 'file_date' => $file->created_at->format('F jS, Y'),\n ]);\n }\n\n return $allFiles;\n }", "title": "" }, { "docid": "1fe3f2a53ad52b11cb60c2c90a174714", "score": "0.50974214", "text": "private function getContent(){\n foreach($this->actions as $action){\n if($action != \"API.php\") session_start();\n require \"./routes/\".$action;\n }\n }", "title": "" }, { "docid": "10c02a932f5d0953e17726cfe9cdb8ab", "score": "0.50973415", "text": "function handleRequest(){\n global $BASE_URI;\n global $_PUT;\n global $_DELETE;\n\n $matches = array();\n $requestMethod = $_SERVER['REQUEST_METHOD'];\n // Strip out the base URI from the request URI.\n $uri = str_replace($BASE_URI, \"\", $_SERVER['REQUEST_URI']);\n\n // Based on the request method and uri, we'll know where to send the\n // request.\n if($requestMethod == \"POST\" && $uri == \"api/signup\"){\n $status = signup($_POST);\n // Add in more of these for your other API calls.\n // } else if(...) {\n } else if($requestMethod == \"GET\" && preg_match(\"/^api\\/logIn\\/([^\\/]*)\\/([^\\/]*)$/\",$uri, $matches)){\n\t$status = login($_GET, $matches);\n \n } else if($requestMethod == \"POST\" && $uri == \"api/addTask\"){\n\t$status = taskAdd($_POST);\n } else if($requestMethod == \"DELETE\" && $uri == \"api/remove\"){\n\t$status = removeATask($_DELETE); \n } else if($requestMethod == \"PUT\" && $uri == \"api/updateTask\"){ \n\t$status = editATask($_PUT);\n } else if($requestMethod == \"GET\" && $uri == \"api/check\"){\n\t$status = checkLogin($_GET);\n } else if($uri == \"api/logout\"){\n\tlogout();\n } else {\n dieWithError(\"Unrecognized request: $requestMethod to $uri.\");\n }\n\n echo json_encode($status);\n exit;\n}", "title": "" }, { "docid": "f8fbb9dea8b41b6f27c1f5498b65e7b9", "score": "0.5094634", "text": "public function index()\n\t{\n\n\t\t$url = $this->API.'slides';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_slides']=$response['data'];\n\n \t#######NEWS\n \t$url = $this->API.'news';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_news']=$response['data'];\n\n \t#######ECONOMIES\n \t$url = $this->API.'creative-economies';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_creative_economies']=$response['data'];\n\n \t#######EVENTS\n \t$url = $this->API.'events';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_events']=$response['data'];\n\n \t#######DESTINATION-CATEGORIES\n \t$url = $this->API.'destination-categories';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_destination_categories']=$response['data'];\n\n#######destinations\n $url = $this->API.'destinations';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n $data['data_destinations']=$response['data'];\n\n#######PARTNERS\n \t$url = $this->API.'partners';\n $ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response = json_decode($response_json, true);\n \t$data['data_partners']=$response['data'];\n\n\n \t $data['base_url']=$this->API;\n\t\t$this->load->view('home/index',$data);\n\t\t\n\t}", "title": "" }, { "docid": "97e2930625affe8c062b7063b6654be8", "score": "0.5092552", "text": "public function run(): void\n {\n $this->config->setParams($this->buildParams($this->config));\n\n $parentId = $this->getParentId();\n\n $request = $this->firstPage($this->config);\n while ($request !== null) {\n $response = $this->download($request);\n\n $responseHash = sha1(serialize($response));\n if ($responseHash === $this->lastResponseHash) {\n $this->logger->debug(\n sprintf(\n \"Job '%s' finished when last response matched the previous!\",\n $this->getJobId()\n )\n );\n $this->scroller->reset();\n break;\n } else {\n $data = $this->runResponseModules($response, $this->config);\n $data = $this->filterResponse($this->config, $data);\n $this->parse($data, $parentId);\n\n $this->lastResponseHash = $responseHash;\n }\n\n $request = $this->nextPage($this->config, $response, $data);\n }\n }", "title": "" }, { "docid": "fe1f5a0e3da128dafbe40493e0518453", "score": "0.5091668", "text": "function public_request_search()\n {\n\n if ( ! class_exists('HelpSpotAPI'))\n\t\t{\n\t\t\trequire PATH_THIRD.'helpspot_ee_manager/HelpSpotAPI'.EXT;\n\t\t}\n \t $api = new HelpSpotAPI(array(\n \"helpSpotApiURL\" => trim($this->url, \"/\").\"/api/index.php\",\n 'username' => $this->login,\n\t\t\t\t\t\t\t\t 'password' => $this->password,\n 'cacheDir' => PATH_THIRD.'helpspot_ee_manager/cache'\n )); \n if ($this->EE->TMPL->fetch_param('email')!='')\n {\n $params['sEmail'] = ($this->EE->TMPL->fetch_param('email')!='{logged_in_email}')?$this->EE->TMPL->fetch_param('email'):$this->EE->session->userdata['email'];\n }\n\n if ($this->EE->TMPL->fetch_param('member_id')!='')\n {\n $q = $this->EE->db->query(\"SELECT email FROM exp_members WHERE member_id=\".intval($this->EE->TMPL->fetch_param('member_id')));\n $params['sEmail'] = $q->row('email');\n }\n\n if (empty($params))\n {\n return $this->EE->TMPL->no_results();\n }\n $params['cacheRequest'] = ($this->EE->TMPL->fetch_param('cache')=='on')?true:false;\n \n //get password for email provided\n $password = $api->privateCustomerGetPasswordByEmail(array('sEmail'=>$params['sEmail']));\n\n //get requests list using customer email and password\n $result = $api->customerGetRequests(array('sEmail'=>$params['sEmail'], 'sPassword'=>$password[\"results\"][\"sPassword\"]));\n if (empty($result[\"requests\"]))\n {\n $cond['no_results'] = TRUE;\n $out = $this->EE->functions->prep_conditionals($this->EE->TMPL->tagdata, $cond);\n return $this->EE->TMPL->no_results();\n }\n $responces = $result[\"requests\"][\"request\"];\n $out = '';\n $count = 0;\n $open = 0;\n $total = count($responces);\n \n $raw_tagdata = $this->EE->TMPL->swap_var_single('request_total', $total, $this->EE->TMPL->tagdata);\n $raw_tagdata = $this->EE->TMPL->swap_var_single('request_email', $params[\"sEmail\"], $raw_tagdata);\n \n /*$categories_req = $api->requestGetCategories();\n $categories = array();\n foreach ($categories_req[\"categories\"][\"category\"] as $cat)\n {\n $categories[$cat[\"xCategory\"]] = $cat[\"sCategory\"];\n }*/\n\n foreach ($responces as $responce)\n {\n $tagdata = $raw_tagdata;\n $count++;\n $tagdata = $this->EE->TMPL->swap_var_single('request_count', $count, $tagdata);\n $tagdata = $this->EE->TMPL->swap_var_single('request_id', $responce[\"xRequest\"], $tagdata);\n $tagdata = $this->EE->TMPL->swap_var_single('request_password', $responce[\"sRequestPassword\"], $tagdata); \n $tagdata = $this->EE->TMPL->swap_var_single('request_status', $responce[\"sStatus\"], $tagdata);\n \n $tagdata = $this->EE->TMPL->swap_var_single('request_category', $responce[\"sCategory\"], $tagdata); \n $tagdata = $this->EE->TMPL->swap_var_single('request_category_id', $responce[\"xCategory\"], $tagdata); \n /*$tagdata = $this->EE->TMPL->swap_var_single('request_status', ($responce[\"xStatus\"]==1)?'Open':'Closed', $tagdata);\n \n $tagdata = $this->EE->TMPL->swap_var_single('request_category', $categories[$responce[\"xCategory\"]], $tagdata);*/\n\n \t\tif (preg_match_all(\"/\".LD.\"request_dateopen\\s+format=[\\\"'](.*?)[\\\"']\".RD.\"/is\", $tagdata, $matches))\n \t\t{\n \t\t\tfor ($j = 0; $j < count($matches['0']); $j++)\n \t\t\t{\n $tagdata = str_replace($matches['0'][$j], $this->EE->localize->decode_date($matches['1'][$j], $responce[\"dtGMTOpened\"]), $tagdata);\n \t\t\t}\n \t\t}\n\n $tagdata = $this->EE->TMPL->swap_var_single('request_text', stripslashes($responce[\"tNote\"]), $tagdata);\n $tagdata = $this->EE->TMPL->swap_var_single('request_author', $responce[\"fullname\"], $tagdata);\n $tagdata = $this->EE->TMPL->swap_var_single('accesskey', $responce[\"accesskey\"], $tagdata);\n \n $cond['request_open'] = ($responce[\"fOpen\"]==1)?TRUE:FALSE;\n $cond['request_urgent'] = ($responce[\"fUrgent\"]==1)?TRUE:FALSE;\n $tagdata = $this->EE->functions->prep_conditionals($tagdata, $cond);\n \n $out .= $tagdata;\n }\n $cond = array();\n $cond['no_results'] = FALSE;\n $out = $this->EE->functions->prep_conditionals($out, $cond);\n \n\n return $out;\n }", "title": "" }, { "docid": "b81755b9cfebb9f617c3a84a09d4cb24", "score": "0.5087741", "text": "public function requests(){ // Function Get All requests\n $requests = ModelsRequest::get(); //Get All\n if (count($requests) > 0) { // التأكد من وجود طلبات\n return response()->json([\n 'error'=>false ,\n 'message'=>'' ,\n 'data'=>$requests],\n 200);//\n }else\n return response()->json([\n 'error'=>true ,\n 'message'=>'Sorry, There Are No Requests Currently' ,\n 'code'=> 6],\n 404);\n // رسالة خطأ // لا يوجد طلبات حاليا\n\n }", "title": "" }, { "docid": "2ae2e96ebf03a727d6066de90a3526c5", "score": "0.5086149", "text": "public function api_request() {\n\t\t$this->_get_license_info();\n\n\t\t// Our array of valid endpoints\n\t\t$valid_endpoints = array(\n\t\t\t\t\t\t\t\t'addons',\n\t\t\t\t\t\t\t\t'backup'\n\t\t\t\t\t\t\t);\n\n\t\t$api = $this->EE->input->get('api');\n\n\n\t\t// Error catching!\n\t\tif (empty($api)) {\n\t\t\treturn array('status' => 'error',\n\t\t\t\t\t\t'message' => 'Invalid API Request');\n\t\t}\n\t\tif (!in_array($api, $valid_endpoints)) {\n\t\t\treturn array('status' => 'error',\n\t\t\t\t\t\t'message' => 'Invalid Endpoint');\n\t\t}\n\n\t\t// This seems to be a valid request, make a call to the API function.\n\t\t$api = '_api_'.$api;\n\t\treturn $this->$api();\n\t}", "title": "" }, { "docid": "850179600680ece93599f9232f9d7292", "score": "0.50808924", "text": "protected function prepare()\n {\n $this->idKey = \\config('CXD2020.idKey', 'id');\n $this->restfulRequest = new RestfulRequest($this->request);\n $this->_repository = $this->getRepository();\n }", "title": "" }, { "docid": "24ddd8dba12b751d78f1979e7e921af4", "score": "0.5080129", "text": "public function make()\n\t{ \n\t\t# try and find the channels. If not, return the response returned by the call\n\t\tif( isApiResponse( $result = $this->getChannels() ) ) {\n\t\t\treturn $result;\n\t\t}\n\n\t\t# get 3 related adverts and set them as allocated\n\t\t$adverts = $this->sponsorResponder->setSponsorType()->getChannelSponsors(3, $this->homeChannels); \n\t\t$this->sponsorResponder->setAllocatedSponsors($adverts);\n\n\t\t# the main response array\n\t\t$response = [\n\t\t\t'channels' => $this->getChannels(),\n 'adverts' => $adverts,\n 'features' => $this->getFeatured(),\n 'picks' => $this->getPicked(),\n 'channelFeed' => $this->getChannelFeed(),\n ]; \n\n\t\treturn apiSuccessResponse( 'ok', $response ); \n\t}", "title": "" }, { "docid": "692628158d07ab0d1c1ef3a9b44df103", "score": "0.5069125", "text": "function run() {\n $startTs = microtime();\n\n $ch = curl_init();\n\n if ($this->method == POST ) //Use POST\n {\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $this->request);\n curl_setopt($ch, CURLOPT_URL, $this->endpoint);\n $opts = array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($this->request)\n );\n }\n else //Use GET(cURL default)\n {\n curl_setopt($ch, CURLOPT_POST, false);\n curl_setopt($ch, CURLOPT_URL, $this->endpoint . '?' . $this->request);\n $opts = array(\n 'Content-Type: application/x-www-form-urlencoded'\n );\n }\n if ( $this->authStringEnc !== '' ) {\n array_push($opts,'Authorization: Basic ' . $this->authStringEnc);\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, $opts );\n curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n\n if ( $this->proxyHost != \"\" )\n {\n curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n curl_setopt($ch, CURLOPT_PROXY, $this->proxyHost);\n }\n\n // version 7.16.2 (version_number 0x071602) and above supports timeouts in milliseconds\n $curlVersion = curl_version();\n if ( $curlVersion['version_number'] >= 464386 ) {\n curl_setopt($ch, CURLOPT_TIMEOUT_MS, $this->timeout);\n }\n else {\n curl_setopt($ch, CURLOPT_TIMEOUT, intval($this->timeout/1000));\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $curlResponse = curl_exec($ch);\n $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $header = substr($curlResponse, 0, $headerSize);\n $headerArray = $this->parseResponseHeaders($header);\n $this->rawResponse = substr($curlResponse, $headerSize);\n $this->contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $this->httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n if ( isset($headerArray[\"response_text\"]) ) {\n $this->httpResponse = $headerArray[\"response_text\"];\n }\n else {\n $this->httpResponse = $this->httpCode;\n }\n curl_close($ch);\n $this->duration = microtime() - startTs;\n }", "title": "" }, { "docid": "cd9f0115a9dc81a02497bece131f0b3a", "score": "0.5068276", "text": "private function enforceApiRateLimit()\n {\n \n if($this->remainingRequests>0)\n {\n return;\n }\n else\n {\n \n if( !empty($this->lastRequestTime) )\n {\n \n $elapsedTime = ( time() - $this->lastRequestTime );\n\n if( $elapsedTime > $this->resetTime )\n {\n return;\n }\n else\n {\n $waitingTime = ( $this->resetTime - $elapsedTime );\n \n sleep($waitingTime);\n }\n\n }\n else\n {\n return; // We never should get here...\n }\n\n \n }\n\n }", "title": "" }, { "docid": "d5ce52df02236626b349670024e9c43a", "score": "0.5062599", "text": "public static function init() {\n\t\tstatic::$apis = [\n\t\t\t'distribution' => new Distribution_API(),\n\t\t\t'player' => new Player_API(),\n\t\t];\n\n\t\tadd_action( 'rest_api_init', [__CLASS__, 'register_rest_routes'] );\n\n\t}", "title": "" }, { "docid": "fcc9419d03d5d162dad7a88f54eef114", "score": "0.50484294", "text": "protected function initInvocationFetcher(): void\n {\n $this->next = curl_init(sprintf('http://%s/2018-06-01/runtime/invocation/next',\n $this->rumtimeAPI));\n curl_setopt($this->next, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($this->next, CURLOPT_FAILONERROR, true);\n curl_setopt($this->next, CURLOPT_HEADERFUNCTION, [$this, 'writeHeader']);\n curl_setopt($this->next, CURLOPT_WRITEFUNCTION, [$this, 'writeData']);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "3469b4cef542c9b2a398b099e34dcd03", "score": "0.0", "text": "public function index()\n {\n return view('doador.agendar');\n }", "title": "" } ]
[ { "docid": "66dba62b6171d79d179d2efe10c0caba", "score": "0.74747115", "text": "public function index()\n\t{\n\t\t// Paginate resource resutls\n\t\t$results = $this->paginate();\n\n\t\t// If results found add asset to make tables responsive\n\t\t$results->total();\n\n\t\t// Create header links for sorting by column\n\t\t$links = (object) link_to_sort_by($this->resource->getVisibleLabels());\n\n\t\t// Set the route for the return button\n\t\t$returnRouteName = replace_last_segment($this->prefix);\n\n\t\t// Add data to the view\n\t\t$view = view('resource.index', compact(['results', 'links', 'returnRouteName']));\n\n\t\t// Add data to the layout\n\t\t$this->layout->title = $this->resource->plural();\n\t\t$this->layout->subtitle = ($results->lastPage() > 1) ? sprintf(_('Page %d/%d'), $results->currentPage(), $results->lastPage()) : _('Index');\n\n\t\t// Return layout + view\n\t\treturn $this->layout($view);\n\t}", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "725058cd65108ac80a78fe0051c949b4", "score": "0.74051094", "text": "public function lists()\n\t{ \n\t\t$input \t = $this->getListRequest();\t\t\n\t\t$resources = $this->resourceRepository->find($input['take'], $input['skip'], $input['sort'], $input['filter']);\n\t\t$total = $this->resourceRepository->count($input['filter']);\n\n\t\treturn $this->makeListResponse($resources, $total);\n\t}", "title": "" }, { "docid": "870d86aa3e5336ed0150f4b1a79d3bc6", "score": "0.7393241", "text": "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.73768365", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "fc2792e1b13ff38e0c9384e5367be91c", "score": "0.7355509", "text": "public function actionList()\n {\n return $this->render('list');\n }", "title": "" }, { "docid": "143d9a58e87ac1f21fc152d696ad25d6", "score": "0.72710556", "text": "public function index()\n {\n $catalog_lists = Catalog::paginate(GlobalEnum::PerPage);\n\n if ($catalog_lists->total()) {\n return $this->ok('', CatalogResource::collection($catalog_lists)->response()->getData(true));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "393e0d0bda703c386c7b465265bed633", "score": "0.71704257", "text": "public function indexAction()\n {\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($filter);\n\n //Api controllers inherit from the shopware_controllers api rest.\n //It extends the enlight_action_controller,but\n //overrides predispatch and postdispatch method through which it defines\n //details regarding views,setting headers and json_encoding the results from the resources\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "915fb596a541fe3490b48ffd04162d2e", "score": "0.7157241", "text": "public function listAction()\n {\n $page = (int) $this->params()->fromRoute('page', 1);\n return $this->forward()->dispatch($this->getRouteIdentifierPrefix(), array('action' => 'index', 'page' => $page));\n }", "title": "" }, { "docid": "6c72516079b466368fa3fffe94f8ae35", "score": "0.7132358", "text": "function index() {\n render(\"list\");\n }", "title": "" }, { "docid": "d9b48afdd79e90cf917b6d111ca6416b", "score": "0.71212447", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(Cache::get('pagination', 10));\n\n return view('resources.index')->with(compact('resources'));\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.7106149", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "90a1f4f6b697ee3ec0f4fa576dd38523", "score": "0.7098513", "text": "public function index()\n {\n return view('resources', ['resources' => Resource::orderBy('name', 'asc')->get(), 'listings' => RentResource::whereDate('start_time', '=', Carbon::today()->toDateString())->orderBy('start_time', 'asc')->get() ]);\n }", "title": "" }, { "docid": "ba6dd0e8295ef2a549fdf27a9cd12661", "score": "0.70087796", "text": "public function listAction()\n\t{\n\t\t$params = ['page' => 'page-catalog-list'];\n\n\t\tforeach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name )\n\t\t{\n\t\t\t$params['aiheader'][$name] = Shop::get( $name )->header();\n\t\t\t$params['aibody'][$name] = Shop::get( $name )->body();\n\t\t}\n\n\t\treturn Response::view( Shop::template( 'catalog.list' ), $params )\n\t\t\t->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) );\n\t}", "title": "" }, { "docid": "79651e14a4b964194c02d9ee700a9ad5", "score": "0.70079595", "text": "public function list(): void\n {\n $list = $this->mysql->select($this->getListQuery());\n $this->page->show($this->getListPageTemplate(), ['list' => $list]);\n }", "title": "" }, { "docid": "5f679e4189acdce779f6ef9e23a350f9", "score": "0.700236", "text": "public function actionList()\n {\n $pagination = $this->setPagination('article');\n \n $list = $pagination['recordList'];\n $pages = $pagination['pages'];\n\n return $this->render('list',['list' => $list,'pages' => $pages]);\n }", "title": "" }, { "docid": "904740a092ed938ccd50ca494c286c30", "score": "0.69705874", "text": "public function list()\r\n\t\t{\r\n\t\t\t// Page title\r\n\t\t\t$this->title = 'Pathways list';\r\n\r\n\t\t\t// Function parameter\r\n\t\t\t$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();\r\n\r\n\t\t\t// Load models\r\n\t\t\t$settings_model = $this->load_model('settings-model');\r\n\t\t\t$pathway_model = $this->load_model('pathway-model');\r\n\r\n\t\t\t/** Load files from view **/\r\n\r\n\t\t\t// Load the template definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/template_config.php';\r\n\r\n\t\t\t// Load the template head section\r\n\t\t\trequire ABSPATH . '/views/_includes/template_start.php';\r\n\r\n\t\t\t// Load the page initial definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/page_head.php';\r\n\r\n\t\t\t// Load the page itself\r\n\t\t\trequire ABSPATH . '/views/pathway_module/pathway_list-view.php';\r\n\r\n\t\t\t// Load the page footer\r\n\t\t\trequire ABSPATH . '/views/_includes/template_end.php';\r\n\r\n\t\t}", "title": "" }, { "docid": "bc75e71d755fa3c285f90da23f029065", "score": "0.6961202", "text": "public function listingAction()\n {\n /** @var Factory $Factory */\n $Factory = $this->get('factory');\n\n /** @var Product[] $Products */\n $Products = $Factory->getAllProducts();\n\n return $this->render(\n 'ACAShopBundle:Products:list.html.twig',\n array(\n 'Products' => $Products\n )\n );\n }", "title": "" }, { "docid": "bdcd442e256866ea4c741c1ff1cc3685", "score": "0.6940423", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->_display();\n }", "title": "" }, { "docid": "cffe60b04946e2b283ae38e3049adc3f", "score": "0.69368476", "text": "public function listAction()\n {\n if (!$this->service) {\n throw new \\RuntimeException('No CRUD service defined');\n }\n\n $label = (isset($this->label)) ? $this->label : '';\n \n $service = $this->getServiceLocator()->get($this->service);\n\n $this->trigger(CrudEvent::EVENT_LIST_PRE);\n\n $where = $this->parseWhere($this->getRequest());\n $order = $this->params()->fromQuery('order', array());\n\n $perPage = $service::INDEX_LIMIT;\n\n $page = ($this->params()->fromQuery('page', 1) -1);\n \n $list = $service->getList($where, $order, ($page * $perPage), $perPage);\n\n $count = $service->getCount($where);\n\n $this->trigger(CrudEvent::EVENT_LIST_POST, $list);\n\n $currentQuery = $this->params()->fromQuery();\n unset($currentQuery['page']);\n\n return $this->loadView(\n 'zucchi-admin/crud/list', \n array(\n 'resource' => $this->resource,\n 'list' => $list,\n 'count' => $count,\n 'page' => $page+1,\n 'currentQuery' => http_build_query($currentQuery),\n 'pages' => ceil($count/$perPage),\n 'listFields' => $this->listFields,\n 'metadata' => $service->getMetaData(),\n 'where' => $where,\n 'order' => $order,\n 'label' => $label,\n\n )\n );\n }", "title": "" }, { "docid": "d033fdb664b5308858d97fa62eaec1dd", "score": "0.6919906", "text": "public function showResourcesList(array $data);", "title": "" }, { "docid": "26f8fdc71a4939e7422fb301f2c7eb6b", "score": "0.69135225", "text": "public function index()\n {\n $questions = Question::latest()->paginate(10);\n\n return QuestionResource::collection($questions)->additional(['result' => 1, 'message' => 'Retrieved.']);\n }", "title": "" }, { "docid": "9614c14c55791e230f2a0558a1a13ab5", "score": "0.68943536", "text": "public function index() {\n $arrObjResource = Resource::latest()->paginate(self::INT_LIMIT);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4f3eab1a65aa0d6cf0ac4845abdf26ac", "score": "0.6890335", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "e4d514bd62d1c63ab8647f831833ec4f", "score": "0.68843615", "text": "public function index()\n {\n \n return $this->list();\n \n }", "title": "" }, { "docid": "227cc9dea5d541678d4dfd2730fdac56", "score": "0.687347", "text": "public function index()\n {\n $queryBuilder = QueryBuilder::for(Repository::enabled())\n ->allowedFilters([\n 'name',\n 'license',\n 'description',\n AllowedFilter::exact('author.name'),\n 'author.display_name',\n AllowedFilter::exact('tags.name'),\n 'tags.category.name',\n ])\n ->allowedSorts([\n 'name',\n 'stargazers',\n 'last_push',\n 'author.name',\n ])\n ->defaultSort('-stargazers')\n ->with('author', 'tags', 'tags.category');\n // Paginate if request has a page parameter\n if (request()->has('page')) {\n return RepositoryFullResource::collection($queryBuilder->jsonPaginate(100));\n } else {\n return RepositoryFullResource::collection($queryBuilder->get());\n }\n }", "title": "" }, { "docid": "85415f9379a58cfef9a5550ad415fc13", "score": "0.6871514", "text": "public function index()\n {\n return StatusResource::collection(\n Status::latest()->paginate(10)\n );\n }", "title": "" }, { "docid": "9bdc4409374aa0ca956ab945dfb3719d", "score": "0.68563753", "text": "public function listAction(){\r\n\t\t\t\r\n\t\t\t//$totalItem \t\t\t\t\t= $this->_model->countItem($this->arrParams, null);\r\n\t\t\t//$this->setPagination(array(\"totalItemPerPage\" => 5, \"pageRange\" => 2));\r\n\t\t\t//$this->_view->pagination \t= new Pagination($totalItem, $this->_pagination);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_view->nameCategory \t= $this->_model->getNameCategory($this->arrParams, array(\"task\" => \"get-name-category\"));\r\n\t\t\t$this->_view->_listBook\t\t= $this->_model->infoItem($this->arrParams, null);\r\n\r\n\r\n\t\t\t$this->_view->_title = \"<title>List</title>\";\r\n\t\t\t$this->_view->render(\"book/list\");\r\n\t\t}", "title": "" }, { "docid": "728f8e03f8b5006e5477454a725a1745", "score": "0.6847423", "text": "public function index()\n {\n return response(EntryList::getAll(), 200);\n }", "title": "" }, { "docid": "27835938400657712b507591c21e8655", "score": "0.683678", "text": "public function actionIndex()\n\t{\n\t\t$objects = self::apiRequest();\n\t\t\n\t\t$this->render('index',array(\n\t 'objects'=>$objects,\n\t 'page'=>$this->pNumber\n\t ));\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "ddc72035c6eee5bda438fcd2d80fe704", "score": "0.68218684", "text": "public function index() {\n\t\t$resources = Resource::with(array('projects' => function($query) {\n\t\t\t$query->orderBy('updated_at','desc');\n\t\t}))->take(10)->get();\n\t\treturn View::make('resource/index', compact('resources'));\n\t}", "title": "" }, { "docid": "d773e5fd60f9ab29f11ae0739ce3ee4a", "score": "0.68212044", "text": "public function index( ) {\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\n\t\t$this->all_rows = $this->model->order($this->get_order())->page($this->this_page,$this->list_limit);\n\t\tif(!$this->all_rows) $this->all_rows=array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "cf0df3ff4d7be7a54e874c2996c82e4e", "score": "0.68184847", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Applications\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all applications allowed access via API\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/applications/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => array('button', 'float_right')))\n\t\t\t\t\t\t\t\t);\n\t\t$this->datagrid->setConfig ( OauthClients::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "7dd3e647ccd9b808f98f8f06413992bc", "score": "0.6815415", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('r_scenarios')->order('r_scenario_id desc');\r\n \r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n \r\n $oMySearchEngine->findWordOn(array('r_scenario_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_scenario_id' => array('operator' => 'eql'),\r\n 'r_scenario_actif' => array('operator' => 'eql'),\r\n 'r_scenario_libelle' => array('operator' => 'like')\r\n ));\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n \r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Handle pagination\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "a422edadfd877c23034b14eb7c872f20", "score": "0.680176", "text": "public function index()\n {\n // Get Students\n\n $students = Student::paginate(10); \n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "8fb097585964e814f54986427cb4f2a5", "score": "0.6801259", "text": "public function listAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n $this->_helper->viewRenderer->setViewScriptPathSpec(\"server/list.phtml\");\n $this->_helper->serverTester->listAction($this->_serverClass, $this);\n }", "title": "" }, { "docid": "9eac380992aafa51fd5f8cad7dd703c0", "score": "0.6791666", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.resource.index');\n\t}", "title": "" }, { "docid": "5d12cb46b97d3119f7b5023b68501a38", "score": "0.678868", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $altinvs = $em->getRepository('SGIBundle:Altinv')->findAll();\n\n return $this->render('altinv/list.html.twig', array(\n 'altinvs' => $altinvs,\n ));\n }", "title": "" }, { "docid": "971c5bf5ae183faa04c5c48cbd18c860", "score": "0.67845964", "text": "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "title": "" }, { "docid": "009c68f22edb5d32fe04a4694c775ca1", "score": "0.67772275", "text": "public function indexAction() {\n $this->render('list', array(\n 'entries' => $this->newsRepository->getAll(array('date' => 'DESC'))\n ));\n }", "title": "" }, { "docid": "f942ddab63eeccb58e9b51ecacb7adee", "score": "0.67770517", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $result) = Resource_Service_Attribute::getList($page, $perpage,array('at_type' => 1,'status' => 1));\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t}", "title": "" }, { "docid": "1cda64db2e68c557b90cdabeccaba33f", "score": "0.67594475", "text": "public function index()\n {\n //\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "183389798fc3f84d25abd7fc3486c685", "score": "0.67534196", "text": "function index()\n\t\t{\n\t\t\tif($this->AJAXCall)\n\t\t\t\texit;\n\t\t\t\n\t\t\t$this->_generate_listing(false);\n\t\t}", "title": "" }, { "docid": "117edb0c09e0fdcb587db5412ef18996", "score": "0.6751079", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TicketswapUserBundle:Users')->find(1);\n $listings = $em->getRepository('TicketswapListingBundle:Listings')->findBy(['user' => $user]);\n\n return $this->render('listings/index.html.twig', array(\n 'listings' => $listings,\n ));\n }", "title": "" }, { "docid": "a0016ac4bfda3ac0418505813ba2e862", "score": "0.6734381", "text": "public function indexAction()\n {\n if ( ! $this->getUser()) {\n return $this->redirect($this->generateUrl('user_sign_in'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BWBlogBundle:Resource')->findBy(array(\n 'user' => $this->getUser(),\n ), array(\n 'created' => 'DESC',\n ));\n $resources = new ArrayCollection($entities);\n\n return $this->render('BWBlogBundle:Resource:index.html.twig', array(\n 'entities' => $entities,\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "274943ce909ef8e9f446ec40976ee886", "score": "0.6731582", "text": "public function listAction()\n {\n $all = $this->rss->findAll();\n \n $this->theme->setTitle(\"Visa alla RSS-flöden\");\n $this->views->add('rss/list-all', [\n 'feeds' => $all,\n 'title' => \"Visa alla RSS-flöden\",\n ], 'main');\n \n $this->views->add('rss/rss-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "c6af5753a45a23a4039724edd2030d18", "score": "0.6731379", "text": "public function index()\n {\n $data = array(\n 'objects' => $this->instituicaoBo->list_all(),\n 'title' => 'Instituição',\n 'heading' => 'Lista de',\n );\n\n $this->load->view('/instituicao/list_instituicao.html.php', $data);\n }", "title": "" }, { "docid": "ed091402879b52de0ec1b21125fb6df3", "score": "0.67281276", "text": "public function index()\n {\n //Get Products\n $products = Product::paginate(100);\n \n //Return collection of products as resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "0ee391ae331b2e93b8a1c88e428dfb9a", "score": "0.6725677", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $rentals = $em->getRepository('SGIBundle:Rental')->findAll();\n\n return $this->render('rental/list.html.twig', array(\n 'rentals' => $rentals,\n ));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.6722664", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b10432984ae1b667b192f3f5d3985a4c", "score": "0.67152315", "text": "public function showList()\n {\n //var_dump($this->post);\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "ff3e5f5bb761df19ee88cd46c9c44f75", "score": "0.6711365", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Partners - '.APP_NAME;\n $this->global['pageMenu'] = 'List Partners';\n $this->global['contentHeader'] = 'List Partners';\n $this->global['contentTitle'] = 'List Partners';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "a82e643c16a81545d59c105f6fd9019e", "score": "0.6710445", "text": "public function index()\n {\n return PlaylistResource::collection(Playlist::with('tracks')->paginate());\n }", "title": "" }, { "docid": "9c3a8017fadc1446e144ef2847a75de3", "score": "0.6704527", "text": "public function index()\n {\n return PlaylistResource::collection(\\App\\Playlist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "1c6e0baa6678b891bebbc943f9480efa", "score": "0.6700806", "text": "public function indexAction()\r\n\t{\r\n\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t $totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t $configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\t\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->slbGroup = $this->_model->itemInSelectBox($this->_arrParam);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "da46f30f701104b01168396ab42fd3e4", "score": "0.6699936", "text": "public function actionList()\n\t{\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax'\n\t\t]);\n\t}", "title": "" }, { "docid": "8fdc346d2ae73862487e8562ba0d2f8e", "score": "0.6697069", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->book ? $this->book->title . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.66963553", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "6302f4af4daf8199c6e51ccba9683ada", "score": "0.6693278", "text": "public function index()\n {\n $flights = Resources::all();\n return view('admin.resource.view', compact('flights'));\n }", "title": "" }, { "docid": "ce01e387a99bc334b00eed748a6952cf", "score": "0.669161", "text": "public function index()\n {\n return $this->respondWithPaginatedCollection(SmartBin::paginate(), $this->smartBinTransformer);\n }", "title": "" }, { "docid": "a852cb19289ccd3ae31b2b0e5320aea1", "score": "0.6691417", "text": "public function index()\n {\n Gate::authorize('view', 'products');\n $product = Product::paginate();\n\n return ProductResource::collection($product);\n }", "title": "" }, { "docid": "d8835f9930d0f9c4f3c53749e67962c3", "score": "0.6685593", "text": "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "title": "" }, { "docid": "a656fd3c504977ccfaf035cdddd42150", "score": "0.66812676", "text": "public function listAction() : void {\n $this -> view -> assignMultiple([\n 'server' => $this -> serverRepository -> findAll()\n ]);\n }", "title": "" }, { "docid": "d69e4f0b4187ff68e97b4e7a5d09ad96", "score": "0.6680512", "text": "public function list()\n {\n }", "title": "" }, { "docid": "88a8d702b1375b13dc358eb9e6dfdb8e", "score": "0.66787434", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Tickets list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the tickets.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/tickets/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\n\t\t$this->datagrid->setConfig ( Tickets::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "af48da44bf6d55a059ab53c7dd12c14e", "score": "0.66786623", "text": "public function index()\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resources = $this->repository->filter()->cast();\n\n return $this->responder->ok()->withData($resources)->send();\n }", "title": "" }, { "docid": "a9f952d5e07e7d6d7e049c37f8d2fa2e", "score": "0.667737", "text": "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 $contact = new Contact();\n $results = $contact->getContact4Admin();\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 }", "title": "" }, { "docid": "fcbdc058a31d41050a367e7b15d55776", "score": "0.66733277", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminMongoOdmEvents::PRE_LIST);\n\n $fields = $this->document['list']['fields'];\n $paginator = $this->mongoOdmFindAll($this->document['class'], $this->request->query->get('page', 1), $this->document['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n $this->dispatch(EasyAdminMongoOdmEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n // RESTRICTED_ACTIONS 'delete_form_template' => $this->createDeleteForm($this->document['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<DocumentName>Template', ['list', $this->document['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d25f4e517682766596d2c16eca86c7fa", "score": "0.66732645", "text": "public function index()\n {\n return view('resource.index',['resources'=>Resource::all()]);\n }", "title": "" }, { "docid": "f6d989efb8c8e985bb96c0559d9bde67", "score": "0.667212", "text": "public function index()\n\t{\n $listings = Listing::paginate(3);\n return response( $listings,200);\n\t}", "title": "" }, { "docid": "561ee0fde098e9e4a73a2a5669089034", "score": "0.66712075", "text": "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "2a6023a5396366a36aac2f066e03181d", "score": "0.66709393", "text": "public function index()\n {\n $playlists = Playlist::query()\n ->with('author')\n ->latest()\n ->paginate(16);\n return PlaylistResource::collection($playlists);\n }", "title": "" }, { "docid": "f16b067e8febaf73c982ac35e0e11cd0", "score": "0.6658731", "text": "public function index()\n {\n return ActionResource::collection(Action::paginate(5));\n }", "title": "" }, { "docid": "ca2f35e9a4c5b25c7b81f82a26bdc119", "score": "0.66559094", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "36f38270af9227d848d8bfe2fc2fb2f6", "score": "0.66512823", "text": "public function index()\n\t{\n\t\t$resources = $this->repository->getResources();\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.index', compact(['resources', 'menuTab']));\n\t}", "title": "" }, { "docid": "842b9bbe43e49f877c207858fd6dd962", "score": "0.66511077", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Products list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the products.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/products/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Products::grid () )->datagrid ();\n\t}", "title": "" }, { "docid": "7654a7b909673402548e3c1d711a6d3b", "score": "0.6646156", "text": "public function list()\n {\n $data = array(\n 'title' => 'Laporan Vclaim',\n 'class_name' => $this->class,\n 'route_name' => $this->routes\n );\n\n $data['contents'] = 'contents/laporan/' . $this->class . '/index';\n $this->load->view('master', $data);\n\n }", "title": "" }, { "docid": "165ffb7039a9dcc6c1d81e1ca64483e4", "score": "0.66448224", "text": "public function index()\n {\n // Get books\n\t $books = Book::orderBy('created_at', 'desc')->paginate(5);\n\n\t return BookResource::collection($books);\n }", "title": "" }, { "docid": "6aae86ba51583240c8fe0f141159a841", "score": "0.664316", "text": "public function index()\n {\n $accountDetail = AccountDetail::all()->sortBy('id');\n return AccountDetailResource::collection($accountDetail);\n }", "title": "" }, { "docid": "10a2b9d6812eccfed7ddcd2d5f7a7eb0", "score": "0.6640271", "text": "public function index()\n {\n $sub_localization_model = SubLocalization::on();\n $this->addUserFilteringToDataFetch($sub_localization_model, 'name', 'where', ['name', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'description', 'where', ['description', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'localization_id', 'where', ['localization_id', '=']);\n\n return BaseResource::collection($sub_localization_model->get());\n }", "title": "" }, { "docid": "6d76de53bb869e73d429cbb2f319f520", "score": "0.663951", "text": "public function index(Request $request)\n {\n $resources = Resource::where('status', 1);\n\n $request_append = array();\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $resources = $resources->where('name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('source_name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('description', 'LIKE', '%' . $query_string . '%');\n }\n\n \n\n $resources = $resources->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n return View('resources.show-resources', compact('resources'));\n }", "title": "" }, { "docid": "d768f601d0b3a2a45a883075e9bd74fa", "score": "0.663936", "text": "public function index()\n {\n $products = Product::latest()->paginate();\n\n return $this->respond(ProductResource::collection($products));\n }", "title": "" }, { "docid": "1863deff5f71e623d3df5630ccdabb09", "score": "0.6633998", "text": "public function indexAction()\n {\n $this->_initAction();\n $this->_title('Items');\n $this->renderLayout();\n }", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.6633943", "text": "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "title": "" }, { "docid": "b2f9c5d65d641e65a8807637650b4e37", "score": "0.6633174", "text": "public function index()\n {\n $limit = 0;\n $list_obj = Collection::where('status', 1)->orderBy('created_at', 'DESC')->paginate($limit);\n return view('admin.collection.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "fbca53bf6960e73cbc1141408c860e37", "score": "0.6629921", "text": "function index()\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->_historialModel->getHistorial();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "fc175898bd7c35e91f0a34b68f176c7f", "score": "0.6628759", "text": "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "da5a6a8e08d78cfa23a7671fa0667dac", "score": "0.66259927", "text": "public function listingAction(){\n if (LoginHelper::isAdmin()){\n $this->view->render('doctor/list', Doctor::all());\n }else{\n Router::redirect('home', '<p class=\"alert alert-danger\">You are not authorized</p>');\n }\n }", "title": "" } ]
1db65a7f77939878e45ee33fa7842d20
try and use getimagesize()
[ { "docid": "19993730f131231a6cfb4f08d7277ef5", "score": "0.0", "text": "public function loadFile($thumbnail, $image)\n {\n // on failure, use identify instead\n // $imgData = @getimagesize($image);\n /* if (!$imgData)\n {\n exec($this->magickCommands['identify'].' '.escapeshellarg($image), $stdout, $retval);\n if ($retval === 1)\n {\n throw new Exception('Image could not be identified.');\n }\n else\n {\n // get image data via identify\n list($img, $type, $dimen) = explode(' ', $stdout[0]);\n list($width, $height) = explode('x', $dimen);\n\n $this->sourceWidth = $width;\n $this->sourceHeight = $height;\n $this->sourceMime = $this->mimeMap[strtolower($type)];\n }\n }\n else*/\n {\n // use image data from getimagesize()\n $this->sourceWidth = '120';\n $this->sourceHeight = '76';\n $this->sourceMime = 'flv';\n }\n $this->image = $image;\n\n // open file resource\n $source = fopen($image, 'r');\n\n $this->source = $source;\n\n // $thumbnail->initThumb($this->sourceWidth, $this->sourceHeight, $this->maxWidth, $this->maxHeight, $this->scale, $this->inflate);\n\n return true;\n }", "title": "" } ]
[ { "docid": "b9d1c32efd2388cb5678b45c75ff08fe", "score": "0.81868", "text": "public function getImageSize() {\n\t}", "title": "" }, { "docid": "dc8650e538e088f2a8efc9dfddfbbe1d", "score": "0.79079074", "text": "private function checkAndGetImageSizeIfNeeded(){\n\t\tif(!($this->imageWidth && $this->imageHeight)){\n\t\t\t$arr = $this->getimagesize(WEBEDITION_PATH . '../' . $this->imagePath);\n\t\t\tif(count($arr) >= 2){\n\t\t\t\t$this->imageWidth = $arr[0];\n\t\t\t\t$this->imageHeight = $arr[1];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2294759175663cc4a6308b6176e60173", "score": "0.7795592", "text": "public function getImageSize() {\r\t\treturn ($this->imageSize);\r\t}", "title": "" }, { "docid": "95ba98c3f7eabb00ad0d343fde24dace", "score": "0.7768138", "text": "public function getImageLength () {}", "title": "" }, { "docid": "78a91ba81f15dc912fb309df04684e78", "score": "0.776669", "text": "public function getImageWidth () {}", "title": "" }, { "docid": "697e39fac6be3761d1dc844beb313a1c", "score": "0.7579727", "text": "function XY($img){\r\necho\tgetimagesize($img);\r\n\r\n\r\n\t}", "title": "" }, { "docid": "72c37be53e5d3843680e90045e531abb", "score": "0.7509512", "text": "public function getImageLength() {\n\t}", "title": "" }, { "docid": "900bbf9b98c1e8c78b7cb1498a1a7e59", "score": "0.7449306", "text": "function getSize(){\n $imgParams=getimagesize($this->fileName);\n $this->imageSizeX=$imgParams[0];\n $this->imageSizeY=$imgParams[1];\n \n switch($imgParams[2]){\n case 1:\n $this->imageType=\"gif\";\n $this->image = imagecreatefromgif($this->fileName);\n break;\n\n case 2:\n $this->imageType=\"jpg\";\n $this->image = imagecreatefromjpeg($this->fileName);\n break;\n \n case 3:\n $this->imageType=\"png\";\n $this->image = imagecreatefrompng($this->fileName);\n break;\n \n default:\n $this->errorState(1);\n }\n \n }", "title": "" }, { "docid": "42a54e772f836fbeedf65d955ac57989", "score": "0.73292994", "text": "public function getImageWidth() {\n\t}", "title": "" }, { "docid": "5bd08c9f3c8e6fbd3010b3f5b0c9efbb", "score": "0.730622", "text": "public function getImageHeight () {}", "title": "" }, { "docid": "4d7924f81075b6bfd0c7b833586141ff", "score": "0.72836554", "text": "private function getSize()\n {\n if (! $this->exists()) {\n return false;\n }\n return array(\n \"width\" => imagesx($this->image),\n \"height\" => imagesy($this->image)\n );\n }", "title": "" }, { "docid": "d3f406c3c746ff623a1d5e3978bc84b9", "score": "0.7253475", "text": "public function getImagesWidth();", "title": "" }, { "docid": "b45c042efb0cce336efd825813961bf8", "score": "0.7154301", "text": "function getWidth() {\n\t\tif (!$this->_imageInfo) {\n\t\t\t$this->_imageInfo = getimagesize($this->getFilePath());\n\t\t}\n\t\treturn $this->_imageInfo[0];\n\t}", "title": "" }, { "docid": "bd8b4cbbd51c3c3c5b73f5b3823600ed", "score": "0.71291256", "text": "public function getWidth(){\n\t\tif(file_exists($this->file->absolutePath)){\n\t\t\t$size=getimagesize($this->file->absolutePath);\n\t\t\treturn $size[0];\n\t\t}\n\t}", "title": "" }, { "docid": "f9b402f0c1ea53dbca9908a946db6535", "score": "0.71233046", "text": "public function getImageDimensions()\n\t{\n\t\treturn getimagesize($this->file);\n\t}", "title": "" }, { "docid": "e641a1d527f7b27a52ea07639fc939ad", "score": "0.71209425", "text": "public function getDimensions() {\r\n return getimagesize($this->fullPath);\r\n }", "title": "" }, { "docid": "9577273c2ab5864d5aaa3dff71d7be00", "score": "0.7110764", "text": "public function getImageResolution () {}", "title": "" }, { "docid": "081f1d0dd2284287f46c3250161cacde", "score": "0.7099911", "text": "public function test_image_size_method_with_existent_image()\n {\n $result = $this->website_object->image_size(\n 'https://php-library.zlatanstajic.com/assets/img/phplibrary-icon.png'\n );\n\n $this->assertNotFalse($result);\n $this->assertInternalType('array', $result);\n\n $values = array(\n 'width',\n 'height',\n 'width_height',\n 'type',\n 'size',\n 'bits',\n 'mime',\n );\n\n foreach ($values as $value)\n {\n $this->assertArrayHasKey($value, $result);\n }\n }", "title": "" }, { "docid": "f22118cc71429217a1f38fed5d97f68f", "score": "0.70733047", "text": "public function getSize() {\n\t\t$width = imageSx($this->image);\n\t\t$height = imageSy($this->image);\n\t\treturn Array($width, $height);\n\t}", "title": "" }, { "docid": "50910e3f52a2321b13b10186d03f3445", "score": "0.70517206", "text": "public function setImageSize() {\r\t\t//enforce image size requirements in megabytes\r\t\tif($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\r\t\t\techo \"Sorry, your file is too large.\";\r\t\t}\r\t\treturn ($this->imageSize);\r\t}", "title": "" }, { "docid": "2d81fd5c629e0c4c4cca0a4a92c04e77", "score": "0.7045277", "text": "private function getimgsize($url)\n {\n return @getimagesize($url);\n /*$ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $file_contents = curl_exec($ch);\n curl_close($ch);\n\n $new_image = ImageCreateFromString($file_contents);\n\n $return = array(imagesx($new_image), imagesy($new_image));\n\n imagedestroy($new_image);\n\n return $return;*/\n }", "title": "" }, { "docid": "809876b9a160b0432222f7191cc4b3ed", "score": "0.7040586", "text": "function check_image($sourcepath){\n\tif(@$size = getimagesize($sourcepath)){\n\t\tif(!in_array($size[2],array(IMAGETYPE_GIF,IMAGETYPE_JPEG,IMAGETYPE_PNG))){\n\t\t\treturn false;\n\t\t}\n\t}else{\n\t\treturn false;\n\t}\n\treturn $size;\n}", "title": "" }, { "docid": "1e1e73e8182128e252c8d0286f6533d1", "score": "0.70352817", "text": "static function getimagesize($url, $option='all'){\r\n\t\t$options = getimagesize($url);\r\n\t\tswitch($option){\r\n\t\t\tcase 'width':\r\n\t\t\t\treturn $options[0];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'height':\r\n\t\t\t\treturn $options[1];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'type':\r\n\t\t\t\treturn $options[2];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'attr':\r\n\t\t\t\treturn $options[3];\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'css':\r\n\t\t\t\treturn 'width:'.$options[0].'px;height:'.$options[1].'px;';\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'all':\r\n\t\t\tdefault:\r\n\t\t\t\treturn $options;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\t}", "title": "" }, { "docid": "d234ade10a0c0b3e274b194d2af22949", "score": "0.70265347", "text": "public function imagesize(): array\n {\n return getimagesize($this->root);\n }", "title": "" }, { "docid": "d573c12a22e72f1a486b24c3bd26615a", "score": "0.69997704", "text": "private function determineImageSize()\n {\n $imageSize = getimagesize($this->uploadedFile->getPathname());\n\n if (!$imageSize) {\n throw new FileException(sprintf('Impossible to get image size for %s', $this->uploadedFile->getPathname()));\n }\n\n $this->existingMedia->setWidth($imageSize[0]);\n $this->existingMedia->setHeight($imageSize[1]);\n }", "title": "" }, { "docid": "a082e33a25eb4a58344bd4d997449efd", "score": "0.69603497", "text": "public function getImageWidth()\n\t{\n\t\treturn $this->info['width'];\n\t}", "title": "" }, { "docid": "fe4a37fbcf88a23aeb198c50ca134d84", "score": "0.6955878", "text": "public function getImageHeight() {\n\t}", "title": "" }, { "docid": "3f7827cc4fb52905f5097862a8fddd7b", "score": "0.6915596", "text": "function fn_get_image_size($file)\r\n{\r\n // File is url, get it and store in temporary directory\r\n if (strpos($file, '://') !== false) {\r\n $tmp = fn_create_temp_file();\r\n\r\n if (fn_put_contents($tmp, fn_get_contents($file)) == 0) {\r\n return false;\r\n }\r\n\r\n $file = $tmp;\r\n }\r\n\r\n list($w, $h, $t, $a) = @getimagesize($file);\r\n\r\n if (empty($w)) {\r\n return false;\r\n }\r\n\r\n $t = image_type_to_mime_type($t);\r\n\r\n return array($w, $h, $t);\r\n}", "title": "" }, { "docid": "892394a72120bf71a39971847b183df4", "score": "0.6906162", "text": "function auxin_wp_get_image_size( $size_name ){\n $all_image_sizes = auxin_get_all_image_sizes();\n\n if( ! empty( $all_image_sizes[ $size_name ] ) ){\n return $all_image_sizes[ $size_name ];\n }\n auxin_error( sprintf( 'Invalid image size name (%s) for \"%s\" function.', $size_name, __FUNCTION__ ) );\n return false;\n}", "title": "" }, { "docid": "5e28e0acd6721886fbe831b95be4c9d5", "score": "0.6904721", "text": "public function getImageInfo() {\n\t\tif (!$this->imageInfo) {\n\t\t\t$this->imageInfo = getimagesize($this->location);\n\t\t}\n\t\treturn $this->imageInfo;\n\t}", "title": "" }, { "docid": "3d0c1397c68d55c5bc5b24f159f370f4", "score": "0.68991154", "text": "public function getImageSize()\n {\n return array($this->image->getImageWidth(), $this->image->getImageHeight());\n }", "title": "" }, { "docid": "7f45f2167942feb9405551b10eae7dc3", "score": "0.6870853", "text": "function getHeight() {\n\t\tif (!$this->_imageInfo) {\n\t\t\t$this->_imageInfo = getimagesize($this->getFilePath());\n\t\t}\n\t\treturn $this->_imageInfo[1];\n\t}", "title": "" }, { "docid": "b870c6b8ec1154eadd4907f613432928", "score": "0.6863252", "text": "function est_image($url){\n return file_exists($url) && is_array(getimagesize($url)) ;\n}", "title": "" }, { "docid": "bc8292812a3663a403ddbc37fcac7baf", "score": "0.6843358", "text": "public static function getImageSizes() {\n return self::$_imgSizes;\n }", "title": "" }, { "docid": "b0ef86fb1ceef040beca6ced338ad33a", "score": "0.68421125", "text": "public function getImageSizes()\n {\n return $this->imageSizes;\n }", "title": "" }, { "docid": "de2e5afef03e9fc109502cdace6aecb9", "score": "0.68033177", "text": "public function getImageResolution() {\n\t}", "title": "" }, { "docid": "37c87054186b348a33857255155b097b", "score": "0.6803113", "text": "function getSize();", "title": "" }, { "docid": "66588eed28cf3d071413ad3ff077ecbe", "score": "0.67921674", "text": "function smart_getImageSize($url, & $width, & $height) {\n if (empty ($width) || empty ($height)) {\n if (!$dimension = @ getimagesize($url)) {\n return false;\n }\n if (!empty ($width)) {\n $height = $dimension[1] * $width / $dimension[0];\n }\n elseif (!empty ($height)) {\n $width = $dimension[0] * $height / $dimension[1];\n } else {\n list ($width, $height) = array (\n $dimension[0],\n $dimension[1]\n );\n }\n return true;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "720ee9652e69be9365fa8d71e6ea91fe", "score": "0.6791972", "text": "function get_image_sizes() {\n\treturn apply_filters( 'tomodomo/wp_imgix/sizes', [] );\n}", "title": "" }, { "docid": "8a13bd4cb720adef231b7dab8e1dc03b", "score": "0.67806524", "text": "static function getimagesize($image_url) {\r\n\t\tif(file_exists($image_url)) {\r\n\t\t\t//check file is not dir\r\n\t\t\tif(is_dir($image_url)) return false;\r\n\t\t\t//return image size\r\n\t\t\treturn getimagesize($image_url);\r\n\t\t}\r\n\r\n if(!preg_match('/^(http|https):\\/\\/.*/i', $image_url, $match)) return false; //filename is not URL\r\n \r\n\t\t$temp_file = tempnam(sys_get_temp_dir(), 'Tux');\r\n\t\t$handle = fopen ($image_url, \"rb\");\r\n\t\tif (!$handle) return false;\r\n\r\n\t\t//read file\r\n\t\t$contents = \"\";\r\n\t\tdo {\r\n\t\t\t$data = fread($handle, 8192);\r\n\t\t\tif (strlen($data) == 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t$contents .= $data;\r\n\t\t} while(true);\r\n\t\tfclose ($handle);\r\n\r\n\t\t$handle = fopen($temp_file, \"w\");\r\n\t\tfwrite($handle, $contents);\r\n\t\tfclose($handle);\r\n\t\t$contents = '';\r\n\r\n\t\tif(!file_exists($temp_file)) return false;\r\n\r\n\t\ttry {\r\n\t\t\t$imageSize = getimagesize($temp_file);\r\n\t\t\t$imageSize['source'] = $temp_file;\r\n\t\t} catch (Exception $e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $imageSize;\r\n\t}", "title": "" }, { "docid": "01c1a9bbca385d3ca5eb0b5329162454", "score": "0.67513794", "text": "public function getHeight(){\n\t\tif(file_exists($this->file->absolutePath)){\n\t\t\t$size=getimagesize($this->file->absolutePath);\n\t\t\treturn $size[1];\n\t\t}\n\t}", "title": "" }, { "docid": "7edb983732feb55beeb2e10bdd193e70", "score": "0.66873556", "text": "public static function getimagesize($filename){\n\t\t$arr = @getimagesize($filename);\n\n\t\tif(isset($arr) && is_array($arr) && (count($arr) >= 4) && $arr[0] && $arr[1]){\n\t\t\treturn $arr;\n\t\t}\n\t\treturn (we_base_imageEdit::gd_version() ?\n\t\t\t\twe_base_imageEdit::getimagesize($filename) :\n\t\t\t\t$arr);\n\t}", "title": "" }, { "docid": "7c72233d9db64d91e4162bdfe64329d2", "score": "0.6682425", "text": "private function setImageDimensions()\n {\n global $Core;\n\n if ($this->allowedSizes) {\n if (!isset($this->allowedSizes[$this->sizeType]) || !isset($this->allowedSizes[$this->sizeType][$this->sizeKey])) {\n $Core->doOrDie();\n } else {\n $this->width = $this->allowedSizes[$this->sizeType][$this->sizeKey]['width'];\n $this->height = $this->allowedSizes[$this->sizeType][$this->sizeKey]['height'];\n }\n }\n }", "title": "" }, { "docid": "c24bad212a9e8d2ad4ce215be3086766", "score": "0.6641682", "text": "function imageSize($sourceFileName)\n\t{\n\t\t$res = array(-1,-1);\n\t\tif (!is_file($sourceFileName)) {\n\t\t\t$this->setError('PHP_IMAGE_NO_IMG', array(), array($sourceFileName));\n\t\t\treturn $res;\n\t\t}\n\t\tif (!is_readable($sourceFileName)) {\n\t\t\t$this->setError('PHP_IMAGE_READ_ERR', array(), array($sourceFileName));\n\t\t\treturn $res;\n\t\t}\n\t\t\n\t\t$arr = @getimagesize($sourceFileName);\n\t\tif (is_array($arr)) {\n\t\t\tswitch ($arr[2]) {\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\t$res = array($arr[0], $arr[1]);\t \n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t\treturn $res;\n\t\t\n\t}", "title": "" }, { "docid": "757093e444f550bc0f3f7a3342ae5e0c", "score": "0.6638234", "text": "function checkImgSize($files){\n\n$maxFileSize = 10485760;\n\n foreach ($files['files']['size'] as $key => $size) {\n \t\n \tif($size > $maxFileSize){\n\n\n \t\t return false;\n \t}else{\n\n \t\tforeach ($files['files']['tmp_name'] as $imSize ) {\n \t\t\t\n \t\t\n \t\t\t$imageSize[] = getimagesize($imSize);\n \t\t}\n\n \t\treturn $imageSize;\n \t}\n }\n\n}", "title": "" }, { "docid": "1bc8e6dff30bccfd2fee01db7fe37d82", "score": "0.6638128", "text": "static function getResizedImg($img = NULL, $size = NULL, $quality = NULL, $wtm = NULL)\n {\n $size_auto = NULL;\n $size_width = NULL;\n $size_height = NULL;\n $size_square = NULL;\n $size_rect = NULL;\n $widthNew = NULL;\n $heightNew = NULL;\n\n //echo '<br>img='.$img;\n $rpos = strrpos($img, '/');\n if ($rpos > 0) {\n $settings_img_path = substr($img, 0, $rpos);\n $img_name = substr($img, $rpos + 1, strlen($img) - $rpos);\n $img_with_path = $img;\n }else {\n return false;\n }\n //echo '<br>$img_with_path='.$img_with_path;\n //echo '<br>$img_name='.$img_name;\n\n $fileSize = @filesize(SITE_PATH .$img_with_path);\n $fileImgSize = @getimagesize(SITE_PATH .$img_with_path);\n //echo '<br>file_exists('.SITE_PATH .$img_with_path.')='.file_exists(SITE_PATH .$img_with_path).' $fileSize='.$fileSize.' $fileImgSize='.$fileImgSize;\n if (!file_exists(SITE_PATH .$img_with_path) || empty($fileSize) || empty($fileImgSize)){\n $img = DEFAULT_NO_IMAGE_PATH;\n $img_with_path = $img;\n $img_name = substr($img, strrpos($img, '/') + 1, strlen($img) - strrpos($img, '/'));\n }\n\n $mas_img_name = explode(\".\", $img_with_path);\n $count_mas_img_name = count($mas_img_name);\n $exp = $mas_img_name[$count_mas_img_name-1];\n $arrPermitsExp = array('jpg','png','gif', 'jpeg');\n if(!in_array(strtolower($exp),$arrPermitsExp)){\n $img = DEFAULT_NO_IMAGE_PATH;\n $img_with_path = $img;\n $img_name = substr($img, strrpos($img, '/') + 1, strlen($img) - strrpos($img, '/'));\n\n $mas_img_name = explode(\".\", $img_with_path);\n $count_mas_img_name = count($mas_img_name);\n $exp = $mas_img_name[$count_mas_img_name-1];\n }\n unset($mas_img_name[$count_mas_img_name-1]);\n $img_name_from_array = implode(\".\",$mas_img_name);\n if(strstr($size, 'size_width')) {\n $size_width = substr($size, strrpos($size, '=') + 1, strlen($size));\n $widthNew = $size_width;\n $heightNew = $size_width;\n $resizeType = ImageK::WIDTH;\n $img_name_new = $img_name_from_array . ADDITIONAL_FILES_TEXT . 'width_' . $size_width . '.' . $exp;\n }elseif(strstr($size, 'size_auto')) {\n $size_auto = substr($size, strrpos($size, '=') + 1, strlen($size));\n $widthNew = $size_auto;\n $heightNew = $size_auto;\n $resizeType = ImageK::AUTO;\n $img_name_new = $img_name_from_array . ADDITIONAL_FILES_TEXT . 'auto_' . $size_auto . '.' . $exp;\n }elseif(strstr($size, 'size_height')) {\n $size_height = substr($size, strrpos($size, '=') + 1, strlen($size));\n $widthNew = $size_height;\n $heightNew = $size_height;\n $resizeType = ImageK::HEIGHT;\n $img_name_new = $img_name_from_array . ADDITIONAL_FILES_TEXT . 'height_' . $size_height . '.' . $exp;\n }elseif(strstr($size, 'size_square')) {\n $size_square = substr($size, strrpos($size, '=') + 1, strlen($size));\n $widthNew = $size_square;\n $heightNew = $size_square;\n $resizeType = ImageK::AUTO;\n $img_name_new = $img_name_from_array . ADDITIONAL_FILES_TEXT . 'square_' . $size_square . '.' . $exp;\n }elseif(strstr($size, 'size_rect')) {\n $sss = explode('=', $size);\n if(isset($sss[1]) AND !empty($sss[1])){\n $sss2 = explode('x', $sss[1]);\n if(isset($sss2[0]) AND !empty($sss2[0])){\n $widthNew = $sss2[0];\n }\n if(isset($sss2[1]) AND !empty($sss2[1])){\n $heightNew = $sss2[1];\n }\n }\n $size_rect = $widthNew.'x'.$heightNew;\n $resizeType = ImageK::AUTO;\n $img_name_new = $img_name_from_array . ADDITIONAL_FILES_TEXT . 'rect_' . $size_rect . '.' . $exp;\n }elseif(empty($size)){\n $img_name_new = $img_name_from_array . '.' . $exp;\n }\n// var_dump($exp);\n// echo '<br>$img_name_new='.$img_name_new;\n $img_full_path = SITE_PATH . $img_name_new;\n $fileSize = @filesize($img_full_path);\n// echo '<br/>$img_full_path ='.$img_full_path.' size='.$fileSize.' exist='.file_exists($img_full_path);\n //if exist local small version of the image then use it\n if(file_exists($img_full_path) && !empty($fileSize)){\n //echo 'exist';\n $str = $img_name_new;\n $flag_to_save = false;\n }\n //else use original image on the server SITE_PATH and make small version on local server\n else{\n //echo 'Not exist';\n if(file_exists($img_full_path)){\n @unlink($img_full_path);\n }\n $img_full_path = SITE_PATH . $img_with_path; // like z:/home/speakers/www/uploads/45/R1800TII_big.jpg\n// echo '<br> $img_full_path='.$img_full_path.'<br> $size_auto='.$size_auto;\n\n $ImageK = ImageK::factory($img_full_path);\n $src_x = $ImageK->width;\n $src_y = $ImageK->height;\n\n /*\n $ImageK_Test = ImageK::factory($img_full_path);\n if($size_square OR $size_rect){\n $ImageK_Test->resize_and_crop($widthNew, $heightNew);\n }else{\n $ImageK_Test->resize($widthNew, $heightNew, $resizeType);\n }\n *\n */\n\n //echo '<br>$widthNew='.$widthNew.' $heightNew='.$heightNew.'$resizeType='.$resizeType.' $src_x='.$src_x.' $src_y='.$src_y.' $ImageK_Test->width='.$ImageK_Test->width.' $ImageK_Test->height='.$ImageK_Test->height;\n\n //if original image smaller than thumbnail then use original image and don't create thumbnail\n //if ($src_x <= $ImageK_Test->width OR $src_y <= $ImageK_Test->height) {\n if ((strstr($size, 'size_width') AND $src_x <= $widthNew)\n or (strstr($size, 'size_height') AND $src_y <= $heightNew)\n or ($src_x <= $widthNew AND $src_y <= $heightNew AND !strstr($size, 'size_width') AND !strstr($size, 'size_height'))) {\n $img_full_path = $settings_img_path . '/' . $img_name;\n// echo '<br>$settings_img_path='.$settings_img_path.' $img_full_path='.$img_full_path;\n $str = $img_full_path;\n $flag_to_save = false;\n }else {\n $mas_img_name = explode(\".\", $img_with_path);\n $img_name_new=\"\";\n //$img_name_new = $mas_img_name[0].ADDITIONAL_FILES_TEXT.intval($thumb->img['x_thumb']).'x'.intval($thumb->img['y_thumb']).'.'.$mas_img_name[1];\n $cnt=count($mas_img_name);\n if($cnt>2) {\n for ($i = 0; $i < $cnt - 1; $i++) {\n if ($i > 0) $img_name_new .= \".\";\n $img_name_new .= $mas_img_name[$i];\n }\n }\n if (!empty($size_width)){\n if($cnt>2) $img_name_new.= ADDITIONAL_FILES_TEXT . 'width_' . $size_width . '.' . $mas_img_name[$cnt-1];\n else $img_name_new = $mas_img_name[0] . ADDITIONAL_FILES_TEXT . 'width_' . $size_width . '.' . $mas_img_name[1];\n }elseif (!empty($size_auto)){\n if($cnt>2) $img_name_new.= ADDITIONAL_FILES_TEXT . 'auto_' . $size_auto . '.' . $mas_img_name[$cnt-1];\n else $img_name_new = $mas_img_name[0] . ADDITIONAL_FILES_TEXT . 'auto_' . $size_auto . '.' . $mas_img_name[1];\n }elseif (!empty($size_height)){\n if($cnt>2) $img_name_new.= ADDITIONAL_FILES_TEXT . 'height_' . $size_height . '.' . $mas_img_name[$cnt-1];\n else $img_name_new = $mas_img_name[0] . ADDITIONAL_FILES_TEXT . 'height_' . $size_height . '.' . $mas_img_name[1];\n }elseif (!empty($size_square)){\n if($cnt>2) $img_name_new.= ADDITIONAL_FILES_TEXT . 'square_' . $size_square . '.' . $mas_img_name[$cnt-1];\n else $img_name_new = $mas_img_name[0] . ADDITIONAL_FILES_TEXT . 'square_' . $size_square . '.' . $mas_img_name[1];\n }elseif (!empty($size_rect)){\n if($cnt>2) $img_name_new.= ADDITIONAL_FILES_TEXT . 'rect_' . $size_rect . '.' . $mas_img_name[$cnt-1];\n else $img_name_new = $mas_img_name[0] . ADDITIONAL_FILES_TEXT . 'rect_' . $size_rect . '.' . $mas_img_name[1];\n }\n\n if($size_square OR $size_rect){\n $ImageK->resize_and_crop($widthNew, $heightNew);\n }else{\n $ImageK->resize($widthNew, $heightNew, $resizeType);\n }\n $str = $img_name_new;\n $flag_to_save = true;\n }//end else\n }//end else\n\n //add watermark on the image\n if($wtm == 'img') {\n //if not exist\n if(!isset($src_x) OR !isset($src_y)){\n $ImageK = ImageK::factory($img_full_path);\n $src_x = $ImageK->width;\n $src_y = $ImageK->height;\n }\n //prepare new image name with adding sufix \"_WTM_\"\n $img_name = substr($str, 0, strrpos($str, '.'));\n if(!strstr($img_name, ADDITIONAL_FILES_TEXT)){\n $img_name .= ADDITIONAL_FILES_TEXT;\n }\n $img_ext = substr($str, strrpos($str, '.'));\n// echo '<br>$img_name='.$img_name.' $img_ext='.$img_ext;\n// $str = $img_name . '_WTM_' . $img_ext;\n\n //if don't exist file with watermark then resize watermark for\n //best using on current image.\n if (!file_exists(SITE_PATH.$str)){\n $size_wtm = min($src_x, $ImageK->width, $src_y, $ImageK->height);\n //echo '<br>$size_wtm='.$size_wtm;\n $wtm = SITE_PATH . ImageK::getResizedImg(WATERMARK_IMG_PATH, 'size_auto='.$size_wtm, 85);\n $mark = ImageK::factory($wtm);\n $ImageK->watermark($mark);\n $flag_to_save = true;\n }else{\n $flag_to_save = false;\n }\n }\n if($flag_to_save){\n $img_full_path_new = SITE_PATH . $str;\n// echo '<br>$img_full_path_new='.$img_full_path_new;\n if (!file_exists($img_full_path_new)){\n $rpos = strrpos($img_with_path, '/');\n //echo '<br />$img_with_path='.$img_with_path.' $rpos='.$rpos;\n if ($rpos > 0){\n $uploaddir = SITE_PATH . substr($img_with_path, 0, $rpos);\n }else{\n return false;\n }\n if (file_exists($uploaddir)){\n @chmod($uploaddir, 0777);\n }else{\n mkdir($uploaddir, 0777);\n }\n $ImageK->save($img_full_path_new, $quality);\n @chmod($uploaddir, 0755);\n }\n }\n return $str;\n }", "title": "" }, { "docid": "fa505540286eadc6ad7e0154c8d8a738", "score": "0.66377413", "text": "function pergo_single_image_size( $size ) {\r\n $size[ 'width' ] = ot_get_option( 'single_image_width', 600 );\r\n $size[ 'height' ] = ot_get_option( 'single_image_height', 800 );\r\n return $size;\r\n}", "title": "" }, { "docid": "3d366dc0084ca32613ebe384f53eca36", "score": "0.66367656", "text": "public function getImageExtrema () {}", "title": "" }, { "docid": "6881ec7c9ae8456b39069cdeb729b933", "score": "0.66052556", "text": "public function image_sizes() {\n //add_image_size(\"cpt-square\", 250, 250, true);\n //add_image_size(\"cpt-square-2x\", 500, 500, true);\n\t}", "title": "" }, { "docid": "ddb206c2b0c6a98780e0e70eea1bc22f", "score": "0.65942305", "text": "function ale_get_necessary_image_size(){\n\n $thumb_size = 'full';\n\n //Get the columns setting\n $ale_work_columns = ale_get_option('default_work_columns');\n\n //Get the Layout Style\n $ale_work_layout = ale_get_option('default_layout_type');\n\n if($ale_work_columns and $ale_work_layout){\n switch($ale_work_columns) {\n case '1' :\n $thumb_size = 'works-'.$ale_work_layout.'extrabig';\n break;\n case '2' :\n $thumb_size = 'works-'.$ale_work_layout.'big';\n break;\n case '3' :\n $thumb_size = 'works-'.$ale_work_layout.'large';\n break;\n case '4' :\n $thumb_size = 'works-'.$ale_work_layout.'medium';\n break;\n case '5' :\n $thumb_size = 'works-'.$ale_work_layout.'small';\n break;\n }\n }\n\n return $thumb_size;\n}", "title": "" }, { "docid": "16541789ce232719ccbb8c67c1a1874d", "score": "0.6592029", "text": "function getWidth($image) {\n\t$sizes = getimagesize($image);\n\t$width = $sizes[0];\n\treturn $width;\n}", "title": "" }, { "docid": "91f1ec16551c8dd5962c2a00925c6e94", "score": "0.65870893", "text": "public function getImageSize(): array\r\n\t{\r\n\t\treturn [\r\n\t\t\t\"x\" => ImageSX($this->orig_img),\r\n\t\t\t\"y\" => ImageSY($this->orig_img)\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "bb707427d92c549b705bd6ae73ca0752", "score": "0.65868217", "text": "public function getSize();", "title": "" }, { "docid": "92897af1961b0d16ef33b14c3d90523d", "score": "0.6577848", "text": "function imageResize() {\r\r\n\t\t$defaultans='';\r\r\n\t\t$ns = new Zend_Session_Namespace('myshows');\r\r\n\t\t$userid = isset($ns->showid) ? $ns->show->owner : 0;\r\r\n\t\t$logofile = '/data/logo'. $userid .'.png';\r\r\n\t\t$logopath = realpath(APPLICATION_PATH) . '/../public/' . $logofile;\r\r\n//\t\t$defaultans = '$logofile=' . $logofile;\r\r\n//\t\techo '$defaultans=' . $defaultans;\r\r\n\t\tif (!isset($userid) ) {\r\r\n\t\t\t$ans = $defaultans;\r\r\n\t\t} else if (!file_exists($logopath) || false) {\r\r\n\t\t\t$ans = $defaultans;\r\r\n//\t\t\techo '$logofile' . $logofile;\r\r\n\t\t} else {\r\r\n\t\t\t//get the image size of the picture and load it into an array\r\r\n\t\t\t$mysock = getimagesize($logopath);\r\r\n\t\t\t$sizepart = $this->_imageResize($mysock[0], $mysock[1], 55);\r\r\n\t\t\t$ans = '<img src=\"'. $this->view->baseUrl() . $logofile .'\" ' . $sizepart . ' />';\r\r\n\t\t\t\r\r\n\t\t\t//$ans = '<img valign=\"middle\" src=\"/venividivici/public/images/arrow_down.gif\" border=\"0\" width=\"150\" height=\"112\" >'; //'<img src=\"/venividivici/public/data/logo13.png\" border=\"0\" />';\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $ans;\r\r\n\t}", "title": "" }, { "docid": "461160538c66c54a153e86e89af8ae77", "score": "0.6569228", "text": "function getWidth($image) {\r\r\n\t $size = getimagesize($image);\r\r\n\t $width = $size[0];\r\r\n\t return $width;\r\r\n }", "title": "" }, { "docid": "6ad577cb2ce7b91e58cfd0b2afb07480", "score": "0.6563809", "text": "private function checkReal() {\n\t\t\t$check = (!is_null($this->target)) ? getimagesize($this->target) : getimagesize($this->tmpName);\n\t\t\tif($check == false) {\n\t\t\t\tthrow new Exception(\"Image file broken.\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1ca31e7675ae24902abb9e155e2f006b", "score": "0.65557545", "text": "public function getWidth($image);", "title": "" }, { "docid": "1a0e48e2a7ae8ba9f5a3dd8a3284f04e", "score": "0.65534854", "text": "private static function workSize($imgData) {\r\n\r\n// $ext = pathinfo($imgData, PATHINFO_EXTENSION);\r\n $ext = getimagesize($imgData)['mime'];\r\n\r\n switch($ext) {\r\n case 'image/jpg':\r\n case 'image/jpeg':\r\n $tmpData = @imagecreatefromjpeg($imgData);\r\n break;\r\n case 'image/gif':\r\n $tmpData = @imagecreatefromgif($imgData);\r\n break;\r\n case 'image/png':\r\n $tmpData = @imagecreatefrompng($imgData);\r\n break;\r\n default:\r\n throw new \\Exception(\"Este arquivo não é uma imagem válida!\", 1);\r\n }\r\n\r\n $x = imagesx($tmpData);\r\n $y = imagesy($tmpData);\r\n\r\n $max = ($x > $y) ? $x : $y;\r\n\r\n $rate = $max/self::$resizableSize;\r\n $finalX = $x/$rate;\r\n $finalY = $y/$rate;\r\n\r\n if($finalX > $x) {\r\n $finalX = $x;\r\n $finalY = $y;\r\n }\r\n\r\n $finalX = ceil($finalX);\r\n $finalY = ceil($finalY);\r\n\r\n $newData = imagecreatetruecolor($finalX,$finalY);\r\n imagefill($newData,0,0,imagecolorallocate($newData, 255, 255, 255));\r\n imagecopyresampled($newData, $tmpData, 0, 0, 0, 0,$finalX, $finalY, $x, $y);\r\n\r\n switch($ext) {\r\n case 'image/png':\r\n case 'image/jpg':\r\n case 'image/jpeg':\r\n imagejpeg($newData, $imgData, self::$resizableQuality);\r\n break;\r\n case 'image/gif':\r\n imagegif($newData, $imgData);\r\n break;\r\n }\r\n\r\n imagedestroy($tmpData);\r\n imagedestroy($newData);\r\n }", "title": "" }, { "docid": "669ebda3f36ae7ac3fbe9210eaf294d2", "score": "0.65456444", "text": "protected function getSourceImageSize()\n {\n $src_size = getimagesize($this->sourceImage);\n $this->sourceImageWidth = $src_size[0];\n $this->newWidth = $src_size[0];\n $this->sourceImageHeight = $src_size[1];\n $this->newHeight = $src_size[1];\n }", "title": "" }, { "docid": "9cd810e83bf86247c994e4a4e63757e6", "score": "0.65319216", "text": "public function getSize () {}", "title": "" }, { "docid": "b377ff93cf8f2173ab54dac597cbf854", "score": "0.6516913", "text": "function getImageStyleSize($path) {\n\n // [C] no size\n return '0x0';\n\n //[A] getiamgesize\n $imagesize = getimagesize($path);\n return $imagesize[0] . 'x' . $imagesize[1];\n\n //[B] If get Imagesize is too slow, use this function: faster but might return some notices\n $headers = array(\n \"Range: bytes=0-32768\"\n );\n\n $curl = curl_init($path);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($curl);\n curl_close($curl);\n\n $im = imagecreatefromstring($data);\n\n $width = imagesx($im);\n $height = imagesy($im);\n\n return $width . 'x' . $height;\n }", "title": "" }, { "docid": "27e3829f653869dab5b55410f562c76b", "score": "0.64958614", "text": "public function getImageHeight()\n\t{\n\t\treturn $this->info['height'];\n\t}", "title": "" }, { "docid": "e8a9ab5377a23d526003c95eb3e07630", "score": "0.647934", "text": "public function GetWidthHeight(){\n\t\tlist($width, $height) = getimagesize($this->imagesPath.$this->filename);\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\t\treturn array('width' => $width, 'height' => $height);\n\t}", "title": "" }, { "docid": "9293877147da392b04c3ff96611994e5", "score": "0.64517146", "text": "private function getDimensions($filename)\n {\n $size = getimagesize($filename);\n $this->mImageWidth = $size[0];\n $this->mImageHeight = $size[1];\n }", "title": "" }, { "docid": "034275f75405f975588302d472f4241a", "score": "0.6444249", "text": "public function getNumberImages () {}", "title": "" }, { "docid": "7604140957dc94b3a50b795efa37fe54", "score": "0.643644", "text": "public function getMaxImageSize()\n {\n return self::MAX_IMG_SIZE * 1024 * 1024;\n }", "title": "" }, { "docid": "224cfb9a0f8c23fa181d119ca0a0a754", "score": "0.64222443", "text": "public function test_resize_image_when_already_small() {\n $result = $this->_cut->resize(__DIR__ . '/img', 'dancer180x139.jpg');\n $this->assertEquals(array(180, 139), $result);\n }", "title": "" }, { "docid": "78a278365cce42d86846cb9f4cad8323", "score": "0.64196116", "text": "abstract public function getSize();", "title": "" }, { "docid": "2e8ce73b9af9ca537b41594ba8d9bd63", "score": "0.6416935", "text": "function getHeight($image) {\r\r\n\t $size = getimagesize($image);\r\r\n\t $height = $size[1];\r\r\n\t return $height;\r\r\n }", "title": "" }, { "docid": "f6c9059df712cf53c1cde3ca9cda04a1", "score": "0.64090735", "text": "function getWidth($image) {\n\t\t$sizes = getimagesize($image);\n\t\t$width = $sizes[0];\n\t\treturn $width;\n\t}", "title": "" }, { "docid": "342298e068de1d036277140c146d1339", "score": "0.6403276", "text": "function getHeight($image) {\n\t$sizes = getimagesize($image);\n\t$height = $sizes[1];\n\treturn $height;\n}", "title": "" }, { "docid": "0f7e26660b2d4eb191cf0ae675af5d60", "score": "0.64021343", "text": "public static function getImageSize($image, $req = '')\n\t{\n\t\t$return = array();\n if(!$image || !is_file($image)) return $return;\n if($img = getimagesize($image)){\n $return['width'] = $img[0];\n $return['height'] = $img[1];\n $return['type'] = $img[2];\n $return['attr'] = $img[3];\n $return['bits'] = $img['bits'];\n $return['mime'] = $img['mime']; \n }\n return ($req != '' && isset($return[$req])) ? $return[$req] : $return; \n }", "title": "" }, { "docid": "0278c63ac4eedaf8f7c0eef11c4da4b2", "score": "0.64009565", "text": "function wptt_single_image_size( $size ){\r\n \r\n $size['width'] = ot_get_option('single_image_width', 600);\r\n $size['height'] = ot_get_option('single_image_height', 600);\r\n \r\n return $size;\r\n \r\n}", "title": "" }, { "docid": "6da8d18e6cba79d29d62d0431ef8c7fd", "score": "0.6399905", "text": "function getimagesizefromstring ($imagedata, array &$imageinfo = null) {}", "title": "" }, { "docid": "44879838d791f582e9064d4c2debb7cb", "score": "0.6382114", "text": "public function test_image_size_method_with_nonexistent_image()\n {\n $result = $this->website_object->image_size(\n 'https://www.example.com/elephpant.png'\n );\n\n $this->assertFalse($result);\n $this->assertInternalType('bool', $result);\n }", "title": "" }, { "docid": "19d629d185b3645707a497382325ee13", "score": "0.6378749", "text": "public function equalizeImage () {}", "title": "" }, { "docid": "debd6fe1dac0cedaf543668b2aefaa6a", "score": "0.63737464", "text": "private function validateImageSize() {\n\n if (!$this->image->getSize()) {\n\n $this->errors[] = $this->image->getClientOriginalName() . ' had 0 size';\n $this->is_ok = null;\n return;\n }\n\n if (isset($this->options['max_image_size'])) {\n $max_image_size = $this->options['max_image_size'];\n } elseif (isset($this->config['max_image_size'])) {\n $max_image_size = $this->config['max_image_size'];\n } else {\n $max_image_size = 1;\n }\n\n $image_size = $this->image->getSize() / 1024 / 1024;\n\n if ($image_size > $max_image_size) {\n $this->errors[] = $this->image->getClientOriginalName() . ' is bigger than allowed image size';\n $this->is_ok = null;\n }\n }", "title": "" }, { "docid": "2690c30788c1686edf2455585cee8942", "score": "0.63728184", "text": "function photo_size($photo, $max_width, $max_height, $return_value = \"w\") {\n\t\t\n\t\t$dimensions = @getimagesize($photo);\n \t\t$width = $dimensions[0];\n\t\t$height = $dimensions[1];\n \n\t\tif($width > $max_width || $height > $max_height) {\n\t\t\tif($width > $max_width) {\n\t \t\t$height = $height*$max_width/$width;\n\t \t\t$width = $max_width;\n\t \t}\n \n\t \tif($height > $max_height) {\n\t\t\t\t$width = $width*$max_height/$height;\n\t\t\t\t$height = $max_height;\n\t \t}\n\t\t}\n \n\t\tif($return_value == \"w\") {\n\t\t\t$image_dimension = $width; \n\t\t} else {\n\t\t\t$image_dimension = $height; \n\t\t}\n \n\t\treturn round($image_dimension, 2);\n\t}", "title": "" }, { "docid": "3e82883065e9d5ddbfcf11f4882a8a03", "score": "0.6372748", "text": "public function getMaxImage($src){\n\t//Get the parameters\n\t$filename=$src;\n\t$size=$this->maxsize;\n\t$width=$size;\n\t$height=$size;\n\n\t//Get the cache path\n\t$cachepath = $this->folderpath.'/cache/'.$size.'x'.$size.''.str_replace(\"/\",\"~\",$filename);\n\t\n\tif(file_exists($cachepath)){ return $cachepath; } //If cached, return right away\n\telse //Create the image\n\t{\n\t\t// Compute the new dimensions\n\t\tlist($width_orig, $height_orig, $type, $att) = getimagesize($filename);\n\t\tif($width_orig>$size || $height_orig>$size) {\n\t\t\t$ratio_orig = $width_orig/$height_orig;\n\t\t\tif ($width/$height > $ratio_orig) { $width = $height*$ratio_orig; } \n\t\t\telse { $height = $width/$ratio_orig; }\n\t\t}\n\t\telse { $width=$width_orig; $height=$height_orig; }\n\n\t\t//Create the image into memory (for manipulation with GD Library)\n\t\t$step1 = imagecreatetruecolor($width, $height);\n\t\tswitch($type) { \n\t\t\tcase 1: $image = imagecreatefromgif($filename); break;\n\t\t\tcase 2: $image = imagecreatefromjpeg($filename); break;\n\t\t\tcase 3: $image = imagecreatefrompng($filename); break;\t\t\t\n\t\t}\n\n\t\t//Resize the image, save it, and return it\n\t\timagecopyresampled($step1, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\t\t\n\t\t$this->cachePicture($step1,$cachepath); \n\t\tImageDestroy($step1); \n\t\treturn $cachepath;\n\t\t\n\t}\n }", "title": "" }, { "docid": "3cc22c554d7480d38fb7af503457aa0e", "score": "0.637219", "text": "function yumc_image_sizes() {\n\tadd_image_size( '380-thumb', 380 ); // 380 pixels wide (and unlimited height)\n\tadd_image_size( '380-253-thumb', 380, 253, true ); // Cropped 380 x 253\n\tadd_image_size( '842-421-thumb', 842, 421, true );\n\tadd_image_size( '880-440-thumb', 880, 440, true );\n}", "title": "" }, { "docid": "2660b3107e35cfd90aa7427ca9288c7e", "score": "0.6369763", "text": "public abstract function getSize();", "title": "" }, { "docid": "72c6587aae808e7c277e27ec7249203b", "score": "0.6369585", "text": "function _getimagesize($img, $m, $ratio='false'){\n \n $v = @getImageSize($img);\n \n if($v === FALSE || $v[2] < 1 || $v[2] > 3)\n return FALSE;\n \n $m = intval($m);\n \n if($m > $v[0] && $m > $v[1])\n return array_merge($v, array(\"w\"=>$v[0], \"h\"=>$v[1]));\n \n if($ratio != 'false'){\n $xy = explode(':',$ratio);\n return array_merge($v, array(\"w\"=>$m, \"h\"=>ceil($m*intval(trim($xy[1]))/intval(trim($xy[0])))));\n }elseif($v[0] > $v[1]){\n $t = $v[0]/$m;\n $s = floor($v[1]/$t);\n $m = ($m > 0) ? $m : 1;\n $s = ($s > 0) ? $s : 1;\n return array_merge($v, array(\"w\"=>$m, \"h\"=>$s));\n } else {\n $t = $v[1]/intval($m);\n $s = floor($v[0]/$t);\n $m = ($m > 0) ? $m : 1;\n $s = ($s > 0) ? $s : 1;\n return array_merge($v, array(\"w\"=>$s, \"h\"=>$m));\n }\n }", "title": "" }, { "docid": "810876f16e180ee146cb058d5a843fe5", "score": "0.63546145", "text": "static function check_image_size ($data, $args) {\n $field = $args[\"field\"];\n $arr_file = $data[$field];\n if ($arr_file[\"tmp_name\"]) {\n\t\t\t\t$image_size = getImageSize($arr_file[\"tmp_name\"]);\n\t \n\t if ($image_size) {\n\t\t\t\t\t$width= $image_size[0];\n\t\t\t\t\t$height= $image_size[1];\n\t\n\t\t\t\t\t$minWidth = $args[\"minWidth\"];\n\t\t\t\t\t$minHeight = $args[\"minHeight\"];\n\t\t\t\t\t$maxWidth = $args[\"maxWidth\"];\n\t\t\t\t\t$maxHeight = $args[\"maxHeight\"];\n\t\t\t\t\t\n\t\t if ($minWidth AND $width < $minWidth) { \t\t\n\t\t \treturn false;\n\t\t }\n\t\t if ($minHeight AND $height < $minHeight) { \t\t\n\t\t \treturn false;\n\t\t } \n\t\t if ($maxWidth AND $width > $maxWidth) { \t\t\n\t\t \treturn false;\n\t\t } \n\t\t if ($maxHeight AND $height > $maxHeight) { \t\t\n\t\t \treturn false;\n\t\t } \n\t } \n } \n \n \treturn true;\t \n }", "title": "" }, { "docid": "5d797142fb525ccb5e4324d91c104c3a", "score": "0.63406134", "text": "public function has_image($size = 'medium')\n {\n $this->check_valid_image_size($size);\n return strlen($this->{\"image_\" . $size});\n }", "title": "" }, { "docid": "96b218249db82164aef88e50dd0ab20b", "score": "0.6330267", "text": "public function getWidth() {\n \treturn imagesx($this->image);\n\t}", "title": "" }, { "docid": "8e31f89b2aa805a0ea611e376acd10c3", "score": "0.6321161", "text": "function pergo_get_image_size_shop_thumbnail( $size ) {\r\n $size[ 'width' ] = 150;\r\n $size[ 'height' ] = 150;\r\n return $size;\r\n}", "title": "" }, { "docid": "f63e285f5704857ea7c223e4415cd473", "score": "0.631982", "text": "function getImageInfo( $image) {\n $imgInfo = array();\n \n if ( file_exists( $image)) {\n if ( $data = getimagesize( $image)) {\n $imgInfo = $data;\n }\n }\n \n return $imgInfo;\n }", "title": "" }, { "docid": "fd628d4e23d346aebe24eea2e4c97bf3", "score": "0.63189197", "text": "public function getImageExtrema() {\n\t}", "title": "" }, { "docid": "052e549f9d41065c0f93153dca64cca1", "score": "0.6318694", "text": "function oxygen_woocommerce_get_single_image_size() {\n\t$deprecated_size_filter = apply_filters( 'single_product_large_thumbnail_size', 'woocommerce_single' );\n\n\treturn apply_filters( 'single_product_archive_thumbnail_size', $deprecated_size_filter );\n}", "title": "" }, { "docid": "d34c486301289c4cce200f3708f7d88c", "score": "0.63108486", "text": "private function _calculate() {\n $this->width = ImageSX($this->_image);\n $this->height = ImageSY($this->_image);\n\n //if the image is landscape - the ratio is greater than 1, and vice versa\n $this->ratio = ($this->width / $this->height);\n }", "title": "" }, { "docid": "836ae0258b89c49dfa4deabbd190efa4", "score": "0.6309303", "text": "protected function getImageSize($url)\n {\n $request = $this->http->get($url, [\n 'Range' => 'bytes=0-32768'\n ]);\n\n if (!$request->success) {\n return false;\n }\n\n $image = imageCreateFromString($request->data);\n\n if ($image) {\n $width = imagesx($image);\n $height = imagesy($image);\n\n return [$width, $height];\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "2f64a76731dc5b896fdc6ea6e95ef8f5", "score": "0.6303338", "text": "protected function _dimensions($path, $mime)\n {\n if (strpos($mime, 'image') !== 0) {\n return '';\n }\n\n //$cache = $this->_od_getFileRaw($path);\n if (func_num_args() > 2) {\n $args = func_get_arg(2);\n } else {\n $args = array();\n }\n if (!empty($args['substitute'])) {\n $tmbSize = intval($args['substitute']);\n } else {\n $tmbSize = null;\n }\n list(, $itemId) = $this->_od_splitPath($path);\n $options = array(\n 'query' => array(\n 'select' => 'id,image',\n ),\n );\n if ($tmbSize) {\n $tmb = 'c' . $tmbSize . 'x' . $tmbSize;\n $options['query']['expand'] = 'thumbnails(select=' . $tmb . ')';\n }\n $raw = $this->_od_query($itemId, true, false, $options);\n\n if ($raw && property_exists($raw, 'image') && $img = $raw->image) {\n if (isset($img->width) && isset($img->height)) {\n $ret = array('dim' => $img->width . 'x' . $img->height);\n if ($tmbSize) {\n $srcSize = explode('x', $ret['dim']);\n if (min(($tmbSize / $srcSize[0]), ($tmbSize / $srcSize[1])) < 1) {\n if (!empty($raw->thumbnails)) {\n $tmbArr = (array)$raw->thumbnails[0];\n if (!empty($tmbArr[$tmb]->url)) {\n $ret['url'] = $tmbArr[$tmb]->url;\n }\n }\n }\n }\n\n return $ret;\n }\n }\n\n $ret = '';\n if ($work = $this->getWorkFile($path)) {\n if ($size = @getimagesize($work)) {\n $cache['width'] = $size[0];\n $cache['height'] = $size[1];\n $ret = $size[0] . 'x' . $size[1];\n }\n }\n is_file($work) && @unlink($work);\n\n return $ret;\n }", "title": "" }, { "docid": "942f988b33859d00622b01ae75b122dd", "score": "0.63011944", "text": "function pergo_get_image_size_shop_catalog( $size ) {\r\n $size[ 'width' ] = ot_get_option( 'catalog_image_width', 400 );\r\n $size[ 'height' ] = ot_get_option( 'catalog_image_height', 500 );\r\n return $size;\r\n}", "title": "" }, { "docid": "41ed0010fafa89734d0759b5c197ebd2", "score": "0.62962985", "text": "public function sizeimg($check, $width, $height, $limit){\n\n //debug($check);\n //debug($limit);\n\n //debug(func_get_args());\n\n\n\n $field = key($check); // on recupere le non du champs (avatarf)\n $value = $check[$field]; // on recupere la valeur contenu dans le champs\n //debug($value);\n //die();\n if(empty($value['tmp_name'])){ // si aucune image n'est envoyer\n return true;\n }\n $file = pathinfo(strtolower($value['name'])); // on recupere le chemin du fichier et on le met en miniscule\n //debug($file);\n //die();\n if(!in_array($file['extension'], array('jpg','jpeg','png'))){\n return false;\n } // si on trouve pas d'extension image on retourne faux\n\n $size = getimagesize($value['tmp_name']); // on recupere la taille de l'image\n\n //debug($size);\n //die();\n return $size[0] > $width && $size[1] > $height;\n }", "title": "" } ]
263a079984b4d162464ecfe6760bd0a5
we want to ignore the name passed
[ { "docid": "27d88d0dc5f84acd91c10a7359696f59", "score": "0.0", "text": "public function __construct($name = null)\r\n {\r\n parent::__construct('topic');\r\n $this->setAttribute('method', 'post');\r\n $this->add(array(\r\n 'name' => 'id_topic',\r\n 'attributes' => array(\r\n 'type' => 'hidden',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'topic_type',\r\n 'attributes' => array(\r\n 'type' => 'text',\r\n 'placeholder' => '选题类型',\r\n ),\r\n 'options' => array(\r\n 'label' => '',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'topic_link',\r\n 'attributes' => array(\r\n 'type' => 'text',\r\n 'placeholder' => '选题链接',\r\n ),\r\n 'options' => array(\r\n 'label' => '',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'abstract',\r\n 'attributes' => array(\r\n 'type' => 'textarea',\r\n 'rows' => 5,\r\n 'placeholder' => '选题概要',\r\n ),\r\n 'options' => array(\r\n 'label' => '',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'app_type',\r\n 'type' => 'Zend\\Form\\Element\\Select',\r\n 'options' => array(\r\n 'value_options' => array(\r\n '' => '请选择征集APP产品类型',\r\n '图书' => '图书',\r\n '商业' => '商业',\r\n '商品指南' => '商品指南',\r\n '教育' => '教育',\r\n '娱乐' => '娱乐',\r\n '财务' => '财务',\r\n '美食佳饮' => '美食佳饮',\r\n '游戏' => '游戏',\r\n '健康健美' => '健康健美',\r\n '生活' => '生活',\r\n '医疗' => '医疗',\r\n '音乐' => '音乐',\r\n '导航' => '导航',\r\n '新闻' => '新闻',\r\n '报刊杂志' => '报刊杂志',\r\n '摄影与录像' => '摄影与录像',\r\n '效率' => '效率',\r\n '参考' => '参考',\r\n '社交' => '社交',\r\n '体育' => '体育',\r\n '旅行' => '旅行',\r\n '工具' => '工具',\r\n '天气' => '天气',\r\n ),\r\n ),\r\n 'attributes' => array( \r\n 'multiple' => 'multiple',\r\n ),\r\n ));\r\n $this->add(array(\r\n 'name' => 'due_date',\r\n 'attributes' => array(\r\n 'type' => 'text',\r\n 'placeholder' => 'YYYY-MM-DD',\r\n 'id' => 'f_date_ETA',\r\n ),\r\n 'options' => array(\r\n 'label' => '',\r\n ),\r\n ));\r\n /*$this->add(array(\r\n 'name' => 'app_type',\r\n 'attributes' => array(\r\n 'type' => 'text',\r\n 'placeholder' => '征集APP产品类型',\r\n ),\r\n 'options' => array(\r\n 'label' => '',\r\n ),\r\n ));*/\r\n $this->add(array(\r\n 'name' => 'submit',\r\n 'attributes' => array(\r\n 'type' => 'submit',\r\n 'value' => 'Go',\r\n 'id' => 'submitbutton',\r\n 'class' => 'btn btn-primary',\r\n ),\r\n ));\r\n }", "title": "" } ]
[ { "docid": "c9427a753d196af79b0af7e416e54d89", "score": "0.6472586", "text": "public function withoutHeader(string $name) {\n }", "title": "" }, { "docid": "66c0ae8fd6e23e66ef26ab694acbc4a5", "score": "0.62616414", "text": "function setName($name) \n {\n // override me \n }", "title": "" }, { "docid": "043bbda76fdd06c4fba86ccf92881859", "score": "0.6247309", "text": "public function noName(){ unset($this->attributes['name']); return $this; }", "title": "" }, { "docid": "54fe91c3484216cea3c3514767a07527", "score": "0.61855865", "text": "protected function nochangeMethod($name)\n {\n return $name;\n }", "title": "" }, { "docid": "0be165474b1926abef268a2649be72b5", "score": "0.61559004", "text": "public function omitField($name) {\n $this->omittedFields[$name] = true;\n }", "title": "" }, { "docid": "a1197514759128128913d1fff607528d", "score": "0.61254656", "text": "function getName()\n {\n //override me \n }", "title": "" }, { "docid": "34f39cc710cd124ef2fa70b650f9db6a", "score": "0.61060363", "text": "function __set ($name, $value)\n\t{\n\t\tswitch ($name) {\n\t\t\tcase \"names\":\n\t\t\t\t//Ignore\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tparent::__set($name, $value);\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "70e36ca5d4d7af9dbe9081fa33f30aaa", "score": "0.60281384", "text": "public function testMissingParameterAddCheckName() {\n $check = $this->default_check;\n $check['name'] = null;\n $this->pingdom->addCheck($check);\n }", "title": "" }, { "docid": "d898edee7630a772b334b6061d2ed6c8", "score": "0.6015748", "text": "function no_aged($name){\n return ($name != 'Aged Brie');\n }", "title": "" }, { "docid": "bb0dd57a534d65e739665b50d48539cb", "score": "0.6002415", "text": "public function __construct($_name) {\n\t\t$this->name = $_name;\n\t\t$cook_by = null;\n\t}", "title": "" }, { "docid": "04280ea0b3c012925c02c0fd01c2043d", "score": "0.5994775", "text": "function removeFilter($name);", "title": "" }, { "docid": "3f364ae9661f13d45dee66cad113ed11", "score": "0.5972615", "text": "function ignoreColumn($name) {\n\t\t$this->ignore[] = $name;\n\t\t$cleanMap = array();\n\t\tfor($x=0; $x < count($this->colMap); ++$x) {\n\t\t\tif ( !in_array( $this->colMap[$x], $this->ignore) ) {\n\t\t\t\t$cleanMap[] = $this->colMap[$x];\n\t\t\t} \n\t\t}\n\t\t$this->colMap = $cleanMap;\n\t}", "title": "" }, { "docid": "7ac58638ab33f29d0f419e26e9880aab", "score": "0.59533924", "text": "public function unsetName(): void\n {\n $this->name = [];\n }", "title": "" }, { "docid": "95b82aeec2faf31019de73d0639fc77e", "score": "0.58967835", "text": "abstract protected function name();", "title": "" }, { "docid": "2c7df4c2b2767d5d781768b0207d976e", "score": "0.589246", "text": "public function getReservedName() {}", "title": "" }, { "docid": "2c7df4c2b2767d5d781768b0207d976e", "score": "0.589246", "text": "public function getReservedName() {}", "title": "" }, { "docid": "6228ee1576211788b4970b1fc4274e31", "score": "0.58662546", "text": "function __unset($name) {\n\t\tif (isset($this->data[$name])) {\n\t\t\tunset($this->data[$name]);\n\t\t}\n\t}", "title": "" }, { "docid": "edb3f110c63ee1e0bcb133e92d582fa2", "score": "0.5861431", "text": "function __construct( $name ) \n\t{\n\t\t$this->_name = $name;\n\t}", "title": "" }, { "docid": "4c8ac1be7d443a33e8623ea00465cf66", "score": "0.5819251", "text": "public function __construct ($name) {\n\t\t\n\t\t\t$this->name=$name;\n\t\t\n\t\t}", "title": "" }, { "docid": "6c5b5c40bea43690bad0239bd59c2823", "score": "0.58144665", "text": "public function __unset($name);", "title": "" }, { "docid": "6c5b5c40bea43690bad0239bd59c2823", "score": "0.58144665", "text": "public function __unset($name);", "title": "" }, { "docid": "1d7656198ad09069168381355c41f1ad", "score": "0.58143586", "text": "public function __construct($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "de728c550ac0667919cdb8a191e061b7", "score": "0.57802194", "text": "public function __construct($name) {\n\t\tparent::__construct($name);\n\t}", "title": "" }, { "docid": "c72ff8901e56679812b3e06dfac169e6", "score": "0.57792956", "text": "public function __unset($name)\n\t{\n\t\tunset($this->params[$name]);\n\t}", "title": "" }, { "docid": "a86cbcc2ac8f0dc6a06f94f4d4a309d1", "score": "0.5774372", "text": "public function __get($name) {\n\t\tthrow new Exception(get_class($this).\": Le get 'noname' n'est pas autoris&eacute;\", E_USER_ERROR);\n\t}", "title": "" }, { "docid": "a86cbcc2ac8f0dc6a06f94f4d4a309d1", "score": "0.5774372", "text": "public function __get($name) {\n\t\tthrow new Exception(get_class($this).\": Le get 'noname' n'est pas autoris&eacute;\", E_USER_ERROR);\n\t}", "title": "" }, { "docid": "13708b924fdc29d3ede9f42c1604d874", "score": "0.57402194", "text": "function nameValidCheck($name) {\n\t\t\t\tif (preg_match(Parameters::incompatibruMid, $name, $out)) {\n\t\t\t\t\terr(\"Invalid element name.\", 50);\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "b4319a0ff1a971d3e2d3e40036ff63da", "score": "0.5731117", "text": "public function __construct($name){\n\t\t\n\t\tparent::__construct();\n\t\t\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "c027b3faeb554bb90d03b4e452ded441", "score": "0.5723485", "text": "public function __construct($name);", "title": "" }, { "docid": "48c6575145b0b0091a6ff2ca8f6deab1", "score": "0.57095134", "text": "public function isNamed()\n {\n return false;\n }", "title": "" }, { "docid": "016c463c3e6e61962873a15fe57d34d7", "score": "0.5708495", "text": "function __construct($name)\n\t{\n\t\tparent::__construct($name);\n\t}", "title": "" }, { "docid": "f699f15ec0dd3877d21e395bc9842208", "score": "0.5702465", "text": "public function __construct($name) {\n $this->name= $name;\n }", "title": "" }, { "docid": "60fcd2763c37cfda43d645186348522e", "score": "0.5687059", "text": "public function __construct($name)\n {\n $this->name = $name;\n parent::__construct(array());\n }", "title": "" }, { "docid": "daec44d2232bbfd5fdc384e6072baa6f", "score": "0.56859297", "text": "abstract protected function getName();", "title": "" }, { "docid": "daec44d2232bbfd5fdc384e6072baa6f", "score": "0.56859297", "text": "abstract protected function getName();", "title": "" }, { "docid": "5c23a21638182a8e6489797042b2e5ee", "score": "0.56834286", "text": "public function __construct($name = NULL) {\n $this->name = $name;\n }", "title": "" }, { "docid": "6d2223dd3d6f30e1fc35443ffb5dd4b2", "score": "0.56766015", "text": "function drop($name){\r\r\n unset($this->_elements[$name]);\r\r\n }", "title": "" }, { "docid": "4b135868a243aef181aaea8dda420a41", "score": "0.5672918", "text": "public function __construct($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "ffa0f15ffb236f9fa2aebd410ee50ad8", "score": "0.56715673", "text": "function no_backstage($name){\n return ($name != 'Backstage passes to a TAFKAL80ETC concert');\n }", "title": "" }, { "docid": "136bdba675ff5c4ef29da9bebe507054", "score": "0.56699157", "text": "public function filter_method_name() {\n\t}", "title": "" }, { "docid": "8f6a8cd5ef181c02d27df939cc8d1650", "score": "0.5666548", "text": "public function __unset($name)\n {\n echo \"Unsetting $name : \",\"\\n\";\n unset($this->data[$name]); // destroys the specified variables\n }", "title": "" }, { "docid": "52897b57907a22d0dcfe5f95b091b5d7", "score": "0.56640023", "text": "abstract protected function getApplicableName ();", "title": "" }, { "docid": "512c594a37ccd5f50d7efb7143496a75", "score": "0.56630266", "text": "public function dissociate($name='');", "title": "" }, { "docid": "003ea1840ebf30961ed6952ce8916dfa", "score": "0.5647614", "text": "abstract public function clear($name = \"\");", "title": "" }, { "docid": "1b74478deaef65eca3258bc3e1991c25", "score": "0.56409097", "text": "public function __construct(string $name) \n {\n $this->name = $name;\n $this->offable = true;\n }", "title": "" }, { "docid": "6d00549b95a33f01973a982a886d8563", "score": "0.56210446", "text": "public function __unset($name)\n {\n $class = $this->getOptions()->getClass();\n unset($class::$name);\n }", "title": "" }, { "docid": "b5d240e6c9d421265fe27b7bbc8a49de", "score": "0.5604828", "text": "public function __construct( $name )\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "5c4d104b47b6d8f8a39418a1d16c5d91", "score": "0.5603165", "text": "public function __unset($name)\n\t{\n\t\tif (isset($this->_attributes[$name])) {\n\t\t\tunset($this->_attributes[$name]);\n// } else if(isset($this->getMetaData()->relations[$name])) {\n// \t\t\tunset($this->_related[$name]);\n\t\t} else {\n\t\t\tparent::__unset($name);\n\t\t}\n\t}", "title": "" }, { "docid": "e83239fd9deea50a4c040fe6cf8802cc", "score": "0.5602727", "text": "public function ignore()\n {\n $this->definition->setIgnored(true);\n }", "title": "" }, { "docid": "36e275264e2135c352d30596d32fbd84", "score": "0.55959874", "text": "function filterTagName($name) {\n return( preg_replace(\"/[^a-z0-9]/\", \"\", strtolower($name)) );\n}", "title": "" }, { "docid": "e2ea945a1aaa1639e3287687c8f9d6b2", "score": "0.55853575", "text": "public function __unset( $name ) {\n\t\tunset( $this->fields[$name] );\n\t}", "title": "" }, { "docid": "2166040b75b54af30427b21f76986e16", "score": "0.5581358", "text": "public function __construct($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "2166040b75b54af30427b21f76986e16", "score": "0.5581358", "text": "public function __construct($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "2166040b75b54af30427b21f76986e16", "score": "0.5581358", "text": "public function __construct($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "2166040b75b54af30427b21f76986e16", "score": "0.5581358", "text": "public function __construct($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "24280ce717d722e0326a6f717b535662", "score": "0.55781794", "text": "function no_sulfuras($name){\n return ($name!='Sulfuras, Hand of Ragnaros');\n }", "title": "" }, { "docid": "0bab171cf327aba18f37643c48227f00", "score": "0.5575524", "text": "public function __construct($name = null)\n\t{\n\t\t$name and $this->name = $name;\n\t}", "title": "" }, { "docid": "fae8ef37460822c28bce7d4acd57fb16", "score": "0.55733955", "text": "function prepareName($name) {\n\t\t\t// to lowercase\n\t\t\t$name = mb_strtolower( $name, 'UTF-8' );\n\t\t\t// delete unwanted characters\ninclude('creator/repo/allowed_characters/arrays.php');\n\t\t\t$name = str_replace( $notAllowedCharacters, $substitutes, $name ); \t\n\t\t\t// Delete more '-' than 1\n\t\t\t$name = preg_replace('/-{2,}/', '-', $name);\t\t\t\n\t\t\t// Trim '-'\n\t\t\t$name = trim($name, '-');\t\n\t\t\treturn $name;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}", "title": "" }, { "docid": "566cf6995a712b901e856ecb7b407c1c", "score": "0.55697876", "text": "public function __unset( $name ) {\n\t\tif ( in_array( $name, $this->compat_fields ) ) {\n\t\t\tunset( $this->$name );\n\t\t}\n\t}", "title": "" }, { "docid": "56ed69125b0da177d659ece0695674ea", "score": "0.55578303", "text": "function set_name($name){\r\n\r\n\t\tif($this->name != $name){\r\n\t\t\t$this->name = $name;\r\n\t\t\t$this->set_info = true;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "dfc2015af0bdc47d7faf94b332286f9c", "score": "0.5551769", "text": "public static function unchangeName()\n {\n self::instance()->unchangeName();\n }", "title": "" }, { "docid": "5ef3892463eeacdd64f77fc0ed7712fa", "score": "0.55430293", "text": "public function __unset($name)\n {\n //什么都不做,标示不能删除任何属性\n }", "title": "" }, { "docid": "97b5f3e2b645059f317556b550c7c32b", "score": "0.5530519", "text": "abstract public function name();", "title": "" }, { "docid": "b8b00c390fcb54a3e3c73d88e63680e3", "score": "0.5528972", "text": "public function setReservedName($var) {}", "title": "" }, { "docid": "b8b00c390fcb54a3e3c73d88e63680e3", "score": "0.5528972", "text": "public function setReservedName($var) {}", "title": "" }, { "docid": "9e403c3acd98b81d06709275468b1293", "score": "0.5524129", "text": "public static function ignored(){\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9d2c62cbbbaa5dc77b1a17f31007ebfc", "score": "0.5520997", "text": "abstract protected function _all($name);", "title": "" }, { "docid": "95decaf2eddc9dde1f1add37f5796847", "score": "0.55136853", "text": "private static function clean($name) {\n\t\treturn preg_replace(\"/[^a-zA-Z0-9_]/\", \"\", $name);\n\t}", "title": "" }, { "docid": "bd87c9a50fc02e4897f7da8313a77c6f", "score": "0.5511042", "text": "function setName($name)\r\n {\r\n $this->_name = trim($name);\r\n }", "title": "" }, { "docid": "ef66b272355dc2cc88897cc4d3b046ed", "score": "0.55092436", "text": "public function __unset($name)\n {\n unset($this->properties[$name]); // memanfaatkan magic function\n }", "title": "" }, { "docid": "a805a256816022336ee5c1d13bd0d096", "score": "0.5508186", "text": "public function escapeName($name)\n {\n\n }", "title": "" }, { "docid": "b68f7eafcd6b543035881eb21e13adc3", "score": "0.5506154", "text": "public function removeOverride(string $name): void\n {\n if (isset($this->parameterOverrides[$name])) {\n\n unset($this->parameterOverrides[$name]);\n }\n }", "title": "" }, { "docid": "214e43f5525c709cbdf5508886cb8bf0", "score": "0.5503315", "text": "private function _setName( $name )\n {\n $this->_name = ltrim( $name, '\\\\' );\n }", "title": "" }, { "docid": "974f6f6d32ad9d421c6c4850c52f7b00", "score": "0.5498825", "text": "public function __unset($name)\n {\n unset($this->data[$name]);\n }", "title": "" }, { "docid": "974f6f6d32ad9d421c6c4850c52f7b00", "score": "0.5498825", "text": "public function __unset($name)\n {\n unset($this->data[$name]);\n }", "title": "" }, { "docid": "c5906cd9e0137765676f6435d98395eb", "score": "0.5495416", "text": "public function ignore(bool $ignore = true);", "title": "" }, { "docid": "46d9eca3e13fef9c2365bbc1d9df1026", "score": "0.5495203", "text": "public function __construct($name){\n if(preg_match($this->publicRegex,$name)){\n $this->name = str_replace('+','',$name);\n $this->private = false;\n }\n else{\n $this->private = true;\n $this->name = $name;\n }\n }", "title": "" }, { "docid": "4061873c51709842aa32dca86fb0972c", "score": "0.54932433", "text": "public function __unset($name)\n {\n unset($this->{$name});\n }", "title": "" }, { "docid": "affeef0b4bae689fe48877a3d11f2435", "score": "0.54892987", "text": "public function not(){}", "title": "" }, { "docid": "24f5d4fcaeca82710f0fc38099a0072b", "score": "0.5487335", "text": "public function __unset(string $name): void\n {\n unset($this->fields[strtolower($name)]);\n }", "title": "" }, { "docid": "c97df64d483fb77ee8cd8bc5bcd7aedf", "score": "0.54871404", "text": "function z_remove_atribute_by_name($name,$name_attr)\n\t{\n\t\t$res = $this->call(\"$this->prefix.RemoveAtributeByName?name=\".urlencode($name).\"&name_attr=\".urlencode($name_attr));\n if ($res ==\"false\")\n\t\t\treturn false;\n\t\telse\n\t\t\treturn $res;\n\t}", "title": "" }, { "docid": "fa2ba32dcbf112d80dd615e40dc14e87", "score": "0.54866254", "text": "public function __construct($name)\n {\n $this->name = sprintf('private-%s', $name);\n }", "title": "" }, { "docid": "8ef97ef54abdf453c24631cd8556954c", "score": "0.5476022", "text": "function get($name)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c300f9eaffa96d0192e82a62b94e9c9e", "score": "0.5467499", "text": "public function disableBehavior($name)\n\t{\n\t\tif(isset($this->_m[$name]))\n\t\t\t$this->_m[$name]->setEnabled(false);\n\t}", "title": "" }, { "docid": "bb8e31e7304a0af2ac2e8a01782ca879", "score": "0.54536486", "text": "function setUnknowns ($arg) {\r\n\t\t\t$arg = strtolower(trim($arg));\r\n\t\t\tif (preg_match('/^ignore|remove|print|leave|comment$/', $arg)) {\r\n\t\t\t\t$this->OPTIONS['UNKNOWNS'] = $arg;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "f0325928ee02428c151bec4e4b16a65e", "score": "0.545263", "text": "protected function set_name( $name ) {\n\t\t$this->name = sanitize_key( $name );\n\t}", "title": "" }, { "docid": "b55e748015d4348edd3f9620d45b79c2", "score": "0.5451558", "text": "function __shadowName($name) {\n\t\treturn strtolower(Inflector::underscore(Inflector::singularize($name))) . '_versions';\n\t}", "title": "" }, { "docid": "871c50c25c40ad426eb285b869fd0a19", "score": "0.5446926", "text": "public function __construct($name)\n {\n $this->setName($name);\n }", "title": "" }, { "docid": "871c50c25c40ad426eb285b869fd0a19", "score": "0.5446926", "text": "public function __construct($name)\n {\n $this->setName($name);\n }", "title": "" }, { "docid": "c3f098842d355ce8d6a1ffe7b90eadf5", "score": "0.5433228", "text": "public function __construct($name)\n\t{\n\t\tparent::__construct(\"Method {$name} is already exists, connection may has been created.\");\n\t}", "title": "" }, { "docid": "b58b22e1f2c4555ecbb792ee98bfa44d", "score": "0.5422719", "text": "public function __construct($name)\n {\n parent::__construct(\"Unknown token $name encountered\");\n\n $this->data = $name;\n }", "title": "" }, { "docid": "521a33afd7364a2c4ab174c107c18e56", "score": "0.5420963", "text": "public function fix($name)\n\t{\n\t\tMig_Manager::fixture($name);\n\t}", "title": "" }, { "docid": "99900cfc845c2d6fd6cbc0c27e59aff3", "score": "0.54162484", "text": "public function provideInvalidName()\n\t{\n\t\t$noName = array('host'=>'us', 'user'=>'me','pass'=>'you', 'port'=>123);\n\t\t$emptyName = array_merge($noName, array('name' => ''));\n\t\t$objName = array_merge($noName, array('name' => new StdClass()));\n\t\t$arrayName = array_merge($noName, array('name' => array(1,2,3)));\n\t\t$intName = array_merge($noName, array('name' => 12345));\n\t\treturn array(\n\t\t\tarray($noName),\n\t\t\tarray($emptyName),\n\t\t\tarray($objName),\n\t\t\tarray($arrayName),\n\t\t\tarray($intName),\n\t\t);\n\t}", "title": "" }, { "docid": "3e7631f92d8ff8e621eeece759f284cb", "score": "0.5415852", "text": "private function _validateName($name) {\n if (!isset($name) || strlen($name) === 0) {\n throw new Exception(\"name must be set and not empty\");\n }\n }", "title": "" }, { "docid": "b0ef2f7ee203f1ebad12d88a1fe6edf2", "score": "0.5406595", "text": "function testNameAbsent() \n {\n\t\t$badvalue = \"\";\n\t\t$this->expectException(Exception::class);\n\t\t$this->item->name = $badvalue;\n }", "title": "" }, { "docid": "76c5fbd480af53e15a56942943d2dd3e", "score": "0.53839093", "text": "public function __call($name, $args)\n {\n return 'fallback';\n }", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.53830886", "text": "abstract public function get_name();", "title": "" }, { "docid": "b80457e9e1000629ffd9fe8bf0e701ef", "score": "0.53830886", "text": "abstract public function get_name();", "title": "" }, { "docid": "d6ff818dfd00e9d54dbfcea10aa99496", "score": "0.53827995", "text": "protected function setNameAttribute()\n {\n return false;\n }", "title": "" }, { "docid": "14ef3820cae53f6335058961c54b54f1", "score": "0.5381918", "text": "public function testNoSetName()\n {\n $this->assertFalse(method_exists($this->builder, 'setName'));\n }", "title": "" }, { "docid": "4baab9b7e0fa9d8084598c17215e61e6", "score": "0.53816694", "text": "function __get($name){\n\t\treturn NULL;\n\t}", "title": "" } ]
725da0c422f913fecf800ad14c875c07
Update positions when attributes of the start tag has been upated.
[ { "docid": "85c3766990ea82e3157ef2470893fac3", "score": "0.54316205", "text": "function _ApplyDiffFromStart($Diff) {\n\t\t$this->pST_PosEnd += $Diff;\n\t\t$this->pST_Src = false;\n\t\tif ($this->pET_PosBeg!==false) $this->pET_PosBeg += $Diff;\n\t\t$this->PosEnd += $Diff;\n\t}", "title": "" } ]
[ { "docid": "3f0fd05146a8f2bef1149037d6f5660a", "score": "0.6413306", "text": "public function setStart( $start )\n\t{\n\t\t$this->setAttribute( \"start\", $start );\n\t}", "title": "" }, { "docid": "3c6dc5881ae4ffefb09b0255596a5b33", "score": "0.61828065", "text": "protected function adjustStart() {\n\t\t$this->start = array_pad($this->start, $this->width, 0);\n\t\t$this->start = array_slice($this->start, 0, $this->width);\n\t\t$this->current = $this->start;\n\t}", "title": "" }, { "docid": "79ea7c5c1b99b60fdb2adc4c64a61d95", "score": "0.5922852", "text": "function epXmlElementStart ($parser, $tag, $attributes) {\r\n $this->currentTag = $tag;\r\n }", "title": "" }, { "docid": "fb73b2ef7b614af1567cfa3be447958c", "score": "0.58816564", "text": "public function setStart($start){\n $this->start = $start;\n }", "title": "" }, { "docid": "db383e4ef0937ff78bfe7eb85f1084eb", "score": "0.56924653", "text": "public function setStart($start)\n {\n $this->start = $start;\n }", "title": "" }, { "docid": "286f561a2d9504731f37268189d306df", "score": "0.5579088", "text": "protected function updates_start() {\n\t\t$start = '<updates>';\n\t\treturn $start;\n\t}", "title": "" }, { "docid": "705c57858f9be09454c536889a654252", "score": "0.5530944", "text": "protected function setStartPosition($startPosition)\n\t{\n\t\tif ($startPosition && $startPosition > 0)\n\t\t{\n\t\t\t$this->startPosition = intval($startPosition);\n//\t\t\twe can use two condition in filter on ID: in array and >=startPostion.\n//\t\t\ttherefore prepare array of sections to export like a >=\n\t\t\tforeach ($this->sectionsToExport as $key => $section)\n\t\t\t{\n\t\t\t\tif ($key < $startPosition)\n\t\t\t\t\tunset($this->sectionsToExport[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0b50357c6bdf6194a2898e7c45dcb266", "score": "0.5521802", "text": "public function setStartAttribute($value): void\n {\n $this->attributes['start'] = $value;\n\n if ($this->end) {\n $this->attributes['duration'] = $this->end->getTimestamp() - (new DateTime($value))->getTimestamp();\n }\n }", "title": "" }, { "docid": "70675cd023dd9b4e6cc894d6fa42a9e9", "score": "0.54065746", "text": "public function on_elements_start() {\n $this->mappings = array();\n $this->dimensions = array();\n }", "title": "" }, { "docid": "2da6e949993d88bbf589b6646f755d4b", "score": "0.53951275", "text": "function bodyStart() {\n\t\techo \"<!--BODY_START-->\";\n\t\t$this->docPos = \"body-start\";\n\t}", "title": "" }, { "docid": "3e27a6e1a5347a747f47abc1bf9cd826", "score": "0.5317197", "text": "public function setStart(string $value):static {\n return $this->setAttribute('start', $value);\n }", "title": "" }, { "docid": "5ea57ad844100ed74922c3d121a1c6d2", "score": "0.52986646", "text": "function startUpdate()\n {\n $this->_updatecounter++;\n }", "title": "" }, { "docid": "542af154e7c5d19a68b7f509577b9da5", "score": "0.5279487", "text": "public function thetaStart(array &$dom_attributes, float $thetaStart)\n {\n $dom_attributes['thetaStart'] = $thetaStart;\n }", "title": "" }, { "docid": "7c9bb13b598c1f20dc901a14b89889fc", "score": "0.52686316", "text": "function startDoc() {\n $this->curr_ns = Array('http://www.w3.org/XML/1998/namespace'=>'xml');\n $this->output_ns = Array('http://www.w3.org/XML/1998/namespace'=>'xml');\n\n // Start with this flag true in order to prevent erroneous leading '>'\n $this->finished_start_tag = true;\n\n // TODO: Need to build a proper XML declaration here with respect to encoding, charset\n $this->writer->write('<?xml version=\"1.0\" encoding=\"utf-8\"?'.\">\\n\");\n }", "title": "" }, { "docid": "794f56eb836a2d6e5f00a19a7892f47b", "score": "0.52290046", "text": "protected function setStartValues()\n {\n $this->result->setStartTime(microtime(true));\n $this->result->setStartMemory(memory_get_usage());\n }", "title": "" }, { "docid": "bf5bc9a24a4c10c538fca253e859a5d7", "score": "0.5224553", "text": "public function getStart() { return $this->start; }", "title": "" }, { "docid": "f673d3301b2b2d08324465912e3c74bc", "score": "0.51289386", "text": "public function setStart($var)\n {\n GPBUtil::checkString($var, False);\n $this->start = $var;\n }", "title": "" }, { "docid": "2a2f333776ae1870d2403058960d8b07", "score": "0.5092801", "text": "public function getStart()\n {\n return $this->getAttribute( 'start' );\n }", "title": "" }, { "docid": "1932834e601dfbf4496c090a13caa634", "score": "0.50720227", "text": "function start_element($tagname, $attributes) {}", "title": "" }, { "docid": "b0118f9ea0dfb6b8f4478605b5b2bd7f", "score": "0.50576514", "text": "public function setStartAt(?string $startAt): void\n {\n $this->startAt = $startAt;\n }", "title": "" }, { "docid": "acec9cc44486c09d089ed866b4909f25", "score": "0.50382924", "text": "public function setStart($val)\n {\n $this->_propDict[\"start\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d11e03204546ba08e08703b4fa575f5b", "score": "0.4936265", "text": "public function setStartAt(string $startAt): void\n {\n $this->startAt = $startAt;\n }", "title": "" }, { "docid": "1ebae933bf6ae0fd46254b5fe1a99e4c", "score": "0.49243674", "text": "public function position()\n {\n }", "title": "" }, { "docid": "e3524312e029b64e979d9286ea1d141e", "score": "0.49038398", "text": "protected function startChunk()\n {\n $chunk = $this->setup->factory->createXMLChunk();\n $chunk->id = $this->currentChunk;\n $chunk->page = $this->page;\n $chunk->section = $this->currentSection;\n $chunk->milestone = $this->milestone;\n $chunk->prestack = join(' ', $this->prestack);\n $chunk->xml = '';\n $this->chunks[$chunk->id] = $chunk;\n }", "title": "" }, { "docid": "07310d8641e19491e11c3852ebe7f3b3", "score": "0.48865712", "text": "public function on_entries_start() {\n $this->xmlwriter->begin_tag('entries');\n }", "title": "" }, { "docid": "c982ccc6b69a918606aeb06fe92a5f52", "score": "0.4885649", "text": "public function getStart(){\n return $this->start;\n }", "title": "" }, { "docid": "cdb5a372c57ac6d7b596f8360848d94d", "score": "0.48798525", "text": "public function setStartOffset($offset);", "title": "" }, { "docid": "2f3d4e7d3c1d45b1f7f4891b34a6915a", "score": "0.48699036", "text": "public function setStart($dt) { $this->start = TimedObject::parseDateTime($dt, TimedObject::START); }", "title": "" }, { "docid": "86f6be20c0d12f0403e26923e9a71905", "score": "0.48675022", "text": "public function getStart():string {\n return $this->getAttribute('start');\n }", "title": "" }, { "docid": "83dae55829ba90f85137eead40b87ef5", "score": "0.48672253", "text": "public function startTag(ParsedTag $tag);", "title": "" }, { "docid": "f684269e8b49c7829850b0dcf48ec5f4", "score": "0.48600242", "text": "public function setStart($var)\n {\n GPBUtil::checkInt64($var);\n $this->start = $var;\n }", "title": "" }, { "docid": "f684269e8b49c7829850b0dcf48ec5f4", "score": "0.48600242", "text": "public function setStart($var)\n {\n GPBUtil::checkInt64($var);\n $this->start = $var;\n }", "title": "" }, { "docid": "f684269e8b49c7829850b0dcf48ec5f4", "score": "0.48600242", "text": "public function setStart($var)\n {\n GPBUtil::checkInt64($var);\n $this->start = $var;\n }", "title": "" }, { "docid": "9c8dbc849a2607b692182e82f1669881", "score": "0.48547083", "text": "public function resetPositionCounter()\n {\n $this->positionCounter = 0;\n }", "title": "" }, { "docid": "c78ecb5713525ff87aa52f2046058229", "score": "0.4851995", "text": "public function markStarted(){\n\t\t$this->started = date('Y-m-d H:i:s');\n\t\t$this->status = self::STATUS_STARTED;\n\n\t\t$this->save(false,['started','status']);\n\t}", "title": "" }, { "docid": "8ca3647aa8778bbaf1fefbb278a08734", "score": "0.48447272", "text": "function start_xml_tag($parser, $name, $attribs) {\n\tglobal $start, $next, $currentName, $index;\n\tglobal $sessions, $attendees, $inAttendee, $inSession;\n\t$currentName=$name;\n\tif ($name==\"sessions\" || $name==\"attendees\") {\n\t\tforeach ($attribs as $key => $value) {\n\t\t\tif ($key=='start')\n\t\t\t\t$start=$value;\n\t\t\telseif ($key=='next')\n\t\t\t\t$next=$value;\n\t\t}\n\n\t} else if ($name==\"attendee\") {\n\t\t$inAttendee=true;\n\t\t$attendees[]=array();\n\t\t$index++;\n\t} else if ($name==\"session\") {\n\t\t$inSession=true;\n\t\t$sessions[]=array();\n\t\t$index++;\n\t}\n}", "title": "" }, { "docid": "85c93afea616a3d8b94b24d5d4102549", "score": "0.48147026", "text": "public function position();", "title": "" }, { "docid": "82c8d19e1022726118b9ac37897b3a2f", "score": "0.48134175", "text": "public function getBeginOffset()\n {\n return $this->begin_offset;\n }", "title": "" }, { "docid": "319ed5e68f76035ff4d91efa780bfd15", "score": "0.48018283", "text": "public function getStartAt() {\n return $this->attributes['start_at'];\n }", "title": "" }, { "docid": "7c8c6076c089615a5499cb74a0a4e0f3", "score": "0.4795702", "text": "function startElement($parser, $name, $attrs) {\r\n\t\tif ($name == \"ACCOUNT\"\r\n\t\t\t|| $name == \"USER\"\r\n\t\t\t|| $name == \"PROJECT\"\r\n\t\t\t|| $name == \"ACTIVITY\"\r\n\t\t\t|| $name == \"TIME\"\r\n\t\t\t|| $name == \"INVOICE\"\r\n\t\t\t|| $name == \"USERBIND\"\r\n\t\t\t|| $name == \"ACTIVITYBIND\"\r\n\t\t\t|| $name == \"FEPORTFILTER\"\r\n\t\t\t|| $name == \"CLIENT\"\r\n\t\t\t) {\r\n \t\t\t$this->_mCurrElement = $attrs;\r\n \t\t}\r\n \t\tif ($name == \"ADDRESS\") {\r\n \t\t\t$this->_mCurrAddr = $attrs[\"ID\"];\r\n \t\t}\r\n \t$this->_mCurrTag = $name;\r\n\t @$this->mDepth[$parser]++;\r\n\t}", "title": "" }, { "docid": "93cdfa77ccca4f42379d7c947962ff2b", "score": "0.47940335", "text": "private function create_space($start, $size = 2)\n\t{\n\t\t// Update the left values.\n\t\t$this->db->query('UPDATE '.$this->table_name.' SET `'.$this->left_column.'` = `'.$this->left_column.'` + '.$size.' WHERE `'.$this->left_column.'` >= '.$start);\n\n\t\t// Now the right.\n\t\t$this->db->query('UPDATE '.$this->table_name.' SET `'.$this->right_column.'` = `'.$this->right_column.'` + '.$size.' WHERE `'.$this->right_column.'` >= '.$start);\n\t}", "title": "" }, { "docid": "b9bcc9c95d250d1c3437948dad9b5a05", "score": "0.47913924", "text": "public function getPosition(){}", "title": "" }, { "docid": "b9bcc9c95d250d1c3437948dad9b5a05", "score": "0.47913924", "text": "public function getPosition(){}", "title": "" }, { "docid": "89e67ee9d215d7d0c5f4088e6029595c", "score": "0.47632506", "text": "public function getFromAttribute()\n\t{\n\t\t// $this->attributes['from'] = $this->start;\n\t\treturn $this->attributes['start'];\n\t}", "title": "" }, { "docid": "ffc8d8cf8ea0ba4a5d2b4ae007067c77", "score": "0.47463822", "text": "public function setPosition(float $newPosition);", "title": "" }, { "docid": "ffb14a7b01f3345b23c0883aa34322b1", "score": "0.4744904", "text": "protected function adjustPosition()\n {\n $page = $this->pdf->PageNo();\n\n if ($page == 1){\n $this->pdf->position += $this->pdf->heightBandPrevious;\n } else {\n $this->pdf->position = $this->pdf->marginTop;\n }\n }", "title": "" }, { "docid": "ead30ad43310df115887b8c66afe7b64", "score": "0.47444582", "text": "public function setStartRecord ($startRecord);", "title": "" }, { "docid": "45685b1ba30a9ee9ad564595ddd24718", "score": "0.47383437", "text": "function startElement(&$parser, $tag, $attributes) {\n\t\t$this->currentData = null;\n\t\t$node = &new XMLNode($tag);\n\t\t$node->setAttributes($attributes);\n\t\t\n\t\tif ($this->currentNode != null) {\n\t\t\t$this->currentNode->addChild($node);\n\t\t\t$node->setParent($this->currentNode);\n\t\t\t\n\t\t} else {\n\t\t\t$this->rootNode = &$node;\n\t\t}\n\t\t\n\t\t$this->currentNode = &$node;\n\t}", "title": "" }, { "docid": "13680df85b0bca2b88ad0cc91aa20b02", "score": "0.4727614", "text": "function startElement( $parser, $tagName, $attrs ) {\r\n // By setting global variable of tag name\r\n // I can determine which tag I am currently\r\n // parsing.\r\n switch( $tagName ) {\r\n case 'TITLE':\r\n $GLOBALS['title'] = true;\r\n break;\r\n case 'LINK':\r\n $GLOBALS['link'] = true;\r\n break;\r\n case 'DESCRIPTION':\r\n $GLOBALS['description'] = true;\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "d5496c33f2396c0893d23ba5a857da7a", "score": "0.4726538", "text": "public function rewind() {\n reset($this->attrs);\n }", "title": "" }, { "docid": "9a8f87ae6d06d5638a3e9e5e3f661668", "score": "0.4723298", "text": "function start($start){\n\t\tif(is_int($start)){\n\t\t\t$this->start=$start;\n\t\t}\n\t\treturn $this; //return original object for method chaining\n\t}", "title": "" }, { "docid": "8643c290dc4d89be84eb5e21ad127c6b", "score": "0.47176963", "text": "private function augment()\n {\n $newStart = new YaccNonterminal('$start');\n $this->grammar->startProduction = new YaccProduction($newStart, array($this->grammar->start), NULL);\n $this->grammar->productions->add($this->grammar->startProduction);\n $this->grammar->nonterminals->add($newStart);\n $this->grammar->start = $newStart;\n\n $this->grammar->epsilon = new YaccTerminal('$epsilon');\n $this->grammar->epsilon->index = -1;\n\n $this->grammar->end = new YaccTerminal('$end');\n $this->grammar->end->index = 0;\n $this->grammar->end->first = new YaccSet('integer');\n $this->grammar->end->first->add($this->grammar->end->index);\n }", "title": "" }, { "docid": "8efcf89fa481f70ff3ff5ee85e1fbe4c", "score": "0.47109413", "text": "private function _removeStartSpaces() {\n $regex = '/^<w:p><w:r><w:t><\\/w:t><\\/w:r><\\/w:p>/';\n if (preg_match($regex, $this->_openXml)) {\n $this->_openXml = preg_replace($regex, '', $this->_openXml);\n\n $this->_removeStartSpaces();\n }\n\n }", "title": "" }, { "docid": "bc437b65b05cdc131f1bd0002d324c3d", "score": "0.47085464", "text": "private function updateStartAndEndDates(){\n\n\t}", "title": "" }, { "docid": "7beeb5bb82fa6897f4d8a404fbcd6aa6", "score": "0.47085422", "text": "public function setPosition( $value );", "title": "" }, { "docid": "138bb5e0ab3b903e87168e81aaf51f08", "score": "0.47046465", "text": "private function processSingleOrdering($startIndex) {\r\n $this->orderAttributes[] = $this->exploded[$startIndex];\r\n }", "title": "" }, { "docid": "b1dc0d744a7ba1aa3877b5dd6a988c87", "score": "0.47044253", "text": "protected function setStartEndOfSequence()\n {\n foreach ($this->ilrs as $key => $seq) {\n // For sos, compare the level of the first character in the sequence with the level of the character\n // preceding it in the paragraph (not counting characters removed by X9), and if there is none,\n // with the paragraph embedding level.\n $lev = $seq['item'][0]['level'];\n if ($seq['start'] == 0) {\n $prev = $this->pel;\n } else {\n $lastchr = $this->chardata[($seq['start'] - 1)];\n $prev = $lastchr['level'];\n }\n $this->ilrs[$key]['sos'] = $this->getEmbeddedDirection(($prev > $lev) ? $prev : $lev);\n\n // For eos, compare the level of the last character in the sequence with the level of the character\n // following it in the paragraph (not counting characters removed by X9), and if there is none or the\n // last character of the sequence is an isolate initiator (lacking a matching PDI), with the paragraph\n // embedding level.\n $lastchr = end($seq['item']);\n $lev = $lastchr['level'];\n if (!isset($this->chardata[($seq['end'] + 1)]['level']) || $this->isIsolateInitiator($lastchr['char'])) {\n $next = $this->pel;\n } else {\n $next = $this->chardata[($seq['end'] + 1)]['level'];\n }\n $this->ilrs[$key]['eos'] = $this->getEmbeddedDirection(($next > $lev) ? $next : $lev);\n \n // If the higher level is odd, the sos or eos is R; otherwise, it is L.\n }\n }", "title": "" }, { "docid": "5377efadddae77942e813cbdf723bf4e", "score": "0.47034144", "text": "public function atStart(){\n if($this->current_space === $this->start_tile){\n return true;\n }\n return false;\n\n }", "title": "" }, { "docid": "306d6e4b537e116b71eef46082af8f87", "score": "0.46941355", "text": "public function start_at($start = 1) {\n $this->start = $start;\n return $this;\n }", "title": "" }, { "docid": "dda7aaeb4aaa705d1a7c8697747e0bf4", "score": "0.4692568", "text": "public function setStart(Point $start_)\n\t{\n\t\t$this->setArc($start_, $this->end(), $this->radius(), $this->isClockwise, $this->isLarge());\n\t}", "title": "" }, { "docid": "4587f0fbfd27e72a66313c87ab0d6b57", "score": "0.4690503", "text": "private function _start() {\n // @codingStandardsIgnoreEnd\n $token_type = $this->currentToken->getType();\n if (empty($this->parseTable['START'][$token_type])) {\n $this->error($this->parseTable['START']);\n }\n foreach ($this->parseTable['START'][$token_type] as $function) {\n $this->$function();\n }\n }", "title": "" }, { "docid": "768233035c8f3f1b601eba812090be85", "score": "0.46891353", "text": "private function augment()\n {\n $newStart = new Nonterminal('$start');\n $this->grammar->startProduction = new Production($newStart, array($this->grammar->start), NULL);\n $this->grammar->productions->add($this->grammar->startProduction);\n $this->grammar->nonterminals->add($newStart);\n $this->grammar->start = $newStart;\n\n $this->grammar->epsilon = new Terminal('$epsilon');\n $this->grammar->epsilon->index = -1;\n\n $this->grammar->end = new Terminal('$end');\n $this->grammar->end->index = 0;\n $this->grammar->end->first = new Set('integer');\n $this->grammar->end->first->add($this->grammar->end->index);\n }", "title": "" }, { "docid": "01e447b535fcd0818bc12d709a7d5a7e", "score": "0.46868423", "text": "public function setStartsAtAttribute($value) {\n $this->attributes['starts_at'] = Date::parse($value);\n }", "title": "" }, { "docid": "0279e9db0852695b79de2621bb4c5473", "score": "0.46843708", "text": "protected function setPositionAttribute($value): void\n {\n $finaleValue = is_null($value) || $value === '' ? null : intval($value);\n\n $this->attributes['position'] = $finaleValue;\n }", "title": "" }, { "docid": "42fd4328b839b9d16b171c894f82343a", "score": "0.46744856", "text": "function mbereg_search_setpos($position) {}", "title": "" }, { "docid": "22e9b4ac154224b45416223b4b53e78b", "score": "0.46705806", "text": "public function onCreating()\n {\n if (isset($this->position)) return;\n $this->position = static::max('position') + 1;\n }", "title": "" }, { "docid": "22e9b4ac154224b45416223b4b53e78b", "score": "0.46705806", "text": "public function onCreating()\n {\n if (isset($this->position)) return;\n $this->position = static::max('position') + 1;\n }", "title": "" }, { "docid": "22e9b4ac154224b45416223b4b53e78b", "score": "0.46705806", "text": "public function onCreating()\n {\n if (isset($this->position)) return;\n $this->position = static::max('position') + 1;\n }", "title": "" }, { "docid": "222e264e455a33d481fac7a0540ca5b4", "score": "0.4670312", "text": "public function setDateStartAttribute($value)\n {\n $this->attributes['date_start'] = $this->convertDateStringToDBInsertDateString($value);\n }", "title": "" }, { "docid": "b494d217a8f259bb1638f7e54abf793b", "score": "0.46630526", "text": "public function startincrease()\n {\n $this->output .= \"\\n\\n\".'--->Start'.\"\\n\";\n //file_put_contents($file, $current, FILE_APPEND);\n }", "title": "" }, { "docid": "35b8d379a09b7dbda2d0b50205012226", "score": "0.46412063", "text": "function start_news()\n\t{\n\t\t$this->content->template['start'] = 1;\n\t}", "title": "" }, { "docid": "ed0c3c2dae91efdd74cdc819a0301165", "score": "0.46412006", "text": "public function setPositionAttribute($position)\n {\n $this->attributes['position'] = $position >= 0 && $position < 127 ? $position : (int)substr($position, -1);\n }", "title": "" }, { "docid": "62136769cf2a5cde25205d57038dacdb", "score": "0.46397114", "text": "public function GoToStart()\n {\n $this->getEntityList()->rewind();\n }", "title": "" }, { "docid": "71a25f9d3fed716bb88bf8b458f773fc", "score": "0.46368182", "text": "public function setBeforeStart($js_function)\n\t{\n\t\t# Set the data member.\n\t\t$this->before_start=$js_function;\n\t}", "title": "" }, { "docid": "633fe605d5ac62550ebbaef74a6ed9fc", "score": "0.46359813", "text": "public function getStart() {\n\t\treturn $this->start;\n\t}", "title": "" }, { "docid": "684b47fa90282e50838794561f71300e", "score": "0.4626497", "text": "function pdf_set_leading($pdfdoc, $distance) {}", "title": "" }, { "docid": "3ad854ddc9f7674b41d54ff9bf4c825a", "score": "0.46156073", "text": "function cpdf_set_leading($pdfdoc, $distance) {}", "title": "" }, { "docid": "347c96e3f8c37ce1723ef599f0da49b0", "score": "0.46147916", "text": "public function setRows($startRow)\n\t\t\t\t\t{\t$this->_startRow = $startRow;\n\t\t\t\t\t}", "title": "" }, { "docid": "8de60c6d9a641d8787dc0a941b225d17", "score": "0.4611337", "text": "function getParentTagBegin()\n {\n $xml = \"<\".$this->parentXMLTag.\" lastModified='\".getLastUpdateDate(\"tblelement\").\"'>\";\n return $xml;\n }", "title": "" }, { "docid": "22b67f008388c0cf3434ac97202e3137", "score": "0.46076602", "text": "function startElement($parser, $name, $attrs) {\n \n // update state for this element\n $this->_XMLstate['in'.$name] = true;\n\n // examine tag\n switch ($name) {\n \n case 'SMLANGUAGE':\n // check version\n if ($attrs['VERSION'] > SMLANGUAGE_VERSION)\n $this->fatalErrorPage(\"version incompatibility with language file $this->file (I'm version \".SMLANGUAGE_VERSION.\", it's version {$attrs['VERSION']})\");\n break;\n\n case 'LDEF':\n $this->_XMLstate['cLocale'] = $attrs['LOCALE'];\n break;\n\n case 'TEXT':\n $this->_XMLstate['ctID'] = $attrs['ID'];\n break;\n\n case 'SM_XML':\n // root tag\n break;\n\n default:\n // ignore unknown tags\n break;\n }\n\n }", "title": "" }, { "docid": "3a0aed34107bcb0bff9e15e99f1b6767", "score": "0.46061417", "text": "function yyloc($start, $end) {\n if (!$start || !$end) {\n return !$start ? $end : $static;\n }\n\n return array(\n 'startOffset' => $start['startOffset'],\n 'endOffset' => $end['endOffset'],\n 'startLine' => $start['startLine'],\n 'endLine' => $end['endLine'],\n 'startColumn' => $start['startColumn'],\n 'endColumn' => $end['endColumn'],\n );\n }", "title": "" }, { "docid": "562c06f1519cf462f4d1db8c5dd5b058", "score": "0.46038172", "text": "public function SetStartMemory($start)\n\t{\n\t\t$this->startMem = $start;\n\t}", "title": "" }, { "docid": "9879fb94b18b7f47ea7da964c469d94b", "score": "0.4599266", "text": "function seo_pagination() {\n\t\t$this->start = intval($this->get_vars['start']);\n\t\t$this->start = ( $this->start > 0 ) ? $this->seo_static['start'] . $this->get_vars['start'] : '';\n\t\tunset($this->get_vars['start']);\n\t}", "title": "" }, { "docid": "32469901fdd258f4d21b27e04d19d384", "score": "0.45970282", "text": "function childs_reset($inside=TRUE,$pos=NULL,$move=TRUE){//TODU CODE\n $pos = $this->extpos($pos);\n }", "title": "" }, { "docid": "8c0cc0e7a3cbf08c19c8f590c8aeb967", "score": "0.45906335", "text": "protected function _parse($tag, $posstart){\n\n $checkNextTag=true;\n\n // we analyse each part of the string, \n for($i=$posstart+1; $i < $this->end; $i++){\n $t=&$this->str[$i];\n\n // is it the escape char ?\n if($this->escapeChar !='' && $t === $this->escapeChar){\n if($checkNextTag){\n $t=''; // yes -> let's ignore the tag\n $checkNextTag=false;\n }else{\n // if we are here, this is because the previous part was the escape char\n $tag->addContent($this->escapeChar);\n $checkNextTag=true;\n }\n\n // is this a separator ?\n }elseif($tag->isCurrentSeparator($t)){\n $tag->addSeparator($t);\n\n }elseif($checkNextTag){\n // is there a ended tag\n if($tag->endTag == $t && !$tag->isTextLineTag){\n return $i;\n\n }elseif(!$tag->isOtherTagAllowed()) {\n $tag->addContent($t);\n\n // is there a tag which begin something ?\n }elseif( isset($this->currentTextLineContainer->allowedTags[$t]) ){\n $newtag = clone $this->currentTextLineContainer->allowedTags[$t];\n $i=$this->_parse($newtag,$i);\n if($i !== false){\n $tag->addContent($newtag->getWikiContent(), $newtag->getContent());\n }else{\n $i=$this->end;\n $tag->addContent($newtag->getWikiContent(), $newtag->getBogusContent());\n }\n\n // is there a simple tag ?\n }elseif( isset($this->simpletags[$t])){\n $tag->addContent($t, $this->simpletags[$t]);\n }else{\n $tag->addContent($t);\n }\n }else{\n if(isset($this->currentTextLineContainer->allowedTags[$t]) || isset($this->simpletags[$t]) || $tag->endTag == $t)\n $tag->addContent($t);\n else\n $tag->addContent($this->escapeChar.$t);\n $checkNextTag=true;\n }\n }\n if(!$tag->isTextLineTag ){\n //we didn't find the ended tag, error\n $this->error=true;\n return false;\n }else\n return $this->end;\n }", "title": "" }, { "docid": "bedbf83629387941a2ff57c69bd59cfd", "score": "0.45902568", "text": "public function getStart()\n {\n return $this->_start;\n }", "title": "" }, { "docid": "ffc2a81621fc5d2474ff4ec79b727b43", "score": "0.45898613", "text": "protected function xmlNSStart($parser, $userData,$prefix,$uri)\n {\n \n }", "title": "" }, { "docid": "af8ec8445991993ed827f56909524192", "score": "0.4587999", "text": "function get_start() {\n\t return $start = get_post_meta( $this->id, '_bkap_start', true );\n\t}", "title": "" }, { "docid": "e0915ba82f8e71f2a904446346f80b66", "score": "0.45769018", "text": "public function setBeginOffset($var)\n {\n GPBUtil::checkInt32($var);\n $this->begin_offset = $var;\n\n return $this;\n }", "title": "" }, { "docid": "93bf8b7753b7ef028ae7c18bf7d2a9e2", "score": "0.45633844", "text": "function setPosition($position)\n {\n $this->position = (int)cleanGPC($position);\n }", "title": "" }, { "docid": "54cecbcb4f4e7d130e4a28660115d727", "score": "0.45600298", "text": "public function set_required_position($required_position) {\n $this->required_position = $required_position;\n }", "title": "" }, { "docid": "76b8f61ead2b5d04ac0ccfb33417537f", "score": "0.45597026", "text": "public function getStart()\n\t{\n\t\treturn $this->start;\n\t}", "title": "" }, { "docid": "836b9278e9f6200a55a5e19c9e1b536c", "score": "0.45565832", "text": "protected function setupStartGroup()\n {\n // Exit if no groups\n if ($this->DisplayGroups == 0) {\n return;\n }\n $startGrp = Param(Config(\"TABLE_START_GROUP\"), \"\");\n $pageNo = Param(\"pageno\", \"\");\n\n // Check for a 'start' parameter\n if ($startGrp != \"\") {\n $this->StartGroup = $startGrp;\n $this->setStartGroup($this->StartGroup);\n } elseif ($pageNo != \"\") {\n if (is_numeric($pageNo)) {\n $this->StartGroup = ($pageNo - 1) * $this->DisplayGroups + 1;\n if ($this->StartGroup <= 0) {\n $this->StartGroup = 1;\n } elseif ($this->StartGroup >= intval(($this->TotalGroups - 1) / $this->DisplayGroups) * $this->DisplayGroups + 1) {\n $this->StartGroup = intval(($this->TotalGroups - 1) / $this->DisplayGroups) * $this->DisplayGroups + 1;\n }\n $this->setStartGroup($this->StartGroup);\n } else {\n $this->StartGroup = $this->getStartGroup();\n }\n } else {\n $this->StartGroup = $this->getStartGroup();\n }\n\n // Check if correct start group counter\n if (!is_numeric($this->StartGroup) || $this->StartGroup == \"\") { // Avoid invalid start group counter\n $this->StartGroup = 1; // Reset start group counter\n $this->setStartGroup($this->StartGroup);\n } elseif (intval($this->StartGroup) > intval($this->TotalGroups)) { // Avoid starting group > total groups\n $this->StartGroup = intval(($this->TotalGroups - 1) / $this->DisplayGroups) * $this->DisplayGroups + 1; // Point to last page first group\n $this->setStartGroup($this->StartGroup);\n } elseif (($this->StartGroup - 1) % $this->DisplayGroups != 0) {\n $this->StartGroup = intval(($this->StartGroup - 1) / $this->DisplayGroups) * $this->DisplayGroups + 1; // Point to page boundary\n $this->setStartGroup($this->StartGroup);\n }\n }", "title": "" }, { "docid": "e56b3e1c3027f7a3be4d8d880b4b0797", "score": "0.45412034", "text": "function getPosition() {\n return $this->fpos + $this->pos;\n }", "title": "" }, { "docid": "2c954e19aa7ab76b9665f1de76779177", "score": "0.4539598", "text": "function olimometer_skin_startElementHandler ($parser,$name,$attrib) {\r\r\n $this->olimometer_skinstate = $name;\r\r\n }", "title": "" }, { "docid": "bdd6894796760cf67a9c01de86453740", "score": "0.453884", "text": "public function getStart(): float\n {\n return $this->start;\n }", "title": "" }, { "docid": "6802342ab5b595ffac72e06241eaec32", "score": "0.45383418", "text": "public function getStart()\n {\n return $this->start;\n }", "title": "" }, { "docid": "6802342ab5b595ffac72e06241eaec32", "score": "0.45383418", "text": "public function getStart()\n {\n return $this->start;\n }", "title": "" }, { "docid": "6802342ab5b595ffac72e06241eaec32", "score": "0.45383418", "text": "public function getStart()\n {\n return $this->start;\n }", "title": "" }, { "docid": "6802342ab5b595ffac72e06241eaec32", "score": "0.45383418", "text": "public function getStart()\n {\n return $this->start;\n }", "title": "" } ]
d3dc1f74cc7b2dc4a5a6bf4ea0f1763b
/ Ritorna il contenuto nella posizione specificata. Es: path : /html/head/keywords > ritorna l'array delle keywords path : /html/head/description > ritorna la descrizione
[ { "docid": "3f33a3e2dc2c703a248f31b2f5ce45ca", "score": "0.0", "text": "function get($path,$default_value=null)\n {\n if (!$this->is_set($path))\n return $default_value;\n \n $path_parts = self::path_tokens($path);\n \n $current_node = $this->data;\n foreach ($path_parts as $p)\n {\n $current_node = $current_node[$p];\n }\n \n return $current_node;\n }", "title": "" } ]
[ { "docid": "880b80b4f1c1138d0e9dabca3e4b6260", "score": "0.60370874", "text": "function get_meta_keywords_description($source_html){\n $tab_metas = get_meta_tags($source_html);\n\n return $tab_metas[\"keywords\"]. \" \" .$tab_metas[\"description\"];\n}", "title": "" }, { "docid": "f8c1cb7b0ee4b8aa598d919897919eb3", "score": "0.5788615", "text": "function FindPartDesc($partsUrl, $tag_path){\n\n$stack = array();\n\n\nforeach ($partsUrl as $url){\n\n$html = file_get_html($url);\n$part_path = $html->find($tag_path);\n\nforeach ($part_path as $items) {\n\n\t\nif(!in_array($items->children(0)->plaintext, $stack)){\n\n$stack[] = $items->children(0)->plaintext;\n\n\n}\n\n}\n}\n\nreturn $stack;\n\n}", "title": "" }, { "docid": "2e3fdd4e5bcd8d4aeecf98a00dffc86e", "score": "0.55513334", "text": "function rh_get_agc_keyword(){\n\n\t$dir = plugin_dir_path(__FILE__ );\n\t$file = $dir.'keywords.txt';\n\n\t$home_url = get_home_url();\n\n\t$result = '';\n\n\tif (file_exists($file)) {\n\t\t\n\t\t$keywords = explode(PHP_EOL, file_get_contents($file));\n\t\tshuffle($keywords);\n\t\t$arr = array_slice($keywords, 0, 5, true);// angka 5 adalah jumlah list yang akan di tampilkan pada widget\n\n\t\tforeach ($arr as $key => $value) {\n\t\t\t $slug = sanitize_title($value );\n\t\t\t\n\t\t\t $arr[$key] = '<li><a href=\"'.$home_url.'/'.$slug.'\">'.$value.'</a></li>';\n\t\t}\n\n\t\t$result = implode('', $arr);\n\n\t}\n\techo '<ul>'.$result.'</ul><br>';\n\t/*echo 'impode';\n\techo '<b>'.implode('', $arr).'</b>';\n\techo 'impode';\n\techo get_home_url().'<br>';\n\techo $_SERVER['REQUEST_URI'].'/<br>';\n\techo '<a href=\"'.$home_url.'\">zzz</a><br>';\n\n\techo '<pre>';\n\tprint_r($arr);\n\techo \"<pre>\";*/\n}", "title": "" }, { "docid": "4fb7956561e89e2bd84fff9d4a06407c", "score": "0.5543535", "text": "function findPageContentMotif ($contentFile, $textFile, &$arrayContent)\r\n\t{\r\n\t\trequire $textFile;\r\n\t\t/**\r\n\t\t * Astuce : \r\n\t\t * On parcours le contenu à la recherche de motif et pour chaque motif trouvé,\r\n\t\t * on enregistre son contenu pris dans le fichier de langue $textFile. On cree donc\r\n\t\t * un tableau dont la clé est le motif et la valeur le texte\r\n\t\t */\r\n\t\t$id_fichier = fopen ($contentFile, \"r\");\r\n\t\twhile ($ligne = fgets ($id_fichier, 1024))\r\n\t\t{\r\n\t\t\t//--- compter le nombre d'occurence du motif\r\n\t\t\t$countMotif = substr_count($ligne, \"[[\");\r\n\t\t\tif ($countMotif > 1)\r\n\t\t\t{\r\n\t\t\t\tfor ($i = 1; $i <= $countMotif; $i++) \r\n\t\t\t\t{\r\n\t\t\t\t\t//--- on extrait le motif et son nom\r\n\t\t\t\t\t$deb = \"[[$i \";\r\n\t\t\t\t\t$end = \" $i]]\";\r\n\t\t\t\t\t$debutLien = strpos ($ligne, $deb) + strlen ($deb);\r\n\t\t\t\t\t$finLien = strpos ($ligne, $end);\r\n\t\t\t\t\t$text\t = substr ($ligne, $debutLien, $finLien - $debutLien);\r\n\t\t\t\t\t//\r\n\t\t\t\t\tif ($i == 1) // si la premiere trouvaille, on cree la collection\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$textHead = $text;\r\n\t\t\t\t\t\t$arrayContent [$text] = array(\r\n\t\t\t\t\t\t\t$i => array(\r\n\t\t\t\t\t\t\t\t'key' => $text,\r\n\t\t\t\t\t\t\t\t'text' => $contentLang [$text]\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse // on enregistre dans la collection\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$arrayContent [$textHead][$i] = array(\r\n\t\t\t\t\t\t\t'key' => $text,\r\n\t\t\t\t\t\t\t'text' => $contentLang [$text]\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\telseif ($countMotif == 1)\r\n\t\t\t{\r\n\t\t\t\t//--- on extrait le motif et son nom\r\n\t\t\t\t$deb = '[[ ';\r\n\t\t\t\t$end = ' ]]';\r\n\t\t\t\t$debutLien = strpos ($ligne, $deb) + strlen ($deb);\r\n\t\t\t\t$finLien = strpos ($ligne, $end);\r\n\t\t\t\t$text\t = substr ($ligne, $debutLien, $finLien - $debutLien);\r\n\t\t\t\tif (strlen($debutLien) > 0 && strlen($finLien) > 0) {\r\n\t\t\t\t\t$arrayContent[ $text ] = $contentLang [$text];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($id_fichier);\r\n\t}", "title": "" }, { "docid": "837ef1ceb46243f023ce7272c932a1be", "score": "0.548871", "text": "function meta_description() {\n\t\t$ste_description_file = 'description.txt';\n\n\t\tif (file_exists($ste_description_file)) {\n\t\t\techo trim(file_get_contents($ste_description_file));\n\t\t}\n\t}", "title": "" }, { "docid": "e16e15a2017c17d6c459ce9012a221b8", "score": "0.54856366", "text": "function get_info($doc, $pos) {\n $ary = array(0,0,0);\n\n $cntdoc = count($doc);\n\n for ($n=$pos; $n < $cntdoc; $n++) {\n if (trim(strtolower($doc[$n])) == '<chapter>'\n || trim(strtolower($doc[$n])) == '<section>') {\n for ($n++; $n < $cntdoc\n && (trim(strtolower($doc[$n])) != '</section>')\n && (trim(strtolower($doc[$n])) != '</chapter>'); $n++) {\n if (trim(strtolower($doc[$n])) == '<title>') {\n $n++;\n $ary[0] = trim($doc[$n]);\n }\n if (trim(strtolower($doc[$n])) == '<description>') {\n $ary[1] = '';\n for ($n++;$n < $cntdoc\n && (trim(strtolower($doc[$n])) != '</description>');\n $n++) {\n $ary[1] .= $doc[$n];\n }\n }\n if (trim(strtolower($doc[$n])) == '<summary>') {\n $ary[2] = '';\n for ($n++; $n < $cntdoc\n && (trim(strtolower($doc[$n])) != '</summary>');\n $n++) {\n $ary[2] .= $doc[$n];\n }\n }\n }\n if (isset($ary)) {\n $ary[3] = $n;\n } else {\n $ary[0] = _(\"ERROR: Help files are not in the right format!\");\n $ary[1] = $ary[0];\n $ary[2] = $ary[0];\n }\n return( $ary );\n } else if (!trim(strtolower($doc[$n]))) {\n $ary[0] = '';\n $ary[1] = '';\n $ary[2] = '';\n $ary[3] = $n;\n }\n }\n $ary[0] = _(\"ERROR: Help files are not in the right format!\");\n $ary[1] = $ary[0];\n $ary[2] = $ary[0];\n $ary[3] = $n;\n return( $ary );\n}", "title": "" }, { "docid": "524850710e7e0a1b3aff69555e9ed5cf", "score": "0.5464425", "text": "public function getDocumentation();", "title": "" }, { "docid": "2d661cc1c7998960a61447b329724473", "score": "0.5449579", "text": "public function __construct() {\n $this->description = <<<EOF\n<h4>Search</h4>\n<p>Search for a given text keyword within files of WordPress.\n</p>\nEOF;\n }", "title": "" }, { "docid": "cc6f31b8bbc52942c2516272714ddd37", "score": "0.54376155", "text": "function setPageTitleDescriptionKeywords(string $title, string $description, string $keywords)\n {\n }", "title": "" }, { "docid": "812ab8d0da3f0989a82c890a589ef190", "score": "0.5419057", "text": "function lista_htmls($f,$p) {\n global $titulos_capitulos;\n global $archivo_texto_contenido;\n // Pinta los html de fuentes\n $fuentes = opendir($f);\n $ficheros_fuentes = array();\n while (($leyendo = readdir($fuentes)) !== false) {\n if ($leyendo != \".\" && $leyendo != \"..\" && substr($leyendo,0,2)==\"ap\" ) {\n $ficheros_fuentes[] = $leyendo;\n }\n }\n sort($ficheros_fuentes);\n echo '<section class=\"container listados\">\n <div class=\"row\">\n <div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6\"><div class=\"listado_toc\">';\n //echo '<h2>'.$f.'</h2>';\n echo '<h2 style=\"text-align:center\">Fuentes</h2>';\n //fputs($archivo_texto_contenido, $f.chr(13).chr(10));\n echo '<ul>';\n for ($i=0; $i<count($ficheros_fuentes); $i++) {\n global $capitulo;\n global $apartado;\n global $lista_contenidos_tema_;\n global $lista_htmls_tema_;\n global $titulo_global_manual;\n // Preparo los htmls para ser leidos\n $contenido_html = file_get_contents($f.'/'.$ficheros_fuentes[$i]);\n $documento = new DOMDocument();\n $documento->loadHTML($contenido_html);\n $documento -> saveHTML();\n $documentopath = new DOMXPath($documento);\n $titulo_manual = $documentopath->query('//title');\n\n // Busco y recojo los htmls que pertenecen a tareas, actividades, o introducciones, y recojo su título\n $busca_las_tareas = array('21.html','22.html','23.html','24.html','25.html','26.html','27.html','28.html','29.html');\n $es_tarea = strposa($ficheros_fuentes[$i], $busca_las_tareas);\n $busca_introduccion = '0101.html';\n $es_introduccion = strpos($ficheros_fuentes[$i], $busca_introduccion);\n $titulo_tarea = $documentopath->query('//div[@class=\"show_tarea_evaluacion3\"]');\n $titulo_actividad = $documentopath->query('//div[@class=\"show_actividad_evaluacion2\"]');\n \n //Paso los títulos a strings\n foreach($titulo_tarea as $titulo_tareas){\n $titulo_tarea = strval($titulo_tareas->nodeValue);\n }\n foreach($titulo_actividad as $titulo_actividades){\n $titulo_actividad = strval($titulo_actividades->nodeValue);\n }\n \n // Recojo el número y la duración de cada tarea, y si son colaborativas\n if(is_string($titulo_tarea) && $es_tarea == true) {\n $numero_tarea = array($documentopath->query('//div[@class=\"show_tarea_evaluacion3\"]/div[@class=\"orden_tarea_evaluacion\"]'));\n /*if($documentopath->query('//div[@class=\"duracion_recurso\"]') == true){\n $duracion_tarea = $documentopath->query('//div[@class=\"duracion_recurso\"]'); \n } else {\n $duracion_tarea = '';\n }*/\n $duracion_tarea = array($documentopath->query('//div[@class=\"duracion_recurso\"]'));\n $es_colaborativa = array($documentopath->query('//div[@class=\"show_tipo_tarea_evaluacion_colaborativa\"]'));\n foreach($duracion_tarea as $duracion_tareas){\n if ($duracion_tarea != ''){\n $duracion_tarea = $duracion_tareas[0]; \n }\n }\n foreach($es_colaborativa as $es_colaborativas){\n if($es_colaborativa[0] != ''){\n $es_colaborativa = $es_colaborativas[0];\n }\n }\n foreach($numero_tarea as $numero_tareas){\n if($numero_tarea[0] != ''){\n $numero_tarea = $numero_tareas[0];\n }\n }\n if(($duracion_tarea != '') && ($es_colaborativa != '')){\n echo '<li>'.$ficheros_fuentes[$i].' = Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).') (Colaborativa)</li>';\n fputs($archivo_texto_contenido, $ficheros_fuentes[$i].' = Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).') (Colaborativa)'.chr(13).chr(10));\n // Guardo el contenido en array\n $guardo_contenido = 'Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).') (Colaborativa)';\n $apartado++;\n $lista_contenidos_tema_[$capitulo][$apartado] = $guardo_contenido;\n } else {\n echo '<li>'.$ficheros_fuentes[$i].' = Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).')</li>';\n fputs($archivo_texto_contenido, $ficheros_fuentes[$i].' = Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).')'.chr(13).chr(10));\n // Guardo el contenido en array\n $guardo_contenido = 'Tarea de evaluación '.strval($numero_tarea->nodeValue).' ('.strval($duracion_tarea->nodeValue).')';\n $apartado++;\n $lista_contenidos_tema_[$capitulo][$apartado] = $guardo_contenido;\n };\n } \n // Busco las Actividades de evaluación para distinguirlas de las tareas\n else if (is_string($titulo_actividad) && $es_tarea == true){\n $numero_actividad = array($documentopath->query('//div[@class=\"show_actividad_evaluacion2\"]/div[@class=\"orden_actividad_evaluacion\"]'));\n foreach($numero_actividad as $numero_actividades){\n if($numero_actividad[0] != ''){\n $numero_actividad = $numero_actividades[0];\n }\n }\n echo '<li>'.$ficheros_fuentes[$i].' = Actividad de evaluación '.strval($numero_actividad->nodeValue).' </li>'; \n fputs($archivo_texto_contenido, $ficheros_fuentes[$i].' = Actividad de evaluación '.strval($numero_actividad->nodeValue).chr(13).chr(10));\n // Guardo contenido en el array\n $guardo_contenido = 'Actividad de evaluación '.strval($numero_actividad->nodeValue).'';\n $apartado++;\n $lista_contenidos_tema_[$capitulo][$apartado] = $guardo_contenido;\n }\n \n // Pinto el título de cada html si no son tareas, actividades o introducciones\n if (($titulo_html = $documentopath->query('//div[@class=\"show_nivel_1\"]')) && ($es_tarea == false)){\n foreach($titulo_manual as $titulo_manuals){\n $titulo_manual = strval($titulo_manuals->nodeValue);\n }\n $titulo_global_manual = $titulo_manual;\n $titulo_capitulo = $documentopath->query('//div[@class=\"texto_capitulo\"]');\n foreach($titulo_capitulo as $titulo_capitulos){\n $titulo_capitulo = strval($titulo_capitulos->nodeValue);\n }\n foreach($titulo_html as $titulo_htmls){\n // Detecto la biografía y el glosario\n $titulo_compara = strval($titulo_htmls->nodeValue);\n if ($titulo_compara == \"Bibliografía\" || $titulo_compara == \"Glosario\") {\n $nointro = 1;\n $capitulo++;\n } else {\n $nointro = 0;\n }\n if ($es_introduccion == true && $nointro==0) {\n array_push($titulos_capitulos, $titulo_capitulo);\n echo '</ul><strong>'.$titulo_capitulo.'</strong><br><ul>';\n fputs($archivo_texto_contenido, chr(13).chr(10).$titulo_capitulo.chr(13).chr(10));\n echo '<li>'.$ficheros_fuentes[$i].' = Introducción</li>';\n fputs($archivo_texto_contenido, $ficheros_fuentes[$i].' = Introducción'.chr(13).chr(10));\n // Guardo el contenido en el array\n $guardo_contenido = 'Introducción';\n $capitulo++;\n $apartado = 0;\n $lista_contenidos_tema_[$capitulo][0] = $guardo_contenido;\n \n } else if($es_introduccion == true && $nointro==1){\n if ($titulo_compara == \"Bibliografía\") {\n //$capitulo++;\n $apartado = 0;\n $lista_contenidos_tema_[$capitulo][$apartado] = 'Bibliografía';\n array_push($titulos_capitulos, 'Bibliografía');\n echo '</ul><ul><li><strong>Bibliografía</strong></li>';\n fputs($archivo_texto_contenido, 'Bibliografía'.chr(13).chr(10));\n } else if ($titulo_compara == \"Glosario\"){\n //$capitulo++;\n $lista_contenidos_tema_[$capitulo][$apartado] = 'Glosario';\n $apartado = 0;\n array_push($titulos_capitulos, 'Glosario');\n echo '<li><strong>Glosario</strong></li>';\n fputs($archivo_texto_contenido, 'Glosario'.chr(13).chr(10));\n } else {\n array_push($titulos_capitulos, '<h3>Falta Bibliografía o Glosario</h3>');\n }\n } else {\n echo '<li>'.$ficheros_fuentes[$i].' = '.$titulo_htmls->nodeValue.'</li>';\n fputs($archivo_texto_contenido, $ficheros_fuentes[$i].' = '.$titulo_htmls->nodeValue.chr(13).chr(10));\n $guardo_contenido = ''.$titulo_htmls->nodeValue.'';\n $apartado++;\n $lista_contenidos_tema_[$capitulo][$apartado] = $guardo_contenido;\n }\n }\n }\n }\n echo '</ul>';\n \n /* Listado de htmls de paginación */\n \n fputs($archivo_texto_contenido, chr(13).chr(10).$titulo_manual.chr(13).chr(10));\n \n /* Pinta los html de paginación */\n echo '</div></div><div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-6\"><div class=\" listado_pagina\">';\n //echo '<h2>'.$p.'</h2>';\n echo '<h2 style=\"text-align:center\">Paginado</h2>';\n $pagina = opendir($p);\n $capit = 0;\n $orden_de_capitulos = array();\n $orden_apartados = array();\n global $lista_htmls_tema_;\n while (($leyendo_p = readdir($pagina)) !== false) {\n if ($leyendo_p != \".\" && $leyendo_p != \"..\") {\n //echo '<ul>';\n //echo \"<strong>$leyendo_p</strong><br>\";\n $numero_capitulo_para_html = intval(preg_replace('/[^0-9]+/', '', $leyendo_p), 10);;\n $capit++;\n $apartado = 0;\n $pagina_int = opendir($p.\"/\".$leyendo_p);\n while (($leyendo_p2 = readdir($pagina_int)) !== false) {\n if ($leyendo_p2 != \".\" && $leyendo_p2 != \"..\") {\n $guardo_htmls = strval($leyendo_p2);\n $orden_apartados[] = $guardo_htmls;\n sort($orden_apartados);\n $orden_de_capitulos[$numero_capitulo_para_html][] = strval($guardo_htmls);\n //echo \"<li>$leyendo_p2</li>\";\n $apartado++;\n }\n }\n } echo \"</ul>\";\n }\n closedir($pagina);\n closedir($pagina_int);\n //var_dump($orden_de_capitulos);\n for($q=1; $q<=count($orden_de_capitulos); $q++){\n echo \"<strong>Unidad \".$q.\"</strong><br>\";\n echo \"<ul>\";\n for($w=0; $w<count($orden_de_capitulos[$q]); $w++){\n sort($orden_de_capitulos[$q]);\n echo \"<li>\".$orden_de_capitulos[$q][$w].\"</li>\";\n }\n echo \"</ul>\";\n }\n escribe_xml($titulos_capitulos);\n echo '</div></div>\n </div>\n </section>';\n echo '<h1 class=\"titulo_manual\">'.$titulo_manual.'</h1>';\n }", "title": "" }, { "docid": "7bc1791fc5a336ca14799be1dc00498f", "score": "0.5411818", "text": "function getDescription() {\n\t\treturn 'Scans your post for keywords as it is shown and then creates a glossary applied with skinvar Glossary(list) there are lots of other skinvars please see http://wiki.lordmatt.co.uk/index.php/NP_Glossary for the full lowdown. One new word may be added with each post or Admin Area Edit (not pop-up edit).';\n\t}", "title": "" }, { "docid": "6b14d25046c267e068d6aa7ea9add288", "score": "0.53669924", "text": "private function findMetas()\n {\n $this->page['description'] = '';\n $this->page['keywords'] = '';\n $pattern = '\n ~<\\s*meta\\s\n # using lookahead to capture type to $1\n (?=[^>]*?\n \\b(?:name|property|http-equiv)\\s*=\\s*\n (?|\"\\s*([^\"]*?)\\s*\"|\\'\\s*([^\\']*?)\\s*\\'|\n ([^\"\\'>]*?)(?=\\s*/?\\s*>|\\s\\w+\\s*=))\n )\n # capture content to $2\n [^>]*?\\bcontent\\s*=\\s*\n (?|\"\\s*([^\"]*?)\\s*\"|\\'\\s*([^\\']*?)\\s*\\'|\n ([^\"\\'>]*?)(?=\\s*/?\\s*>|\\s\\w+\\s*=))\n [^>]*>\n\n ~ix';\n\n if (preg_match_all($pattern, $this->page['content'], $out)) {\n $metas = array_combine($out[1], $out[2]);\n if (!empty($metas['description'])) {\n $this->countResults++;\n $this->page['description'] = $metas['description'];\n }\n if (!empty($metas['keywords'])) {\n $this->page['keywords'] = $metas['keywords'];\n }\n }\n }", "title": "" }, { "docid": "33b0e88d3464532f7114be784942e94b", "score": "0.53532445", "text": "function rh_get_wiki($keyword){\n\n\t$url = 'https://en.wikipedia.org/w/api.php?'.\n\t'format=json&action=query&prop=extracts'.\n\t'&exintro=&explaintext=&titles='.$keyword;\n\n\t$contents = json_decode(file_get_contents($url) );\n\n\t$title = '';\n\t$description = '';\n\n\tforeach ($contents->query->pages as $content) {\n\t\t$title = $content->{'title'};\n\t\t$description = $content->{'extract'};\n\t}\n\n\tif (strpos(strtolower($description), 'this is a redirect') !== false) {\n\t\t\n\t\t$description = '';\n\n\t}elseif ($description !=''){\n\n\t\t$paragraph = explode(\"\\n\", $description);\n\t\tforeach ($paragraph as $key => $value) {\n\t\t\t$paragraph[$key] = '<p>'.$value.'</p>';\n\n\t\t}\n\n\t\t$description = implode('', $paragraph);\n\n\t\t\n\t\t\n\t}\n\n\t$data['title'] = $title;\n\t$data['description'] = $description;\n\treturn serialize($data);\n\n}", "title": "" }, { "docid": "f0e12b62685c4cee8c14633ad01b550c", "score": "0.5321694", "text": "public function getKeywords();", "title": "" }, { "docid": "ff6dd47f8467705d944f475cbf917e81", "score": "0.531461", "text": "public function get_keywords()\n {\n return [ 'heading', 'title', 'text' ];\n }", "title": "" }, { "docid": "92fb601db318e296462a78812b23c813", "score": "0.527578", "text": "function info_path($path, $keyword, $optlist) {}", "title": "" }, { "docid": "361085ccd4e66ff13ac8fb7e558270aa", "score": "0.5274397", "text": "function head_desc_and_keywords() {\n global $s, $post;\n $description = '';\n $keywords = '';\n $blog_name = get_bloginfo('name');\n if ( is_singular() ) {\n\tif(!empty($post->post_password)){//有密码保护的文章不输出\n\t $text = \"受保护的文章,输入密码查看!\";\n\t $keywords = '';\n\t}else{\n $text = $post->post_content;\n\t if ( get_the_tags( $post->ID ) ) {\n\t\tforeach ( get_the_tags( $post->ID ) as $tag ) $keywords .= $tag->name . ', ';\n\t\t}\n\t\tforeach ( get_the_category( $post->ID ) as $category ) $keywords .= $category->cat_name . ', ';\n\t }\n $description = trim( str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\", \" \", \" \"), \" \", str_replace( \"\\\"\", \"'\", strip_tags( $text ) ) ) );\n \tif ( !( $description ) ) $description = $blog_name . \" - \" . trim( wp_title('', false) );\n\t$keywords = substr_replace( $keywords, \"\" , -2 );\n } elseif ( is_home () ) {\n\t$description = get_option('Abook_description');\n\t$keywords = get_option('Abook_keywords');\n } elseif ( is_tag() ) { \n\t$description = $blog_name . \"有关 '\" . single_tag_title('', false) . \"' 的文章\";\n\t$keywords = single_tag_title('', false);\n } elseif ( is_category() ) {\n\t$description = $blog_name . \"有关 '\" . single_cat_title('', false) . \"' 的文章\";\n\t$keywords = single_cat_title('', false);\n } elseif ( is_archive() ) {\n\t$description = $blog_name . \"在: '\" . trim( wp_title('', false) ) . \"' 的文章\";\n\t$keywords = trim( wp_title('', false) );\n } elseif ( is_search() ) {\n\t$description = $blog_name . \": '\" . esc_html( $s, 1 ) . \"' 的搜索結果\";\n\t$keywords = esc_html( $s, 1 );\n } else { \n\t$description = $blog_name . \"有关 '\" . trim( wp_title('', false) ) . \"' 的文章\";\n\t $keywords = trim( wp_title('', false) );\n } \n if ( $keywords ) {\n echo \"<meta name=\\\"keywords\\\" content=\\\"$keywords\\\" />\\n\";\n }\n\t$description = mb_substr( $description, 0, 97, 'utf-8' ) . '..';//截取文章的前97个字符作为描述\n\techo \"<meta name=\\\"description\\\" content=\\\"$description\\\" />\\n\";\n}", "title": "" }, { "docid": "0ee140bff9663f57b6b57c941bd01548", "score": "0.5253775", "text": "protected function set_meta_desc()\n {\n define('_KEYWORDS','استمارة الاستبيان');\n define('_DESCRIPTION','استمارة الاستبيان');\n define('_TITLE_PAGE','استمارة الاستبيان');\n }", "title": "" }, { "docid": "e31853c2de45f490efbd2d95ae9373af", "score": "0.5215019", "text": "private function _extract_description(string $desc): array\n {\n $ar = [];\n $bits = X::split($desc, PHP_EOL);\n if (!empty($bits)) {\n $ar['summary'] = trim(array_shift($bits));\n $ar['description'] = '';\n $ar['description_parts'] = [];\n if (!empty($bits)) {\n $description = trim(X::join($bits, PHP_EOL));\n $num_matches = preg_match_all('/```(?:php)?(.+)```/s', $description, $matches, PREG_OFFSET_CAPTURE);\n $len = strlen($description);\n $start = 0;\n \n if ($num_matches) {\n foreach ($matches[0] as $i => $m) {\n if (isset($m[1])) {\n if (\n ($i === 0)\n && ($m[1] !== 0)\n && $tmp = trim(substr($description, $start, $m[1]))\n ) {\n //$content = trim(Str::markdown2html($tmp));\n $content = $tmp;\n if ($content) {\n $ar['description_parts'][] = [\n 'type' => 'text',\n 'content' => $content\n ];\n }\n }\n \n $ar['description_parts'][] = [\n 'type' => 'code',\n 'content' => trim($matches[1][$i][0])\n ];\n $start = $m[1] + strlen($m[0]);\n $end = isset($matches[0][$i + 1]) ? $matches[0][$i + 1][1] : $len;\n if (\n ($start < $len)\n && ($tmp = trim(substr($description, $start, $end - $start)))\n ) {\n $ar['description_parts'][] = [\n 'type' => 'text',\n 'content' => $tmp\n ];\n }\n }\n }\n } else {\n //$content = trim(Str::markdown2html($description));\n $content = $description;\n if ($content) {\n $ar['description_parts'][] = [\n 'type' => 'text',\n 'content' => $content\n ];\n }\n }\n foreach ($ar['description_parts'] as $p) {\n if ($p['type'] === 'text') {\n $ar['description'] = $p['content'];\n break;\n }\n }\n }\n }\n \n return $ar;\n }", "title": "" }, { "docid": "d530baabc4e09d431d4030e57f9f526a", "score": "0.5209219", "text": "function info_textline($text, $keyword, $optlist) {}", "title": "" }, { "docid": "51975cf94ab12dfde97a4359cad7a214", "score": "0.51870495", "text": "private function _getTexts() {\n if(array_key_exists('language',Yii::$app->params)) {\n $lang = Yii::$app->params['language'];\n } else {\n //It comes from the webapp\n $lang = Yii::$app->language;\n }\n foreach($this->dataCodingTexts as $t) {\n if($t->language_id == $lang)\n return ['title'=>self::_stringToNull($t->title),\n 'subtitle'=>self::_stringToNull($t->subtitle),\n 'info'=>self::_stringToNull($t->info)];\n }\n }", "title": "" }, { "docid": "8eff77f6f0d0eea6a35ac8c7e3411d31", "score": "0.5161184", "text": "function setMetaTags($title,$description,$keywords)\r\r\n{\r\r\n\tglobal $cfg , $mycms, $mycommoncms;\r\r\n\t$pagename\t=\tbasename($_SERVER['PHP_SELF']);\r\r\n?>\r\r\n\t<title><?=TITLE?> - <?=$title?> ::</title>\r\r\n\t<meta charset=\"UTF-8\">\r\r\n\t<?\r\r\n\tif($pagename=='searchContent.php' || $pagename=='verify.php' || $pagename=='coming-soon.php')\r\r\n\t{\r\r\n\t\t?>\r\r\n\t\t<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\"/>\r\r\n\t\t<?\r\r\n\t}\r\r\n\telse if($pagename=='page-content.php')\r\r\n\t{\r\r\n\t\t$cmsId\t=\t$mycommoncms->getFieldValue($_GET['cmsId']);\r\r\n\t\tif($cmsId=='11' || $cmsId=='13' || $cmsId=='12' || $cmsId=='20' || $cmsId=='24')\r\r\n\t\t{\r\r\n\t\t\t?>\r\r\n\t\t\t<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\"/>\r\r\n\t\t\t<?\r\r\n\t\t}\r\r\n\t}\r\r\n\t?>\r\r\n\t<meta name=\"description\" content=\"<?=$description?>\">\r\r\n\t<meta name=\"keywords\" content=\"<?=$keywords?>\">\r\r\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\" />\r\r\n\t\r\r\n\t<link rel=\"icon\" type=\"image/ico\" href=\"<?=BASE_URL?>Assets/images/fav.png\"/>\r\r\n<?\r\r\n}", "title": "" }, { "docid": "a13252147cbdc92290acdee0756ed2c5", "score": "0.5135625", "text": "public function getDocumentation(): string;", "title": "" }, { "docid": "e62ccff0b4cdc2232aa3a1b317a098b2", "score": "0.5135128", "text": "function GetPageKeywords(){\n $detail = ModelSeoPage::newInstance()->getAttrByPageId(osc_static_page_id()); \n return isset($detail['seo_keywords']) ? $detail['seo_keywords'] : false;\n}", "title": "" }, { "docid": "065468d34b6b2cfeb5c28b58884355b7", "score": "0.51325953", "text": "function inf_keyword_texts($keyword_count = 1) {\n\n global $tagger;\n $keyword_conf = $tagger->getConfiguration('keyword');\n $property = $keyword_conf['property'];\n\n $db_conf = $tagger->getConfiguration('db');\n $word_relations_table = $db_conf['word_relations_table'];\n\n\n\t touch('keywords_selected.txt');\n\t $error = false;\n\n if($keyword_count != 'all') {\n // Get selected keywords (keywords_selected.txt)\n if ($lines = file('keywords_selected.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) {\n foreach($lines as $line) {\n list($tid, $name) = explode('|', $line);\n $keywords[$tid] = mb_strtolower($name);\n }\n $c = count($lines);\n echo \"Found $c keywords in keywords_selected.txt.\\n\";\n\n // check if the wanted keywords exists in the database\n foreach ($keywords as $tid => $name) {\n echo \"$tid: $name\\n\";\n $query = \"SELECT name FROM term_data WHERE vid = 16 AND tid = $tid\";\n $result = TaggerQueryManager::query($query);\n if ($row = TaggerQueryManager::fetch($result)) {\n if (mb_strtolower($row['name']) == $name) {\n continue;\n }\n else {\n echo \" => TID $tid is '\".$row['name'].\"' not '$name'.\\n\";\n unset($keywords[$tid]);\n $error = true;\n }\n }\n else {\n echo \" => TID $tid not found.\\n\";\n unset($keywords[$tid]);\n $error = true;\n }\n $query = \"SELECT tid FROM term_data WHERE vid = 16 AND name = '\".mysql_real_escape_string($name).\"'\";\n $result = TaggerQueryManager::query($query);\n if ($row = TaggerQueryManager::fetch($result)) {\n echo \" => '$name' has TID \".$row['tid'].\"\\n\";\n $error = true;\n }\n else {\n echo \" => No keyword '$name' found i database.\\n\";\n $error = true;\n }\n }\n }\n else { \n $query = \"SELECT tid, name FROM term_data WHERE vid = 16\";\n $result = TaggerQueryManager::query($query);\n\n while ($row = TaggerQueryManager::fetch($result)) {\n $keywords[$row['tid']] = $row['name'];\n }\n }\n\n if ($error) {\n die(\"Errors in keywords_selected.txt found. Exiting\\n\");\n }\n\n // filter keywords that:\n // * have too few articles (keyword_non_candidates.txt)\n // * are already in the database (keywords_in_db.txt)\n // * or simply don't wanna have (add them yourself to keywords_non_candidates.txt)\n touch(\"keywords_non_candidates.txt\");\n touch(\"keywords_in_db.$property.txt\");\n $lines1 = file(\"keywords_non_candidates.txt\", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n $lines2 = file(\"keywords_in_db.$property.txt\", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n $lines = array_merge($lines1, $lines2);\n foreach($lines as $line) {\n list($tid, $name) = explode('|', $line);\n unset($keywords[$tid]);\n }\n\n $keywords = array_slice($keywords, 0, $keyword_count, true);\n $keyword_count = count($keywords);\n }\n else {\n $query = \"SELECT name, tid FROM term_data WHERE vid = 16\";\n $result = TaggerQueryManager::query($query);\n\n while ($row = TaggerQueryManager::fetch($result)) {\n $keywords[$row['tid']] = $row['name'];\n }\n\n }\n\n $new_keywords = 0;\n\n $start = time();\n\n $tids_n_texts = array();\n foreach ($keywords as $tid => $name) {\n echo \"Finding articles related to $name...\\n\";\n\n // Get texts related to this keyword\n $tids_n_texts[$tid] = inf_get_keyword_texts($name, $property, 'underrubrik');\n $hits = count($tids_n_texts[$tid]);\n\n // too few articles found\n echo \"$hits articles.\";\n if ($hits < 5) {\n unset($tids_n_texts[$tid]);\n echo \" Too few. Skipping.\\n\\n\";\n $file = fopen('keywords_non_candidates.txt', 'a');\n fwrite($file, $tid . '|' . $name . '|' . $hits . \"\\n\");\n continue;\n }\n else {\n echo \"\\n\\n\";\n }\n }\n return $tids_n_texts;\n }", "title": "" }, { "docid": "de0466099ceeea71d2f84eb0442a5f74", "score": "0.51308656", "text": "public function meta($text);", "title": "" }, { "docid": "fb085a556858148bcd1652358d87aa99", "score": "0.51144177", "text": "public function descripcion() {\n\t\t$idc = $_GET ['idc'];\n\t\t$gestion = $_SESSION ['idgestion'];\n\t\t$cadete = $this->cadete->informacion ( $idc, $gestion )->fetchAll ( PDO::FETCH_OBJ );\n\t\tforeach ( $cadete as $c ) {\n\t\t\t$nombre = $c->paterno . \" \" . $c->materno . \" \" . $c->nombres;\n\t\t\t$curso = $c->curso2;\n\t\t\t$codigo = $c->codigo;\n\t\t\t$coeficiente = $c->coeficiente;\n\t\t\t$puntosSemestre = $c->puntosSemestre;\n\t\t}\n\t\t//faltas cometidas por el cadete\n\t\t$faltas = $this->cadete->faltasActuales ( $idc, $gestion )->fetchAll ( PDO::FETCH_OBJ );\n\t\t//\t\t$faltasGenerales=$this->cadete->faltasActuales();\n\t\tif ($path = $this->existeFichero ( \"cadetes/folder.php\" )) {\n\t\t\t//\t\tif ($path = $this->existeFichero ( \"slickgrid/descripcion.php\" )) {\n\t\t\tinclude ($path);\n\t\t}\n\t}", "title": "" }, { "docid": "01f468a6f7543324ddb5aba639787280", "score": "0.5109214", "text": "function headers($keywords, $description, $title){\n\t$HEADER = '\n\t\t\t<meta charset=\"UTF-8\">\n\t\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t<meta name=\"keywords\" content='.$keywords.'>\n\t\t\t<meta name=\"description\" \tcontent='.$description.'>\n\t\t\t<!-- Latest compiled and minified CSS -->\n\t\t\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css\">\n\t\t\t<!-- style for the specifict elements -->\n\t\t\t<link rel=\"stylesheet\" href=\"css/style.css\">\n\t\t\t<link rel=\"stylesheet\" href=\"css/navbar.css\">\n\t\t\t<link rel=\"stylesheet\" href=\"css/animate.min.css\">\n\t\t\t<!-- FAVICON -->\n\t\t\t<link rel=\"shortcut icon\" href=\"favicon.ico\" />\n\t\t\t<title>'.$title.'</title>\n\n\t';\n\t\n\treturn $HEADER;\n}", "title": "" }, { "docid": "e155c973b116169faf06a94298b23f89", "score": "0.5103191", "text": "public abstract function get_intro_text();", "title": "" }, { "docid": "15149f8d5eeb3a7324041abeefe48e4e", "score": "0.5098421", "text": "function ppvtool_relaventkeywords($keyword){\r\n\r\n require_once('class.ppvtools.autokeyword.php');\r\n $results = $this->ppvtool_sniper($keyword, 8);\r\n\r\n $keywords = '';\r\n foreach($results as $key => $value){\r\n $keywords .= $results[\"$key\"]['titleNoFormatting'].' ';\r\n $keywords .= $results[\"$key\"]['content'].' ';\r\n }\r\n\r\n //Clean up contant and remove markup code.\r\n $data = $this->remove_HTML($keywords);\r\n $data = $this->filter_stopwords($data);\r\n\r\n //Set the length of Keywords you like\r\n $params['content'] = $data; //page content\r\n $params['min_word_length'] = 5; //minimum length of single words\r\n $params['min_word_occur'] = 6; //minimum occur of single words\r\n\r\n $params['min_2words_length'] = 3; //minimum length of words for 2 word phrases\r\n $params['min_2words_phrase_length'] = 10; //minimum length of 2 word phrases\r\n $params['min_2words_phrase_occur'] = 4; //minimum occur of 2 words phrase\r\n\r\n $params['min_3words_length'] = 3; //minimum length of words for 3 word phrases\r\n $params['min_3words_phrase_length'] = 10; //minimum length of 3 word phrases\r\n $params['min_3words_phrase_occur'] = 4; //minimum occur of 3 words phrase\r\n\r\n $keyword_out = new autokeyword($params, \"iso-8859-1\");\r\n\r\n unset($output);\r\n $output['one_word'] = $keyword_out->parse_words();\r\n $output['two_word'] = $keyword_out->parse_2words();\r\n $output['three_word'] = $keyword_out->parse_3words();\r\n $output['all'] = $keyword_out->get_keywords();\r\n\r\n return($output);\r\n }", "title": "" }, { "docid": "bb9eee59d294e52029b92f47bd4a4fab", "score": "0.5080769", "text": "function generate_docs() {\n\t$docs = array(\n\t\t'Guides' => array(\n\t\t\t'Installing' => array(),\n\t\t\t'Quick start' => array(),\n\t\t),\n\t\t'References' => array(\n\t\t\t'Global parameters' => array(\n\t\t\t\t'path' => '/config/',\n\t\t\t\t'title' => 'Global parameters',\n\t\t\t\t'description' => 'Variables defining how a command is executed, including which WordPress user the command is run as and which WordPress instance the command is run against.',\n\t\t\t),\n\t\t\t'Built-in commands' => array(\n\t\t\t\t'path' => '/commands/',\n\t\t\t\t'title' => 'Built-in commands',\n\t\t\t\t'description' => 'Commands included in every copy of WP-CLI.',\n\t\t\t),\n\t\t\t'Package index' => array(\n\t\t\t\t'path' => '/package-index/',\n\t\t\t\t'title' => 'Package index',\n\t\t\t\t'description' => 'Commands maintained and supported by the community.',\n\t\t\t),\n\t\t\t'Internal API' => array(),\n\t\t),\n\t\t'Contributing' => array(),\n\t\t'Misc' => array(),\n\t);\n\tforeach( glob( __DIR__ . '/docs/*/index.md' ) as $file ) {\n\t\t$contents = file_get_contents( $file );\n\t\t$parts = explode( '---', $contents );\n\t\t$header = $parts[1];\n\t\tpreg_match( '#category:\\s(.+)#', $header, $matches );\n\t\tif ( ! empty( $matches[1] ) && array_key_exists( $matches[1], $docs ) ) {\n\t\t\t$category = $matches[1];\n\t\t} else {\n\t\t\t$category = 'Misc';\n\t\t}\n\t\tpreg_match( '#title:\\s(.+)#', $header, $matches );\n\t\t$title = ! empty( $matches[1] ) ? $matches[1] : '';\n\t\tpreg_match( '#description:\\s(.+)#', $header, $matches );\n\t\t$description = ! empty( $matches[1] ) ? $matches[1] : '';\n\t\tif ( ! isset( $docs[ $category ][ $title ] ) ) {\n\t\t\t$docs[ $category ][ $title ] = array();\n\t\t}\n\t\t$docs[ $category ][ $title ]['path'] = '/docs/' . basename( dirname( $file ) ) . '/';\n\t\t$docs[ $category ][ $title ]['title'] = $title;\n\t\t$docs[ $category ][ $title ]['description'] = $description;\n\t}\n\t$out = '';\n\tforeach( $docs as $category => $cat_docs ) {\n\t\tif ( empty( $cat_docs ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$cat_slug = strtolower( $category );\n\t\t$out .= '<h3 id=\"' . $cat_slug . '\">' . $category . '</h3>' . PHP_EOL . PHP_EOL;\n\t\t$out .= '<ul>' . PHP_EOL;\n\t\tforeach( $cat_docs as $cat_doc ) {\n\t\t\t$out .= '<li><a href=\"' . $cat_doc['path'] . '\"><strong>' . $cat_doc['title'] . '</strong></a>';\n\t\t\tif ( ! empty( $cat_doc['description'] ) ) {\n\t\t\t\t$out .= ' - ' . $cat_doc['description'];\n\t\t\t}\n\t\t\t$out .= '</li>' . PHP_EOL;\n\t\t}\n\t\t$out .= '</ul>' . PHP_EOL . PHP_EOL;\n\t}\n\n\tfile_put_contents( '_includes/doc-list.html', $out );\n\tWP_CLI::success( 'Generated /docs/' );\n}", "title": "" }, { "docid": "f57f5174d020c15f7f3c95b889b30b90", "score": "0.50785697", "text": "function getMethodDescription(string $doc, string $key = '@description'): string\n{\n $description = [];\n $flag = false;\n\n foreach (explode(PHP_EOL, $doc) as $line) {\n $line = ltrim($line, $characters = \" \\t\\n\\r\\0\\x0B*/#\");\n\n if (str_starts_with($line, $key)) {\n $flag = true;\n } elseif (str_starts_with($line, '@')) {\n $flag = false;\n }\n\n if ($flag) {\n $description[] = trim($line, $characters);\n }\n }\n\n return trim(substr(implode(' ', $description), strlen($key)));\n}", "title": "" }, { "docid": "6b83cb327d87cfc105afc8ed23cb6ed5", "score": "0.50772876", "text": "protected function searchContent() {\n\n//\t\techo \"search content <br>\";\n\n\t\t// Try locating the term in the contents.\n\t\t$files = $this->search($this->getPath().\"content\");\n\n\t\t$result = [];\n\n\t\t// We retrieved all content files holding the search term. Now we need to look if they are linked in page files\n\t\tforeach ($files as $file) {\n\t\t\t// Get Filename to search for in page content's component.\n\t\t\t$filename = $file->getFilename();\n\t\t\t// In Case we have multilanguage support and a language suffix in the file\n\t\t\t// We only need the filename without the suffix\n\n\t\t\t$name = substr($filename,0,strrpos($filename,\".\"));\n\t\t\tif ($pPos = strpos($name,\".\")) {\n\t\t\t\t$name = substr($name,0,$pPos);\n\t\t\t\t$suffix = substr($filename,strrpos($filename,\".\"));\n\t\t\t\t$filename = $name.$suffix;\n\t\t\t\t// I.E. \"welcome.de.html\" => \"welcome.html\"\n\t\t\t}\n\n\t\t\t$pagesWithTerm = $this->searchPage($this->prepareTerm($filename));\n\n\n\t\t\tforeach ($pagesWithTerm as $i => $pageWithTerm) {\n\n\t\t\t\t// filter results for component \"editable\" or content file=\"\"\n\t\t\t\t$includes = [\n\t\t\t\t'/{%\\s?component\\s?[\"|\\']editable[\"|\\']\\s?file=[\"|\\']([^\"\\']+)[\"|\\']\\s?%}/is',\n\t\t\t\t'/{%\\s?content\\s?[\"|\\']contacts\\.htm[\"\\']\\s?%}/is'];\n\t\t\t\t$contentRewritten = preg_replace($includes,$file->getContents(),$pageWithTerm->getContents());\n\t\t\t\t$contentRewritten = PageHelper::stripTwigTags($contentRewritten);\n\n\t\t\t\t$pageWithTerm->setContents($contentRewritten);\n\n\t\t\t\t$result[] = $pageWithTerm;\n\n\t\t\t}\n\n\n\t\t}\n\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "1f34719c1f8a9b28b21afece7668fe46", "score": "0.5062789", "text": "function find_marked_content( $url = \"/\", $cfg, $label, $status = array(-2,-1), $add_filter = array(), $check_privs = TRUE, $ignore = array() ) {\n global $db, $pathvars, $environment;\n\n $path = explode(\"/\",$url);\n $kategorie = array_pop($path);\n $ebene = implode(\"/\",$path);\n $new_releases = null;\n\n if ( !isset($environment[\"parameter\"][1]) ) $environment[\"parameter\"][1] = null;\n \n if ( $kategorie ) {\n $tmp_tname = eCRC($url);\n } else {\n $tmp_tname = \"\";\n }\n // gibt es bereiche, die nicht untersucht werden sollen\n $where = null; $filter = null;\n if ( count($ignore) > 0 ) {\n foreach ( $ignore as $value ) {\n $where[] = \"ebene NOT LIKE '\".$value.\"%'\";\n $where[] = \"kategorie NOT LIKE '\".$value.\"%'\";\n }\n $where = \" AND (\".implode(\" AND \",$where).\")\";\n }\n // zusaetzliche filter\n $buffer = array();\n foreach ( $add_filter as $key=>$value ) {\n switch ( $key ) {\n case \"user\":\n $buffer[] = \"byalias='\".$value.\"'\";\n break;\n case \"max_age\":\n $buffer[] = \"changed>='\".date(\"Y-m-d H:i:s\", mktime(0, 0, 0, date(\"m\"), (date(\"d\")-$value), date(\"Y\"))).\"'\";\n break;\n }\n }\n if ( count($buffer) > 0 ) $filter = \"AND \".implode(\" AND \",$buffer);\n $sql = \"SELECT *\n FROM site_text\n WHERE \n tname LIKE '\".$tmp_tname.\"%'\n \".$where.\"\n AND label='\".$label.\"'\n AND status IN (\".implode(\",\",$status).\")\n \".$filter.\"\n ORDER BY tname, status ASC, version DESC\";\n\n $result = $db -> query($sql);\n\n $dataset = \"\";\n while ( $data = $db -> fetch_array($result) ) {\n // weiterspringen, falls es von diesen content bereits eine freizugebene version gibt\n if ( $dataset == $data[\"tname\"].\"::\".$label ) continue;\n $dataset = $data[\"tname\"].\"::\".$label;\n\n if ( $data[\"ebene\"] == \"\" ) {\n $tname = $data[\"kategorie\"];\n } else {\n $tname = eCRC($data[\"ebene\"]).\".\".$data[\"kategorie\"];\n }\n $path = $data[\"ebene\"].\"/\".$data[\"kategorie\"];\n // rechte checken\n if ( $check_privs == TRUE || $_SESSION[\"uid\"] == \"\" ) {\n if ( $data[\"status\"] == -2 && !priv_check($path,\"publish\") ) {\n continue;\n } elseif ( $data[\"status\"] == -1 && !priv_check($path,\"edit;publish\") ) {\n continue;\n }\n }\n\n // titel\n $titel = \"---\";\n preg_match(\"/\\[H[0-9]{1}\\](.+)\\[\\/H/Us\",$data[\"content\"],$match);\n if ( count($match) > 1 ) {\n $titel = $match[1];\n }\n\n // link anpassen\n if ( $data[\"status\"] > 0 ) {\n $view_link = $pathvars[\"menuroot\"].$data[\"ebene\"].\"/\".$data[\"kategorie\"].\".html\";\n } else {\n $view_link = $pathvars[\"menuroot\"].$data[\"ebene\"].\"/\".$data[\"kategorie\"].\",v\".$data[\"version\"].\".html\";\n }\n\n // ggf kategorie\n $kategorie = \"---\";\n $ext = \"---\";\n if ( !empty($cfg[\"bloged\"][\"blogs\"][$url][\"category\"]) ) {\n preg_match(\"/\\[\".$cfg[\"bloged\"][\"blogs\"][$url][\"addons\"][\"name\"][\"tag\"].\"\\](.+)\\[\\/\".$cfg[\"bloged\"][\"blogs\"][$url][\"addons\"][\"name\"][0].\"/Us\",$data[\"content\"],$termine_match);\n if ( count($termine_match) > 1 ) {\n $ext = $termine_match[1];\n// if ( $data[\"status\"] > 0 ) {\n $view_link = $pathvars[\"menuroot\"].$data[\"ebene\"].\",,\".$data[\"kategorie\"].\".html\";\n// } else {\n// $view_link = $pathvars[\"menuroot\"].$data[\"ebene\"].\",,\".$data[\"kategorie\"].\",v\".$data[\"version\"].\".html\";\n// }\n }\n preg_match(\"/\\[\".$cfg[\"bloged\"][\"blogs\"][$url][\"category\"].\"\\](.+)\\[\\/\".$cfg[\"bloged\"][\"blogs\"][$url][\"category\"].\"/U\",$data[\"content\"],$match);\n if ( count($match) > 1 ) {\n $kategorie = $match[1];\n\n $path = $kategorie;\n }\n }\n\n // letzte aktuelle version finden\n $sql = \"SELECT *\n FROM site_text\n WHERE tname='\".$data[\"tname\"].\"'\n AND label='\".$data[\"label\"].\"'\n AND lang='\".$data[\"lang\"].\"'\n AND status=1\n ORDER BY version DESC\";\n $res_akt = $db -> query($sql);\n if ( $db->num_rows($res_akt) == 0 ) {\n $last_author = \"\";\n $last_uid = \"\";\n } else {\n $dat_akt = $db -> fetch_array($res_akt);\n $last_author = $dat_akt[\"byforename\"].\" \".$dat_akt[\"bysurname\"];\n $last_uid = $dat_akt[\"byalias\"];\n }\n\n // tabellen farben wechseln\n if ( @$cfg[$data[\"status\"]][\"color\"][\"set\"] == $cfg[\"wizard\"][\"color\"][\"a\"]) {\n $cfg[$data[\"status\"]][\"color\"][\"set\"] = $cfg[\"wizard\"][\"color\"][\"b\"];\n } else {\n $cfg[$data[\"status\"]][\"color\"][\"set\"] = $cfg[\"wizard\"][\"color\"][\"a\"];\n }\n\n // datum bearbeiten\n $tmp_date1 = explode(\" \",$data[\"changed\"]);\n $tmp_date = explode(\"-\",$tmp_date1[0]);\n $date = $tmp_date[2].\".\".$tmp_date[1].\".\".$tmp_date[0];\n\n // Sortierdatum\n $sort_date = $date;\n $sort_date_db = $data[\"changed\"];\n preg_match(\"/\\[SORT\\](.+)\\[\\/SORT\\]/Us\",$data[\"content\"],$match);\n if ( count($match) > 1 ) {\n $tmp_date1 = explode(\" \",$match[1]);\n $tmp_date = explode(\"-\",$tmp_date1[0]);\n $sort_date = $tmp_date[2].\".\".$tmp_date[1].\".\".$tmp_date[0];\n $sort_date_db = $match[1];\n }\n\n $new_releases[$data[\"status\"]][] = array(\n \"path\" => $path,\n \"tname\"=> $data[\"tname\"],\n \"preview\" => $pathvars[\"virtual\"].\"/wizard/show,\".$db->getDb().\",\".$tname.\",inhalt,,,verify.html\",\n \"titel\" => $titel,\n \"ext\" => $ext,\n \"kategorie\" => $kategorie,\n \"author\" => $data[\"byforename\"].\" \".$data[\"bysurname\"],\n \"last_author\" => $last_author,\n \"last_uid\" => $last_uid,\n \"changed\" => $date,\n \"changed_db\" => $data[\"changed\"],\n \"sort\" => $sort_date,\n \"sort_db\" => $sort_date_db,\n \"view\" => $view_link,\n \"edit\" => $pathvars[\"virtual\"].\"/wizard/show,\".$db->getDb().\",\".$tname.\",\".$label.\".html\",\n \"del\" => $pathvars[\"virtual\"].\"/wizard/delete,\".$db->getDb().\",\".$tname.\",\".$label.\".html\",\n \"unlock\" => $pathvars[\"virtual\"].\"/wizard/release,\".$environment[\"parameter\"][1].\",\".$tname.\",\".$label.\",unlock,\".$data[\"version\"].\".html\",\n \"release\" => $pathvars[\"virtual\"].\"/wizard/release,\".$environment[\"parameter\"][1].\",\".$tname.\",\".$label.\",release,\".$data[\"version\"].\".html\",\n \"history\" => $pathvars[\"virtual\"].\"/admin/contented/history,,\".$tname.\",\".$label.\",\".@$dat_akt[\"version\"].\",\".$data[\"version\"].\".html\",\n \"color\" => $cfg[$data[\"status\"]][\"color\"][\"set\"],\n \"status\" => $data[\"status\"],\n );\n }\n\n return $new_releases;\n }", "title": "" }, { "docid": "657b5995b1837fe586149fbedf0a2b38", "score": "0.50569123", "text": "function contentonly($phpWord,$value)\n{\n $text=$value->content;\n\t\t\n $textlines = explode(\"\\n\", $text);\t\t\n\t\n $contentonlysection=$phpWord->addSection(\n array(\n\t\t'pageSizeH' => 10800,\n\t\t'pageSizeW'\t => 10800,\n 'marginLeft' => 0,\n 'marginRight' => 0,\n 'marginTop' => 0,\n 'marginBottom' => 0,\n 'headerHeight' => 0,\n 'footerHeight' => 50,\n )\n );\n\t$contenttable=$contentonlysection->addTable();\n\t$contenttable->addRow();\t\n\t$contenttable->addCell(3000,array('valign' => 'top'))->addText(htmlspecialchars($value->title),array('name' => 'Times New Roman' ,'size' => 22.5 ,'color' => 'gray','bold' => true));\n\t\n\n\t\n\t$description=$contenttable->addCell(7800);\n\tfor ($i = 0; $i < sizeof($textlines); $i++) {\n $description->addText(htmlspecialchars($textlines[$i]),array('name' => 'Times New Roman' ,'size' => 10.5 ,'color' => 'gray'));\n\t\n\t}\n\t\n\t$footertable=$contentonlysection->addFooter()->addTable();\n $footertable->addRow();\n $logo=url('/').'/'.$value->upload_path.trim($value->logo);\n\t$logo=str_replace(\" \",\"%20\",\"$logo\");\n\tif(@is_array(getimagesize($logo))){\n $footertable->addCell(2250)->addImage($logo,array('width' => 150, 'height' => 50)); \n\t}\n}", "title": "" }, { "docid": "b328e00e3b60fdc41e7467688bfa10d4", "score": "0.5052681", "text": "function i_doc_line($ln) {\r\n global $i_doc_info, $i_doc_class, $i_doc_id, $i_doc_t, $i_doc_ref, $i_doc_err, $i_doc_n, $i_doc_file;\r\n $typs= array (\r\n // uvozují popis\r\n 'f'=>'Function',\r\n 'o'=>'Options',\r\n 'i'=>'Fire',\r\n 'c'=>'Class',\r\n // doplňují popis\r\n 'a'=>'Arguments','r'=>'Returns','e'=>'Events', 'x'=>'Examples',\r\n 't'=>'Extends', // pouze u Class - záznam seznamu tříd do doc.extends => rozšíření seznamu\r\n 'h'=>'History',\r\n 's'=>'Section'\r\n );\r\n if ( count($ln)==2 ) {\r\n // ukončené počatého souvislého komentáře\r\n if ( count($i_doc_info) && ( $i_doc_class || $i_doc_id ) )\r\n // ukončení předchozího popisu\r\n i_doc_final($i_doc_class,$i_doc_id,$i_doc_info[\"$i_doc_class.$i_doc_id\"],$i_doc_t);\r\n }\r\n else {\r\n// debug($ln);\r\n $typ= trim($ln[2]); // typ informace, pokud je vynechán, jde o pokračování\r\n $t= substr($typ,0,strpos($typ,':'));\r\n $ref= $i_doc_ref= $t=='' ? $i_doc_ref : (\r\n strstr('oifc',$t[0]) ? strtr($t[0],$typs) : strtr($t,$typs));\r\n// if ( $t[0]=='i' ) display(\"=$i_doc_ref\");\r\n $info= trim(str_replace(\"\\r\",'',$ln[4]));\r\n $t= substr($typ,0,strpos($typ,':'));\r\n if ( $t[0] && strstr('oifc',$t[0]) ) {\r\n // zpracování začátku popisu elementu tj.\r\n //c: třída [ popis]\r\n //i: [třída.]událost [ popis]\r\n //f?: [třída.]funkce [ argumenty ] - metoda\r\n //o?: [třída.]options [ popis]\r\n if ( count($i_doc_info) && ( $i_doc_class || $i_doc_id ) )\r\n // ukončení předchozího popisu\r\n i_doc_final($i_doc_class,$i_doc_id,$i_doc_info[\"$i_doc_class.$i_doc_id\"],$i_doc_t);\r\n // zjištění složek kvalifikovaného jména\r\n $i_doc_t= $t;\r\n $si= explode('.',$info);\r\n if ( count($si)>1 ) {\r\n $i_doc_class= trim($si[0]);\r\n $ssi= explode(' ',$si[1]);\r\n $i_doc_id= trim($ssi[0]);\r\n }\r\n else {\r\n $si= explode(' ',$info);\r\n switch ($t[0]) {\r\n case 'c':\r\n $i_doc_class= trim($si[0]); $i_doc_id= ''; break;\r\n case 'i':\r\n $i_doc_class= trim($si[0]); $i_doc_id= ''; break;\r\n case 'f':\r\n $i_doc_class= ''; $i_doc_id= trim($si[0]); break;\r\n case 'o':\r\n $i_doc_class= ''; $i_doc_id= trim($si[0]); break;\r\n }\r\n }\r\n $i_doc_n++;\r\n // $i_doc_class= třída; $i_doc_id= část; $i_doc_n= pořadí popisu\r\n if ( is_array($i_doc_info[\"$i_doc_class.$i_doc_id\"]) ) {\r\n // pokus o nový popis již popsaného\r\n $i_doc_err.= \"\\n$info -- duplicitní definice\";\r\n $i_doc_id.= \"/$i_doc_n\";\r\n }\r\n $i_doc_info[\"$i_doc_class.$i_doc_id\"]= array();\r\n $i_doc_info[\"$i_doc_class.$i_doc_id\"][$ref].= \"$info\\n\";\r\n }\r\n else if ( $i_doc_ref ) {\r\n // další vlastnost předchozího elementu - přenáší se celá\r\n $i_doc_info[\"$i_doc_class.$i_doc_id\"][$ref].= \"$info\\n\";\r\n }\r\n// if ( $t[0]=='i' ) debug($i_doc_info[\"$i_doc_class.$i_doc_id\"],\"$i_doc_class.$i_doc_id as $i_doc_ref\");\r\n }\r\n}", "title": "" }, { "docid": "7c13244f3ccbce2e581f67f2bdd1094a", "score": "0.5049919", "text": "private function elementListing() : array {\n return [\n '!doctype /', // \tDefines a document type \t \n 'a', // \tSpecific a anchor (Hyperlink) Use for link in internal/external web documents. \t \n 'abbr', // \tDescribes an abbreviation (acronyms) \t \n 'acronym', // \tDescribes an acronyms \t\n 'address', // \tDescribes an address information \t \n 'applet', // \tEmbedding an applet in HTML document \t\n 'area /', // \tDefines an area in an image map \t \n 'article', // \tDefines an article \t\n 'aside', // \tDescribes contain set(or write) on aside place in page contain \t\n 'audio', // \tSpecific audio content \t\n 'b', // \tSpecific text weight bold \t \n 'base /', // \tDefine a base URL for all the links with in a web page \t \n 'basefont', // \tDescribes a default font color, size, face in a document \t\n 'bb', // \tDefine browser command, that command invoke as per client action \n 'bdo', // \tSpecific direction of text display \t \n 'big', // \tDefines a big text \t\n 'blockquote', // \tSpecifies a long quotation \t \n 'body', // \tDefines a main section(body) part in HTML document \t \n 'br /', // \tSpecific a single line break \t \n 'button', // \tSpecifies a press/push button \t \n 'canvas', // \tSpecifies the display graphics on HTML web documment \t\n 'caption', // \tDefine a table caption \t \n 'center', // \tSpecifies a text is display in center align \t\n 'cite', // \tSpecifies a text citation \t \n 'code', // \tSpecifies computer code text \t \n 'col /', // \tSpecifies a each column within a 'colgroup' element in table \t \n 'colgroup', // \tDefines a group of one or more columns inside table \t \n 'command /', // \tDefine a command button, invoke as per user action \t\n 'datagrid', // \tDefine a represent data in datagrid either list wise or tree wise\n 'datalist', // \tDefine a list of pre-defined options surrounding 'input',\n 'dd', // \tDefines a definition description in a definition list \t \n 'del', // \tSpecific text deleted in web document \t \n 'details', // \tDefine a additional details hide or show as per user action \t\n 'dfn', // \tDefine a definition team \t \n 'dialog', // \tDefine a chat conversation between one or more person\n 'dir', // \tDefine a directory list \t\n 'div', // \tDefine a division part \t \n 'dl', // \tDefine a definition list \t \n 'dt', // \tDefine a definition team \t \n 'em', // \tDefine a text is emphasize format \t \n 'embed /', // \tDefine a embedding external application using a relative plug-in \t\n 'eventsource', // \tDefines a source of event generates to remote server\n 'fieldset', // \tDefines a grouping of related form elements \t \n 'figcaption', // \tRepresents a caption text corresponding with a figure element \t\n 'figure', // \tRepresents self-contained content corresponding with a 'figcaption' element \t\n 'font', // \tDefines a font size, font face and font color for its text \t\n 'footer', // \tDefines a footer section containing details about the author, copyright, contact us, sitemap, or links to related documents. \t\n 'form', // \tDefines a form section that having interactive input controls to submit form information to a server. \t \n 'frame', // \tDefines frame window. \t\n 'frameset', // \tUsed to holds one or more 'frame' elements. \t\n 'h1', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'h2', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'h3', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'h4', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'h5', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'h6', // \tDefines a Headings level from 1 to 6 different sizes. \t \n 'head', // \tDefines header section of HTML document. \t \n 'header', // \tDefines as a container that hold introductory content or navigation links. \t\n 'hgroup', // \tDefines the heading of a section that hold the h1 to h6 tags. \n 'hr /', // \tRepresent a thematic break between paragraph-level tags. It is typically draw horizontal line. \t \n 'html', // \tDefine a document is a HTML markup language \t \n 'i', // \tDefines a italic format text \t \n 'iframe', // \tDefines a inline frame that embedded external content into current web document. \t \n 'img /', // \tUsed to insert image into a web document. \t \n 'input /', // \tDefine a get information in selected input \t \n 'ins', // \tUsed to indicate text that is inserted into a page and indicates changes to a document. \t \n 'isindex', // \tUsed to create a single line search prompt for querying the contents of the document. \t\n 'kbd', // \tUsed to identify text that are represents keyboard input. \t \n 'keygen /', // \tUsed to generate signed certificate, which is used to authenticate to services.\n 'label', // \tUsed to caption a text label with a form 'input' element. \t \n 'legend', // \tUsed to add a caption (title) to a group of related form elements that are grouped together into the 'fieldset' tag.\n 'li', // \tDefine a list item either ordered list or unordered list.\n 'link /', // \tUsed to load an external stylesheets into HTML document. \t \n 'map', // \tDefines an clickable image map. \t \n 'mark', // \tUsed to highlighted (marked) specific text. \t\n 'menu', // \tUsed to display a unordered list of items/menu of commands. \t \n 'meta /', // \tUsed to provide structured metadata about a web page. \t \n 'meter', // \tUsed to measure data within a given range. \t\n 'nav', // \tUsed to defines group of navigation links. \t\n 'noframes', // \tUsed to provide a fallback content to the browser that does not support the 'frame' element. \t\n 'noscript', // \tUsed to provide an fall-back content to the browser that does not support the JavaScript. \t \n 'object', // \tUsed to embedded objects such as images, audio, videos, Java applets, and Flash animations. \t \n 'ol', // \tDefines an ordered list of items. \t \n 'optgroup', // \tUsed to create a grouping of options, the related options are grouped under specific headings. \t \n 'option', // \tRepresents option items within a 'select', 'optgroup' or 'datalist' element. \t \n 'output', // \tUsed for representing the result of a calculation. \t\n 'p', // \tUsed to represents a paragraph text. \t \n 'param /', // \tProvides parameters for embedded object element. \t \n 'pre', // \tUsed to represents preformatted text. \t \n 'progress', // \tRepresents the progress of a task. \t\n 'q', // \tRepresents the short quotation. \t \n 'rp', // \tUsed to provide parentheses around fall-back content to the browser that does not support the ruby annotations. \t\n 'rt', // \tSpecifies the ruby text of ruby annotation. \t\n 'ruby', // \tUsed to represents a ruby annotation. \t\n 's', // \tText display in strikethrough style. \t \n 'samp', // \tRepresents text that should be interpreted as sample output from a computer program. \t \n 'script', // \tDefines client-side JavaScript. \t \n 'section', // \tUsed to divide a document into number of different generic section. \t\n 'select', // \tUsed to create a drop-down list. \t \n 'small', // \tUsed to makes the text one size smaller. \t \n 'source /', // \tUsed to specifies multiple media resources. \t\n 'span', // \tUsed to grouping and applying styles to inline elements. \t \n 'strike', // \tRepresents strikethrough text. \t\n 'strong', // \tRepresents strong emphasis greater important text. \t \n 'style', // \tUsed to add CSS style to an HTML document. \t \n 'sub', // \tRepresents inline subscript text. \t \n 'sup', // \tRepresents inline superscript text. \t \n 'table', // \tUsed to defines a table in an HTML document. \t \n 'tbody', // \tUsed for grouping table rows. \t \n 'td', // \tUsed for creates standard data cell in HTML table. \t \n 'textarea', // \tCreate multi-line text input. \t \n 'tfoot', // \tUsed to adding a footer to a table that containing summary of the table data. \t \n 'th', // \tUsed for creates header of a group of cell in HTML table. \t \n 'thead', // \tUsed to adding a header to a table that containing header information of the table. \t \n 'time', // \tRepresents the date and/or time in an HTML document. \t\n 'title', // \tRepresents title to an HTML document. \t \n 'tr', // \tDefines a row of cells in a table. \t \n 'track /', // \tRepresents text tracks for both the 'audio', and 'video' tags. \t\n 'tt', // \tRepresents teletype text. \t\n 'u', // \tRepresents underlined text. \t \n 'ul', // \tDefines an unordered list of items. \t \n 'var', // \tRepresents a variable in a computer program or mathematical equation. \t \n 'video', // \tUsed to embed video content. \t\n 'wbr /' // \tDefines a word break opportunity in a long string of text. \t\n ];\n }", "title": "" }, { "docid": "76b951799d9c86162d05944a3b9b6bcf", "score": "0.504844", "text": "public function render(){\n\t\t\t$res='/'.'**'.CRLF.str_replace(CR,CRLF.' * ',str_replace(LF,CR,str_replace(CRLF,CR,$this->description)));\n\t\t\t$tag=new PhpDocTag(); // phpdoc hack\n\t\t\tforeach($this->taglines as $tag)\n\t\t\t\t$res.=CRLF.' * '.$tag->doctag.' '.str_replace(CR,CRLF.' * ',str_replace(LF,CR,str_replace(CRLF,CR,$tag->content)));\n\t\t\t$res.=' *'.'/';\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "aa2721b548e2e281271f22d538793033", "score": "0.50404626", "text": "function getMetaTags($siteUrl)\n{\n $html = getSiteContents($siteUrl);\n\n $doc = new DOMDocument();\n @$doc->loadHTML($html);\n\n\n $metaTitle = $doc->getElementsByTagName('title')->item(0)->nodeValue; //title found\n $metaDescription = \"\";\n $metaDescriptions = array();\n $metaTags = $doc->getElementsByTagName('meta');\n $k = 0;\n for ($i = 0; $i < $metaTags->length; $i++) {\n $mTag = $metaTags->item($i);\n\n if ('description' == trim($mTag->getAttribute('name'))) {\n $metaDescription = trim($mTag->getAttribute('content'));\n $metaDescriptions[$k] = $metaDescription;\n $k++;\n }\n }\n\n return array($metaTitle, $metaDescriptions);\n}", "title": "" }, { "docid": "55f956dc29c90afd984248b020589d6f", "score": "0.5040022", "text": "public function _self_doc()\n\t{\n\t\t$info = array(\n\t\t\t'url' => array(\n\t\t\t\t'description' => array(// a single sentence to explain the purpose of this method\n\t\t\t\t\t'en' => 'shortten url and return'\n\t\t\t\t),\n\t\t\t\t'single' => true,// will it work as a single tag?\n\t\t\t\t'double' => false,// how about as a double tag?\n\t\t\t\t'variables' => '',// list all variables available inside the double tag. Separate them|like|this\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'get' => array(// this is the name=\"World\" attribute\n\t\t\t\t\t\t'type' => 'url',// Can be: slug, number, flag, text, array, any.\n\t\t\t\t\t\t'flags' => '',// flags are predefined values like asc|desc|random.\n\t\t\t\t\t\t'default' => 'current uri',// this attribute defaults to this if no value is given\n\t\t\t\t\t\t'required' => true,// is this attribute required?\n\t\t\t\t\t),\n\t\t\t\t\t'tag' => array(\n\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t'flags' => '1|0',\n\t\t\t\t\t\t'default'=>'1',\n\t\t\t\t\t\t'required'=>true\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "9cdfa308b904af6c45e903404d3734ae", "score": "0.5030489", "text": "function workUrl($url) {\r\n\t$content='';\r\n\t$article=file_get_contents(trim($url));\r\n\tif(strpos($article,'<!-- 正文开始 -->')){\r\n\t\tpreg_match('/<!-- 正文开始 -->([\\s\\S]*)<!-- 正文结束 -->/', $article, $content);\r\n\t}else{\r\n\t\tpreg_match('/<!-- 内容区 -->([\\s\\S]*)<!--\\/内容区-->/', $article, $content);\r\n\t}\r\n\t//$content = str_replace(PHP_EOL . PHP_EOL, PHP_EOL, strip_tags($content[0]));\r\n\t$content = str_replace(' ', ' ', $content[0]);\r\n\t\r\n\t\r\n\t$content=str_ireplace('`', '\\\\`', $content);\r\n\t$content=str_replace('*','\\\\*', $content);\r\n\t$content=str_replace('~', '\\\\~', $content);\r\n\t$content=str_ireplace('<strong>', '**', $content);\r\n\t$content=str_ireplace('</strong>', '**', $content);\r\n\t$content=str_ireplace('<em>', '*', $content);\r\n\t$content=str_ireplace('</em>', '*', $content);\r\n\t\r\n\tpreg_match('/<title>(.*?)_(.*)<\\/title>/', $article, $title);\r\n\t$title = str_replace('&nbsp;', ' ', strip_tags($title[0]));\r\n\t$title=str_replace('_','\\\\_', $title);\r\n\t$result['title'] = $title;\r\n\t$result['content'] = $content;\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "65b1571a8c65c0632cb9e698632de5db", "score": "0.50264025", "text": "public function document() {\n Timer::start(__METHOD__);\n \n $title = $this->params['title'];\n $type = $this->params['type'];\n $type = strtolower($type);\n \n $cache = Cache::get('dynamicCache');\n $cacheKey = Util::makeCacheKey($this->pageName . '_' . $title);\n if (!$row = $cache->getItem($cacheKey)) {\n \t//在原先文档转换过程中,将空格转换为下划线\n \t$title = str_replace(\" \",\"_\",$title);\t\n \t\t$articleModel = new ArticleCms();\n \t\t$params = array();\n \t\t$row = array();\n \t\t$params['title'] = $title;\n\t\t\t$row['description'] = $articleModel->fetchContent('document',$params);\n\t\t\t\n \tif ($row['description']) {\n \t\t\t$cache->setItem($cacheKey, $row);\n \t\t\t$item = $cache->getItem($cacheKey);\n \t}\n }\n \n if(!$row['description']){\n\t\t\t$this->_redirectToUrl('/');\n }\n $document = $row['description'];\n \t\n $data = Data::getInstance();\n\n \tif ((false !== stripos($document, '@meta.begin')) && (false !== stripos($document, '@meta.end'))) {\n \t\t\n\t \t$parseHelper = Util::getViewHelper('ParseContent');\n\t\t \t\t\n\t preg_match('/\\@meta\\.title=\"([^\"]+)\"/i', $document, $matches);\n\t if ($matches && !empty($matches[1])) {\n\t \t$pageTitle = Util::formatString($parseHelper($matches[1]));\n\t \t$tplParams['meta_title'] = $pageTitle;\n\t \tif ($data->has('tplParams')) {\n\t \t\t$tplParams = array_merge($tplParams, $data->get('tplParams'));\n\t \t}\n\t \t$data->set('tplParams', $tplParams);\n\t }\n \t\t\n \tpreg_match('/\\@meta\\.description=\"([^\"]+)\"/i', $document, $matches);\n \tif ($matches && !empty($matches[1])) {\n \t\t$metaDescription = Util::formatString($parseHelper($matches[1]));\n \t\t$tplParams['meta_description'] = $metaDescription;\n \t\tif ($data->has('tplParams')) {\n \t\t\t$tplParams = array_merge($tplParams, $data->get('tplParams'));\n \t\t}\n \t\t$data->set('tplParams', $tplParams);\n \t}\n \t\t\n// \tpreg_match('/\\@meta\\.keywords=\"([^\"]+)\"/i', $document, $matches);\n// \tif ($matches && !empty($matches[1])) {\n// \t\t$metaKeywords = Util::formatString($parseHelper($matches[1]));\n// \t\t$tplParams['meta_keywords'] = $metaKeywords;\n// \t\tif ($data->has('tplParams')) {\n// \t\t\t$tplParams = array_merge($tplParams, $data->get('tplParams'));\n// \t\t}\n// \t\t$data->set('tplParams', $tplParams);\n// \t} \n }\n \t\n $pageVariables['description'] = $document;\n $pageVariables['params'] = $this->params;\n $data = Data::getInstance();\n $result = array_merge($data->getData(), $pageVariables);\n $viewModel = new ViewModel($result);\n $viewModel->setTemplate('application/document/document.phtml');\n \n Timer::end(__METHOD__);\n \n return $viewModel;\n\t\t\n }", "title": "" }, { "docid": "28bb5929f539a8f892c8bbd570b28e8d", "score": "0.50207263", "text": "function get_node_info($id,$link) {\n $link->query(sprintf(\"select * from razd where id='%d' and site='%d'\",$id,$this->sitenumber));\n $info=$link->next_record();\n $info['keywords']=explode(\",\",$info['keywords']);\n if (empty($info['keywords'][0])) {unset($info['keywords']);} \n return($info);\n }", "title": "" }, { "docid": "6e1b5b52c4e822c86dd567d7fd48dbe5", "score": "0.5020192", "text": "function meta_tag($img, $description_g=\"\", $description=\"\", $title_page=\"\", $more_tags=\"\") {\n if(is_array($img)) {\n $description_g = $img[1];\n $description = $img[2];\n $title_page = $img[3];\n $more_tags = $img[4];\n $img = $img[0];\n }\n $description_g = preg_replace('/[\\s]+/', ' ', $description_g);\n $description = preg_replace(\"/[\\s]+/\", \" \", $description);\n $tag = 'absences, vacances, arroser, jardin, effectuer, rondes, nourrir, animaux, aide, menagere, nettoyage, repassage, garde, promenade, toilettage, automobile, changement, pieces, reparations, vidange, accompagnement, ecole, activite, enfant, bricolage, monter, meuble, travaux, manuels, reparations, coaching, conseils, cuisine, decoration, jeux, sport, conseils, cours, particuliers, langues, matieres, scientifiques, musique, courses, demarches, administratives, faire, demenagement, festivites, preparation , fete, animation, musicale, bar, restauration, informatique, assistance, maintenance, reparation, redaction, documents, soins, beaute, coiffure, epilation, manucure, massage, entretien, habitat, electricite, jardinage, maconnerie, peinture, plomberie, swappy, echange, gratuit, services, sel, bricolage, baby-sitting, troc, partage, entraide, communaute, utilisateur, swappeur, non-lucratif, generosite, entre-aide, amitie, temps, rencontre, competences, particuliers, entraide, annonce, garder, local, malin, consommer, consommation, collaborative, economie';\n\t\t //AJOUT DE MOT CLES\n if(!empty_($more_tags)) {\n $more = preg_split(\"/( |\\'|\\,|\\.|\\-|[\\s]|[\\s+])/\", strtolower($this->stripAccents(trim($more_tags))));\n $al = preg_split(\"/\\, /\", $tag);\n foreach($more as $key => $value) {\n\t\t\t\t$value = preg_replace('#[^[:alnum:]]#u', '', trim($value));\n if(strlen($value) > 2) {\n if(!$this->in_array_r(\"/\".preg_replace(\"/(.*?)s$/\", \"$1\", $value).\"($|s$)/\", $al)) {\n $tag .= ', '.trim($value);\n }\n }\n }\n }\n if(empty_($img)) {\n $img=\"image.jpg\";\n }\n if(preg_match(\"/\\//\", $img)) {\n $base = basename($img);\n $dir = dirname($img);\n $makef = 0;\n if($dir == \"img/user/upload\") {\n $dir = \"img/social/{TYPE}/user/\";\n $makef = 1;\n }\n $list = array(\"facebook\", \"google\", \"twitter\");\n if($makef == 1) {\n for($i=0;$i<count($list);$i++) {\n $file = preg_replace(\"/\\{TYPE\\}/\", $list[$i], $dir.$base);\n $im = $img_ = \"\";\n\t\t\t\t\t//CREATION MINIATURE SI INEXISTANTE\n if(!file_exists($file)) {\n $im = imagecreatefromstring(file_get_contents($img));\n if ($im !== false) {\n if($list[$i] == \"google\") {\n $w = $h = 190;\n }\n if($list[$i] == \"facebook\") {\n $w = $h = 210;\n }\n if($list[$i] == \"twitter\") {\n $w = $h = 180;\n }\n $img_ = imagecreatetruecolor($w,$h);\n imagecopyresampled($img_,$im,0,0,0,0,$w,$h,imagesx($im),imagesy($im));\n imagejpeg($img_,$file,100); \n imagedestroy($img_);\n }\n }\n ${substr($list[$i],0,1).\"img\"} = ''.URL_SITE.''.FOLDER_.$file;\n }\n } else {\n $gimg = ''.URL_SITE.''.FOLDER_.\"img/social/google/\".basename($img).\"\";\n $fimg = ''.URL_SITE.''.FOLDER_.\"img/social/facebook/\".basename($img).\"\";\n $timg = ''.URL_SITE.''.FOLDER_.\"img/social/twitter/\".basename($img).\"\";\n }\n \n } else {\n $gimg = ''.URL_SITE.''.FOLDER_.\"img/social/google/\".$img.\"\";\n $fimg = ''.URL_SITE.''.FOLDER_.\"img/social/facebook/\".$img.\"\";\n $timg = ''.URL_SITE.''.FOLDER_.\"img/social/twitter/\".$img.\"\";\n }\n if(empty_($title_page)) {\n $title_page = \"Échanges de services gratuits entre particuliers\";\n }\n if(empty_($description_g)) {\n $description_g = 'Swappy, la plateforme d’échanges de services gratuits entre particuliers ! Proposez/recherchez des services sur ce nouveau site d\\'annonces dédié à l\\'entraide.'; \n } \n if(empty_($description)) {\n $description = $description_g; \n }\n $ogurl = basename($_SERVER['REQUEST_URI']);\n $html = '<meta name=\"description\" content=\"'.$description_g.'\">\n <meta name=\"keywords\" content=\"'.$tag.'\">\n <!-- Schema.org markup for Google+ -->\n <meta itemprop=\"name\" content=\"Swappy.fr - '.$title_page.'\">\n <meta itemprop=\"description\" content=\"'.$description_g.'\">\n <meta itemprop=\"image\" content=\"'.$gimg.'\">\n <!-- Twitter Card data -->\n <meta name=\"twitter:card\" content=\"summary\">\n <meta name=\"twitter:url\" content=\"'.URL_SITE.''.FOLDER_.'\">\n <meta name=\"twitter:site\" content=\"@_Swappy\">\n <meta name=\"twitter:title\" content=\"Swappy.fr - '.$title_page.'\">\n <meta name=\"twitter:description\" content=\"'.$description_g.'\">\n <meta name=\"twitter:image\" content=\"'.$timg.'\">\n <!-- Open Graph data -->\n <meta property=\"og:locale\" content=\"fr_FR\">\n <meta property=\"og:title\" content=\"Swappy.fr - '.$title_page.'\">\n <meta property=\"og:type\" content=\"website\">\n <meta property=\"og:url\" content=\"'.URL_SITE.''.FOLDER_.$ogurl.'\">\n <meta property=\"og:image\" content=\"'.$fimg.'\">\n <meta property=\"og:description\" content=\"'.$description_g.'\">\n <meta property=\"og:site_name\" content=\"Swappy.fr - '.$title_page.'\">\n ';\n return $html;\n }", "title": "" }, { "docid": "7f6c1f012476c0d028110dd83b410f7d", "score": "0.50142866", "text": "function titleKeyWords()\n\t{\n\t\tif(isset($_REQUEST['drinkID']))\n\t\t{\n\t\t\tprint get_drink_nameByDrinkID($_REQUEST['drinkID']).' - Екзотични коктейли, алкохолни и безалкохолни напитки, шейкове, сиропи, нектари, концентрати и още';\n\t\t}\n\t\telseif(isset($_REQUEST['drink_category']) OR isset($_REQUEST['category']))\n\t\t{\n\t\t\tprint get_drink_category(($_REQUEST['drink_category'] > 0 ? $_REQUEST['drink_category'] : $_REQUEST['category'])).' - Екзотични коктейли, алкохолни и безалкохолни напитки, шейкове, сиропи, нектари, концентрати и още';\n\t\t}\t\t\n\t\telse \n\t\t{\n\t\t\tprint 'Екзотични коктейли, алкохолни и безалкохолни напитки, шейкове, сиропи, нектари, концентрати и още';\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "a3c3e3b40ae847f09f00b189d5c08e49", "score": "0.50104475", "text": "public function add_keywords_description($description, $keywords='', $limit=50){\n \n if($description=='') return;\n \n $tpl = RMTemplate::get();\n $tc = TextCleaner::getInstance();\n $description = strip_tags($description);\n $tpl->add_meta('description', $tc->truncate($description, 255));\n if($keywords!=''){\n $tpl->add_meta('keywords', $keywords);\n return;\n }\n \n $description = preg_replace(\"/[^[[:alnum:]]]|[\\.,:]/\",'', $description);\n $description = preg_replace(\"/[[:space:]][[:alnum:]]{0,4}[[:space:]]/\",' ',$description);\n \n $words = explode(\" \", $description);\n asort($words);\n $keys = array_rand($words, $limit>count($words) ? count($words) : $limit);\n \n foreach($keys as $id){\n $keywords .= $keywords=='' ? $words[$id] : ', '.$words[$id];\n }\n \n $tpl->add_meta('keywords', $keywords);\n \n }", "title": "" }, { "docid": "c77c7f3b5f8b9a259dbb06d6e99eb64f", "score": "0.50092304", "text": "function prepare_descr_html($html,$cat,$image='',$id='') {\n global $lang_input_all_names, $lang_input_all_values, $lang_category, $translation_type_tr;\n\n if (!isset($GLOBALS['lang_input_all_names'])) {\n include $GLOBALS['WWW_ROOT'] . 'lang/details.php_' . get_lang() . '.php';\n }\n\n // A empty line before description\n $rez = str_replace('<b>descr</b>','<br><b>descr</b>',$html);\n\n $rez = str_replace($lang_input_all_names,$lang_input_all_values,$rez);\n if(isset($lang_category[$cat])) {\n $rez = str_replace('%category%',$lang_category[$cat],$rez);\n }\n if ($image) {\n $rez = '<img src=\"'.$GLOBALS['torrent_img_dir_www'].'/'.$id.'_'.$image.'\"><br><br>'.$rez;\n }\n\n $translation_type_what = array();\n $translation_type_to = array();\n foreach($translation_type_tr AS $what=>$to) {\n $translation_type_what[] = 'language_type{'.$what.'}';\n $translation_type_to[] = '<br><b><a href=\"/forum.php?action=viewtopic&topicid=378913\" target=\"_blank\">'.__('Traducere').'</a></b>: ' . $to;\n }\n $rez = str_replace($translation_type_what,$translation_type_to,$rez);\n\n return $rez;\n}", "title": "" }, { "docid": "51594fbef154a5a6885a2c0c122c1084", "score": "0.50080144", "text": "function getTutorials($filelist)\n {\n $list = $tutorials = array();\n foreach($filelist as $file)\n {\n if (strpos($file,'tutorials/') !== false)\n {\n $tutedir = explode('/',substr($file,strpos($file,'tutorials/')));\n array_shift($tutedir);\n if (count($tutedir) <= 3)\n {\n $res = array();\n // kludge - will need to fix for 2.0\n $res['category'] = $GLOBALS['phpDocumentor_DefaultCategoryName'];\n $res['package'] = array_shift($tutedir);\n $res['subpackage'] = '';\n if (count($tutedir) > 1)\n $res['subpackage'] = array_shift($tutedir);\n $f = array_shift($tutedir);\n $res['tutename'] = $f;\n $f = explode('.',$f);\n $res['tutetype'] = array_pop($f);\n if ($res['tutetype'] == 'ini') continue;\n $res['path'] = $file;\n if (@file_exists($file . '.ini'))\n {\n $res['ini'] = phpDocumentor_parse_ini_file($file . '.ini', true);\n } else\n {\n $res['ini'] = false;\n }\n $tutorials[] = $res;\n }\n } else $list[] = $file;\n }\n return array($list,$tutorials);\n }", "title": "" }, { "docid": "5741623bc885d27c0d9787e3f3485a05", "score": "0.5007974", "text": "public function list_help()\n\t{\n\t\t//$this->db->select('title');\n\t\t$query = $this->db->get($this->dbtable);\n\t\t$list = $query->result_array();\n\t\tforeach ($list as &$item)\n\t\t{\n\t\t\t$content = $item['content'];\n\t\t\t$bang = explode(\"\\n\" , $content);\n\t\t\t$content = strip_tags($bang[0]);\n\t\t\t$item['content'] = $content;\n\t\t}\n\t\treturn ($list);\n\t}", "title": "" }, { "docid": "65d5bf57c7e9730cb4028fc10bce58ee", "score": "0.50045335", "text": "function extractKeywords($description) {\n $stopWords = [\"a\", \"about\", \"above\", \"after\", \"again\", \"against\", \"all\", \"am\", \"an\", \"and\", \"any\", \"are\", \"as\", \"at\", \"be\", \"because\", \"been\", \"before\", \"being\", \"below\", \"between\", \"both\", \"but\", \"by\", \"could\", \"did\", \"do\", \"does\", \"doing\", \"down\", \"during\", \"each\", \"few\", \"for\", \"from\", \"further\", \"had\", \"has\", \"have\", \"having\", \"he\", \"he'd\", \"he'll\", \"he's\", \"her\", \"here\", \"here's\", \"hers\", \"herself\", \"him\", \"himself\", \"his\", \"how\", \"how's\", \"i\", \"i'd\", \"i'll\", \"i'm\", \"i've\", \"if\", \"in\", \"into\", \"is\", \"it\", \"it's\", \"its\", \"itself\", \"let's\", \"me\", \"more\", \"most\", \"my\", \"myself\", \"nor\", \"of\", \"on\", \"once\", \"only\", \"or\", \"other\", \"ought\", \"our\", \"ours\", \"ourselves\", \"out\", \"over\", \"own\", \"same\", \"she\", \"she'd\", \"she'll\", \"she's\", \"should\", \"so\", \"some\", \"such\", \"than\", \"that\", \"that's\", \"the\", \"their\", \"theirs\", \"them\", \"themselves\", \"then\", \"there\", \"there's\", \"these\", \"they\", \"they'd\", \"they'll\", \"they're\", \"they've\", \"this\", \"those\", \"through\", \"to\", \"too\", \"under\", \"until\", \"up\", \"very\", \"was\", \"we\", \"we'd\", \"we'll\", \"we're\", \"we've\", \"were\", \"what\", \"what's\", \"when\", \"when's\", \"where\", \"where's\", \"which\", \"while\", \"who\", \"who's\", \"whom\", \"why\", \"why's\", \"with\", \"would\", \"you\", \"you'd\", \"you'll\", \"you're\", \"you've\", \"your\", \"yours\", \"yourself\", \"yourselves\"];\n\n // Convert description to lowercase and tokenize into words\n $words = str_word_count(strtolower($description), 1);\n\n // Filter out stopwords, words with length less than 3, and get the frequency of each word\n $filteredWords = array_filter($words, function($word) use ($stopWords) {\n return !in_array($word, $stopWords) && strlen($word) >= 3;\n });\n\n $wordFrequencies = array_count_values($filteredWords);\n\n // Sort by frequency\n arsort($wordFrequencies);\n\n // Return the top 10 words\n return array_slice(array_keys($wordFrequencies), 0, 10);\n}", "title": "" }, { "docid": "5526a36939880fd6670a7092ca10d08f", "score": "0.4987379", "text": "public function top_links_and_content(\n $readme_edit_url, $readme_md2htm_url, &$data\n )\n {\n /**\n * D I S P L A Y T O P L I N K S\n */\n ?>\n <div>\n <!-- parent::getconf('PATHALLSITES_WSDOC')\n //$urlqry = QS .'Home/&fle='.$path; was QS .'p/edit/&fle=readme.md\n //QS .'p/md2htm/&fle= target=\"_blank\"\n -->\n <a href=\"<?=$readme_edit_url?>\" title=\"SimpleMDE edit readme.md\">\n Edit readme.md</a>\n &nbsp;\n <a href=\"<?=$readme_md2htm_url?>\" title=\"Parse down readme.md md to html\">\n HTML</a>\n\n </div>\n <?php\n\n\n /**\n * D i s p l a y m o d e l d a t a\n * D I S P L A Y (BLOCK, LIST OF) FILES\n */\n foreach($data as $htmlline) { echo $htmlline; }\n //echo '<br/><br/><hr/>e n d o f &nbsp; '.__FILE__;\n //echo '<br/>default view $this->pgtxt_name_def = lcfirst(basename(get_class($this))).\\'_view.php\\'; = '. $this->pgtxt_name_def;\n\n\n }", "title": "" }, { "docid": "3ca284558a312bbc5325617713c444f2", "score": "0.49780455", "text": "function get_details($url) {\n\t$options = array('http'=>array('method'=>\"GET\", 'headers'=>\"User-Agent: SEEK/0.1\\n\"));\n\t// create stream context.\n\t$context = stream_context_create($options);\n\t// create new instance of PHP's DOMDocument class.\n\t$doc = new DOMDocument();\n\t// use file file_get_contents() to download page\n\t@$doc->loadHTML(@file_get_contents($url, false, $context));\n\n\t// create an array of all title tags\n\t$title = $doc->getElementsByTagName(\"title\");\n\t// there should be only one title on each page, giving our array only one element.\n\t@$title = @$title->item(0)->nodeValue;\n\t// give description and keywords no initial value, to prevent errors.\n\t$description = \"\";\n\t$keywords = \"\";\n\t// create an array of all <meta> tags\n\t$metas = $doc->getElementsByTagName(\"meta\");\n\t// loop through all meta tags\n\tfor ($i = 0; $i < $metas->length; $i++) {\n\t\t$meta = $metas->item($i);\n\t\t// get description and keywords of the url\n\t\tif (strtolower($meta->getAttribute(\"name\")) == \"description\")\n\t\t\t$description = $meta->getAttribute(\"content\");\n\t\tif (strtolower($meta->getAttribute(\"name\")) == \"keywords\")\n\t\t\t$keywords = $meta->getAttribute(\"content\");\n\t}\n\t// return our json string containg title, description, keywords and url.\n\treturn '{ \"Title\": \"'.str_replace(\"\\n\", \"\", $title).'\", \"Description\": \"'.str_replace(\"\\n\", \"\", $description).'\", \"Keywords\": \"'.str_replace(\"\\n\", \"\", $keywords).'\", \"URL\": \"'.$url.'\"},';\n}", "title": "" }, { "docid": "202368f781b9a793aa200574ddef4def", "score": "0.49766904", "text": "public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Allows content to be split into columns. This macro must first start with a declaration of the number of columns you want to use: `Column(3)`. Then you must use the macro twice to indicate where a column starts and ends: `Column(start)` and `Column(end)`. Attributes may be applied by separating name/value pairs with a comma. Example: Column(start, class=myclass)';\n\t\t$txt['html'] = '<p>Allows content to be split into columns. This macro must first start with a declaration of the number of columns you want to use: <code>[[Column(3)]]</code> Then you must use the macro twice to indicate where a column starts and ends:</p><p><code>[[Column(start)]]<br />content<br />[[Column(end)]]</code></p><p>Attributes may be applied by separating name/value pairs with a comma. Example: <code>[[Column(start, class=myclass)]]</code>';\n\t\treturn $txt['html'];\n\t}", "title": "" }, { "docid": "11d9bae7c3abb396a53a9409e0be20a4", "score": "0.49631682", "text": "function pAre_makeDataHead( $titleWin, $keys, $desc, $titleDoc, $subMenuToOpen, $menuItemToActivate ){\n \n $res = [];\n $res[ARE_CTE_ID_TITLE_WIN] = \"Arevalillo - \".$titleWin;\n $res[ARE_CTE_ID_TITLE_DOC] = $titleDoc;\n $res[ARE_CTE_ID_HEAD_KEYS] = \"arevalillo,\".$keys;\n $res[ARE_CTE_ID_HEAD_DESC] = $desc;\n $res[ARE_CTE_ID_SUBMENU_TO_OPEN] = $subMenuToOpen;\n $res[ARE_CTE_ID_MENUITEM_TO_ACTIVATE] = $menuItemToActivate;\n \n\n \n return $res;\n}", "title": "" }, { "docid": "89e4a2a7468c3d8aa97f9ccfe2bba465", "score": "0.49537373", "text": "protected function extractDescription() : void \n {\n $this->description = trim($this->rawHike->filter('#hike-body-text')->html(null));\n }", "title": "" }, { "docid": "ff5be55aff504f250753099877cefa90", "score": "0.49530602", "text": "function CabeceraHTML($titulo)\n{\n\t//Genera las etiquetas de la cabecera HTML comunes para todas las páginas\n\techo \" <title>\".$titulo.\"</title>\\n\";\n\techo \" <meta name=\\\"description\\\" content=\\\"ENS2001 es un ensamblador y simulador del estandar IEEE 694 con versiones en modo consola para DOS y GNU/Linux y en modo grafico para Windows.\\\">\\n\";\n echo \" <meta name=\\\"description\\\" content=\\\"Ensamblador y Simulador Estandar IEEE 694\\\">\\n\";\n\techo \" <meta name=\\\"keywords\\\" content=\\\"ens2001,ensamblador,simulador,IEEE 694,informatica,compilador,ass,ens96,windows,linux\\\">\\n\";\n\techo \" <meta http-equiv=\\\"Expires\\\" content=\\\"Tue, 01 Jan 1980 1:00:00 GMT\\\">\\n\";\n\techo \" <meta http-equiv=\\\"Pragma\\\" content=\\\"no-cache\\\">\\n\";\n\t\n}", "title": "" }, { "docid": "6ecdedaf70a87761ec88dcf1ee9710d6", "score": "0.49522886", "text": "function carregarTextos(){\n $PaginaDAO = new PaginaDAO();\n switch($this->idioma){\n case 2: // Ing\n $arrayTextos = $PaginaDAO->getTextosEmInglesByPagina($this->id);\n break;\n case 3: // Esp\n $arrayTextos = $PaginaDAO->getTextosEmEspanholByPagina($this->id);\n break;\n default: //Port\n $arrayTextos = $PaginaDAO->getTextosEmPortuguesByPagina($this->id);\n }\n foreach($arrayTextos as $idTexto => $texto)\n $this->textos[$idTexto] = $texto;\n }", "title": "" }, { "docid": "1ba85d8352aade868a655e0e8b38b362", "score": "0.4950641", "text": "private static function getTodos(string $markdown) : array\n\t{\n\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t$aeFunctions = \\MarkNotes\\Functions::getInstance();\n\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t$task = $aeSession->get('task');\n\n\t\t$file = $aeSession->get('filename');\n\t\t$matches = array();\n\n\t\t$bIntroAdded = false;\n\n\t\t$url = rtrim($aeFunctions->getCurrentURL(), '/');\n\n\t\t$urlHTML = '';\n\t\tif ($file !== '') {\n\t\t\t$urlHTML = $url.'/'.rtrim($aeSettings->getFolderDocs(false), DS).'/';\n\t\t\t$urlHTML .= str_replace(DS, '/', $aeFiles->replaceExtension($file, 'html'));\n\t\t\t$urlHTML = str_replace(' ', '%20', $urlHTML);\n\t\t}\n\n\t\t// Retrieve the title for the section, from settings.json\n\t\t//\n\t\t// $arrSettings is an array like :\n\t\t// \"todos\" : {\n\t\t// \"pattern\" : \"(Todo)( |\\a|\\t|:){1}(.*)\",\n\t\t// \"title\": \"## Todo's overview\"\n\t\t// },\n\t\t// \"decisions\" : {\n\t\t// \"pattern\" : \"(Decision)( |\\a|\\t|:){1}(.*)\",\n\t\t// \"title\": \"## Decision points\"\n\t\t// }\n\n\t\t$aeRegex = \\MarkNotes\\Helpers\\Regex::getInstance();\n\n\t\t$arrOptions = self::getOptions('tags', array());\n\n\t\t$sTodo = '';\n\n\t\tfor ($i=0; $i < count($arrOptions); $i++) {\n\n\n\t\t\t$tmp = $aeRegex->removeMarkdownCodeBlock($markdown);\n\n\t\t\t// Get the pattern f.i. (Todo)( |\\\\a|\\\\t|:){1}(.*)\"\n\t\t\t$pattern = trim($arrOptions[$i]['pattern']);\n\n\t\t\tif ($pattern == '') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (preg_match_all(\"/\".$pattern.\"/im\", $tmp, $matches)) {\n\t\t\t\t// Get the title, column and anchor\n\t\t\t\t// For instance,\n\t\t\t\t// \"title\": \"### Todo's overview\"\n\t\t\t\t// \"column\": \"Action point\"\n\t\t\t\t// \"anchor\": \"todo\"\n\t\t\t\t$title = trim($arrOptions[$i]['title']);\n\t\t\t\t$column = trim($arrOptions[$i]['column']);\n\t\t\t\t$anchor = trim($arrOptions[$i]['anchor']);\n\n\t\t\t\t$arrTodos = array();\n\n\t\t\t\t// Get the number of groups in the regex\n\t\t\t\t//\n\t\t\t\t// Example : \"Todo Christophe : make it rocks!\"\n\t\t\t\t//\n\t\t\t\t// 0 : the matched string\n\t\t\t\t//\t\t\t=> \"Todo Christophe : make it rocks!\"\n\t\t\t\t// 1 : The Todo word\n\t\t\t\t//\t\t\t=> \"Todo\"\n\t\t\t\t// 2 : Spaces or punctuation just after the word\n\t\t\t\t//\t\t\t=> \"\"\n\t\t\t\t// 3 : After the punctuation\n\t\t\t\t//\t\t\t=> \"Christophe : make it rocks!\"\n\n\t\t\t\t$entries = count($matches[0]);\n\n\t\t\t\tfor ($j = 0; $j < $entries; $j++) {\n\t\t\t\t\t// Prepare the new line :\n\t\t\t\t\t// * Add a todo number (given by #$j)\n\t\t\t\t\t// * Add put the line in bold\n\n\t\t\t\t\t$sWhoWhat = $matches[2][$j].($matches[3][$j] ?? '');\n\n\t\t\t\t\tif (!in_array($task, array(\"pdf\",\"txt\"))) {\n\t\t\t\t\t\t$link = \"<a name='\".$anchor.\"_\".($j + 1).\"'></a>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$link = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$tmp = $link.\"**\".$matches[1][$j].' #'.($j + 1).$sWhoWhat.\"**\";\n\n\t\t\t\t\t$markdown = str_replace($matches[0][$j], $tmp, $markdown);\n\t\t\t\t\t$arrTodos[$j] = $sWhoWhat;\n\t\t\t\t}\n\n\t\t\t\t// ----------------------------------------\n\t\t\t\t// Add the Todo summary after the content\n\n\t\t\t\tif ($bIntroAdded == false) {\n\t\t\t\t\t$introduction = trim(self::getOptions('introduction', ''));\n\n\t\t\t\t\tif (trim($introduction) !== '') {\n\t\t\t\t\t\t$bIntroAdded = true;\n\t\t\t\t\t\t$sTodo .= PHP_EOL.PHP_EOL.trim($introduction);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$sTodo .= PHP_EOL.PHP_EOL.$title.PHP_EOL.PHP_EOL.\"| ID | \".$column.\" |\".PHP_EOL.\"| --- | --- |\".PHP_EOL;\n\n\t\t\t\tforeach ($arrTodos as $key => $value) {\n\t\t\t\t\tif (!in_array($task, array(\"pdf\",\"txt\"))) {\n\t\t\t\t\t\t$link=\"[\".($key + 1).\"](#\".$anchor.\"_\".($key + 1).\")\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t $link=$key + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$sTodo .= \"| \".$link.\" | \".trim($value, \" :,!;\").\" |\".PHP_EOL;\n\t\t\t\t} // foreach ($arrTodos\n\t\t\t} // if (preg_match_all(\"/\".$pattern.\"/im\"\n\t\t} // foreach ($arrOptions as $key => $value)\n\n\t\treturn array($markdown, trim($sTodo));\n\t}", "title": "" }, { "docid": "80fac46ccc8122d08318bafa081cec20", "score": "0.4941138", "text": "public function createMetaKeywords(){\n\t\t$match = array();\n\t\t$key = $this->getKeywords();\n\n\t}", "title": "" }, { "docid": "87b0714f408a9fb035347efbe2901b85", "score": "0.49368474", "text": "public function keywords(): array\n {\n // new theme\n if (empty($this->data['locations'])) {\n $dom = $this->getHtmlDomParser(\"keywords\");\n\n // check exist in locations page\n if ($dom->findOneOrFalse('[data-testid=\"sub-section\"]') != false) {\n foreach ($dom->find('[data-testid=\"sub-section\"] ul li')->text() as $keyword) {\n $this->data['keywords'][] = $this->cleanString($keyword);\n }\n }\n }\n\n if (empty($this->data['keywords'])) {\n $page = $this->getContentOfPage(\"keywords\");\n if (preg_match_all('|<a href=\"/search/keyword[^>]+?>(.*?)</a>|', $page, $matches)) {\n $this->data['keywords'] = $matches[1];\n }\n }\n\n return $this->data['keywords'];\n }", "title": "" }, { "docid": "d6142a4430b74998cd6359ec96d1a76e", "score": "0.4923272", "text": "public function print_metadata() {\n\t\t?>\n\t\t<title><?php echo esc_html( wp_get_document_title() ); ?></title>\n\t\t<meta name=\"description\" content=\"<?php echo esc_attr( wp_strip_all_tags( get_the_excerpt() ) ); ?>\" />\n\t\t<?php\n\t}", "title": "" }, { "docid": "d3b3605cb52980ba9af2760e8a8dc93e", "score": "0.49152124", "text": "public function extracttext($fichier1,$fichier2){\n $document1 = fopen($fichier1, 'r+');\n $document2 = fopen($fichier2, 'r+');\n // 2 : on lit toute les lignes des fichiers\n $nb=0;\n $doc1='';\n\n while(!feof($document1)) {\n\n $nb=$nb+1;\n //transformation de chaque ligne en minuscule\n $minus=fgets($document1);\n $doc1=$minus.\" \";//concaténation des ligne pour obtenir un seul tableau!\n //transformation en tableau\n //$keywords1=preg_split(\"/[ .!\\:,;]+/\", $doc1);\n }\n //$tailledoc1=count($keywords1);\n $nb=0;\n $doc2='';\n while(!feof($document2)) {\n $nb++;\n //transformation de chaque ligne en minuscule\n $minus= fgets($document2);\n $doc2.=$minus;//concaténation des ligne pour obtenir un seul tableau!\n //transformation en tableau\n //$keywords2 = preg_split(\"/[ .!\\:,;]+/\", $doc2);\n }\n $tabstring=array($doc1,$doc2);\n fclose($document1);\n fclose($document2);\t\t\n //$tailledoc2=count($keywords2);\n return $tabstring;\n }", "title": "" }, { "docid": "7b91bff3eb0bf7b273228d244cf3122e", "score": "0.49098745", "text": "function get_particular_tags($description,$type)\n{\n\t$chunks = explode(\" \",$description);\n\tforeach($chunks as $key=>$val)\n\t{\n\t\tif(!empty($val)){\n\t\t\tif(substr($val,0,1) == $type)\n\t\t\t{\n\t\t\t\t$result[] = substr($val,1);\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "dfa9722f4dd9eb80d6efa411ffe40262", "score": "0.48980698", "text": "public function description()\n\t{\n\t\t$txt = array();\n\n\t\t$txt['wiki'] = Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE') . \"\\n\\n\" .\n\t\t\t\t\t\tLang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_ARGUMENTS') . \"\\n\\n\" .\n\t\t\t\t\t\t' * ' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE_LIMIT') . \"\\n\" .\n\t\t\t\t\t\t' * ' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE_CLASS') . \"\\n\";\n\n\t\t$txt['html'] = '\n\t\t\t<p>' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE') . '</p>\n\t\t\t<p>' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_ARGUMENTS') . '</p>\n\t\t\t<ul>\n\t\t\t\t<li>' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE_LIMIT') . '</li>\n\t\t\t\t<li>' . Lang::txt('PLG_WIKI_PARSERDEFAULT_MACRO_RECENT_PAGE_CLASS') . '</li>\n\t\t\t</ul>';\n\n\t\treturn $txt['html'];\n\t}", "title": "" }, { "docid": "5bdfa2a840e7c1638b4e35b6c5933315", "score": "0.4887286", "text": "function kses(\n $string,\n $allowed_html=array(\n 'a'=>array('id'=>1,'class'=>1,'href'=>array('maxlen'=>100),'name'=>1,'title'=>1),\n 'abbr'=>array('id'=>1,'class'=>1),\n 'acronym'=>array('id'=>1,'class'=>1),\n 'address'=>array('id'=>1,'class'=>1),\n 'article'=>array('id'=>1,'class'=>1,'itemprop'=>1,'itemscope'=>1,'itemtype'=>1,'name'=>1),\n 'aside'=>array('id'=>1,'class'=>1,'itemprop'=>1,'itemscope'=>1,'itemtype'=>1),\n 'b'=>array('id'=>1,'class'=>1),\n 'bdo'=>array('id'=>1,'class'=>1),\n 'big'=>array('id'=>1,'class'=>1),\n 'blockquote'=>array('id'=>1,'class'=>1),\n 'br'=>array(),\n 'caption'=>array('id'=>1,'class'=>1),\n 'cite'=>array('id'=>1,'class'=>1),\n 'code'=>array('id'=>1,'class'=>1),\n 'col'=>array('id'=>1,'class'=>1),\n 'colgroup'=>array('id'=>1,'class'=>1),\n 'dd'=>array('id'=>1,'class'=>1),\n 'del'=>array('id'=>1,'class'=>1),\n 'details'=>array('id'=>1,'class'=>1),\n 'dfn'=>array('id'=>1,'class'=>1),\n 'div'=>array('id'=>1,'class'=>1),\n 'dl'=>array('id'=>1,'class'=>1),\n 'dt'=>array('id'=>1,'class'=>1),\n 'em'=>array('id'=>1,'class'=>1),\n 'figcaption'=>array('id'=>1,'class'=>1),\n 'figure'=>array('id'=>1,'class'=>1),\n 'h1'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'h2'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'h3'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'h4'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'h5'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'h6'=>array('id'=>1,'class'=>1,'itemprop'=>1,'name'=>1),\n 'hgroup'=>array('id'=>1,'class'=>1),\n 'hr'=>array('id'=>1,'class'=>1),\n 'i'=>array('id'=>1,'class'=>1),\n 'img'=>array('id'=>1,'class'=>1,'src'=>1,'title'=>1),\n 'ins'=>array('id'=>1,'class'=>1),\n 'li'=>array('id'=>1,'class'=>1),\n 'map'=>array('id'=>1,'class'=>1),\n 'mark'=>array('id'=>1,'class'=>1),\n 'menu'=>array('id'=>1,'class'=>1),\n 'meta'=>array('itemprop'=>1,'content'=>1),\n 'meter'=>array('id'=>1,'class'=>1),\n 'ol'=>array('id'=>1,'class'=>1),\n 'p'=>array('id'=>1,'class'=>1),\n 'pre'=>array('id'=>1,'class'=>1),\n 'q'=>array('id'=>1,'class'=>1),\n 'rp'=>array('id'=>1,'class'=>1),\n 'rt'=>array('id'=>1,'class'=>1),\n 's'=>array('id'=>1,'class'=>1),\n 'samp'=>array('id'=>1,'class'=>1),\n 'section'=>array('id'=>1,'class'=>1),\n 'small'=>array('id'=>1,'class'=>1),\n 'span'=>array('id'=>1,'class'=>1,'title'=>1),\n 'strong'=>array('id'=>1,'class'=>1),\n 'sub'=>array('id'=>1,'class'=>1),\n 'summary'=>array('id'=>1,'class'=>1),\n 'sup'=>array('id'=>1,'class'=>1),\n 'table'=>array('id'=>1,'class'=>1),\n 'tbody'=>array('id'=>1,'class'=>1),\n 'td'=>array('id'=>1,'class'=>1,'colspan'=>1,'rowspan'=>1),\n 'tfoot'=>array('id'=>1,'class'=>1),\n 'th'=>array('id'=>1,'class'=>1,'colspan'=>1,'rowspan'=>1),\n 'thead'=>array('id'=>1,'class'=>1),\n 'time'=>array('id'=>1,'class'=>1),\n 'tr'=>array('id'=>1,'class'=>1),\n 'tt'=>array('id'=>1,'class'=>1),\n 'u'=>array('id'=>1,'class'=>1),\n 'ul'=>array('id'=>1,'class'=>1),\n 'var'=>array('id'=>1,'class'=>1),\n 'wbr'=>array('id'=>1,'class'=>1)),\n $allowed_protocols=array(\n 'http',\n 'https',\n 'ftp',\n 'news',\n 'nntp',\n 'telnet',\n 'gopher',\n 'mailto'\n )\n){\n $string=stripslashes($string);\n $string=kses_no_null($string);\n $string=kses_js_entities($string);\n $string=kses_normalize_entities($string);\n $string=kses_hook($string);\n $allowed_html_fixed=kses_array_lc($allowed_html);\n return kses_split($string,$allowed_html_fixed,$allowed_protocols);\n}", "title": "" }, { "docid": "519948f0b16a5c3de3e547777178a7e2", "score": "0.48824805", "text": "function writeSearchInfo($ind=4) {\n $indent = translateIndent($ind);\n global $params;\n if ($params[\"search\"] != \"\") {\n echo($indent.'<div class=\"sys_msg\" id=\"searchinfo\"><h4>'.__('you searched for:').'</h4><ul>'.\"\\n\");\n foreach($params[\"search\"] as $name => $val) {\n if ($name==\"kw\")$name=\"keyword\";\n if ($val != \"\") echo($indent.' <li>'.$name.':'.utf8_str_replace(\"\\\\\",\"\",$val).'</li>'.\"\\n\");\n }\n echo($indent.'</ul></div>'.\"\\n\");\n }\n}", "title": "" }, { "docid": "42d61ae3a8b6cf4581f2d062e2d153d0", "score": "0.48811933", "text": "public function getMetaDescription();", "title": "" }, { "docid": "991e1731936d54a43004af8305248f74", "score": "0.4881035", "text": "function fil(&$titres, $separateur = ' <strong>&rsaquo;</strong> ')\n{\n\t$baseUrl = 'http://' . $_SERVER['HTTP_HOST'];\n\t$retour = '<a href=\"\">Home</a>';\n\t$chemin = explode(\"/\", substr($_SERVER['PHP_SELF'], 1));\n\n\tif (is_array($chemin))\n\t{\n\t\tforeach ($chemin as $k=>$v)\n\t\tif ($titres[$v] !== false)\n\t\t{\n\t\t\t$baseUrl .= \"/$v\";\n\t\t\t$titre = isset($titres[$v]) ? $titres[$v] : $v;\n\t\t\tif ($titres[$v] == 'index')\n\t\t\t{\n\t\t\t\t$retour .= $separateur . 'Lecture de la page';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$retour .= $separateur . '<a href=' . append_sid($baseUrl) . '>' . $titre . '</a>';\n\t\t\t}\n\t\t}\n\t}\n\treturn $retour;\n}", "title": "" }, { "docid": "9678f695d895004034fe81c70cdc1066", "score": "0.48789006", "text": "public function description()\n {\n return \"Libro \". $this->index .\", autor: \".$this->author;\n }", "title": "" }, { "docid": "2c995f42331e8982831132d1f6415c63", "score": "0.48741913", "text": "public function HeaderTagsMetaKeywords() {\n\t\t$this->fetchMetatags();\n\t\treturn $this->keyword;\n\t}", "title": "" }, { "docid": "47821129a3ee457062d433fdf44a9b9c", "score": "0.48736456", "text": "public function getHelpContent($page)\n {\n }", "title": "" }, { "docid": "fcd3334fb4206699a1b69550571f0298", "score": "0.4868896", "text": "function info_pdi_page($page, $keyword, $optlist) {}", "title": "" }, { "docid": "d13bebb73238a977fecc149b2f7962e8", "score": "0.48618028", "text": "function apple_seo_site_description() {\n\t$inside = sprintf( '<a href=\"%s\" title=\"%s\">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'description' ) ), get_bloginfo( 'description' ) );\n\n\t/** Determine which wrapping tags to use */\n\t$wrap = is_home() && 'description' == genesis_get_seo_option( 'home_h1_on' ) ? 'h1' : 'p';\n\n\t/* Build the description */\n\t$description = $inside ? sprintf( '<%s id=\"description\">%s</%s>', $wrap, $inside, $wrap ) : '';\n\n\t/** Echo (filtered) */\n\techo apply_filters( 'genesis_seo_description', $description, $inside, $wrap );\n}", "title": "" }, { "docid": "54cf378ca624348bddbbbbf31c31d43d", "score": "0.48605925", "text": "public function getDescription(): array;", "title": "" }, { "docid": "47ca62ce7ad4a418846e2e396c3de85c", "score": "0.48585543", "text": "function getDesc($key)\n{\n if (strpos($key, 'light') !== false) {\n return 'Ett ljust tema';\n }\n\n return 'Ett mörkt tema';\n}", "title": "" }, { "docid": "e211942b7f0627a7b250bd55a1d95eb1", "score": "0.48575917", "text": "public static function fullTextIn($keyword)\n {\n $config = new Config();\n $c = $config->get();\n $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($c['param']['path']));\n\n //get only Article files into files\n $matchedFiles = array();\n\n foreach($rii as $file)\n {\n if($file->isDir() || $file->getExtension() != 'html')\n {\n continue;\n }\n foreach(file($file) as $fli => $fl)\n {\n if(strpos($fl, $keyword) !== false)\n {\n $matchedFiles[] = $file->getPathname();\n break;\n }\n }\n if(count($matchedFiles) > $c['max_search_result'])\n {\n break;\n }\n }\n\n $result = array();\n\n //get Article Objects\n foreach($matchedFiles as $file)\n {\n $parts = explode(DIRECTORY_SEPARATOR, $file);\n $url = $parts[count($parts)-2];\n $year = $parts[count($parts)-5];\n $month = $parts[count($parts)-4];\n $day = $parts[count($parts)-3];\n $creatingDate = $year . '-' . $month . '-' . $day;\n $art = new Article($config);\n $art->setUrl($url);\n $art->setCreatingDate($creatingDate);\n $article = $art->get();\n \n array_push($result, $article);\n }\n\n return $result;\n }", "title": "" }, { "docid": "29f50e7a297bc230f4ec7d6d4f5b6109", "score": "0.48493454", "text": "public function index()\n\t{\n\t\t$data['keywords']\t= 'Eidara, Matadata, Infrastructure, Infrastruktur, Rekayasa, Innovation, Data Driven, Nawacita, Indonesia, Timur, Sustainable Development, Drone, UAV, Pemetaan, Mapping, Land Grabbing, Project Management, Manajemen Proyek, Antardisiplin, Interdisciplinary, Science Technology Society, Science Technology Policy, RTRWK, Rencana Tata Ruang Wilayah Kota, Urban Planning, Rural Planning, Multidiscipline, Multidisiplin, COP 21, PT Eidara matadata presisi, matadata, Eidara, Eidara matadata presisi';\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('welcome_message');\n\t\t$this->load->view('footer');\n\t}", "title": "" }, { "docid": "17301713f2675dda9d29938742ae7d9b", "score": "0.4847776", "text": "function searchInContent($pattern,$subset=false) {\r\n\tif ($pattern) {\r\n\t\tif ($subset) {\r\n\t\t\t$med = $subset;\r\n\t\t} else {\r\n\t\t\t$med = json_decode(file_get_contents(__DIR__.\"/../data/index_media.json\"),true);\r\n\t\t}\r\n\t\t$ppl = json_decode(file_get_contents(__DIR__.\"/../data/index_people.json\"),true);\r\n\r\n\r\n\t\t$return = array();\r\n\r\n\t\tforeach ($med as $k=>$m) {\r\n\t\t\t$period = sprintf('%02d',(int)$m[\"wahlperiode\"]);\r\n\t\t\t$session = sprintf('%03d',(int)$m[\"sitzungsnummer\"]);\r\n\t\t\t$html = file_get_contents(__DIR__.\"/../data/\".$period.\"/\".$session.\"/\".$period.$session.\"-Rede-\".$m[\"id\"].\".html\");\r\n\t\t\tif ($html) {\r\n\t\t\t\t$dom = new DOMDocument();\r\n\t\t\t\t$dom->loadHTML($html);\r\n\t\t\t\t$xPath = new DOMXPath($dom);\r\n\t\t\t\t//$elems = $xPath->query(\"//div[@class='rede']/*\");\r\n\t\t\t\t$elems = $xPath->query(\"//div[@class='rede']/div | //div[@class='rede']/p/span\");\r\n\t\t\t\tforeach($elems as $k=>$elem) {\r\n\t\t\t\t\t$matches = false;\r\n\t\t\t\t\tif (is_array($pattern)) {\r\n\t\t\t\t\t\tforeach($pattern as $p) {\r\n\t\t\t\t\t\t\tif (!preg_match(\"/\\b(\\w*\".$p.\"\\w*)\\b/\",$elem->nodeValue)) {\r\n\t\t\t\t\t\t\t\t$matches = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$matches = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (preg_match(\"/\\b(\\w*\".$pattern.\"\\w*)\\b/\",$elem->nodeValue)) {\r\n\t\t\t\t\t\t\t$matches = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($matches) {\r\n\t\t\t\t\t\t//$tmp = array();\r\n\t\t\t\t\t\t//$tmp = array_merge($tmp, $m);\r\n\t\t\t\t\t\t/*$tmp[\"period\"] = $period;\r\n\t\t\t\t\t\t$tmp[\"session\"] = $session;\r\n\t\t\t\t\t\t$tmp[\"rede\"] = $m[\"id\"];\r\n\t\t\t\t\t\t$tmp[\"mediaID\"] = $m[\"mediaID\"];\r\n\t\t\t\t\t\t$tmp[\"rednerID\"] = $m[\"rednerID\"];\r\n\t\t\t\t\t\t$tmp[\"headline\"] = $m[\"headline\"];\r\n\t\t\t\t\t\t$tmp[\"headline\"] = $m[\"headline\"];*/\r\n\t\t\t\t\t\t//array_merge($return[$m[\"id\"]],$m);\r\n\t\t\t\t\t\tif (!array_key_exists($m[\"id\"],$return)) {\r\n\t\t\t\t\t\t\t$m = array_merge($m, $ppl[$m[\"rednerID\"]]);\r\n\t\t\t\t\t\t\t$m[\"timestamp\"] = strtotime($m[\"date\"]);\r\n\t\t\t\t\t\t\t$m[\"full_name\"] = $m[\"first_name\"].\" \".$m[\"last_name\"];\r\n\t\t\t\t\t\t\t$return[$m[\"id\"]] = $m;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$tmp[\"data-start\"] = $elem->getAttribute(\"data-start\");\r\n\t\t\t\t\t\t$tmp[\"data-end\"] = $elem->getAttribute(\"data-end\");\r\n\t\t\t\t\t\t$tmp[\"class\"] = ($elem->hasAttribute(\"class\")) ? $elem->getAttribute(\"class\") : \"\";\r\n\t\t\t\t\t\t$tmp[\"klasse\"] = ($elem->hasAttribute(\"klasse\")) ? $elem->getAttribute(\"klasse\") : \"\";\r\n\t\t\t\t\t\t$tmp[\"context\"] = $elem->nodeValue;\r\n\t\t\t\t\t\t$return[$m[\"id\"]][\"finds\"][] = $tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn $return;\r\n\r\n\r\n\t}\r\n\r\n\r\n}", "title": "" }, { "docid": "1092ed02b3c6c9c9d558d7a3efd7da18", "score": "0.48447338", "text": "public function keywords()\n\t{\n\t\treturn $this->page_info->meta_keywords;\n\t}", "title": "" }, { "docid": "21bc3dcea45f8e8041b975e9ef059fb0", "score": "0.4840213", "text": "public function get_keywords() {\n return [ 'astha', 'testimonial', 'review', 'feedback', 'user', 'rating', 'slider' ];\n }", "title": "" }, { "docid": "0f03cbda3788a70aa90abdbcbe3f293c", "score": "0.48397344", "text": "function pcos_get_string($doc, $path) {}", "title": "" }, { "docid": "5dffc0ac1c68a1ee76b3fbbec92eb87b", "score": "0.48387524", "text": "function getDocumentIdOnLocation($text)\n{\n \n}", "title": "" }, { "docid": "14162411a22e5360cb439eaae6cdb7fe", "score": "0.48363227", "text": "function heading_links($elementName, $text) {\n\t$element = get_db()->getTable('Element')->findByElementSetNameAndElementName('Dublin Core', $elementName);\n\t$id = $element->id;\n\t$advanced[] = array('element_id' => $id, 'terms' => htmlspecialchars_decode($text, ENT_QUOTES), 'type' => 'is exactly');\n\t$paramArray = array('search' => '', 'advanced' => $advanced);\n\t$params = http_build_query($paramArray);\n\t$url = url('/items/browse?') . $params;\n\t$html = '<a href=\"';\n\t$html .= $url;\n\t$html .= '\">';\n\t$html .= $text;\n\t$html .= '</a>';\n\treturn $html;\n}", "title": "" }, { "docid": "5926eb82d7fc5a02da7185e44f6d11e9", "score": "0.48338482", "text": "function desc_kit($objeto) {\n\t\t\t$desc = '';\n\t\t\t\n\t\t\t$sql = \"SELECT \n\t\t\t\t\t\tpe.*, p.tipo_producto, p.nombre\n\t\t\t\t\tFROM \n\t\t\t\t\t\tcom_pedidos_kit pe\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tapp_productos p\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tp.id = pe.id_producto\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tid_pedido = \".$objeto['id'];\n\t\t\t// return $sql;\n\t\t\t$pedidos = $this -> queryArray($sql);\n\t\t\t\n\t\t\tforeach ($pedidos[\"rows\"] as $key => $value) {\n\t\t\t$desc .='<br>'.$value['nombre'];\n\t\t\t\n\t\t\t// ** Opcionales\n\t\t\t//Si el producto tiene opcionales marcados, consultamos la descripcion del opcional.\n\t\t\t\tif ($value[\"opcionales\"] != '') {\n\t\t\t\t\t$desc .= ' >Con: ';\n\t\t\t\t\t$selectOpcional = \"\tSELECT \n \t\t\t\t\t\tnombre, descripcion_larga AS deslarga\n \t\t\t\t\tFROM\n \t\t\t\t\t\tapp_productos \n \t\t\t\t\tWHERE \n \t\t\t\t\t\tid in (\" . $value[\"opcionales\"] . \") \";\n\t\t\t\t\t$opcionales = $this -> queryArray($selectOpcional);\n\n\t\t\t\t\tforeach ($opcionales[\"rows\"] as $key2 => $producto) {\n\t\t\t\t\t\t$desc .= '/ ' . $producto[\"nombre\"];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($producto[\"nota_opcional\"]) {\n\t\t\t\t\t\t$desc .= ' >>' . $producto[\"nota_opcional\"];\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t// ** Extras\n\t\t\t//Si el producto tiene extra marcados, consultamos la descripcion del producto.\n\t\t\t\tif ($value[\"extras\"] != '') {\n\t\t\t\t\t$desc .= ' >Extras: ';\n\n\t\t\t\t\t$selectAdicional = \"SELECT \n \t\t\t\t\t\tnombre, descripcion_larga AS deslarga \n \t\t\t\t\tFROM \n \t\t\t\t\t\tapp_productos\n \t\t\t\t\tWHERE \n \t\t\t\t\t\tid IN (\" . $value[\"extras\"] . \")\";\n\t\t\t\t\t$adicionales = $this -> queryArray($selectAdicional);\n\n\t\t\t\t\tforeach ($adicionales[\"rows\"] as $key2 => $producto) {\n\t\t\t\t\t\t$desc .= '/ ' . $producto[\"nombre\"];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($producto[\"nota_extra\"]) {\n\t\t\t\t\t\t$desc .= ' >>' . $producto[\"nota_extra\"];\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t// ** Sin\n\t\t\t//Si el producto tiene extra marcados, consultamos la descripcion del producto.\n\t\t\t\tif ($value[\"sin\"] != '') {\n\t\t\t\t\t$desc .= ' >Sin: ';\n\n\t\t\t\t\t$sin = \"SELECT \n \t\t\tnombre, descripcion_larga AS deslarga\n \t\tFROM \n \t\t\tapp_productos \n \t\tWHERE \n \t\t\tid in (\" . $value[\"sin\"] . \")\";\n\t\t\t\t\t$sin = $this -> queryArray($sin);\n\n\t\t\t\t\tforeach ($sin[\"rows\"] as $key2 => $producto) {\n\t\t\t\t\t\t$desc .= '/ ' . $producto[\"nombre\"];\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}\n\n\t\t\treturn $desc;\n\t\t}", "title": "" }, { "docid": "963a1bc489f0175da2638e473d282a11", "score": "0.48302397", "text": "public function getKeywords() {\n $this->getColumn(\"keywords\");\n\n $prefix = $GLOBALS[\"Utility\"]->getTag(\"keyword_prefix\");\n\n $keywords = $GLOBALS[\"Hook\"]->doAction(\"content_keywords\");\n\n $search_url = $GLOBALS[\"Utility\"]->getTag(\"search_url\");\n\n if (!empty($keywords)) {\n\n // Begin unordered list.\n $keywords_markup = \"<ul class=\\\"keywords\\\">\";\n\n foreach (explode(\",\", $keywords) as $keyword) {\n\n // Remove whitespace from the beginning and end of each keyword.\n $keyword = trim($keyword);\n\n // Encode spaces.\n $keyword_url = str_replace(\" \", \"%20\", $keyword);\n\n // Create a list item for each keyword.\n $keywords_markup .= \"\n\n <li>\n <a href=\\\"{$search_url}?keywords={$keyword_url}\\\">{$prefix}{$keyword}</a>\n </li>\n \";\n }\n\n // End unordered list.\n $keywords_markup .= \"</ul>\";\n\n $GLOBALS[\"Hook\"]->removeAction(\"content_keywords\");\n\n $GLOBALS[\"Hook\"]->addAction(\"content_keywords\", $keywords_markup);\n }\n }", "title": "" }, { "docid": "2e6adda138a4df7ecae6924535004021", "score": "0.48225465", "text": "function content_test($con){\n\n\n\t\t// Grab the meta keywords\n\t\t$pageAddress = get_page_meta_keywords(FALSE);\n\n\n\t\t//check if keywords\n\n\t\tif(stripos($pageAddress, \"helpmeplugin\") !== FALSE){\n\t\t\t$regex = '(%helpme%)'; // this is what you need\n\t\t\t$out = \"Found Ok this works - help baby!!! SUPER AWESOME!!!!!\";\n\t\t}\n\t\telseif(stripos($pageAddress, \"contactsmeplugin\") !== FALSE){\n\t\t\t$regex = '(%contactsme%)'; // this is what you need\n\t\t\t$out = file_get_contents(SCPLUGINSPATH.'simpleContacts/contactsSearch.php') or die();\n\t\t}\n\n\t\t//replace the placeholder with the new content\n\t\t$con = str_replace($regex, $out, $con);\n\t\treturn $con;\n}", "title": "" }, { "docid": "307d30187a48fe259a5c0dec2da2f017", "score": "0.4822231", "text": "public function getHtmlKeywords() {\n\treturn (string) $this->_resource['html_keywords'];\n\n }", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "69c78cb1a39e5a0af6022d9446204101", "score": "0.48201746", "text": "public function getContent();", "title": "" }, { "docid": "fb92bf432427bbcfca449b40e1eec6c4", "score": "0.48164627", "text": "public function getHeadContent() { }", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.48140547", "text": "abstract public function getDescription();", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.48140547", "text": "abstract public function getDescription();", "title": "" }, { "docid": "f3dbc07100bb09972de97538282b2691", "score": "0.4813879", "text": "function getpage($folder, $entry)\n{\n $returnme['raw'] = @file_get_contents($folder.'/'.$entry);\n \n if($returnme['raw'] == FALSE)\n return get404();\n\n ///////////////////////////\n // load element title\n $tok = strtok($returnme['raw'], \"^^^\");\n $returnme['title'] = $tok;\n\n // load element body\n $tok = strtok(\"^^^\");\n $returnme['body_raw'] = $tok;\n $returnme['body'] = Markdown($returnme['body_raw']);\n\n // load element tags\n $tok = strtok(\"^^^\");\n $returnme['tags_raw'] = $tok;\n ///////////////////////////\n\n // parse the tags\n $tagitr = 0;\n $tok = strtok($returnme['tags_raw'], \", \");\n while ($tok !== false) {\n $returnme['tags'][$tagitr] = $tok;\n $tok = strtok(\", \"); $tagitr++;\n }\n\n return $returnme;\n}", "title": "" } ]
5c7d19aa18807096b26dd883e7b9a9ea
Sets the name of this parameter
[ { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.79078966", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" } ]
[ { "docid": "7af07b9725dee278be9da59a9448efc2", "score": "0.7949859", "text": "public function setName( $name ) {\n $this->name = $name; \n }", "title": "" }, { "docid": "5208850478828696faa66d10975be992", "score": "0.7948748", "text": "public function setName($name)\n {\n $this->name = strval($name);\n }", "title": "" }, { "docid": "614c767a97959b02a9d7274954af257f", "score": "0.7933618", "text": "public function set_name( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "614c767a97959b02a9d7274954af257f", "score": "0.7933618", "text": "public function set_name( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "614c767a97959b02a9d7274954af257f", "score": "0.7933618", "text": "public function set_name( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "05c392aed2ad6f0103e8d9fce0105657", "score": "0.7926494", "text": "public function setName( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "05c392aed2ad6f0103e8d9fce0105657", "score": "0.7926494", "text": "public function setName( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "05c392aed2ad6f0103e8d9fce0105657", "score": "0.7926494", "text": "public function setName( $name ) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "7f7043487fdebe2ccfe0ec24665282e9", "score": "0.7918397", "text": "public function setName($name){\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "1d2064de80ff4e042180eb825f526c77", "score": "0.79110557", "text": "public function set_name($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "1d2064de80ff4e042180eb825f526c77", "score": "0.79110557", "text": "public function set_name($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "c4bfdd6642fe2124ae2533d8235068c3", "score": "0.790337", "text": "public function setName($name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "c4bfdd6642fe2124ae2533d8235068c3", "score": "0.790337", "text": "public function setName($name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "ad1e85ad83794d6d78f084e5ec921916", "score": "0.78976834", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "ad1e85ad83794d6d78f084e5ec921916", "score": "0.78976834", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "ad1e85ad83794d6d78f084e5ec921916", "score": "0.78976834", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "ad1e85ad83794d6d78f084e5ec921916", "score": "0.78976834", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "1af1f119cf42d0029e5df71813c0e3a4", "score": "0.78916615", "text": "public function setName($name){\n\t\t$this->name\t\t\t=\t$name;\n\t}", "title": "" }, { "docid": "74ea54bb7649ac4c8da5b4017e4d6ea4", "score": "0.787878", "text": "public function setName(string $name){\n $this->name = $name;\n }", "title": "" }, { "docid": "96194d8994b19c78015d99e337ec7f1e", "score": "0.7876051", "text": "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "title": "" }, { "docid": "96194d8994b19c78015d99e337ec7f1e", "score": "0.7876051", "text": "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "title": "" }, { "docid": "96194d8994b19c78015d99e337ec7f1e", "score": "0.7876051", "text": "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "title": "" }, { "docid": "50a08d8ee37df4b3da985534b0be6ee0", "score": "0.7875667", "text": "public function setName($name){\n $this->name = $name;\n }", "title": "" }, { "docid": "594bf0e6aaadfb00dc9b0e1751f45bb5", "score": "0.7868501", "text": "public function setName(string $name){\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.7857228", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "65542b583217c55d5ba1814577d8b460", "score": "0.78558195", "text": "public function setName($name)\r\n {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "54ebe502d11fbd5f606c381b7afe14d6", "score": "0.7851397", "text": "public function name($name)\r\n\t{\r\n\t\t\r\n\t\t$this->name = $name;\r\n\r\n\t}", "title": "" }, { "docid": "be2ce27ef605083fe3364fce3c147c36", "score": "0.78504646", "text": "function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "3a16b74701d2ca190ce4eae566a0930d", "score": "0.7843091", "text": "public function setName($name) {\r\n $this->_name = $name;\r\n }", "title": "" }, { "docid": "0c8dc1ae6d6df64c8376b805c2678452", "score": "0.78405863", "text": "public function setName($name) {\n\t\t$this->_name = $name;\n\t}", "title": "" }, { "docid": "c7063eadcb4c06d43855be834038f21b", "score": "0.7837214", "text": "public function setName($name) \n\t\t{\n\t\t\t$this->name = $name;\n\t\t}", "title": "" }, { "docid": "249a99c1062b4d6b632e2d4d65360b79", "score": "0.783559", "text": "public function set_name($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "249a99c1062b4d6b632e2d4d65360b79", "score": "0.783559", "text": "public function set_name($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "249a99c1062b4d6b632e2d4d65360b79", "score": "0.783559", "text": "public function set_name($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "f4b876042f8df146830ed099c9153f18", "score": "0.7825574", "text": "public function setName ($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "3edf8b0bc6ef26885ad954ed8c319a36", "score": "0.78242105", "text": "public function setName(string $name = \"\")\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "15cb24cf96d84224fc613ecc5005bfbd", "score": "0.782342", "text": "function SetName($name='') { $this->name = $name; }", "title": "" }, { "docid": "d5c39c3dd53e6797808000460bba49ed", "score": "0.7815885", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "0bfab2b95f34d620ba410f28f2eb0af0", "score": "0.78128076", "text": "public function setName( $name )\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "e8fee686d95bf5538789ec5a60fb9aba", "score": "0.78093684", "text": "public function setName($name) {\n\n\t \t\t $this->name = $name;\n\t }", "title": "" }, { "docid": "5f4ec200cb3c04c8440f83e26432907a", "score": "0.78051275", "text": "public function setName(string $name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "dd05846a3fa0230ee3d64844e0f69b66", "score": "0.7802251", "text": "public function setName($name)\n\t{\n\t\tif(is_string($name))\n\t\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "8c27b5f5be3c2b9586cc261195c7f895", "score": "0.7800721", "text": "public function set_name($name)\n\t{\n\t\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "6ec2db38371c02cf2ad01036d956977a", "score": "0.7800316", "text": "public function setName(string $name) { $this->name = $name; }", "title": "" }, { "docid": "38ff998da08d4be4e3160d3d78e6d193", "score": "0.7792441", "text": "public function set_name($name)\n {\n $this->name=$name;\n }", "title": "" }, { "docid": "99051444ef342a07d47cfd36fad364bf", "score": "0.7792211", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.77894235", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "665f9ca7d89d2e67df1317368071a732", "score": "0.7783682", "text": "public function setName($name) {\n $this->name = (string) $name;\n }", "title": "" }, { "docid": "927595e1433a07de9e44cdfbe46500fa", "score": "0.778325", "text": "public function setName( string $name ) {\n $this->_name = $name;\n }", "title": "" }, { "docid": "dbe672912066e1953b9dc5bceefc206b", "score": "0.77810323", "text": "public function setName ( $name )\n {\n $this->_name = $name;\n\n }", "title": "" }, { "docid": "26ae433f4885d8f65bef97e85cbea7eb", "score": "0.7778154", "text": "public function setName(string $name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "5d52de8c51b2a7a106e56e3c3e3632f0", "score": "0.77733946", "text": "final public function setName( $name )\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7772815", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" } ]
4babc10df13daf473b465f3c594351bf
support for customizable list screen
[ { "docid": "57715bd7864a7810ae3b8c0e52a86f43", "score": "0.0", "text": "public function UserViewsAction($id){\n $id+=0;\n\n $ps=array(\n 'rows' => $this->getViewListArr($this->getViewListUserFields(), true)\n );\n\n $this->fw->parser(\"/common/list/userviews\", $ps);\n }", "title": "" } ]
[ { "docid": "b13b6122e2f979d1d26964dc2d025d08", "score": "0.70793", "text": "public function list_items()\n\t{ \n\t $views[]\t\t\t\t\t\t\t\t\t\t\t= \"site_list\";\n $data['title'] = lang('list_title');\n $this->data['action'] = \"list\";\n \n $this->data['flexigrid']['cols'] = $this->site_mod->get_flexigrid_cols();\n $this->data['flexigrid']['base_url'] = $this->data['base_url'];\n $this->data['flexigrid']['export_limit'] = $this->export_limit;\n $this->data['flexigrid']['delete_limit'] = $this->delete_limit;\n $this->data['flexigrid']['sortname'] = 'name';\n \n view_load($views,$this->data);\n\t}", "title": "" }, { "docid": "349599c7292a71cd03fc4c4ffdd1f19b", "score": "0.6803793", "text": "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->_personModel->getPersons();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "2947b2c8c3c02fb9550821c40f31fc67", "score": "0.67169863", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Roles\", \"Roles\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.65868634", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.65868634", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.65868634", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6540888", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "db710ab9dde1a5902020fd6187e02893", "score": "0.653317", "text": "function index(){\n\t\t$this->template->add_includes('js', config_item('url_javascript_main') .'list.js', 'header', FALSE, FALSE);\n\t\t\n\t\t/* load view */\n\t\t$this->template->write_view('list');\n\t}", "title": "" }, { "docid": "7573e843d1b7cfeddf14f70707821b32", "score": "0.6527887", "text": "public function actionList()\n\t{\n\t\t$this->renderPartial('list', array(), false, true);\n\t}", "title": "" }, { "docid": "c2173c444b3ed01cf1a75f66920882b3", "score": "0.651561", "text": "function onComponentList() {\r\n include_once('view/component.php');\r\n $data = array();\r\n $data['mode'] = 'list';\r\n view($data);\r\n}", "title": "" }, { "docid": "2bc5428efce258b4e8c83e878c1cd9e5", "score": "0.6513597", "text": "public function indexAction(){\n // dump($CustomMenuM->getLists());\n $this->display();\n }", "title": "" }, { "docid": "d6dd919ab4f913def8144fdfee2d10c4", "score": "0.65005344", "text": "function SetupListOptions() {\n\t\tglobal $Security, $sponsored_student;\n\n //customization-start kgosafomaafo\n\t\tglobal $custom_include_root;\n\t\tinclude $custom_include_root.'sponsored_student_row_init.php';\n\t\t//customization-end\n //\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_school_attendance\"\n\t\t$this->ListOptions->Add(\"detail_school_attendance\");\n\t\t$item =& $this->ListOptions->Items[\"detail_school_attendance\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('school_attendance');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_package\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_package\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_package\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_package');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($sponsored_student->Export <> \"\" ||\n\t\t\t$sponsored_student->CurrentAction == \"gridadd\" ||\n\t\t\t$sponsored_student->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "title": "" }, { "docid": "d30c64026637248de748b043afe9bf1c", "score": "0.64760166", "text": "function viewlist() {\n //Devuelve la lista de usuarios\n $this->getModel()->addFile('archivo-mensaje', '');\n $this->getModel()->addFile('archivo-contenido', 'iamlogged/admin/contenido');\n $lista = $this->getModel()->getList();\n //Devuelve la plantilla de usuarios\n $this->getModel()->addData('lista-usuarios', $lista);\n }", "title": "" }, { "docid": "9ba180ed65da59bf2b9a95f1c09cb0ef", "score": "0.6455446", "text": "public function listAction() {\n\t\t$flexSliders = $this->flexSliderRepository->findAll();\n\n\t\t$tplObj = array(\n\t\t\t'configuration' => EmConfiguration::getConfiguration(),\n\t\t\t'data' => $this->contentObject->data,\n\t\t\t'altUid' => uniqid('alt'),\n\t\t\t'flexSliders' => $flexSliders\n\t\t);\n\t\t$this->view->assignMultiple($tplObj);\n\t}", "title": "" }, { "docid": "ce094d16c29c8611ed6cf9369e547e61", "score": "0.6443894", "text": "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n?>\n\t\t<div class=\"wp-list-table app-mp-addons <?php echo esc_attr( implode( ' ', $this->get_table_classes() ) ); ?>\">\n\n\t\t\t<div id=\"the-list\" <?php echo esc_attr( $data_attr ); ?> >\n\t\t\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t\t\t</div>\n\t\t</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\n\t\t$this->request->update_counters();\n\t}", "title": "" }, { "docid": "d326cff1b88dfab3fcf343db440d04a4", "score": "0.642114", "text": "protected function setupListOperation()\n {\n $this->setView();\n $this->crud->addFilter(\n [\n 'type' => 'text',\n 'name' => 'title',\n 'label' => 'Title'\n ],\n false,\n function ($value) {\n $this->crud->addClause('where', 'title', 'like', '%' . $value . '%');\n }\n );\n }", "title": "" }, { "docid": "373460103c293e69b6f78d27e75041b4", "score": "0.63931745", "text": "function displayList() {\n\t\t$theCode = $this->theCode;\n\n\t\t$where = '';\n\t\t$content = '';\n\t\tswitch ($theCode) {\n\t\t\tcase 'LATEST':\n\t\t\t$prefix_display = 'displayLatest';\n\t\t\t$templateName = 'TEMPLATE_LATEST';\n\t\t\tif (!$this->conf['displayArchivedInLatest']) { // if this is set, latest will do the same as list\n\t\t\t\t$this->arcExclusive = -1; // Only latest, non archive news\n\t\t\t}\n\t\t\t$this->config['limit'] = $this->config['latestLimit'];\n\t\t\tbreak;\n\n\t\t\tcase 'LIST':\n\t\t\t$prefix_display = 'displayList';\n\t\t\t$templateName = 'TEMPLATE_LIST';\n\t\t\tbreak;\n\n\t\t\tcase 'SEARCH':\n\t\t\t$prefix_display = 'displayList';\n\t\t\t$templateName = 'TEMPLATE_LIST';\n\n\t\t\t$formURL = $this->pi_linkTP_keepPIvars_url(array('pointer' => null, 'cat' => null), 0, '', $this->config['searchPid']) ;\n\t\t\t// Get search subpart\n\t\t\t$t['search'] = $this->getNewsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH###'));\n\t\t\t// Substitute the markers for teh searchform\n\t\t\t$out = $t['search'];\n\n\t\t\t$out = $this->cObj->substituteMarker($out, '###FORM_URL###', $formURL);\n\t\t\t$out = $this->cObj->substituteMarker($out, '###SWORDS###', htmlspecialchars($this->piVars['swords']));\n\t\t\t$out = $this->cObj->substituteMarker($out, '###SEARCH_BUTTON###', $this->pi_getLL('searchButtonLabel'));\n\t\t\t// Add to content\n\t\t\t$content .= $out;\n\t\t\t// do the search and add the result to the $where string\n\t\t\tif ($this->piVars['swords']) {\n\t\t\t\t$where = $this->searchWhere(trim($this->piVars['swords']));\n\t\t\t\t$theCode = 'SEARCH';\n\t\t\t} else {\n\t\t\t\t$where = ($this->conf['emptySearchAtStart']?'AND 1=0':''); // display an empty list, if 'emptySearchAtStart' is set.\n\t\t\t}\n\t\t\tbreak;\n\t\t\t// xml news export\n\t\t\tcase 'XML':\n\t\t\t$prefix_display = 'displayXML';\n\t\t\t// $this->arcExclusive = -1; // Only latest, non archive news\n\t\t\t$this->allowCaching = $this->conf['displayXML.']['xmlCaching'];\n\t\t\t$this->config['limit'] = $this->conf['displayXML.']['xmlLimit']?$this->conf['displayXML.']['xmlLimit']:$this->config['limit'];\n\n\t\t\tswitch ($this->conf['displayXML.']['xmlFormat']) {\n\t\t\t\tcase 'rss091':\n\t\t\t\t$templateName = 'TEMPLATE_RSS091';\n\t\t\t\t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rss091_tmplFile']);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'rss2':\n\t\t\t\t$templateName = 'TEMPLATE_RSS2';\n\t\t\t\t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rss2_tmplFile']);\n\t\t\t\tbreak;\n\n\n\t\t\t\t// this will be possible later:\n\t\t\t\t// case 'rdf':\n\t\t\t\t// $templateName = 'TEMPLATE_RDF';\n\t\t\t\t// $this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rdf_tmplFile']);\n\t\t\t\t// break;\n\n\t\t\t\t// case 'atom':\n\t\t\t\t// $templateName = 'TEMPLATE_ATOM';\n\t\t\t\t// $this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['atom_tmplFile']);\n\t\t\t\t// break;\n\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t// process extra codes from $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']\n\t\t$userCodes = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['tt_news']['what_to_display'];\n\n\t\tif ($userCodes && !$prefix_display && !$templateName) {\n\t\t\twhile (list(, $ucode) = each($userCodes)) {\n\t\t\t\tif ($theCode == $ucode[0]) {\n\t\t\t\t\t$prefix_display = 'displayList';\n\t\t\t\t\t$templateName = 'TEMPLATE_' . $ucode[0] ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$noPeriod = 0;\n\n\t\tif (!$this->conf['emptyArchListAtStart']) {\n\t\t\t// if this is true, we're listing from the archive for the first time (no pS set), to prevent an empty list page we set the pS value to the archive start\n\t\t\tif (($this->arcExclusive > 0 && !$this->piVars['pS'] && $theCode != 'SEARCH')) {\n\t\t\t\t// set pS to time minus archive startdate\n\t\t\t\t$this->piVars['pS'] = ($GLOBALS['SIM_EXEC_TIME'] - ($this->config['datetimeDaysToArchive'] * 86400));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->piVars['pS'] && !$this->piVars['pL']) {\n\t\t\t$noPeriod = 1; // override the period lenght checking in getSelectConf\n\t\t}\n\t\t// Allowed to show the listing? periodStart must be set, when listing from the archive.\n\t\tif (!($this->arcExclusive > -1 && !$this->piVars['pS'] && $theCode != 'SEARCH')) {\n\t\t\tif ($this->conf['displayCurrentRecord'] && $this->tt_news_uid) {\n\t\t\t\t$this->pid_list = $this->cObj->data['pid'];\n\t\t\t\t$where = 'AND tt_news.uid=' . $this->tt_news_uid;\n\t\t\t}\n\t\t\t// build parameter Array for List query\n\t\t\t$selectConf = $this->getSelectConf($where, $noPeriod);\n\t\t\t// performing query to count all news (we need to know it for browsing):\n\t\t\t$selectConf['selectFields'] = 'count(distinct(uid))'; //count(*)\n\t\t\t$res = $this->cObj->exec_getQuery('tt_news', $selectConf);\n\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);\n\t\t\t$newsCount = $row[0];\n\t\t\t// Only do something if the queryresult is not empty\n\t\t\tif ($newsCount > 0) {\n\t\t\t\t// Init Templateparts: $t['total'] is complete template subpart (TEMPLATE_LATEST f.e.)\n\t\t\t\t// $t['item'] is an array with the alternative subparts (NEWS, NEWS_1, NEWS_2 ...)\n\t\t\t\t$t = array();\n\t\t\t\t$t['total'] = $this->getNewsSubpart($this->templateCode, $this->spMarker('###' . $templateName . '###'));\n\n\t\t\t\t$t['item'] = $this->getLayouts($t['total'], $this->alternatingLayouts, 'NEWS');\n\t\t\t\t// build query for display:\n\t\t\t\t$selectConf['selectFields'] = '*';\n\t\t\t\tif ($this->config['groupBy']) {\n\t\t\t\t\t$selectConf['groupBy'] = $this->config['groupBy'];\n\t\t\t\t} else {\n\t\t\t\t\t$selectConf['groupBy'] = 'uid';\n\t\t\t\t}\n\n\t\t\t\tif ($this->config['orderBy']) {\n\t\t\t\t\t$selectConf['orderBy'] = $this->config['orderBy'] . ($this->config['ascDesc']?' ' . $this->config['ascDesc']:'');\n\t\t\t\t} else {\n\t\t\t\t\t$selectConf['orderBy'] = 'datetime DESC';\n\t\t\t\t}\n\t\t\t\t// overwrite the groupBy value for categories\n\t\t\t\tif (!$this->catExclusive && $selectConf['groupBy'] == 'category') {\n\t\t\t\t\t$selectConf['leftjoin'] = 'tt_news_cat_mm ON tt_news.uid = tt_news_cat_mm.uid_local';\n\t\t\t\t\t$selectConf['groupBy'] = 'tt_news_cat_mm.uid_foreign';\n\t\t\t\t\t$selectConf['selectFields'] = 'DISTINCT tt_news.uid,tt_news.*';\n\t\t\t\t}\n\t\t\t\t// exclude the LATEST template from changing its content with the pagebrowser. This can be overridden by setting the conf var latestWithPagebrowser\n\t\t\t\tif ($theCode != 'LATEST' && !$this->conf['latestWithPagebrowser']) {\n\t\t\t\t\t$selectConf['begin'] = $this->piVars['pointer'] * $this->config['limit'];\n\t\t\t\t}\n\t\t\t\t// exclude news-records shown in LATEST from the LIST template\n\t\t\t\tif ($theCode == 'LIST' && $this->conf['excludeLatestFromList'] && !$this->piVars['pointer'] && !$this->piVars['cat']) {\n\t\t\t\t\tif ($this->config['latestLimit']) {\n\t\t\t\t\t\t$selectConf['begin'] += $this->config['latestLimit'];\n\t\t\t\t\t\t$newsCount -= $this->config['latestLimit'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$selectConf['begin'] += $newsCount;\n\t\t\t\t\t\t// this will clean the display of LIST view when 'latestLimit' is unset because all the news have been shown in LATEST already\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// List start ID\n\t\t\t\tif (($theCode == 'LIST' || $theCode == 'LATEST') && $this->config['listStartId'] && !$this->piVars['pointer'] && !$this->piVars['cat']) {\n\t$selectConf['begin'] = $this->config['listStartId'];\n\t\t\t\t}\n\n\t\t\t\t// MLC specific news to show\n\t\t\t\tif ( $this->config['newsId'] )\n\t\t\t\t{\n\t\t\t\t\t$selectConf['where']\t= \"\n\t\t\t\t\t\t1 = 1\n\t\t\t\t\t\tAND tt_news.uid = {$this->config['newsId']}\n\t\t\t\t\t\";\n\t\t\t\t}\n\n\t\t\t\t// Reset:\n\t\t\t\t$subpartArray = array();\n\t\t\t\t$wrappedSubpartArray = array();\n\t\t\t\t$markerArray = array();\n\n\t\t\t\tif ($theCode == 'XML') {\n\t\t\t\t\t$markerArray = $this->getXmlHeader();\n\n\t\t\t\t\t$subpartArray['###HEADER###'] = $this->cObj->substituteMarkerArray($this->getNewsSubpart($t['total'], '###HEADER###'), $markerArray);\n\t\t\t\t}\n\t\t\t\t// get the list of news items and fill them in the CONTENT subpart\n\t\t\t\t$subpartArray['###CONTENT###'] = $this->getListContent($t['item'], $selectConf, $prefix_display);\n\n\t\t\t\t$markerArray['###GOTOARCHIVE###'] = $this->pi_getLL('goToArchive');\n\t\t\t\t$markerArray['###LATEST_HEADER###'] = $this->pi_getLL('latestHeader');\n\t\t\t\t$wrappedSubpartArray['###LINK_ARCHIVE###'] = $this->local_cObj->typolinkWrap($this->conf['archiveTypoLink.']);\n\t\t\t\t// unset pagebrowser markers\n\t\t\t\t$markerArray['###LINK_PREV###'] = '';\n\t\t\t\t$markerArray['###LINK_NEXT###'] = '';\n\t\t\t\t$markerArray['###BROWSE_LINKS###'] = '';\n\t\t\t\t// render a pagebrowser if needed\n\t\t\t\tif ($newsCount > $this->config['limit'] && !$this->config['noPageBrowser']) {\n\t\t\t\t\t// configure pagebrowser vars\n\t\t\t\t\t$this->internal['res_count'] = $newsCount;\n\t\t\t\t\t$this->internal['results_at_a_time'] = $this->config['limit'];\n\t\t\t\t\t$this->internal['maxPages'] = $this->conf['pageBrowser.']['maxPages'];\n\t\t\t\t\t$this->internal['pagefloat'] = 'CENTER';\n\t\t\t\t\tif (!$this->conf['pageBrowser.']['showPBrowserText']) {\n\t\t\t\t\t\t$this->LOCAL_LANG[$this->LLkey]['pi_list_browseresults_page'] = '';\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->conf['userPageBrowserFunc']) {\n\t\t\t\t\t\t$markerArray = $this->userProcess('userPageBrowserFunc', $markerArray);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$markerArray['###BROWSE_LINKS###'] = $this->pi_list_browseresults($this->conf['pageBrowser.']['showResultCount'], $this->conf['pageBrowser.']['tableParams']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($t['total'], $markerArray, $subpartArray, $wrappedSubpartArray);\n\t\t\t} elseif (ereg('1=0', $where)) {\n\t\t\t\t// first view of the search page with the parameter 'emptySearchAtStart' set\n\t\t\t\t$markerArray['###SEARCH_EMPTY_MSG###'] = $this->local_cObj->stdWrap($this->pi_getLL('searchEmptyMsg'), $this->conf['searchEmptyMsg_stdWrap.']);\n\t\t\t\t$searchEmptyMsg = $this->getNewsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH_EMPTY###'));\n\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($searchEmptyMsg, $markerArray);\n\t\t\t} elseif ($this->piVars['swords']) {\n\t\t\t\t// no results\n\t\t\t\t$markerArray['###SEARCH_EMPTY_MSG###'] = $this->local_cObj->stdWrap($this->pi_getLL('noResultsMsg'), $this->conf['searchEmptyMsg_stdWrap.']);\n\t\t\t\t$searchEmptyMsg = $this->getNewsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH_EMPTY###'));\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($searchEmptyMsg, $markerArray);\n\t\t\t} elseif ($theCode == 'XML') {\n\t\t\t\t// fill at least the template header\n\t\t\t\t// Init Templateparts: $t['total'] is complete template subpart (TEMPLATE_LATEST f.e.)\n\t\t\t\t$t = array();\n\t\t\t\t$t['total'] = $this->getNewsSubpart($this->templateCode, $this->spMarker('###' . $templateName . '###'));\n\t\t\t\t// Reset:\n\t\t\t\t$subpartArray = array();\n\t\t\t\t$wrappedSubpartArray = array();\n\t\t\t\t$markerArray = array();\n\t\t\t\t// header data\n\t\t\t\t$markerArray = $this->getXmlHeader();\n\t\t\t\t// get the list of news items and fill them in the CONTENT subpart\n\t\t\t\t$subpartArray['###HEADER###'] = $this->cObj->substituteMarkerArray($this->getNewsSubpart($t['total'], '###HEADER###'), $markerArray);\n\n\t\t\t\t$t['total'] = $this->cObj->substituteSubpart($t['total'], '###HEADER###', $subpartArray['###HEADER###'], 0);\n\t\t\t\t$t['total'] = $this->cObj->substituteSubpart($t['total'], '###CONTENT###', '', 0);\n\n\t\t\t\t$content .= $t['total'];\n\t\t\t}\n\t\t\telseif ($this->arcExclusive && $this->piVars['pS'] && $GLOBALS['TSFE']->sys_language_content) {\n\t\t\t// this matches if a user has switched languages within a archive period that contains no items in the desired language\n\n\t\t\t\t$content .= $this->local_cObj->stdWrap($this->pi_getLL('noNewsForArchPeriod','Sorry, there are no translated news-articles in this Archive period'), $this->conf['noNewsToListMsg_stdWrap.']);\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$content .= $this->local_cObj->stdWrap($this->pi_getLL('noNewsToListMsg'), $this->conf['noNewsToListMsg_stdWrap.']);\n\t\t\t}\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "fa1c74a21cccdb280f60d6dc7dbfa870", "score": "0.637749", "text": "public function admin_list() {\n\t\trequire_once( 'say-what-list-table.class.php' );\n\t\trequire_once( 'html/say-what-admin-list.php' );\n\t}", "title": "" }, { "docid": "79184fc5d4f1ca01cbbc292ec10cbd63", "score": "0.6352242", "text": "function est_render_list_page(){\n\tinclude( get_template_directory() . '/framework/customdata/customdata_display.php' );\n}", "title": "" }, { "docid": "fea1df02832dcf7ef32973495ef62d6c", "score": "0.63325006", "text": "function list_action(){\n global $FUNCS, $PAGE, $DB, $CTX;\n\n // check if template's physical file missing\n if( !file_exists(K_SITE_DIR . $PAGE->tpl_name) ){\n $html = $FUNCS->render( 'template_missing' );\n\n $rs = $DB->select( K_TBL_PAGES, array('id'), \"template_id='\" . $DB->sanitize( $PAGE->tpl_id ). \"' AND is_master<>'1' LIMIT 1\" );\n if( count($rs) ){\n $FUNCS->add_html( $html );\n }\n else{\n $this->define_list_title();\n return $html;\n }\n }\n\n $rs = $DB->select( K_TBL_TEMPLATES, array('config_list'), \"id='\" . $DB->sanitize( $PAGE->tpl_id ). \"'\" );\n if( count($rs) ){\n $this->arr_config = @unserialize( base64_decode($rs[0]['config_list']) );\n }\n\n return parent::list_action();\n }", "title": "" }, { "docid": "f7a87ae6c993ad3c3f6ec9da2248552a", "score": "0.6310926", "text": "public function listAction()\n {\n if (Config::get('error')) {\n return false;\n }\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n // Check for existance\n $group = Model::getRow(Route::param('alias'), 'alias', 1);\n if (!$group) {\n return Config::error();\n }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n Model::addView($group);\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, $this->offset, $this->sort, $this->type);\n // Generate pagination\n $pager = Pager::factory($this->page, $result['total'], $this->limit)->create();\n // Render page\n $this->_content = View::tpl(['result' => $result['items'], 'pager' => $pager], 'Catalog/ItemsList');\n }", "title": "" }, { "docid": "9531bfb085cb9934430b7547bfecb39d", "score": "0.6302997", "text": "public function lists()\n {\n }", "title": "" }, { "docid": "8bdb69c0c9e54e28c2d4b6bfc234f8cb", "score": "0.62987846", "text": "public function listAction()\n {\n }", "title": "" }, { "docid": "d2f196f6527ee0498b1f382fe6b03c2c", "score": "0.62984186", "text": "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n?>\n\t\t<div class=\"wp-list-table <?php echo esc_attr( implode( ' ', $this->get_table_classes() ) ); ?>\">\n\n\t\t\t<div id=\"the-list\" <?php echo esc_attr( $data_attr ); ?> >\n\t\t\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t\t\t</div>\n\t\t</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "title": "" }, { "docid": "92b0f36ad62ca8d516cb858ed917c664", "score": "0.6298224", "text": "protected function setupListOperation()\n {\n CRUD::addColumn([\n 'name' => 'url',\n 'label' => __('Url'),\n 'type' => 'closure',\n 'function' => function ($entry) {\n return \"<a href='$entry->url' target='_blank'>$entry->url</a>\";\n },\n 'searchLogic' => 'text'\n ]);\n CRUD::column('addedBy.username')->label( __('Added By') );\n CRUD::column('created_at')->label( __('Created At') );\n\n // Remove default buttons and add review button instead\n CRUD::removeAllButtons();\n CRUD::addButtonFromView('line', 'reviewTutorial', 'review-tutorial', 'beginning');\n }", "title": "" }, { "docid": "13726ecd940a335859b22827e82c8a19", "score": "0.629464", "text": "function Ally_list() {\n #check rights\n if (!$this->_checkUserRights(array(\"addally\",\"editally\",\"deleteally\"))){\n #no permission\n $this->_header(\"\",\"no permission\");\n }\n $allylistfilter = $_SESSION['allylistfilter'];\n $page = param_num(\"page\",1);\n $rows = 6;\n if (($_REQUEST['sort'] && $_REQUEST['order']) || !$allylistfilter) {\n $sort = trim($_REQUEST['sort']);\n $order = trim($_REQUEST['order']);\n if ($sort != 'name' && $sort != 'tag' && $sort != 'member') $sort = 'tag';\n if ($order != \"asc\" && $order != \"desc\") $order = \"asc\";\n $allylistfilter['sort'] = $sort;\n $allylistfilter['order'] = $order;\n $_SESSION['allylistfilter'] = $allylistfilter;\n }\n $this->forms['list'][$allylistfilter['sort']][$allylistfilter['order']] = '_active';\n $allylist = listAllys($allylistfilter,&$pages,&$page,$rows);\n $this->forms['list']['pages'] = showPageBar($page,$pages,\"admin.php?action=ally\",\"page\",\"menu\");\n $this->template->assign(\"allylist\",$allylist);\n $this->show('ally_list',\"Allianzen\");\n }", "title": "" }, { "docid": "6b412cc8eedf60b3d65e3c2dd34eb5ce", "score": "0.6289818", "text": "public function renderList()\n {\n\n $method = Tools::getValue('method');\n if($method == 'processList'){\n // Process list\n //$html .= $this->_processList();\n }\n\n $iconRefresh = $this->bootstrap ? 'download' : 'refresh-index';\n $this->toolbar_btn[$iconRefresh] = array(\n 'desc' => $this->l('Update Objects'),\n 'href' => AdminController::$currentIndex.'&method=processList&token='.Tools::getAdminTokenLite('AdminMyModuleMyObjectModel'),\n );\n\n $iconConfig = $this->bootstrap ? 'edit' : 'new-url';\n $this->toolbar_btn[$iconConfig] = array(\n 'desc' => $this->l('Configure'),\n 'href' => $this->context->link->getAdminLink('AdminModules').'&configure='. $this->moduleName,\n );\n\n // Remove 'Add New' button\n unset($this->toolbar_btn['new']);\n\n return parent::renderList();\n }", "title": "" }, { "docid": "33aedd4a0518182c21adb97cbfd2344b", "score": "0.62869734", "text": "public function listinfoAction() {\n $this->_breadcrumbs->addStep($this->Translate('Список информационной помощи'));\n }", "title": "" }, { "docid": "51831ac0b37bfe283f6027ae6f9f4876", "score": "0.62840676", "text": "function lists()\n\t{\n\t}", "title": "" }, { "docid": "d41e2e38be85926a8a29158301af89af", "score": "0.62709403", "text": "public function list(){\n }", "title": "" }, { "docid": "d5e200712c102dbacb19be6089f3198d", "score": "0.62695855", "text": "protected function action_listview() {\n// $this->bean = new CustomAccount(); \n $this->bean = new Account(); \n\t\tparent::action_listview();\n }", "title": "" }, { "docid": "6409d96336705ee6540f1ae899e53ae7", "score": "0.6258111", "text": "protected function renderListOptionsExt()\n {\n }", "title": "" }, { "docid": "5262465e33f3a5ac962b839a91f67e2e", "score": "0.62560767", "text": "function vouchers_register_toggle() {\n\t$url = elgg_http_remove_url_query_element(current_page_url(), 'list_type');\n\n\tif (get_input('list_type', 'list') == 'list') {\n\t\t$list_type = \"gallery\";\n\t\t$icon = elgg_view_icon('grid');\n\t} else {\n\t\t$list_type = \"list\";\n\t\t$icon = elgg_view_icon('list');\n\t}\n\n\tif (substr_count($url, '?')) {\n\t\t$url .= \"&list_type=\" . $list_type;\n\t} else {\n\t\t$url .= \"?list_type=\" . $list_type;\n\t}\n\n\n\telgg_register_menu_item('extras', array(\n\t\t'name' => 'vouchers_list',\n\t\t'text' => $icon,\n\t\t'href' => $url,\n\t\t'title' => elgg_echo(\"vouchers:list:$list_type\"),\n\t\t'priority' => 1000,\n\t));\n}", "title": "" }, { "docid": "3a09f675c360d94c15c4459a5f528627", "score": "0.6251776", "text": "public function actionList()\n\t{\n\t\t$this->layout = 'listingcolumn2';\n\t\t\n\t\t$criteria = new CDbCriteria(); \t\t\n\t\t$inst = Instrument::model()->findAll($criteria);\t \n\t\t$this->render('instrumentlist',array('inst' => $inst));\t \n\t \n\t}", "title": "" }, { "docid": "6f716fb0d645620791c39e3c2af2b242", "score": "0.6248943", "text": "function index() {\n Event::run('system.404');\n if ( ! A2::instance()->allowed('recruit', 'manage'))\n Event::run('system.403');\n \n $this->title = 'Manage Recruitment Lists';\n $this->lists = ORM::factory('recruit_list')->get();\n }", "title": "" }, { "docid": "bbd976a3cc99fdf36a4ab85d72d6d46c", "score": "0.6246341", "text": "protected function setupListOperation()\n {\n $this->crud->setColumns(['title','slug']);\n }", "title": "" }, { "docid": "15871bf4ada7393bc878944a01d437da", "score": "0.6238047", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_role->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->load('template', 'contents', 'role/list', $data);\n\t}", "title": "" }, { "docid": "de20c6b0270385eee3ac9e701bf4846d", "score": "0.6235953", "text": "protected function addToolbarForListPage()\n\t{\n \n\t\tJToolBarHelper::custom('se_urlreward.create', 'new.png', 'new.png', 'New', false,false);\n\t\tJToolBarHelper::custom('se_urlreward.delete', 'delete.png', 'delete.png', 'Delete', true);\n\t\tJToolbarHelper::back('Back', 'index.php?option=com_searchengine&package_id='.JRequest::getVar('package_id'));\n\t}", "title": "" }, { "docid": "a2f50fe2de02ccccb02d8e28c8204098", "score": "0.6233415", "text": "public function on_list() {\n\n if (!is_file($this->cache_file)) {\n // init form\n $list = array(\n array(\n 'todo' => '5:00 出门吃烤肉',\n 'completed' => 0,\n 'dateline' => time() - 3600,\n ),\n array(\n 'todo' => '写5000行代码',\n 'completed' => time(),\n 'dateline' => time() - 2000,\n ),\n array(\n 'todo' => '找个妹子表白',\n 'completed' => 0,\n 'dateline' => time() - 1000,\n ),\n );\n } else {\n $list = json_decode(file_get_contents($this->cache_file), 1);\n }\n $extend = array(\n 'list' => $list,\n // some config for user\n 'conf' => array(),\n );\n $this->show_json('', 0, $extend);\n }", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.62330747", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "22891861fa74043db48073093454900c", "score": "0.6229124", "text": "protected function setupListOperation()\n {\n // $this->crud->setFromDb();\n $name = $this->textCol('name', 'Name');\n $link = $this->textCol('link', 'Link');\n \n CRUD::addColumns([$name,$link]);\n }", "title": "" }, { "docid": "e8b53da9f4cc647985e0b409c5403c8c", "score": "0.622848", "text": "public function index() {\n\t\t$pseudo = $this->info['pseudo'];\n\t\t$list = null;\n\t\tif ($this->pList->checkPseudo($pseudo)) {\n\t\t\t$list = $this->pList->getItemList($pseudo);\n\t\t}\n\n\t\t$this->generateView(array(\n\t\t\t'lastCo' => $this->info['lc'],\n\t\t\t'pseudo' => $pseudo,\n\t\t\t'list' => $list,\t\t\t\n\t\t));\n\t}", "title": "" }, { "docid": "8ee06d50b4220e3a57e920d9df7dd477", "score": "0.62272626", "text": "protected function setupListOperation()\n {\n CRUD::column('id')->type('number');\n CRUD::column('img')->type('image')\n ->prefix('uploads/images/banners/');\n\n CRUD::column('title')->type('text');\n CRUD::column('second_title')->type('text');\n\n CRUD::column('description')->type('text');\n CRUD::column('link')->type('text');\n }", "title": "" }, { "docid": "a0f47ff5e34e55aa4898d974a79342f9", "score": "0.622279", "text": "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "title": "" }, { "docid": "ed3575b68c59e9612dec439c2b5c6cf8", "score": "0.61914617", "text": "protected function setViewSpecificListRowContents() {\n\t\t$this->setMarker(\n\t\t\t'editor_link',\n\t\t\t$this->createLinkToFeEditorPage(\n\t\t\t\t'editorPID', $this->internal['currentRow']['uid']\n\t\t\t)\n\t\t);\n\t\t$this->setMarker(\n\t\t\t'image_upload_link',\n\t\t\t$this->createLinkToFeEditorPage(\n\t\t\t\t'imageUploadPID', $this->internal['currentRow']['uid']\n\t\t\t)\n\t\t);\n\t\t$this->setMarker(\n\t\t\t'really_delete',\n\t\t\t$this->translate('label_really_delete') . '\\n' .\n\t\t\t\t$this->translate('label_object_number') . ' ' .\n\t\t\t\t$this->internal['currentRow']['object_number'] . ': ' .\n\t\t\t\t$this->internal['currentRow']['title']\n\t\t);\n\t\t$this->setMarker(\n\t\t\t'delete_link',\n\t\t\t$this->cObj->typoLink_URL(\n\t\t\t\tarray(\n\t\t\t\t\t'parameter' => $GLOBALS['TSFE']->id,\n\t\t\t\t\t'additionalParams' => t3lib_div::implodeArrayForUrl(\n\t\t\t\t\t\t$this->prefixId,\n\t\t\t\t\t\tarray('delete' => $this->internal['currentRow']['uid'])\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$this->setMarker(\n\t\t\t'record_state',\n\t\t\t$this->translate($this->internal['currentRow']['hidden']\n\t\t\t\t? 'label_pending' : 'label_published'\n\t\t\t)\n\t\t);\n\n\t\t$this->setAdvertisementMarkers();\n\t}", "title": "" }, { "docid": "487e87ad232ff325cc457bf55a83c693", "score": "0.6191044", "text": "protected function setupListOperation()\n {\n $this->defaultListColumns();\n CRUD::enableExportButtons();\n }", "title": "" }, { "docid": "260fd1cce15daccf5bfeb76c61136145", "score": "0.6183777", "text": "public static function form_list_page() {\r\n\t\trequire_once( GFCommon::get_base_path() . '/form_list.php' );\r\n\t\tGFFormList::form_list_page();\r\n\t}", "title": "" }, { "docid": "c55c0a643ba11846a6b934eb10f20d6b", "score": "0.6156253", "text": "protected function setupListOperation()\n {\n //CRUD::column('surname');\n //CRUD::column('firstname');\n //CRUD::column('phonenumber');\n //CRUD::column('email');\n //CRUD::column('password');\n //CRUD::column('role_id');\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n\n $this->crud->addFilter([\n 'name' => 'role',\n 'type' => 'dropdown',\n 'label' => trans('macyo_custom.role')\n ], function () {\n return \\App\\Models\\Role::all()->pluck('name', 'id')->all();\n }, function ($value) { // if the filter is active\n $this->crud->addClause('where', 'role_id', $value);\n });\n\n //$this->crud->denyAccess('show');\n }", "title": "" }, { "docid": "0da13ebee7c060ee0e0bcb248127cae6", "score": "0.6151604", "text": "function sam_martin_theme_functions_vc_component_sm_list() {\n\tif ( function_exists( 'vc_map' ) ) {\n\t\tglobal $vc_gitem_add_link_param;\n\t\tvc_map( array(\n\t\t\t\"name\" => esc_html__( \"Potenza List\", 'smtf' ),\n\t\t\t\"description\" => esc_html__( \"Potenza List\", 'smtf'),\n\t\t\t\"base\" => \"sm_list\",\n\t\t\t\"class\" => \"thecorps_xyz\",\n\t\t\t\"controls\" => \"full\",\n\t\t\t\"icon\" => 'icon-thecorps-vc',\n\t\t\t\"category\" => esc_html__('Potenza', 'smtf'),\n\t\t\t\"show_settings_on_create\" => true,\n\t\t\t\"params\" => array(\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'heading' => esc_html__( 'Add icon?', 'smtf' ),\n\t\t\t\t\t'param_name'=> 'add_icon',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'dropdown',\n\t\t\t\t\t'heading'=> esc_html__( 'Icon library', 'smtf' ),\n\t\t\t\t\t'value' => array(\n\t\t\t\t\t\tesc_html__( 'Font Awesome', 'smtf' )=> 'fontawesome',\n\t\t\t\t\t\tesc_html__( 'Open Iconic', 'smtf' ) => 'openiconic',\n\t\t\t\t\t\tesc_html__( 'Typicons', 'smtf' ) => 'typicons',\n\t\t\t\t\t\tesc_html__( 'Entypo', 'smtf' ) => 'entypo',\n\t\t\t\t\t\tesc_html__( 'Linecons', 'smtf' ) => 'linecons',\t\t\t\t\t\t\n\t\t\t\t\t\tesc_html__( 'Mono Social', 'smtf' ) => 'monosocial',\n\t\t\t\t\t),\n\t\t\t\t\t'param_name' => 'icon_type',\n\t\t\t\t\t'description' => esc_html__( 'Select icon library.', 'smtf' ),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'add_icon',\n\t\t\t\t\t\t'value' => 'true',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name'=> 'icon_fontawesome',\n\t\t\t\t\t'value' => 'fa fa-info-circle',\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false,\n\t\t\t\t\t\t// default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'iconsPerPage' => 4000,\n\t\t\t\t\t\t// default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'icon_type',\n\t\t\t\t\t\t'value' => 'fontawesome',\n\t\t\t\t\t),\n\t\t\t\t\t'description' => esc_html__( 'Select icon from library.', 'smtf' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name'=> 'icon_openiconic',\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false,\n\t\t\t\t\t\t// default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'type' => 'openiconic',\n\t\t\t\t\t\t'iconsPerPage' => 4000,\n\t\t\t\t\t\t// default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'icon_type',\n\t\t\t\t\t\t'value' => 'openiconic',\n\t\t\t\t\t),\n\t\t\t\t\t'description' => esc_html__( 'Select icon from library.', 'smtf' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name' => 'icon_typicons',\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false,\n\t\t\t\t\t\t// default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'type' => 'typicons',\n\t\t\t\t\t\t'iconsPerPage' => 4000,\n\t\t\t\t\t\t// default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'icon_type',\n\t\t\t\t\t\t'value' => 'typicons',\n\t\t\t\t\t),\n\t\t\t\t\t'description' => esc_html__( 'Select icon from library.', 'smtf' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name' => 'icon_entypo',\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false,\n\t\t\t\t\t\t// default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'type' => 'entypo',\n\t\t\t\t\t\t'iconsPerPage' => 4000,\n\t\t\t\t\t\t// default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'icon_type',\n\t\t\t\t\t\t'value' => 'entypo',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name'=> 'icon_linecons',\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false,\n\t\t\t\t\t\t// default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'type' => 'linecons',\n\t\t\t\t\t\t'iconsPerPage' => 4000,\n\t\t\t\t\t\t// default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element'=> 'icon_type',\n\t\t\t\t\t\t'value' => 'linecons',\n\t\t\t\t\t),\n\t\t\t\t\t'description' => esc_html__( 'Select icon from library.', 'smtf' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'iconpicker',\n\t\t\t\t\t'heading' => esc_html__( 'Icon', 'smtf' ),\n\t\t\t\t\t'param_name'=> 'icon_monosocial',\n\t\t\t\t\t'value' => 'vc-mono vc-mono-fivehundredpx', // default value to backend editor admin_label\n\t\t\t\t\t'settings' => array(\n\t\t\t\t\t\t'emptyIcon' => false, // default true, display an \"EMPTY\" icon?\n\t\t\t\t\t\t'type' => 'monosocial',\n\t\t\t\t\t\t'iconsPerPage'=> 4000, // default 100, how many icons per/page to display\n\t\t\t\t\t),\n\t\t\t\t\t'dependency' => array(\n\t\t\t\t\t\t'element' => 'icon_type',\n\t\t\t\t\t\t'value' => 'monosocial',\n\t\t\t\t\t),\n\t\t\t\t\t'description' => esc_html__( 'Select icon from library.', 'smtf' ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'param_group',\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'param_name' => 'list',\n\t\t\t\t\t'group' => esc_html__( 'List', 'smtf' ),\n\t\t\t\t\t'callbacks' => array(\n\t\t\t\t\t\t'after_add' => 'vcChartParamAfterAddCallback',\n\t\t\t\t\t),\n\t\t\t\t\t'params' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t'heading' => esc_html__( 'Content', 'smtf' ),\n\t\t\t\t\t\t\t'param_name' => 'title',\n\t\t\t\t\t\t\t'tooltip' => esc_html__( 'Define item content. <br/>HTML markup is supported.', 'smtf' ),\n\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t'edit_field_class' => 'vc_col-sm-12 vc_column',\n\t\t\t\t\t\t\t'admin_label' => true,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\t\t\t\n\t\t\t)\n\t\t) );\n\t}\n}", "title": "" }, { "docid": "c6e21cd43184d7a9fec6a1f6eadfc87f", "score": "0.6144212", "text": "function renderList()\n {\n $filter = $this->getFilter();\n $headpage = $this->getHeadpage();\n $this->releaseSelector->update();\n $this->fai_release = $this->releaseSelector->getBase();\n $headpage->setBase($this->fai_release);\n $headpage->update();\n $smarty = get_smarty();\n $r = $this->config->get_cfg_value(\"faiManagement\", \"postremove\");\n $c = $this->config->get_cfg_value(\"faiManagement\", \"postcreate\");\n $smarty->assign(\"allow_create\", $c);\n $smarty->assign(\"allow_remove\", $r);\n $smarty->assign(\"RELEASE\", $this->releaseSelector->render());\n $display = $headpage->render();\n return($this->getHeader().$display);\n }", "title": "" }, { "docid": "dcbdf548c2a7607c55bace3d77efe33c", "score": "0.61380875", "text": "public function renderList()\n\t{\n\t\t$this->addRowAction('edit');\n\t\t$this->addRowAction('delete');\n\t\t$this->addRowAction('details');\n\t\t$this->bulk_actions = array(\n\t\t\t'delete' => array(\n\t\t\t\t'text' => $this->trans('Delete selected', array(), 'Modules.combinationseo.Admin'),\n\t\t\t\t'confirm' => $this->trans('Delete selected items?', array(), 'Modules.combinationseo.Admin')\n\t\t\t\t)\n\t\t\t);\n\t\t$this->fields_list = array(\n\t\t\t'id' => array(\n\t\t\t\t'title' => $this->trans('ID', array(), 'Modules.combinationseo.Admin'),\n\t\t\t\t'align' => 'center',\n\t\t\t\t'width' => 25\n\t\t\t),\n\t\t\t'blockreference' => array(\n\t\t\t\t'title' => $this->trans('Block reference', array(), 'Modules.combinationseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t\t'subreference' => array(\n\t\t\t\t'title' => $this->trans('Subreference of block', array(), 'Modules.combinationseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t\t'text' => array(\n\t\t\t\t'title' => $this->trans('text', array(), 'Modules.combinationseo.Admin'),\n\t\t\t\t'width' => 'auto',\n\t\t\t),\n\t\t);\n\t\t// Gère les positions\n\t\t$this->fields_list['position'] = array(\n\t\t\t'title' => $this->trans('Position', array(), 'Modules.combinationseo.Admin'),\n\t\t\t'width' => 70,\n\t\t\t'align' => 'center',\n\t\t\t'position' => 'position'\n\t\t);\n\t\t$lists = parent::renderList();\n\t\tparent::initToolbar();\n\t\treturn $lists;\n\t}", "title": "" }, { "docid": "ad0f3cdea6172041d2c0c5d72ceb3f76", "score": "0.61341476", "text": "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "title": "" }, { "docid": "002698cd12d262b1ef32978713a3aae0", "score": "0.6120487", "text": "public function apartment_item_list() {\r\n $data = array();\r\n $data['body']['items'] = $this->stock_model->select_all_apartment_items();\r\n /*print_r($data['body']['items']).exit;*/\r\n $data['header']['title'] = \"Apartment Stock\";\r\n $data['header']['menu_base'] = \"stock\";\r\n $data['body']['page'] = \"apartment_item_list\";\r\n makeTemplateAdmin($data);\r\n }", "title": "" }, { "docid": "5284e0e8a629d94b2c297dec365035f8", "score": "0.6104815", "text": "function index(){\n\n\t\t$this->post_listing($start=0);\n\n\t}", "title": "" }, { "docid": "12ca284d322ed4acfe8155a178456e14", "score": "0.60969913", "text": "public function viewAction()\n {\n if(!$this->current_user){\n $this->_redirect('/');\n }\n \n $idList = $this->_request->getParam('id');\n $list = new Model_DbTable_List();\n $inst_user = new Model_DbTable_User();\n $this->view->infoList = $list->find($idList)->current();\n $list_user = $this->view->infoList->findModel_DbTable_UserViaModel_DbTable_UserHasListByListAndUser()->current();\n $this->view->user_list = $inst_user->find($list_user['idUser'])->current(); \n $this->view->modelList= $list->getTypes($this->view->infoList);\n $this->view->listItem = $list->getItemsNoModel($this->view->infoList); \n }", "title": "" }, { "docid": "3fe9ae921639a445462362594f471c37", "score": "0.6074626", "text": "function showList($idL, $list_name)\n{\n\t$tasks = getTableName($idL);\n\n\trender(\"To_do_list/listPage\", array(\n\t\t'tasks' \t\t=> $tasks,\n\t\t'idL'\t\t\t\t=> $idL,\n\t\t'list_name'\t=> $list_name)\n\t);\n}", "title": "" }, { "docid": "defd636553026ad3d60788e99a81cc4f", "score": "0.6071031", "text": "function AlbumList($info){\r\n\t\t\tif (!isset($info['left_panel'])){\r\n\t\t\t\t$info['left_panel'] = true;\r\n\t\t\t\t$this -> setTemplate(null, 'list_profile.tpl.php');\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$this -> setTemplate(null, 'list.tpl.php');\t\r\n\t\t\t}\r\n\t\t\t$this -> set($info);\r\n\t\t}", "title": "" }, { "docid": "c69023e05e64daec46a607e6f80ce8b9", "score": "0.60692865", "text": "protected function displayMessagesList()\n {\n //$this->getPathway()->addItem($this->_data['page_title']);\n }", "title": "" }, { "docid": "891c470ce0db856f702c540ec95197a9", "score": "0.606582", "text": "public function displayList() {\n\t\tif (in_array('SEARCH', $this->codes)) {\n\t\t\t$template = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_SEARCH###');\n\t\t\t// TODO : Implements search code\n\t\t\t// Insert hook?\n\t\t}\n\t\telse {\n\t\t\t$template = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_RESULTS_NOSEARCH###');\n\t\t}\n\t\tif (in_array('LIST', $this->codes)) {\n\t\t\t$renderList = t3lib_div::makeInstance(\n\t\t\t\t'tx_icstcafeadmin_ListRenderer',\n\t\t\t\t$this,\n\t\t\t\t$this->table,\n\t\t\t\t$this->fields,\n\t\t\t\t$this->fieldLabels,\n\t\t\t\t$this->conf\n\t\t\t);\n\t\t\t$renderList->init();\n\t\t\t$locMarkers['RESULT_LIST'] = $renderList->render($this->getRecords());\n\t\t}\n\t\telse {\n\t\t\t$locMarkers['RESULT_LIST'] = '';\n\t\t}\n\t\t$template = $this->cObj->substituteMarkerArray($template, $locMarkers, '###|###');\n\n\t\t$markers = array(\n\t\t\t'PREFIXID' => $this->prefixId,\n\t\t);\n\t\t$template = $this->cObj->substituteMarkerArray($template, $markers, '###|###');\n\t\t\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "a14ec0450a8465a608c6acc64a3e8653", "score": "0.60551584", "text": "private function list_items() {\n\t\t\t$count = 0;\n\t\t\t$class = $this->css_class;\n\t\t\t\n\t\t\tforeach ($this->menu_items as $item) {\n\t\t\t\tif (($this->file != $item['link']) && (!isset($item['column']))) {\n\t\t\t\t\techo \"<li id=\\\"\" . $class . \"_\" . $count . \"\\\" class=\\\"$class\\\"><a href=\\\"\";\n\t\t\t\t\t\tif ($item['link'] != 'drop_down') {\n\t\t\t\t\t \t\techo $item['link'] . \"\\\" \";\n\t\t\t\t\t \t}\n\t\t\t\t\t \telse {\n\t\t\t\t\t \t\techo \"\\\" \";\n\t\t\t\t\t \t}\n\t\t\t\t\t echo \"class=\\\"$class\\\" \";\n\t\t\t\t\tif (array_key_exists('first_event', $item)) {\n\t\t\t\t\t\techo $item['first_event'] . \"=\\\"\" . $item['first_js'];\n\t\t\t\t\t\tif ($item['link'] == 'drop_down') {\n\t\t\t\t\t\t\techo \"; showDropDown('\" . $class . \"_\" . $count . \"', '\". $class . \"Dd_\" . $count . \"')\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"\\\" \";\n\t\t\t\t\t}\n\t\t\t\t\tif (array_key_exists('second_event', $item)) {\n\t\t\t\t\t\techo $item['second_event'] . \"=\\\"\" . $item['second_js'];\n\t\t\t\t\t\tif ($item['link'] == 'drop_down') {\n\t\t\t\t\t\t\techo \"; hideDropDown('\" . $class . \"Dd_\" . $count . \"')\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\techo \">\" . $item['caption'] . \"</a></li>\\n\";\n\t\t\t\t}\n\t\t\t\tif ($item['link'] == 'drop_down') {\n\t\t\t\t\t$item['num'] = $count;\n\t\t\t\t\t$this->drop_down_menus[] = $item;\n\t\t\t\t}\n\t\t\t\tif (isset($item['column'])) {\n \t\t\t\t\t$this->drop_down_items[] = $item;\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ebf7a2b9024bb1b0de64be8b84d88d36", "score": "0.6045922", "text": "function ADMIN_simpleList($fieldfunction, $header_arr, $text_arr,\n $data_arr, $options = '', $form_arr='')\n{\n global $_CONF, $_TABLES, $LANG01, $LANG_ADMIN, $LANG_ACCESS, $MESSAGE,\n $_IMAGE_TYPE;\n\n $retval = '';\n\n $help_url = '';\n if (!empty($text_arr['help_url'])) {\n $help_url = $text_arr['help_url'];\n }\n\n $title = '';\n if (!empty($text_arr['title'])) {\n $title = $text_arr['title'];\n }\n\n $form_url = '';\n if (!empty($text_arr['form_url'])) {\n $form_url = $text_arr['form_url'];\n }\n\n $admin_templates = new Template($_CONF['path_layout'] . 'admin/lists');\n $admin_templates->set_file (\n array (\n 'list' => 'list.thtml',\n 'header' => 'header.thtml',\n 'row' => 'listitem.thtml',\n 'field' => 'field.thtml'\n )\n );\n $admin_templates->set_var( 'xhtml', XHTML );\n $admin_templates->set_var('site_url', $_CONF['site_url']);\n $admin_templates->set_var('site_admin_url', $_CONF['site_admin_url']);\n $admin_templates->set_var('layout_url', $_CONF['layout_url']);\n $admin_templates->set_var('form_url', $form_url);\n $admin_templates->set_var('lang_edit', $LANG_ADMIN['edit']);\n $admin_templates->set_var('lang_deleteall', $LANG01[124]);\n $admin_templates->set_var('lang_delconfirm', $LANG01[125]);\n if (isset($form_arr['top'])) {\n $admin_templates->set_var('formfields_top', $form_arr['top']);\n }\n if (isset($form_arr['bottom'])) {\n $admin_templates->set_var('formfields_bottom', $form_arr['bottom']);\n }\n\n # define icon paths. Those will be transmitted to $fieldfunction.\n $icons_type_arr = array('edit', 'copy', 'list', 'addchild');\n $icon_arr = array();\n foreach ($icons_type_arr as $icon_type) {\n $icon_url = \"{$_CONF['layout_url']}/images/$icon_type.$_IMAGE_TYPE\";\n $icon_arr[$icon_type] = COM_createImage($icon_url, $LANG_ADMIN[$icon_type]);\n }\n\n // Check if the delete checkbox and support for the delete all feature should be displayed\n $min_data = 1;\n if (is_array($options) && isset($options['chkminimum'])) {\n $min_data = $options['chkminimum'];\n }\n if (count($data_arr) > $min_data AND is_array($options) AND $options['chkdelete']) {\n $admin_templates->set_var('header_text', '<input type=\"checkbox\" name=\"chk_selectall\" title=\"'.$LANG01[126].'\" onclick=\"caItems(this.form);\"' . XHTML . '>');\n $admin_templates->set_var('class', \"admin-list-field\");\n $admin_templates->set_var('show_deleteimage', '');\n $admin_templates->parse('header_row', 'header', true);\n $admin_templates->clear_var('on_click');\n } else {\n $admin_templates->set_var('show_deleteimage','display:none;');\n }\n\n # HEADER FIELDS array(text, field, sort)\n for ($i=0; $i < count( $header_arr ); $i++) {\n $admin_templates->set_var('header_text', $header_arr[$i]['text']);\n if (!empty($header_arr[$i]['header_class'])) {\n $admin_templates->set_var('class', $header_arr[$i]['header_class']);\n } else {\n $admin_templates->set_var('class', \"admin-list-headerfield\");\n }\n $admin_templates->parse('header_row', 'header', true);\n }\n\n if (count($data_arr) == 0) {\n if (isset($text_arr['no_data'])) {\n $message = $text_arr['no_data'];\n } else {\n $message = $LANG_ADMIN['no_results'];\n }\n $admin_templates->set_var('message', $message);\n } else if ($data_arr === false) {\n $admin_templates->set_var('message', $LANG_ADMIN['data_error']);\n } else {\n $admin_templates->set_var('show_message', 'display:none;');\n for ($i = 0; $i < count($data_arr); $i++) {\n if (count($data_arr) > $min_data AND is_array($options) AND $options['chkdelete']) {\n $admin_templates->set_var('itemtext', '<input type=\"checkbox\" name=\"delitem[]\" value=\"' . $data_arr[$i][$options['chkfield']].'\"' . XHTML . '>');\n $admin_templates->set_var('class', \"admin-list-field\");\n $admin_templates->parse('item_field', 'field', true);\n }\n for ($j = 0; $j < count($header_arr); $j++) {\n $fieldname = $header_arr[$j]['field'];\n $fieldvalue = '';\n if (!empty($data_arr[$i][$fieldname])) {\n $fieldvalue = $data_arr[$i][$fieldname];\n }\n if (!empty($fieldfunction)) {\n $fieldvalue = $fieldfunction($fieldname, $fieldvalue, $data_arr[$i], $icon_arr);\n } else {\n $fieldvalue = $fieldvalue;\n }\n if (!empty($header_arr[$j]['field_class'])) {\n $admin_templates->set_var('class', $header_arr[$j]['field_class']);\n } else {\n $admin_templates->set_var('class', \"admin-list-field\");\n }\n if ($fieldvalue !== false) {\n $admin_templates->set_var('itemtext', $fieldvalue);\n $admin_templates->parse('item_field', 'field', true);\n }\n }\n $admin_templates->set_var('cssid', ($i%2)+1);\n $admin_templates->parse('item_row', 'row', true);\n $admin_templates->clear_var('item_field');\n }\n }\n\n $admin_templates->parse('output', 'list');\n\n if (!empty($title)) {\n $retval .= COM_startBlock($title, $help_url,\n COM_getBlockTemplate('_admin_block', 'header'));\n }\n $retval .= $admin_templates->finish($admin_templates->get_var('output'));\n if (!empty($title)) {\n $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));\n }\n\n return $retval;\n}", "title": "" }, { "docid": "6dd2b51d616003ed3fad1cb414a5a330", "score": "0.60445374", "text": "public function listview() {\n\n $news_list = Doctrine::getTable('News')->findAll();\n $data['news_list'] = $news_list;\n\n $data['view_name'] = \"news_list_view\";\n $this->load->view(\"admin/common/template\", $data);\n }", "title": "" }, { "docid": "648a9c7777e666542ba4fee85455ebb8", "score": "0.60397357", "text": "protected function setupListOperation()\n {\n //$this->addColumns();\n $this->crud->setFromDb();\n }", "title": "" }, { "docid": "77da688adebd32a49a0d2c8f60b5eb7a", "score": "0.6039709", "text": "protected function renderListEntry($pic, $append = '')\n {\n\n if ($pic[WgtMenu::ICON] != '' || trim($pic[WgtMenu::TEXT]) != '') {\n\n $text = trim($pic[WgtMenu::TEXT]) != '' ? $pic[WgtMenu::TEXT].'<br />' : '';\n\n if (Wgt::ACTION == $pic[WgtMenu::TYPE]) {\n $link = $text.'<img class=\"icon xsmall cursor\" '.\n ' src=\"'.$this->baseFolder.$pic[WgtMenu::ICON].'\" '.\n ' onclick=\"'.$pic[WgtMenu::ACTION].'\" '.\n ' alt=\"'.$pic[WgtMenu::TITLE].'\" '.\n ' title=\"'.$pic[WgtMenu::TITLE].'\" />';\n } elseif (Wgt::URL == $pic[WgtMenu::TYPE]) {\n $icon = '<img class=\"icon xsmall\" '.\n ' src=\"'.$this->baseFolder.$pic[WgtMenu::ICON].'\" '.\n ' alt=\"'.$pic[WgtMenu::TITLE].'\" '.\n ' title=\"'.$pic[WgtMenu::TITLE].'\" />';\n\n $link = '<a href=\"'.$pic[WgtMenu::ACTION].$append.'\" >'.$icon.'<span>'.$text.'</span></a>';\n } elseif (Wgt::AJAX == $pic[WgtMenu::TYPE]) {\n $icon = '<img class=\"icon xsmall\" '.\n ' src=\"'.$this->baseFolder.$pic[WgtMenu::ICON].'\" '.\n ' alt=\"'.$pic[WgtMenu::TITLE].'\" '.\n ' title=\"'.$pic[WgtMenu::TITLE].'\" />';\n\n $link = '<a class=\"wcm wcm_req_ajax\" href=\"'.$pic[WgtMenu::ACTION].$append.'\" >'.$icon.'<span>'.$text.'</span></a>';\n } elseif (Wgt::WINDOW == $pic[WgtMenu::TYPE]) {\n $icon = '<img class=\"icon xsmall\" '.\n ' src=\"'.$this->baseFolder.$pic[WgtMenu::ICON].'\" '.\n ' alt=\"'.$pic[WgtMenu::TITLE].'\" '.\n ' title=\"'.$pic[WgtMenu::TITLE].'\" />';\n\n $link = '<a class=\"wcm wcm_req_ajax\" href=\"'.$pic[WgtMenu::ACTION].$append.'\" >'.$icon.'<span>'.$text.'</span></a>';\n } else {\n $icon = '<img class=\"icon xsmall\" '.\n ' src=\"'.$this->baseFolder.$pic[WgtMenu::ICON].'\" '.\n ' alt=\"'.$pic[WgtMenu::TITLE].'\" '.\n ' title=\"'.$pic[WgtMenu::TITLE].'\" />';\n\n $link = '<a class=\"wcm wcm_req_ajax\" href=\"'.$pic[WgtMenu::ACTION].$append.'\" >'.$icon.'<span>'.$text.'</span></a>';\n }\n\n } else {\n $link = '&nbsp;';\n }\n\n return '<li>'.$link.'</li>'.NL;\n\n }", "title": "" }, { "docid": "736de7600e573a26efc18415b413efc9", "score": "0.60322964", "text": "function _scaffoldList($params)\n {\n $this->controllerClass->set('fieldNames', $this->controllerClass->generateFieldNames(null,false) );\n $this->controllerClass->set('data', $this->controllerClass->{$this->modelKey}->findAll());\n if(file_exists(APP.'views'.DS.$this->viewPath.DS.'scaffold.list.thtml'))\n {\n return $this->controllerClass->render($this->actionView, '', APP.'views'.DS.$this->viewPath.DS.'scaffold.list.thtml');\n }\n return $this->controllerClass->render($this->actionView, '', LIBS.'view'.DS.'templates'.DS.'scaffolds'.DS.'list.thtml');\n }", "title": "" }, { "docid": "9852f54e162cc7467c8c5459bde8c25a", "score": "0.60321295", "text": "protected function setupListOperation()\n {\n // CRUD::setFromDb(); // columns\n $this->crud->addColumns([\n [\n 'name' => 'name',\n 'label' => 'Nama',\n 'type' => 'avatar_name'\n ]\n ]);\n\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']); \n */\n }", "title": "" }, { "docid": "827a5ebdae2081bb3ac90527670c8a2f", "score": "0.6030311", "text": "public function run(){\r\n\t\t$this->init();\r\n\t\t$this->controller->render(\"List\",array(\r\n\t\t\t\t\t\t\t\t\t\t\t 'Tlist'=>$this->Tlist\r\n\t\t\t\t\t\t\t\t \t\t\t )\r\n\t\t\t\t\t\t\t\t );\r\n\t\t$this->Create_list();\r\n\t}", "title": "" }, { "docid": "d4992cd6ca840bedaffe5323183a7b46", "score": "0.6029467", "text": "protected function setupListOperation()\n {\n $this->crud->addColumns($this->getFieldsData());\n $this->crud->addFilter([\n 'name' => 'userid',\n 'type' => 'select2',\n 'label' => 'User'\n ], function() {\n return User::all()->pluck('username', 'id')->toArray();\n }, function($value) {\n $this->crud->addClause('where', 'userid', $value);\n });\n }", "title": "" }, { "docid": "2f625c2d4937749a56833b7650e16945", "score": "0.60284", "text": "public function get_list()\n {\n \n $this->template['usersx'] = $this->twitter_user_model->get_list();\n \n $this->output('admin/user_list');\n }", "title": "" }, { "docid": "33624126f637f374b6f8a69785117d16", "score": "0.601659", "text": "protected function setupListOperation() \n {\n\n CRUD::addColumn([\n 'name' => 'title',\n 'label' => __('Title'),\n ]);\n\n CRUD::addColumn([\n 'name' => 'content',\n 'label' => __('Content'),\n ]);\n\n CRUD::addColumn([\n 'name' => 'bounding_top',\n 'label' => __('Bounding Top'),\n ]);\n\n CRUD::addColumn([\n 'name' => 'bounding_right',\n 'label' => __('Bounding Right'),\n ]);\n\n CRUD::addColumn([\n 'name' => 'bounding_bottom',\n 'label' => __('Bounding Bottom'),\n ]);\n\n CRUD::addColumn([\n 'name' => 'bounding_left',\n 'label' => __('Bounding Left'),\n ]);\n\n }", "title": "" }, { "docid": "1d3519bfc0c34af363e0ac0fc95774e0", "score": "0.601623", "text": "function listAction(){\n \t$d['model'] = $this->get();\n \t$d['langMoodle'] = $_SESSION['_basic_lti_context']['launch_presentation_locale'];//TODELETE\n \treturn xView::load('home/home', $d)->render();\n }", "title": "" }, { "docid": "3791fefbd7489808aa82d9b61a1eaf9e", "score": "0.6013317", "text": "public function action_list()\n {\n// $content = View::factory('admin/manage/celebrity/list')->set('celebrities', $celebrities)->render();\n $content = View::factory('admin/manage/celebrity/list_1')->render();\n $this->request->response = View::factory('admin/template')->set('content', $content)->render();\n }", "title": "" }, { "docid": "9895a4a5bdaf7ebc3e294c230a975209", "score": "0.6012188", "text": "public function IndexAction() {\n $f = $this->initFilter();\n\n $this->setListSorting();\n $this->setListSearch();\n $this->setListSearchStatus();\n // set here non-standard search\n if ($f[\"field\"] > '') {\n $this->list_where .= \" and field=\".dbq($f[\"field\"]);\n }\n\n $this->getListRows();\n //add/modify rows from db if necessary\n /*\n foreach ($this->list_rows as $k => $row) {\n $this->list_rows[$k]['field'] = 'value';\n }\n */\n $ps=array(\n 'list_rows' => $this->list_rows,\n 'count' => $this->list_count,\n 'pager' => $this->list_pager,\n 'f' => $this->list_filter,\n 'related_id' => $this->related_id,\n 'return_url' => $this->return_url,\n );\n\n #optional userlists support\n $ps[\"select_userlists\"] = fw::model('UserLists')->listSelectByEntity($this->list_view);\n $ps[\"mylists\"] = fw::model('UserLists')->listForItem($this->list_view, 0);\n $ps[\"list_view\"] = $this->list_view;\n\n if ($this->is_dynamic_index){\n #customizable headers\n $this->setViewList($ps, reqh(\"search\"));\n }\n\n return $ps;\n }", "title": "" }, { "docid": "8d04f5c296b864cf90cecaf5468e572b", "score": "0.6008366", "text": "function jlist(){\n\t\t\temp::logi();\n\t\t\t\tinclude('theme/emp_list.php');\n\t\t}", "title": "" }, { "docid": "f4a274bcbf9485f1c1a7b1d245173b1c", "score": "0.60064137", "text": "public function listInfo();", "title": "" }, { "docid": "2f3248eed61dc89963285def920db3b0", "score": "0.6002072", "text": "function Galaxy_list() {\n #check rights\n $rank = $this->_getMinRightRank(array(\"addgala\",\"editgala\",\"deletegala\"));\n if (!$rank){\n #no permission\n $this->_header(\"\",\"no permission\");\n }\n $galaxylistfilter = $_SESSION['galaxylistfilter'];\n $page = param_num(\"page\",1);\n $rows = 12;\n #allianzebene & galaxieebene\n if ($rank > 1) {\n $galaxylistfilter['ally'] = $this->userdata['aid'];\n }\n if (($_REQUEST['sort'] && $_REQUEST['order']) || !$galaxylistfilter) {\n $sort = trim($_REQUEST['sort']);\n $order = trim($_REQUEST['order']);\n if ($sort != 'gala' && $sort != 'tag' && $sort != 'member') $sort = 'gala';\n if ($order != \"asc\" && $order != \"desc\") $order = \"asc\";\n $galaxylistfilter['sort'] = $sort;\n $galaxylistfilter['order'] = $order;\n $_SESSION['galaxylistfilter'] = $galaxylistfilter;\n }\n $this->forms['list'][$galaxylistfilter['sort']][$galaxylistfilter['order']] = '_active';\n $galaxylist = listGalaxys($galaxylistfilter,&$pages,&$page,$rows);\n $this->forms['list']['pages'] = showPageBar($page,$pages,\"admin.php?action=galaxy\",\"page\",\"menu\");\n $this->template->assign(\"galaxylist\",$galaxylist);\n $this->show('gala_list',\"Galaxien\");\n }", "title": "" }, { "docid": "e152b70aa24c3021bcb4f909ac5ddede", "score": "0.6001488", "text": "public function fourni_list()\n {\n $this->templates->display('fourni_list');\n }", "title": "" }, { "docid": "e461ea0495a396c080353c8a36a62365", "score": "0.6000091", "text": "protected function setupListOperation()\n {\n //$this->crud->setFromDb();\n\n $name = $this->textCol('name', 'Name');\n $phonenumber = $this->textCol('phonenumber', 'Phone number');\n $email = $this->textCol('email', 'Email');\n\n CRUD::addColumns([$name, $phonenumber, $email]);\n }", "title": "" }, { "docid": "c31d0ba2bc8316cb74b0a84e93230696", "score": "0.5995205", "text": "function wp_ajax_fetch_list() {\n\tglobal $wp_list_table;\n\n\t$list_class = $_GET['list_args']['class'];\n\tcheck_ajax_referer( \"fetch-list-$list_class\", '_ajax_fetch_list_nonce' );\n\n\t$wp_list_table = _get_list_table( $list_class, array( 'screen' => $_GET['list_args']['screen']['id'] ) );\n\tif ( ! $wp_list_table )\n\t\twp_die( 0 );\n\n\tif ( ! $wp_list_table->ajax_user_can() )\n\t\twp_die( -1 );\n\n\t$wp_list_table->ajax_response();\n\n\twp_die( 0 );\n}", "title": "" }, { "docid": "307c9434524a664ed064f3824f8be4ed", "score": "0.5993219", "text": "public function renderList()\n {\n $this->getValues();\n\n return $this->display(__FILE__, 'views/templates/admin/list.tpl');\n }", "title": "" }, { "docid": "0da78066c5bb80e43126e6f0a7042635", "score": "0.5992483", "text": "public function details_list() {\n // Start the list, and print the title and schedule type\n $str = \"<dl class=\\\"details_list\\\">\\n\"\n // Title\n .\"\\t<dt>\".t('Title').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->title)\n .\"</dd>\\n\"\n // Type\n .\"\\t<dt>\".t('Type').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->texttype)\n .\"</dd>\\n\";\n // Only show these fields for recording types where they're relevant\n if (in_array($this->type, array(rectype_once, rectype_daily, rectype_weekly, rectype_override, rectype_dontrec))) {\n // Airtime\n $str .= \"\\t<dt>\".t('Airtime').\":</dt>\\n\"\n .\"\\t<dd>\".strftime($_SESSION['date_scheduled_popup'].', '.$_SESSION['time_format'], $this->starttime)\n .' to '\n .strftime($_SESSION['time_format'], $this->endtime)\n .\"</dd>\\n\";\n // Subtitle\n if (preg_match('/\\\\S/', $this->subtitle)) {\n $str .= \"\\t<dt>\".t('Subtitle').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->subtitle)\n .\"</dd>\\n\";\n }\n // Description\n if (preg_match('/\\\\S/', $this->description)) {\n $str .= \"\\t<dt>\".t('Description').\":</dt>\\n\"\n .\"\\t<dd>\".nl2br(html_entities($this->description))\n .\"</dd>\\n\";\n }\n // Rating\n if (preg_match('/\\\\S/', $this->rating)) {\n $str .= \"\\t<dt>\".t('Rating').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->rating)\n .\"</dd>\\n\";\n }\n }\n // Category\n if (preg_match('/\\\\S/', $this->category)) {\n $str .= \"\\t<dt>\".t('Category').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->category)\n .\"</dd>\\n\";\n }\n // Rerun?\n if (!empty($this->previouslyshown)) {\n $str .= \"\\t<dt>\".t('Repeat').\":</dt>\\n\"\n .\"\\t<dd>\".t('Yes')\n .\"</dd>\\n\";\n }\n // Will be recorded at some point in the future?\n if (!empty($this->will_record)) {\n $str .= \"\\t<dt>\".t('Schedule').\":</dt>\\n\"\n .\"\\t<dd>\";\n switch ($this->type) {\n case rectype_once: $str .= t('rectype-long: once'); break;\n case rectype_daily: $str .= t('rectype-long: daily'); break;\n case rectype_always: $str .= t('rectype-long: always'); break;\n case rectype_weekly: $str .= t('rectype-long: weekly'); break;\n case rectype_findone: $str .= t('rectype-long: findone'); break;\n case rectype_override: $str .= t('rectype-long: override'); break;\n case rectype_dontrec: $str .= t('rectype-long: dontrec'); break;\n default: $str .= t('Unknown');\n }\n $str .= \"</dd>\\n\";\n }\n // Which duplicate-checking method will be used\n if ($this->dupmethod > 0) {\n $str .= \"\\t<dt>\".t('Dup Method').\":</dt>\\n\"\n .\"\\t<dd>\";\n switch ($this->dupmethod) {\n case 1: $str .= t('None'); break;\n case 2: $str .= t('Subtitle'); break;\n case 4: $str .= t('Description'); break;\n case 6: $str .= t('Subtitle and Description'); break;\n case 8: $str .= t('Subtitle then Description'); break;\n case 22: $str .= t('Sub and Desc (Empty matches)'); break;\n }\n $str .= \"</dd>\\n\";\n }\n // Recording Priority\n if (preg_match('/\\\\S/', $this->recpriority)) {\n $str .= \"\\t<dt>\".t('Recording Priority').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->recpriority)\n .\"</dd>\\n\";\n }\n // Profile\n if (preg_match('/\\\\S/', $this->profile)) {\n $str .= \"\\t<dt>\".t('Profile').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->profile)\n .\"</dd>\\n\";\n }\n // Transcoder\n if (preg_match('/\\\\S/', $this->transcoder)) {\n global $Transcoders;\n $str .= \"\\t<dt>\".t('Transcoder').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities(_or($Transcoders[$this->transcoder], '&nbsp;'))\n .\"</dd>\\n\";\n }\n // Recording Group\n if (!empty($this->recgroup)) {\n $str .= \"\\t<dt>\".t('Recording Group').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->recgroup)\n .\"</dd>\\n\";\n }\n // Storage Group\n if (!empty($this->storagegroup)) {\n $str .= \"\\t<dt>\".t('Storage Group').\":</dt>\\n\"\n .\"\\t<dd>\".html_entities($this->storagegroup)\n .\"</dd>\\n\";\n }\n // Finish off the table and return\n $str .= \"\\n</dl>\";\n return $str;\n }", "title": "" }, { "docid": "df01f7ff8d6a105850fbefd31e546f03", "score": "0.5991316", "text": "function list() {\n\n\t\t\tif($this->listJWT) $this->requireJWT();\n\n\t\t\t//Items to show, we can define the number of items via the show query param\n\t\t\t$show = $this->request->get('show', 100);\n\t\t\t$show = $show ?: 100;\n\n\t\t\t//Pages to show, we can define the page number via the page query param\n\t\t\t$page = $this->request->get('page', 1);\n\t\t\t$page = $page ?: 1;\n\n\t\t\t//Sorting defined via the sort query param\n\t\t\t$sort = $this->request->get('sort', 'asc');\n\t\t\t$sort = $sort ?: 'asc';\n\n\t\t\t//Sort by parameter defined via the by query param\n\t\t\t$by = $this->request->get('by', 'id');\n\t\t\t$by = $by ?: 'id';\n\n\t\t\t$args = [ 'show' => $show, 'page' => $page, 'sort' => $sort, 'by' => $by, 'args' => [] ];\n\n\t\t\t//Defines if we want to fetch metas or not\n\t\t\t$fetch_metas = $this->request->get('fetch_metas');\n\t\t\tif($fetch_metas) {\n\n\t\t\t\tif($fetch_metas != 1) $fetch_metas = explode(',', $fetch_metas);\n\t\t\t\t$args['args']['fetch_metas'] = $fetch_metas;\n\t\t\t}\n\n\t\t\t//Automagically add conditions based on get params\n\t\t\tforeach($_GET as $key => $value) {\n\n\t\t\t\tif(in_array($key, $this->plural::getTableFields())) {\n\t\t\t\t\t$args['conditions'][] = \"`{$key}` = '{$value}'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Query Fields\n\t\t\t$query_fields = $this->request->get('query_fields');\n\t\t\tif($query_fields && is_string($query_fields)) $query_fields = explode(',', $query_fields);\n\t\t\tif($query_fields) $args['query_fields'] = $query_fields;\n\n\t\t\t//Fetch\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tif(preg_match('/fetch_(?<entity>.*)/', $key)) {\n\t\t\t\t\t$args['args'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passing args via URL\n\t\t\tif($url_args = $this->request->get('args')) {\n\n\t\t\t\t$args = array_merge($args, $url_args);\n\t\t\t}\n\n\t\t\t// Specifically passing PDO Args\n\t\t\tif($pdo = $this->request->get('pdo')) {\n\n\t\t\t\t$args['args'] = array_merge($args['args'], $pdo);\n\t\t\t}\n\n\t\t\t//$args['debug'] = 1;\n\n\t\t\t// Conditions Filter\n\t\t\t$args['conditions'] = $this->filterListConditions(get_item($args, 'conditions', []));\n\n\t\t\tif(is_array($args['conditions'])) {\n\t\t\t\t$args['conditions'] = array_filter($args['conditions']);\n\t\t\t}\n\n\t\t\t$items = $this->plural::all($args);\n\t\t\t$this->data = $items;\n\n\t\t\t$count = $this->plural::count($args['conditions'] ?? []);\n\t\t\t$pages = ceil($count / $show);\n\n\t\t\t$this->properties['current_page'] = (int) $page;\n\t\t\t$this->properties['per_page'] = (int) $show;\n\t\t\t$this->properties['last_page'] = (int) $pages;\n\t\t\t$this->properties['count'] = (int) $count;\n\t\t\t$this->properties['sort'] = $sort;\n\t\t\t$this->properties['by'] = $by;\n\t\t\t$this->properties['total'] = (int) $pages;\n\n\t\t\tif(count($items)) {\n\n\t\t\t\t$this->result = 'success';\n\t\t\t}\n\n\t\t\t$this->respond();\n\t\t}", "title": "" }, { "docid": "ccf88c458aa743e5ce928d9b21249820", "score": "0.5988597", "text": "protected function setupListOperation()\n {\n $this->crud->setFromDb();\n\t $this->crud->removeColumn('logo');\n\t $this->crud->addColumn([\n\t\t\t'name' => 'logo', // The db column name\n\t\t\t'label' => 'image', // Table column heading\n\t\t\t'type' => 'image',\n\t\t\t'prefix' => 'uploads/',\n\t\t\t'height' => '70px',\n\t\t\t'width' => '70px',\n\t ]);\n\t $this->crud->addColumn([\n\t \t'name' => 'users',\n\t\t 'label' => 'Medewerkers',\n\t\t 'type' => 'model_function',\n\t\t\t'function_name' => 'getUsersCount',\n\t ]);\n }", "title": "" }, { "docid": "1fc20910923833f12c4c11a343368947", "score": "0.59835184", "text": "protected function setupListOperation()\n {\n CRUD::addColumns([\n [\n 'name' => 'title',\n ],[\n 'name' => 'content',\n ],[\n 'name' => 'updated_at',\n ]\n ]);\n }", "title": "" }, { "docid": "0a62f99e87d4cf23f636c531628ed894", "score": "0.59810215", "text": "function list_action(){\n global $FUNCS, $DB, $CTX;\n\n // define components to be rendered\n $this->define_list_title();\n $this->define_list_actions(); /* toolbar, filters, bulk-actions, extended-actions, row-actions */\n $this->define_list_fields();\n\n // allow addons to chip in\n $FUNCS->dispatch_event( 'action_pages_list', array($this) );\n\n // form posted?\n if( $_SERVER['REQUEST_METHOD']=='POST' ){\n\n $redirect_dest = $CTX->get( 'k_qs_link' );\n\n if( isset($_POST['k_bulk_action']{0}) ){\n $FUNCS->validate_nonce( 'bulk_action_page' );\n $FUNCS->dispatch_event( 'pages_list_bulk_action', array($_POST['k_bulk_action'], &$redirect_dest, $this) );\n }\n else{\n $FUNCS->dispatch_event( 'pages_list_post_action', array(&$redirect_dest, $this) );\n }\n\n // redirect if not directed otherwise (e.g. by AJAX requests which can set $redirect_dest to blank to skip redirection)\n $redirect_dest = $FUNCS->sanitize_url( trim($redirect_dest) );\n if( strlen($redirect_dest) ){\n $DB->commit( 1 );\n header( \"Location: \".$redirect_dest );\n exit;\n }\n }\n\n // render output ..\n $html = $this->render_list();\n\n return $html;\n }", "title": "" }, { "docid": "99791401bb6bc60edd2505cb7064b4a5", "score": "0.59754735", "text": "public function listInit(){\n\t\t$this->setNameModelController('component_tpls');\n\t\t\n\t\t$this->setReportDownload(true, true, true);\n\t\t\n\t\t$this->setConfig('{labelComponents}', 'id_field_key');\n\t\t$this->nameTopics = '{labelComponents}';\n\t\t$this->nameTopic = '{labelComponent}';\n\t\t$this->defaultSort = '{alias_table}.{field_sort_sql}';\n\t\t\n\t\t$this->autoAddColInfoUltimoCambio();\n\t\t$this->getView()->setForceFit(false);\n\t\t$this->fixColAutoActionEdit('{list.field_action_edit_sql}');\n\t}", "title": "" }, { "docid": "879f1d2bbcb31e609bf3b345592ccda4", "score": "0.5973353", "text": "function articulos()\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->_personModel->getPersons();\n\t\t\t$this->_view->render('articulos', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "602ed8dee2e015ea55511aa59ba3ed40", "score": "0.59660876", "text": "public function showList()\n {\n return view();\n }", "title": "" }, { "docid": "683d8c956d561e2792d5a3f39a0da5bf", "score": "0.59574556", "text": "public function loadlist()\n\t{\n\t\t\n\t\t$this->load->helper('im_helper');\n\t\t\n\t\t$module_list = get_modules();\n\t\t\n\t\t$data['module_list'] = $module_list;\n\t\t\n\t\t$this->load->view('partials/module_table', $data);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "0f7dbf6f838d169613439b487d0b3d0a", "score": "0.59562474", "text": "public function show(ListModel $listModel)\n {\n //\n }", "title": "" }, { "docid": "082206cdd76dcd19fe63a941dd3ec067", "score": "0.5953764", "text": "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->bonus);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->bonus,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/bonus/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "title": "" }, { "docid": "9bc261e446e1e428d83b77af454f21ff", "score": "0.5941397", "text": "function wp_inventory_display_list() {\r\n\tglobal $wpdb;\r\n\tglobal $current_user;\r\n \tget_currentuserinfo();\r\n \t \t\r\n \t$where = $sort = \"\";\r\n \t$sortby = (isset($_GET[\"sortby\"])) ? $_GET[\"sortby\"] : \"\";\r\n \t$asc = (isset($_GET[\"asc\"])) ? $_GET[\"asc\"] : \"\";\r\n \t$sorturl = ($sortby) ? \"&sortby=\" . $sortby : \"\";\r\n \t$sorturl.= ($asc) ? \"&asc=\" . $asc : \"\";\r\n \t$orderby = ($sortby) ? $sortby . \" \" . $asc : \"inventory_order DESC\";\r\n \t$currentcategory = (isset($_POST[\"category_id\"])) ? $_POST[\"category_id\"]: \"\";\r\n \t$currentcategory = (isset($_GET[\"category_id\"])) ? $_GET[\"category_id\"]: $currentcategory;\r\n \t$url = \"&category_id=\" . $currentcategory;\r\n\t$cur_user = $current_user->ID;\r\n\t$cur_user_admin = ( current_user_can('manage_options')) ? 1 : 0;\r\n\t$config = inv_getConfig();\r\n\t$limit_edit = inv_checkConfig($config, \"limit_edit\");\r\n\t$where.= ($currentcategory) ? \" \" . WP_INVENTORY_TABLE . \".category_id = \" . $currentcategory : \"\";\r\n\t$where = ($where) ? \" WHERE \" . $where : \"\";\r\n\t$ipp = (isset($_POST[\"items_per_page\"])) ? $_POST[\"items_per_page\"] * 1 : 20;\r\n\t$ipp = (isset($_GET[\"items_per_page\"])) ? $_GET[\"items_per_page\"] * 1 : $ipp;\r\n \tif ($ipp) {\r\n\t\t$showpages = false;\r\n\t\t$start = (isset($_GET[\"start\"])) ? ($_GET[\"start\"] * 1) : 0;\r\n\t\t$start = (!$start && isset($_POST[\"start\"])) ? ($_POST[\"start\"] * 1) : $start;\r\n\t\t$next = ($start + $ipp)*1;\r\n\t\t$prev = max(0,($start-$ipp)*1);\r\n\t\t$limit = \" LIMIT \" . $start . \", \" . $ipp;\r\n\t\t$counts = $wpdb->get_results(\"SELECT count(inventory_id) AS count FROM \" . WP_INVENTORY_TABLE . \" LEFT JOIN \" . WP_INVENTORY_CATEGORIES_TABLE .\r\n\t\t\t\" ON \" . WP_INVENTORY_TABLE . \".category_id = \" . WP_INVENTORY_CATEGORIES_TABLE . \".category_id\" .\r\n\t\t$inv_search_sql);\r\n\t\tforeach ($counts as $count) {\r\n\t\t\t$last = ($count->count*1);\r\n\t\t}\r\n\t\t$url.=\"&items_per_page=\" . $ipp;\r\n\t\t$page_name = INVENTORY_ADMIN_URL . \"?page=inventory&\";\r\n\t\tif ($last>$ipp) {\r\n\t\t\t$showpages = true;\r\n\t\t\t$last=($last-$ipp)*1;\r\n\t\t\t$next = min($next, $last);\r\n\t\t\t$inventory_pages.= '<div id=\"inv_page\">';\r\n\t\t\t$inventory_pages.=($start!=0) ? '<a class=\"first\" href=\"' . $page_name . 'start=0\"' . $sorturl . $url . '>&laquo; ' . __('First', 'inventory') . '</a>' : '<span>&laquo; ' . __('First', 'inventory') . '</span>';\t\r\n\t\t\t$inventory_pages.=($start!=0) ? '<a class=\"prev\" href=\"' . $page_name . 'start=' . $prev . $sorturl . $url . '\">&lt;' . __('Prev', 'inventory') . '</a> | ' : '<span>&lt; ' . __('Prev', 'inventory') . '</span> | ';\r\n\t\t\t$inventory_pages.=($start<$next) ? '<a class=\"next\" href=\"' . $page_name . 'start=' . $next . $sorturl . $url . '\">' . __('Next', 'inventory') . ' &gt;</a>' : '<span> ' . __('Next', 'inventory') . ' &gt;</span>';\t\r\n\t\t\t$inventory_pages.=($start<$last) ? '<a class=\"last\" href=\"' . $page_name . 'start=' . $last . $sorturl . $url . '\">' . __('Last', 'inventory') . ' &raquo; </a>' : '<span>' . __('Last', 'inventory') . ' &raquo;</span>';\r\n\t\t\t$inventory_pages.='</div>';\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\r\n\t$items = $wpdb->get_results(\"SELECT \" . WP_INVENTORY_TABLE . \".*, category_name, category_colour \r\n\t\tFROM \" . WP_INVENTORY_TABLE . \" LEFT JOIN \" . WP_INVENTORY_CATEGORIES_TABLE . \r\n\t\t\" ON \" . WP_INVENTORY_TABLE . \".category_id = \" . WP_INVENTORY_CATEGORIES_TABLE . \".category_id\" .\r\n\t\t$where . \" ORDER BY \" . $orderby . $limit);\r\n\techo '<form name=\"inventory_manager\" method=\"post\" action=\"' . INVENTORY_ADMIN_URL . '?page=inventory' . $sorturl . '\">' . __('View Category', 'inventory') . inventory_category_list($currentcategory, 1, 1);\r\n\tinventory_items_per_page();\r\n\techo '</form>';\r\n\tif ( !empty($items) ) {\r\n\t\t$numberlabel = inv_getLabel($config, \"number\");\r\n\t\t// New feature limiting what is displayed....\r\n\t\tif ($config[\"display_inventory_number\"]<=0) {$config[\"display_inventory_number\"]=1;}\r\n\t\t$fieldorder = inv_fieldOrder($config);\r\n\t\t?>\r\n\t\t<table class=\"widefat page fixed\" cellpadding=\"3\" cellspacing=\"3\" style=\"clear: both; width: 100%; margin-bottom: 15px;\">\r\n\t\t <thead>\r\n\t\t\t <tr>\r\n\t\t \t\t<th class=\"manage-column\" scope=\"col\" width=\"50\"><?php doHeaderSort(\"ID\", \"inventory_id\", $url, $sorturl); ?></th>\r\n\t\t \t\t<?php\r\n\t\t \t\t\t// Load the fields into the array so we can sort and display in proper order\r\n\t\t \t\t\t$invlist[$fieldorder[\"number\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"80\">' . doHeaderSort($numberlabel,'inventory_number', $url, $sorturl, 0) . '</th>';\r\n\t\t \t\t\t$invlist[$fieldorder[\"name\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"100\">' . doHeaderSort(inv_getLabel($config, \"name\"),'inventory_name', $url, $sorturl, 0) . '</th>';\r\n\t\t \t\t\t$invlist[$fieldorder[\"description\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"*\">' . doHeaderSort(inv_getLabel($config, \"description\"),'inventory_description', $url, $sorturl, 0) . '</th>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"date_added\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"90\">' . doHeaderSort('Date Added','date_added', $url, $sorturl, 0) . '</th>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"price\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"70\">' . doHeaderSort('Price','inventory_price', $url, $sorturl, 0) . '</th>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"reserved\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"70\">' . doHeaderSort('Reser.','inventory_reserved', $url, $sorturl, 0) . '</th>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"category_name\"]] = '<th class=\"manage-column\" scope=\"col\" width=\"70\">' . doHeaderSort(inv_getLabel($config, \"category\"),'category_id', $url, $sorturl, 0) . '</th>';\r\n\t\t\t\t\tunset($invlist[0]);\r\n\t\t\t\t\tunset($invlist[-1]);\r\n\t\t\t\t\tksort($invlist);\r\n\t\t\t\t\t$count = count($invlist) + 2;\r\n\t\t\t\t\techo implode('', $invlist);\r\n\t\t\t\t\tunset($invlist);\r\n\t\t \t\t?>\r\n\t\t \t\t<th class=\"manage-column\" scope=\"col\" width=\"50\"><?php _e('Delete','inventory'); ?></th>\t\r\n\t\t\t </tr>\r\n\t\t </thead>\r\n\t\t\t\t<tr><td colspan=\"<?php echo $count; ?>\"><a href=\"<?php echo INVENTORY_ADMIN_URL; ?>?page=inventory&amp;action=add&amp;inventory_id=<?php echo $item->inventory_id;?>\" class='edit'><?php _e('Add New Item', 'inventory'); ?></a></td></tr>\r\n\t\t<?php\r\n\t\t$class = '';\r\n\t\t$editlink = INVENTORY_ADMIN_URL . \"?page=inventory&amp;action=edit&amp;inventory_id=\";\r\n\t\tforeach ( $items as $item ) {\r\n\t\t\t$class = ($class == 'alternate') ? '' : 'alternate';\r\n\t\t\t$number = ($item->inventory_number) ? $item->inventory_number : \"(no \" . $numberlabel . \")\";\r\n\t\t\tif ($cur_user == $item->inventory_userid || $item->inventory_userid==0 || $cur_user_admin || !$limit_edit) {\r\n\t\t\t\t$number = '<a href=\"' . $editlink . $item->inventory_id . '\">' . $number . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$number = $item->inventory_number;\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t\t<tr class=\"<?php echo $class; ?>\">\r\n\t\t\t\t<th scope=\"row\"><?php echo stripslashes($item->inventory_id); ?></th>\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$reserved = ($item->inventory_reserved) ? \"Yes\" : \"-\";\r\n\t\t\t\t\t$invlist[$fieldorder[\"number\"]] = '<td>' . $number . '</td>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"name\"]] = '<td>' . inventory_excerpt(stripslashes($item->inventory_name), 30, 45) . '</td>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"description\"]] = '<td>' . inventory_excerpt(stripslashes($item->inventory_description), 50, 75) . '</td>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"date_added\"]] = '<td>' . date(\"m/d/Y\", $item->date_added) . '</td>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"price\"]] = '<td>' . __(\"$\", \"inventory\") . number_format($item->inventory_price, 2) . '</td>';\r\n\t\t\t\t\t$invlist[$fieldorder[\"reserved\"]] = '<td>' . $reserved . '</td>'; \r\n\t\t\t\t\t$invlist[$fieldorder[\"category_name\"]] = '<td style=\"background-color:' . $category_colour . ';\">' . stripslashes($item->category_name) . '</td>';\r\n\t\t\t\t\tunset($invlist[0]);\r\n\t\t\t\t\tunset($invlist[-1]);\r\n\t\t\t\t\tksort($invlist);\r\n\t\t\t\t\techo implode('', $invlist);\r\n\t\t\t\t?>\r\n\t\t\t\t<?php if ($cur_user == $item->inventory_userid || $item->inventory_userid==0 || $cur_user_admin || !$limit_edit) { ?>\r\n\t\t\t\t<td><a href=\"<?php echo INVENTORY_ADMIN_URL; ?>?page=inventory&amp;action=delete&amp;inventory_id=<?php echo $item->inventory_id;?>\" class=\"delete\" onclick=\"return confirm('<?php _e('Are you sure you want to delete this item?','inventory'); ?>')\"><?php echo __('Delete','inventory'); ?></a></td>\r\n\t\t\t\t<?php } else {\r\n\t\t\t\t\techo \"<td>&nbsp;</td>\";\r\n\t\t\t\t} ?>\r\n\t\t\t</tr>\r\n\t\t\t<?php\r\n\t\t}\r\n\t\t?>\r\n\t\t</table>\r\n\t\t<?php\r\n\t\techo $inventory_pages;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t?>\r\n\t\t<p><?php _e(\"There are no inventory items in the database!\",'inventory')\t?></p>\r\n\t\t<p><a href=\"<?php echo INVENTORY_ADMIN_URL; ?>?page=inventory&amp;action=add&amp;inventory_id=<?php echo $item->inventory_id;?>\" class='edit'>Add New Item</a></p>\r\n\t\t<?php\t\r\n\t}\r\n}", "title": "" }, { "docid": "cd9d6d4da47189bfa557a48ed4a6e4a2", "score": "0.5932364", "text": "public function indexAction() {\n\n \tif (!Mage::getSingleton('customer/session')->isLoggedIn()){\n \t\tMage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());\n \t\tMage::getSingleton('customer/session')->setAfterAuthUrl(Mage::helper('core/url')->getCurrentUrl());\n\t\t}\n\t\telse {\n\t\t\t// fire custom event for CP so we sync accounts and wishlist items with Cue\n\t\t\tMage::dispatchEvent('elist_view', array('customer' => Mage::getSingleton('customer/session')->getCustomer()));\n\t\t}\n\t\t\n\t\t// Render layout\n $this->loadLayout();\n\n // update page title\n\t\t$this->getLayout()->getBlock(\"head\")->setTitle($this->__(\"Cue My List\"));\n\n\t\t// show breadcrumbs\n\t\t$breadcrumbs = $this->getLayout()->getBlock(\"breadcrumbs\");\n\t\t$breadcrumbs->addCrumb(\"home\", array(\n\t\t\t\"label\" => $this->__(\"Home\"),\n\t\t\t\"title\" => $this->__(\"Home\"),\n\t\t\t\"link\" => Mage::getBaseUrl()\n\t\t));\n\n\t\t$breadcrumbs->addCrumb(\"elist\", array(\n\t\t\t\"label\" => $this->__(\"My-List\"),\n\t\t\t\"title\" => $this->__(\"My-List\")\n\t\t));\n\n\t\t// render layout\n $this->renderLayout();\n }", "title": "" }, { "docid": "0690aea21158749f3fc83c6a31111e77", "score": "0.5928212", "text": "public function index() {\n $this->model->getList($this->submit);\n\n $this->smarty->assign('module', $this);\n\n $this->smarty->assign('liste', $this->model->list);\n $this->smarty->assign('barre_nav2', $this->model->barre_nav2);\n $this->smarty->assign('nbtotal', $this->model->nbtotal);\n $this->smarty->assign('recherche', $this->model->recherche);\n\n $this->smarty->assign('authLevel', $this->auth->getLevel());\n\n $this->render('core/user/list.tpl');\n }", "title": "" }, { "docid": "eb1600d232810d323eb0abb42007f345", "score": "0.59222776", "text": "protected function setupListOptions()\n {\n global $Security, $Language;\n\n // \"griddelete\"\n if ($this->AllowAddDeleteRow) {\n $item = &$this->ListOptions->add(\"griddelete\");\n $item->CssClass = \"text-nowrap\";\n $item->OnLeft = false;\n $item->Visible = false; // Default hidden\n }\n\n // Add group option item\n $item = &$this->ListOptions->add($this->ListOptions->GroupOptionName);\n $item->Body = \"\";\n $item->OnLeft = false;\n $item->Visible = false;\n\n // \"view\"\n $item = &$this->ListOptions->add(\"view\");\n $item->CssClass = \"text-nowrap\";\n $item->Visible = $Security->canView();\n $item->OnLeft = false;\n\n // \"edit\"\n $item = &$this->ListOptions->add(\"edit\");\n $item->CssClass = \"text-nowrap\";\n $item->Visible = $Security->canEdit();\n $item->OnLeft = false;\n\n // List actions\n $item = &$this->ListOptions->add(\"listactions\");\n $item->CssClass = \"text-nowrap\";\n $item->OnLeft = false;\n $item->Visible = false;\n $item->ShowInButtonGroup = false;\n $item->ShowInDropDown = false;\n\n // \"checkbox\"\n $item = &$this->ListOptions->add(\"checkbox\");\n $item->Visible = $Security->canEdit();\n $item->OnLeft = false;\n $item->Header = \"<div class=\\\"custom-control custom-checkbox d-inline-block\\\"><input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"custom-control-input\\\" onclick=\\\"ew.selectAllKey(this);\\\"><label class=\\\"custom-control-label\\\" for=\\\"key\\\"></label></div>\";\n $item->ShowInDropDown = false;\n $item->ShowInButtonGroup = false;\n\n // Drop down button for ListOptions\n $this->ListOptions->UseDropDownButton = false;\n $this->ListOptions->DropDownButtonPhrase = $Language->phrase(\"ButtonListOptions\");\n $this->ListOptions->UseButtonGroup = false;\n if ($this->ListOptions->UseButtonGroup && IsMobile()) {\n $this->ListOptions->UseDropDownButton = true;\n }\n\n //$this->ListOptions->ButtonClass = \"\"; // Class for button group\n\n // Call ListOptions_Load event\n $this->listOptionsLoad();\n $this->setupListOptionsExt();\n $item = $this->ListOptions[$this->ListOptions->GroupOptionName];\n $item->Visible = $this->ListOptions->groupOptionVisible();\n }", "title": "" }, { "docid": "facba27dd2ead4d05eedc72c5cfe6bdd", "score": "0.5920872", "text": "public function mylistAction()\n {\n if(!$this->current_user)\n $this->_redirect(\"/\");\n \n $this->view->headTitle('TOOTLIST : Accueil');\n $list = new Model_DbTable_List();\n $this->view->lang = $this->current_user->language;\n $this->view->myLists = $list->getListSortable($this->current_user->idUser);\n $this->view->inst_user = new Model_DbTable_User();\n if($this->_request->getPost('permission')!='')\n {\n $idList = $this->_request->getPost('idList');\n \n \n $data = array('permission'=>$this->_request->getPost('permission'));\n \n $where = $list->getAdapter()->quoteInto('idList = ?', $idList);\n $list->update($data,$where); \n \n \n }\n \n }", "title": "" }, { "docid": "edf03cea4db85025b6df450f15ba9241", "score": "0.5919921", "text": "function mod_productlist($ret_prod,$title)\n\t\t{\n\t\t\tglobal $Captions_arr,$ecom_siteid,$db,$Settings_arr,$position;\n\t\t\tif ($position=='left' and $_REQUEST['req']=='') // show only if position value is left and home page\n\t\t\t{\n\t\t?>\n\t\t\t\t<div class=\"lf_plist\">\n\t\t\t\t<div class=\"lf_plist_top\"></div>\n\t\t\t\t<div class=\"lf_plist_middle\">\n\t\t\t\t<ul class=\"plist\">\n\t\t\t<?php\n\t\t\t\tif($title)\n\t\t\t\t{\n\t\t\t?>\n\t\t\t\t<li class=\"plistheader\"><?php echo stripslashes($title)?></li>\n\t\t\t<?php\n\t\t\t\t}\n\t\t\t\twhile ($row_prod = $db->fetch_array($ret_prod))\n\t\t\t\t{\n\t\t\t\t?>\n\t\t\t\t\t\t<li><h2><a href=\"<?php echo url_product($row_prod['product_id'],$row_prod['product_name'],-1)?>\" class=\"plistlink\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\"><?php echo stripslashes($row_prod['product_name'])?></a></h2></li>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"lf_plist_bottom\"></div>\n\t\t\t\t</div>\n\t\t<?php\t\t\n\t\t\t}\n\t\t\telseif($position=='right' or ($position=='left' and $_REQUEST['req']!=''))// right or middle page other than home page\n\t\t\t{\n\t\t\t?>\n\t\t\t\t<div class=\"lf_plist_right\">\n\t\t\t\t<div class=\"lf_plist_top_right\"></div>\n\t\t\t\t<div class=\"lf_plist_middle_right\">\n\t\t\t\t<ul class=\"plist_right\">\n\t\t\t<?php\n\t\t\t\tif($title)\n\t\t\t\t{\n\t\t\t?>\n\t\t\t\t<li class=\"plistheader_right\"><?php echo stripslashes($title)?></li>\n\t\t\t<?php\n\t\t\t\t}\n\t\t\t\twhile ($row_prod = $db->fetch_array($ret_prod))\n\t\t\t\t{\n\t\t\t\t?>\n\t\t\t\t\t\t<li><h2><a href=\"<?php echo url_product($row_prod['product_id'],$row_prod['product_name'],-1)?>\" class=\"plistlink_right\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\"><?php echo stripslashes($row_prod['product_name'])?></a></h2></li>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"lf_plist_bottom_right\"></div>\n\t\t\t\t</div>\n\t\t\t<?php\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "42b997aff71b2d1318d9bb05c5914451", "score": "0.59187436", "text": "public function myList()\n\t\t{\n\t\t\t\n\t\t\t$perPage = 20;\n\t\t\t$user = $_SESSION['username'];\n\t\t\t\n\t\t\t$blogModel = $this -> model( \"BlogModel\" );\n\t\t\t$count = $blogModel -> getUserPostCount( $user );\n\t\t\t\n\t\t\t$totalPages = ceil( $count[0]['count'] / $perPage );\n\t\t\t$data['total'] = $totalPages;\n\t\t\tif ( isset( $_GET['page'] ) ) {\n\t\t\t\t$page = $_GET['page'];\n\t\t\t} else {\n\t\t\t\t$page = 1;\n\t\t\t}\n\t\t\t$data['page'] = $page;\n\t\t\t\n\t\t\tif ( $page ) {\n\t\t\t\t$data['start'] = ( $page - 1 ) * $perPage;\n\t\t\t} else {\n\t\t\t\t$data['start'] = 0;\n\t\t\t}\n\t\t\t$data['co'] = $count[0]['count'];\n\t\t\t$data['perPage'] = $perPage;\n\t\t\t$data['postList'] = $blogModel -> getUserPosts( $user, $data['start'], $perPage );\n\t\t\t$data['index'] = \"index?\";\n\t\t\t$this -> view( \"blog/myList\", $data );\n\t\t\t\n\t\t}", "title": "" }, { "docid": "27187a26ab20d6011eb8b6627f01e2b3", "score": "0.5906911", "text": "public function multiListCommand(): void\n {\n Show::multiList([\n 'list0' => [\n 'value in the list 0',\n 'key' => 'value in the list 0',\n 'key1' => 'value1 in the list 0',\n 'key2' => 'value2 in the list 0',\n ],\n 'list1' => [\n 'key' => 'value in the list 1',\n 'key1' => 'value1 in the list 1',\n 'key2' => 'value2 in the list 1',\n 'value in the list 1',\n ],\n 'list2' => [\n 'key' => 'value in the list 2',\n 'value in the list 2',\n 'key1' => 'value1 in the list 2',\n 'key2' => 'value2 in the list 2',\n ],\n ]);\n }", "title": "" }, { "docid": "b6ef244c656c4ea687d2e383a6c16c0f", "score": "0.5902844", "text": "function edit() { \n\n ## Load view ##\n\t\t$data = $this->list_records();\n $data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"biz_listing\");\n $data[\"content\"] = $this->template->admin_view(\"biz_listing_list\", $data, true, \"biz_listing\");\n $this->template->build_admin_output($data);\n }", "title": "" }, { "docid": "9afee0612faafd94ede8268037297cc9", "score": "0.58990335", "text": "public function index(){\n\n \t\t$data = array( 'page_title' => 'List Room Type', );\n \t\t$data['ListRoomType'] = $this->Roomtype_model->ListRoomType();\n \t\t$this->parser->parse('roomtype/roomtypelist', $data);\n \t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "3e3a565a181db6f795f079d1dfb01f75", "score": "0.7099585", "text": "public function update(Resource $resource, $id)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "23bd42dc38bca65e850c1b8f771c0f0f", "score": "0.6837518", "text": "public function update(ResourceInterface $resource)\n {\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "fb65b4f4d55e024e7f1613af273a55f2", "score": "0.6775597", "text": "public function update(Request $request, Resource $resource)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'url' => 'required|max:255',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id',\n 'is_published' => 'required|boolean'\n ]);\n $resource_previous_unpublished = !$resource->is_published;\n //Create the resource\n $resource->update([\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => $request->is_published\n ]);\n //Drop the tags from the pivot table. Add the updated ones\n $resource->tags()->detach();\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource updated';\n $responseText .= $resource_previous_unpublished && $request->is_published ? ' and published' : '';\n //Take them back to the resource form so they can add more resources\n return back()->with('success', $responseText);\n }", "title": "" }, { "docid": "61a34fcd66242862e9a967402e4ff514", "score": "0.6267246", "text": "private function updateResource($resource, $inputs )\n {\n \n // if(isset($inputs['category_id'])){\n // $model->categories()->sync($inputs['category_id']);\n // } else {\n // $model->categories()->sync([]);\n // }\n return $resource->update($inputs);\n\n }", "title": "" }, { "docid": "a4a8c199770b8cc35d56a67cd9297225", "score": "0.62659985", "text": "public function update($storageName, $key, array $data);", "title": "" }, { "docid": "4c22c400891589f8da5573f60cdc4ea0", "score": "0.61376035", "text": "public function update(Request $request, Resource $resource)\n {\n $validator = Validator::make($request->all(),[\n 'wbs' => 'required',\n 'tipo_recurso' => 'required',\n 'cantidad' => 'required',\n 'comentarios' => 'required',\n 'vision_estrategica' => 'required'\n\n ]);\n if ($validator->fails()) {\n return response()->json(['Error'],404);\n\n }else{\n $resource->wbs = $request->wbs;\n $resource->tipo_recurso = $request->tipo_recurso;\n $resource->cantidad = $request->cantidad;\n $resource->comentarios = $request->comentarios;\n $resource->vision_estrategica = $request->vision_estrategica;\n \n $resource->save();\n return response()->json($resource);\n }\n }", "title": "" }, { "docid": "cb421444658bf63523d9239cfdb2c091", "score": "0.6102644", "text": "public function update(StorageRequest $request, $id)\n {\n try {\n $this->service->updateStorage($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 }", "title": "" }, { "docid": "40c721acddd9f92cbdc47e322ae39955", "score": "0.60837495", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n if($storage = Storage::find($id))\n {\n if( $storage->update( $request->all() ) )\n {\n if($request->storage_items)\n $storage->item()->sync($request->storage_items);\n else\n $storage->item()->sync([]);\n return redirect()->back();\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "1b397375316ae1351b5a50f45f20bc46", "score": "0.6000568", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')){\n $resources = $request->session()->get('resources');\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $priceInput = $request->input('price');\n \n if(isset($resources[$id]) && (isset($resources[$idInput])==false || $idInput==$id)){\n // $resource = $resources[$id];\n $resource = ['id' => $idInput, 'name' => $nameInput, 'price' => $priceInput];\n unset($resources[$id]);\n $resources[$idInput]=$resource;\n $request->session()->put('resources', $resources);\n \n return redirect('resource')->with('message', 'Se editado el elemento correctamente');\n }\n \n }\n return back()->withInput();\n }", "title": "" }, { "docid": "1342fca6bb741918e9de91960e422b72", "score": "0.59302443", "text": "public function dispatchOnPostUpdateResource($resource);", "title": "" }, { "docid": "4c33901004c334e4edd8b45955f45ed2", "score": "0.5906145", "text": "public function sliderUpdate(SliderUpdateRequest $request, $id)\n {\n\n $slider=Slider::find($id);\n /* dd($service); */\n $input= $request->all();\n\n if($request->hasFile('image')) {\n if($request->image==$slider->image){\n $input['image']=$slider->image;\n }else{\n $fileName=$request->file('image')->store('slider','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$slider->image);\n }\n } else {\n\n $input['image']=$slider->image;\n\n }\n $slider->update([\n 'title'=>$request->title,\n 'image'=>$input['image'],\n ]);\n /* dd($service); */\n\n return new SliderResource($slider);\n }", "title": "" }, { "docid": "9645d8e1c1b4d32587e5589c88868755", "score": "0.5878462", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->fill($request->all());\n $resource->save();\n\n $resource->tags()->sync($request->tags);\n\n $message = 'El recurso literario \"' . $resource->title . '\" fue modificado.';\n $class = 'warning';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.5876995", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "cc850ce20ed7c56b132541ba822c9777", "score": "0.5832923", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $request->validate([\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'resource' => 'file|mimes:pdf,doc,docx,xls,xlm,xla,xlc,xlt,xlw,ppt,pps,pot'\n ]);\n\n $eLibrary = ELibrary::findOrFail($id);\n\n /*Photo*/\n if($request->hasFile('resource') && $request->file('resource')->isValid()){\n $file = $request->file('resource');\n $filename = $data['title'] . '_' . time().'.'.$file->extension();\n $path = $file->storePubliclyAs('public/uploads/eLibrary',$filename);\n if($eLibrary->path) {\n if (Storage::exists($eLibrary->path)) Storage::delete($eLibrary->path);\n }\n $data['path'] = $path;\n }\n if($eLibrary->update($data)){\n Session::flash('alert-success',\"The E-Library resource '$eLibrary->title' has been updated\");\n }else{\n Session::flash('alert-danger',\"The E-Library resource '$eLibrary->title' could not be updated. Please contact support.\");\n }\n return redirect('admin/eLibrary');\n }", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "3ec7c5a8877f8c46b7760a665414271c", "score": "0.5738682", "text": "public function update(Request $request, int $id)\n {\n $data = $request->except(\"image\");\n $product = $this->product->findOrFail($id);\n if($request->hasFile(\"image\") && $request->image->isValid()){\n Storage::delete($product->image);\n $data[\"image\"] = $request->image->store(\"products/\".$request->name);\n }\n $product->update($data);\n return redirect()->route(\"products.index\");\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "1a87e148e066a4886de60512f8e08a52", "score": "0.57288736", "text": "public function update(ShareRequest $request, $id)\n {\n $share = Share::find($id);\n $share->share_name = $request->get('share_name');\n $share->share_price = $request->get('share_price');\n $share->share_qty = $request->get('share_qty');\n $share->save();\n if ($share->image) {\n unlink(public_path('storage/') . $share->image);\n }\n $this->storeImage($share);\n return redirect('/shares')->with('success', 'Stock has been updated');\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "d55f58a252de4e09d616136ab381ea2d", "score": "0.5689798", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'group_id'=>'exists:groups,id|integer',\n 'name'=>'required|min:1|max:16|unique:resources,name,'.$id,\n 'description'=> 'max:255'\n ]);\n\n $resource = Resource::find($id);\n $resource->group_id = $request->get('group_id');\n $resource->name = $request->get('name');\n $resource->description = $request->get('description');\n $resource->save();\n\n return redirect('/resources')->with('success', 'Resource has been updated');\n }", "title": "" }, { "docid": "09f959fbad30c2f941ea086cc7dad93f", "score": "0.56853646", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::find($id);\n $product->fill($request->all())->save();\n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $product->fill(['file' => asset($path)])->save();\n } \n return redirect()->route('products.edit', \n $product->id)->with('info', 'Info de product actualizada con éxito');\n }", "title": "" }, { "docid": "e6fb42d6286b3f4fe6f14fab49db4173", "score": "0.56730545", "text": "public function update(Request $request, $id)\n {\n if($request->has('new_image')) {\n\n $product = Product::where('id',$id)->first(); \n\n $old_image = $product->image;\n unlink($old_image);\n\n\n $file = $request->file('new_image');\n $name = Str::random(10);\n $url = \\Storage::putFileAs('images',$file, $name . '.' .$file->extension());\n\n $data = array();\n $data['name'] = $request->name;\n $data['price'] = $request->price;\n $data['image'] = $url;\n\n $update = DB::table('products')->where('id',$id)->update($data);\n\n\n\n } else {\n $product = Product::find($id);\n $product->update($request->only('name','price'));\n }\n\n return redirect()->back()->with(\"status\",\"Successfully Updated\");\n\n\n\n }", "title": "" }, { "docid": "97e4ce8ade6b1dc2b2b25f72334eb18d", "score": "0.5636433", "text": "public function dispatchOnPreUpdateResource($resource);", "title": "" }, { "docid": "bba4992ee37e44374ffa661fa659a09a", "score": "0.56323135", "text": "public function update (EntityInterface $entity);", "title": "" }, { "docid": "318b6ff187eaf08454a3d0857e9aca4d", "score": "0.56295455", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\t$res = $this->cloudDrive->uploadStream($resource, $path, true);\r\n\r\n\t\treturn $res['success'];\r\n\t}", "title": "" }, { "docid": "072d1df8727e8fc01d135f9b601cd0cc", "score": "0.5626336", "text": "public function update(Request $request, int $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"name\" => \"required\"\n ]);\n $store = self::store($data, $resource_id);\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'listing category updated successfully']);\n }", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "fef6f84766f65b55a5b2d09f06bbe894", "score": "0.56153053", "text": "public function update(model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.5600381", "text": "function setResource($resource);", "title": "" }, { "docid": "a67ff3295306d457a45d5bfd402b9bbf", "score": "0.55851954", "text": "public function update(Request $request, $id)\n {\n $result=Slider::find($id);\n\n $result->name=$request->name;\n $result->desc=$request->desc;\n $result->price=$request->price;\n\n if ($request->hasFile('img')) {\n $file=$request->img->store('upload', 'public');\n $result->img=$file;\n }else{\n $errors=\"File not set\";\n return redirect()->back()\n ->withInput($request->input())\n ->with(\"msgError\", $errors);\n }\n\n $result->save();\n\n if ($result) {\n return redirect('show/slider')->with('message', 'Product updated successfully!');\n }\n else{\n return redirect()->back()->withInput($request->input())\n ->with('msgError', 'Record do not update in database!');\n }\n\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "aeb943a599e58a4bbe6bd7e228755660", "score": "0.55803686", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,\n [\n 'title'=>'required|max:50',\n 'price'=>'required',\n 'description'=>'required|max:100'\n ,\n 'imagePath'=>'required'\n ],[\n 'required'=>'El campo :attribute es obligatorio'\n ]\n );\n $product=Product::find($id);\n $product->title = $request->input('title');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n // $product->imagePath = $request->input('imagePath');\n\n $nombreImagen = str_slug($product->title) . '.' .request()->imagePath->extension();\n // storeAs recibe dos parametros el nombre de la carpeta y el nombre del archivo\n request()->imagePath->storeAs('public', $nombreImagen);\n $product->imagePath = $nombreImagen;\n \n $product->save();\n\n return redirect()->action('Admin\\ProductsController@index');\n\n }", "title": "" }, { "docid": "b9d5c9b5a3c8b34eb93904bd4bc5dfc1", "score": "0.55740935", "text": "public function update($id, StoreSliderRequest $request)\n {\n $slider = Slider::find($id);\n $input = $request->all();\n $slider->fill($input);\n\n if(Input::file('image')){\n $file = Input::file('image');\n $filename = time().'-'.$file->getClientOriginalName();\n $directory = $slider->getPath();\n $file->move($directory, $filename);\n $slider->image = $directory.$filename;\n #ImageCompress::tinifyImage($slider->image);\n }\n\n $slider->save();\n\n return redirect()->route('admin.slider.index');\n }", "title": "" }, { "docid": "6ec0972709d8081c8584eadfdebd73e3", "score": "0.55724585", "text": "public function put($resource, array $args = [], array $options = []) {\n return $this->do('PUT', $resource, $args, $options);\n }", "title": "" }, { "docid": "720aa13d6dd5abab4700c72fc5726f2f", "score": "0.55704945", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->product_price = $request->product_price;\n $product->condition = $request->condition;\n $product->brand_id = $request->brand_id;\n $product->state_id = $request->state_id;\n $product->area_id = $request->area_id;\n // $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n\n if ($request->hasFile('product_image')) {\n\n $path = $request->product_image->store('public/uploads');\n\n $product->product_image = $request->product_image->hashNAme();\n\n }\n\n $product->save();\n\n Alert::success('Product succesfully updated!')->autoclose(4000);\n\n // flash('Product succesfully updated')->overlay();\n\n return redirect()->route('admin.products.index');\n\n\n\n }", "title": "" }, { "docid": "e186357e6cd112ce0670460eed4e4946", "score": "0.55632365", "text": "public function update(UploadImageRequest $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $filename = $request->file('image')->getClientOriginalName();\n $type = $request->file('image')->getClientOriginalExtension();\n $url = 'products/images/' . $product->id . '/' . $filename;\n\n $image = Image::make($request->file('image'))->resize(150, 150)->encode($type);\n Storage::disk('s3')->put($url, (string)$image, 'public');\n\n $product->update([\n 'image' => $url,\n ]);\n }\n $product->update([\n 'name' => $request->name,\n 'cost' => $request->cost,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'quantity' => $request->quantity,\n ]);\n $product->save();\n return redirect()->route('admin.product-administration.show', $product->id);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "392bdf3b4d83d7a822d671646207f552", "score": "0.55553967", "text": "public function update($request, int $id);", "title": "" }, { "docid": "39ec1d6074d8d2034e596ad13d30da68", "score": "0.55506486", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|min:1',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'quantity' => 'required|min:1',\n ]);\n\n $product = Product::find($id);\n $product->store_id = Auth::guard('store')->user()->id;\n $product->product_name = $request->get('name');\n $product->product_description = $request->get('description');\n $product->product_price = $request->get('price');\n $product->product_quantity = $request->get('quantity');\n $current_image = $product->product_image;\n $new_image = \"\";\n\n if ($request->has('subcategory')) {\n $product->subcategory_id = $request->get('subcategory');\n }\n if ($request->has('parameter')) {\n $product->product_parameter_id = $request->get('parameter');\n }\n if ($request->has('image')) {\n $new_image = $request->file('image');\n $extension = $new_image->getClientOriginalExtension();\n $filename = 'product-' . time() . '.' . $extension;\n $product->product_image = $filename;\n $new_image->storeAs('products', $filename, 'public');\n }\n $product->save();\n if (Storage::disk('public')->exists('products/' . $new_image)) {\n Storage::disk('public')->delete('products/' . $current_image);\n }\n return redirect()->route('products.index')->with('success', 'Product updated');\n }", "title": "" }, { "docid": "c6efa075535fbc725da4b180e4ec737b", "score": "0.55501103", "text": "public function update(Request $request, $id)\n {\n if ( Auth::user()->userrole != \"Admin\") {\n return abort(401, 'Access Denied');\n }\n\n $article = Product::where('id',$id)->first(); \n $article->name = request('name');\n $article->sub_title = request('sub_title');\n $article->title = request('title');\n $article->title1 = request('title1');\n $article->title2 = request('title2');\n $article->title3 = request('title3');\n $article->content1 = request('content1');\n $article->content2 = request('content2');\n $article->content3 = request('content3');\n $article->button_text = request('button_text');\n $article->button_link = request('button_link');\n $article->description = request('description');\n $article->slug = Str::slug(request('title'), '-'); \n $article->active = request('active');\n\n // Store uploaded file...\n if($request->hasFile('image')) { \n $file = $request->file('image'); \n $imageName = time().'-'.$file->getClientOriginalName();\n $request->image->storeAs('public/products', $imageName); \n $article->image = $imageName; \n }\n\n $article->save(); \n\n return redirect()->route('admin.product.index');\n }", "title": "" }, { "docid": "8333f02674e0537622e556ed30714d92", "score": "0.5541451", "text": "protected function put()\n {\n \\throw_if(!$this->request->isJson(), new RestfulException(RestfulErrorMessage::InvalidJsonHeader));\n if ($this->restfulRequest->resourceId) {\n $document = null;\n try {\n $document = $this->_get();\n } catch (\\Exception $e) {\n // ...\n }\n return \\response(\n $this->_repository->replace($document, $this->restfulRequest->resourceId, $this->request->json()->all())\n );\n }\n if ($this->payloadIsAttributeSet()) {\n return \\response(\n $this->_repository->batchReplace($this->getFindOption(), $this->request->json()->all())\n );\n }\n throw new RestfulException(RestfulErrorMessage::InvalidRequestPayload);\n }", "title": "" }, { "docid": "a4b00c57c46ebcebca149c23c5beb30a", "score": "0.55269605", "text": "public function update(Request $request, $id)\n {\n $item = Items::find($id);\n $item->fill($request->all());\n\n// if (Input::file()) {\n// $filename = $request->file('image')->store('public');\n// $path = substr($filename, 7);\n// $item->image = $path;\n// }\n\n $item->update();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.5521795", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "21ec885e595c2bf310bc026dbe22811d", "score": "0.5520187", "text": "public function update(Request $request, $id)\n {\n\n\n $contents = $request->data;\n\n if ($id === 'options') {\n\n Storage::put('options.json', json_encode($contents));\n\n }\n\n if ($id === 'templates') {\n\n Storage::put('templates.json', json_encode($contents));\n\n }\n\n if ($id === 'documentation') {\n\n Storage::put('documentation.json', json_encode($contents));\n\n }\n\n\n return response('', 200);\n }", "title": "" }, { "docid": "550e477a9a956b28304b535c2916ad5c", "score": "0.55201524", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"title\" => 'required',\n \"product_id\" => 'sometimes',\n \"button_text\" => 'sometimes',\n \"button_link\" => 'sometimes',\n \"priority\" => 'required',\n \"image\" => 'sometimes|file|image|max:3000',\n ]);\n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->product_id = $request->product_id;\n $slider->button_text = $request->button_text;\n $slider->button_link = $request->button_link;\n $slider->priority = $request->priority;\n\n if (request()->hasFile('image')) {\n if (File::exists('storage/' . $slider->image)) {\n File::delete('storage/' . $slider->image);\n }\n\n $path = $request->file('image')->store('sliders', 'public');\n $slider->image = $path;\n }\n $slider->save();\n $sliders = Slider::all();\n session()->flash('flash_message_success', 'You have updated a slider successfully!');\n return redirect()->route('admin.sliders')\n ->with(compact('sliders'));\n\n }", "title": "" }, { "docid": "a66a502d0331860b0492d8521d8dc6fc", "score": "0.551738", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n $data = $request->all();\n if ($request->hasFile('imagen')) {\n $data['imagen'] = $request->file('imagen')->store('slides','public');\n\n $exists = Storage::disk('sliders')->exists($slider->solo_imagen);\n if($exists)\n Storage::delete(\"/public/$slider->imagen\");\n\n }\n $slider->fill($data);\n $slider->save();\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "b54270ca9c777eb769ba1aabcadc3d1e", "score": "0.55085415", "text": "public function update($object){\n \n }", "title": "" }, { "docid": "963320c6c8e6f19972872f0c66fe30e0", "score": "0.5508141", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('public/products');\n Storage::delete($product->image);\n }\n $product->name = $request->name;\n $product->description = $request->description;\n $product->image = $image;\n $product->price = $request->price;\n $product->additional_info = $request->additional_info;\n $product->category_id = $request->category;\n $product->subcategory_id = $request->subcategory;\n\n $product->save();\n\n return redirect()->route('product.index')->with('message', 'Successfully updated the product');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "60f3ddc323c30358e47d69e943e6dbaa", "score": "0.5501432", "text": "public function update(Request $request, $id)\n {\n\n extract($this->getResourceNames());\n\n $this->authorize('EDIT_' . $permissionKey);\n\n $item = $modelPath::findOrFail($id);\n\n $this->validateEditForm($request, $item);\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "f413999cfa6fd30cb481e60a58035e46", "score": "0.54997146", "text": "public function update(Request $request,$id)\n {\n $product=Product::find($id);\n $request->validate([\n \"name\"=>\"required\",\n \"category\"=>\"required\",\n \"description\"=>\"required\",\n \"price\"=>\"required|numeric\",\n \"stock\"=>\"required|numeric\",\n \"image\"=>\"required\"\n ]);\n if($request->hasFile('image')){\n $imgname=$request->image->getClientOriginalName(); \n if(Storage::exists($request->image)){\n $product->image=$imgname; \n }\n else{\n $request->image->storeAs('public',$imgname);\n $product->image=$imgname;\n }\n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->description=$request->description;\n $product->stock=$request->stock;\n $product->price=$request->price;\n $product->save();\n\n }", "title": "" }, { "docid": "8de839d3e9816fa894298a9064d231f4", "score": "0.5497475", "text": "function update($record) {\n\t\techo \"update called\";\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t\t$this->rest->option(CURLOPT_PORT, REST_PORT);\n\t\t$key = $record->{$this->_keyfield};\n\t\t$retrieved = $this->rest->put('/job/' . $key, $record);\n\t\t$this->load(); // because the \"database\" might have changed\n\t}", "title": "" }, { "docid": "01d7e90eb4d4834e12b31486f04ab3c2", "score": "0.5493121", "text": "public function update(Request $request)\n {\n $feature=Feature::find($request->id);\n if($request->hasFile('feature_icon')) {\n $file_name = time().'.'.$request->feature_icon->extension(); \n $path = $request->file('feature_icon')->storeAs('public/feature_icons',$file_name);\n $feature->feature_icon=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/feature_icons/' . $Image)){\n $delete= Storage::delete('/public/feature_icons/' . $Image);\n }\n } \n $feature->feature_name=$request->feature_name;\n $feature->updated_at=date('Y-m-d H:m:s');\n $feature->update();\n alert::success('feature Updated Successfully');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "f7f83699cca8c8d4920c525dc392587d", "score": "0.54910034", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = $request->all();\n $product = Product::find($id);\n\n $path = null;\n if ($request->file('image')) {\n $path = $request->file('image')->store('public/products');\n // @unlink('storage/'. $product->image);\n $data['image'] = $path;\n }\n\n\n $product->update($data);\n\n return redirect('/product');\n }", "title": "" }, { "docid": "2160be914cd287b1f331b462c6097a00", "score": "0.54888636", "text": "public function update(Request $request, $id)\n {\n // $this->authorize('haveaccess','producto.edit');\n $datosProductos=request()->except(['_token','_method']);\n\n if ($request->hasFile('imagen')) {\n\n $producto= Producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->imagen);\n\n $datosProductos['imagen']=$request->file('imagen')->store('uploads/producto','public');\n }\n\n Producto::where('id','=',$id)->update($datosProductos);\n $valores['concesionado']=Null;\n $producto= Producto::findOrFail($id);\n $producto->fill($valores);\n $producto->save();\n return view('supervisor.producto.edit',compact('producto'));\n }", "title": "" }, { "docid": "6cf2f968968fff04f96278a9288f5b34", "score": "0.54857856", "text": "public function update(Request $request, $id)\n {\n if ($this->checkRole()) {\n $product = Product::find($id);\n $product->brandName = $request->Input('brandName');\n $product->medicalName = $request->Input('medicalName');\n $product->price = $request->Input('price');\n $product->buying_price = $request->Input('buying_price');\n $product->reorder_level = $request->Input('reorder_level');\n if ($request->hasFile('image')) {\n $oldFilename = 'public/product_images/' . $product->image;\n $product->image = $this->filenameToStore($request);\n Storage::delete($oldFilename);\n }\n $product->save();\n $product->suppliers()->sync($request->suppliers);\n\n return redirect('/products')->with('success', 'Product Details Saved Successfully!');\n } else {\n return redirect()->route('home');\n }\n\n }", "title": "" }, { "docid": "57e8a233d0abf833c408dd0277ccd310", "score": "0.5483825", "text": "public function update($id)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n try {\n //Update \n $data2 = [\n 'slug' => request('slug'), \n 'title' => request('title'), \n 'status' => request('status'),\n 'description' => request('description'),\n 'user_id' => Auth::user()->id, \n ];\n\n $data = [\n 'pages' => request('pages'), \n 'body' => request('body'),\n ];\n\n $resource = Article::find($id);\n //var_dump($resource);\n $tags = [];\n\n //If new tags then create and add for sync\n foreach(json_decode(request('tags')) as $tagK => $tagV){\n if(!empty($tagV->create) && $tagV->create){\n if($tag = Tag::firstOrCreate([\n 'title' => $tagV->value,\n 'slug' => str_slug($tagV->value),\n ]))\n {\n $tag->resources()->sync($id);\n $tags[] = $tag->id;\n }\n }\n else {\n $tags[] = $tagV->value;\n }\n }\n\n if($resource->update($data) && $resource->resource->update($data2) && $resource->resource->tags()->sync($tags)) \n {\n return $this->respondSuccess('Successful edit.');\n }\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondError(null, ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "69899e5cc810b430e81a78ef78bbb9aa", "score": "0.54833865", "text": "public function putAction()\n\t{\n\t\t$this->_connectionApi->put();\n\t}", "title": "" }, { "docid": "317ca96a233f05a742b57399bd2b3542", "score": "0.54833144", "text": "public function update(Request $r, $id)\n {\n $p = Product::find($id);\n $p->stock = $r->input('stock');\n $p->save();\n alert()->success('Success', 'Data successfully updated');\n return redirect()->route('emptyProduct.index');\n }", "title": "" }, { "docid": "f84f36825279804eeb3fa246acad7d33", "score": "0.5482953", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n unset($data['_token']);\n unset($data['_method']);\n unset($data['image']);\n $rs = Pr::find($id)->update($data);\n if($rs) {\n if($request->image){\n $prs = Pr::find($id);\n $image_u = $prs->media;\n $image_u = str_replace('/storage/app/', '', $image_u);\n $path = '/storage/app/'.@$request->file('image')->store('prs');\n $prs->image = $path;\n $prs->save();\n Storage::delete($image_u);\n }\n return redirect(route('prs.index'));\n }else{\n return back();\n }\n }", "title": "" }, { "docid": "a01ea56f337a0cca2a7f8b0fb86e58d0", "score": "0.54794407", "text": "public function update(Request $request, $id)\n {\n\t\t$product = Product::find($id);\n\n\t\t$this->valid($request);\n\n\t\t$field = [\n\t\t\t'uuid',\n\t\t\t'name',\n\t\t\t'price',\n\t\t\t'description',\n\t\t];\n\n\t\tif ($request->product_photo) {\n\t\t\t$request->request->add([\n\t\t\t\t'rule' => [\n\t\t\t\t\t'product_photo' =>\n\t\t\t\t \t'required|image|mimes:jpeg,png,jpg|max:2048',\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$this->valid($request);\n\n\t\t\t$upload = $request->file('product_photo')->store('assets/img');\n\n\t\t\tif ($product->photo != '/assets/img/default.jpg') {\n\t\t\t\t@unlink(public_path().$product->photo);\n\t\t\t}\n\n\t\t\tarray_push($field, 'photo');\n\n\t\t\t$request->request->add([\n\t\t\t\t'photo' => '/'.$upload\n\t\t\t]);\n\t\t}\n\n\t\tProduct::where('id', $id)\n\t\t\t->update($request->only($field));\n\n\t\treturn redirect()->route('product.index')->with([\n\t\t\t'success' => 'Data Changed'\n\t\t]);\n }", "title": "" }, { "docid": "749485fd3edd17fca5d56cd2e62d0c66", "score": "0.547553", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n\n $old_image = $item->image_url;\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'items');\n $requestData['image_url'] = $path;\n File::delete(public_path() . $old_image);\n\n }\n\n $item->update($requestData);\n\n return redirect('/admin/items');\n }", "title": "" }, { "docid": "ba14e6d76f18913118873dc455ddf07e", "score": "0.547496", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n //\n try {\n $originImage= $product->image;\n $product->fill($request->except(['category', 'supplier']));\n $product->image = $originImage;\n if ($request->image) {\n $oldImage = $product->image;\n $imageEncodeBase64 = $request->image;\n $postion = strpos($imageEncodeBase64, ';');\n $ext = explode('/', substr($imageEncodeBase64, 0, $postion))[1];\n $fileName = Str::uuid() . '.' . $ext;\n $filePath = public_path('storage/product') . '/' . $fileName;\n Image::make($imageEncodeBase64)->resize(200, 240)->save($filePath);\n $product->image = \"product/$fileName\";\n $filePath = public_path('storage/'.$oldImage);\n if(file_exists($filePath)){\n unlink($filePath);\n }\n }\n $product->save();\n return response()->success(new ProductResource($product));\n } catch (\\Throwable $ex) {\n return response()->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "748d9e839dc1aa55917e22860bfd0666", "score": "0.54659873", "text": "public function update(Request $request, $id, $parent = null)\n {\n extract($this->getResourceNames());\n\n if(!is_null($parent))\n {\n $item = $modelPath::findOrFail($parent);\n $parent = $this->parentModelPath::findOrFail($id);\n } else {\n $item = $modelPath::findOrFail($id);\n }\n\n $validated = $this->resolveRequest('Update')->validated();\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "47bbce92661ab4fdf29441a5eabbeea2", "score": "0.5462897", "text": "public function update(Request $request, $id)\n {\n $update = Supplier::find($id);\n $update->name = $request->name;\n $update->slug = strtolower(str_replace(' ', '-',$request->name));\n $update->email = $request->email;\n $update->phone = $request->phone;\n $update->address = $request->address;\n $update->shop_name = $request->shop_name;\n\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $img = time() . '.'. $image->getClientOriginalExtension();\n $location = public_path('backend/assets/images/supplier/'.$img);\n Image::make($image)->resize(300,300)->save($location);\n $update->photo = $img;\n }\n $update->save();\n toast('Supplier Information Add Successfully','success');\n return redirect()->route('index.supplier');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "f684d143c5cb5e0fd840b77e6b10f6c8", "score": "0.5460385", "text": "public function update(Request $request, $id)\n { \n $product = Product::find($id);\n $product->name = $request->name;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->save();\n if($request->hasFile('image')){\n $file = $request->file('image');\n $name = time().'.jpg';\n $file->move(public_path('//images//'), $name);\n $image = Image::find($id);\n $image->path = '/images/'.$name;\n $image->save();\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product ,'image'=>$image,]);\n }\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product]);\n }", "title": "" }, { "docid": "6bbf67d9e29ef7e592b60af7e38a778c", "score": "0.54592675", "text": "public function update($resource, $attributes, $exec = false)\n {\n if (!$exec) {\n return $this->beforeUpdate($resource, $attributes);\n }\n\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->afterUpdate($resource, $attributes);\n });\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "4360333bf1732261e8e76d77713982a2", "score": "0.54556817", "text": "private function updateEntity(Model\\BaseModel $entity, string $uri, string $resourceFieldKey): void {\n\t\t$tags = [];\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// Preserve the tags temporarily.\n\t\t\t// We'll sync them later.\n\t\t\t$tags = $entity->getTags();\n\t\t}\n\n\t\t$rawApiResponse = $this->communicator->put($uri, [], [\n\t\t\t$resourceFieldKey => $entity->export(),\n\t\t]);\n\n\t\t$newData = $rawApiResponse->getValue(sprintf('[%s]', $resourceFieldKey));\n\t\t$entity->hydrate($newData);\n\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// The requests (and hydration) above made us lose the tags,\n\t\t\t// since they're managed through another API.\n\t\t\t// Let's assign/de-assign tags now.\n\t\t\t$this->ensureTagsSynced($entity, $tags);\n\t\t}\n\t}", "title": "" }, { "docid": "f2d8cf4532904fd7bfbac2bd62a96a68", "score": "0.54469514", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n if ($request->hasFile('icon')) {\n $path = $request->icon->store('public/images');\n $input['icon'] = $path;\n }\n $block = FourBlock::find($id);\n $block->fill($input)->save();\n toastr()->success('Block has been updated successfully');\n return redirect()->route('fourblock.index');\n }", "title": "" }, { "docid": "0073ba64b443f80ace8779c23d638758", "score": "0.54424137", "text": "public function update(StorePoductRequest $request, Product $product, $id)\n {\n $updated_datas = $request->except(['_method','_token']);\n $prod_to_update = Product::where('id',$id);\n $updated = $prod_to_update->update($updated_datas);\n if($prod_to_update){\n return redirect('/admin/products')->with('status', 'A termék sikeresen frissítve!');\n }\n\n }", "title": "" }, { "docid": "7db59e65f55b9762d20b09aede45101b", "score": "0.54399514", "text": "public function update(Request $request, Product $product)\n {\n if($request['image']){\n $file = $request['image'];\n $image = $this->ImageUploader($file,'images/');\n// unlink($product->image);\n }else{\n $image = $product->image;\n }\n if($request['file']){\n $file = $request['image'];\n $val = $this->ImageUploader($file,'files/');\n// unlink($product->file);\n }else{\n $val = $product->file;\n }\n\n\n $data = $request->all();\n $product->tags()->sync($data['tag_id']);\n $data['image'] = $image;\n $data['file'] = $val;\n\n $product->update($data);\n return redirect(route('product.index'));\n }", "title": "" }, { "docid": "2b54bef0cb09abd830d8673bfdd3df4e", "score": "0.5435874", "text": "public function update(ProductRequest $request, $id)\n {\n $inputs = $request->except(['_method', '_token']);\n if ($request->hasFile('poster')) {\n $poster = $request->file('poster');\n $new_name = uniqid(mb_strimwidth($poster->getClientOriginalName(), 0, 3, '_')) . '.' . $poster->getClientOriginalExtension();\n\n $img = Image::make($poster);\n $img->insert(public_path().'/images/watermark.png', 'center');\n $img->save(public_path() . '/images/' . $new_name);\n\n File::delete('images/' . $inputs['old_poster']);\n $inputs['poster'] = $new_name;\n unset($inputs['old_poster']);\n } else {\n $inputs['poster'] = $inputs['old_poster'] ?? null;\n unset($inputs['old_poster']);\n }\n if ($inputs['available'] === 'yes') {\n $inputs['available'] = 1;\n } else {\n $inputs['available'] = 0;\n }\n $update_product = Product::find($id);\n $update_product->fill($inputs);\n if ($update_product->update()) {\n return redirect()->route('product.index')->with('status', 'Product successfully updated !!!');\n }\n }", "title": "" }, { "docid": "45006333af499b7a8ef5e992e8465995", "score": "0.54331666", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n\t\tself::storeOrUpdate($product, $request);\n\n\t\treturn redirect('/products')->with('edited', \"Product edited: $product->name\");\n }", "title": "" }, { "docid": "f71584ef2ac9d0aab6b54094e7b315c4", "score": "0.543238", "text": "public function update()\n {\n $this->executeActions(true);\n $this->saveData();\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "eaa583782a682873861569b9b98dc81c", "score": "0.5430323", "text": "public function updateEntity(Entity $entity);", "title": "" }, { "docid": "8fb9613a7e05f846bb10235d1d3c4c4b", "score": "0.54254407", "text": "public function update(Request $request, $id)\n {\n $validation=$request->validate([\n \"text\"=>\"required\",\n\n \n ]);\n $update=Slider::find($id);\n if (request()->hasFile(key:'img')) {\n $img=request()->file(key:'img')->hashName();\n request()->file(key:'img')->storeAs(path:'',name:$img);\n $update->img=$img;\n }\n $update->text=$request->text;\n $update->save();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "9f31b47ab07ed8f7effea689ae758174", "score": "0.5420852", "text": "public function update()\n {\n $this->getDataBackend()->update();\n }", "title": "" }, { "docid": "336bb2ab11980d312dc3ebdfdf92ee79", "score": "0.5418655", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'al_desc'=>'required|string',\n 'tr_desc'=>'required|string',\n 'stock'=>'required',\n 'age'=>'required',\n 'pur_price'=>'required',\n 'sale_price'=>'required',\n 'image' => 'required|image|max:2048',\n ]);\n\n $article = Articles::where('id', $id)\n ->first();\n\n $image_path = public_path(\"images/{$article->image}\");\n\n if (File::exists($image_path)) {\n unlink($image_path);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $image->move(public_path('images'), $filename);\n $article->image = $request->file('image')->getClientOriginalName();\n }\n\n $articleStock = $request->input('stock');\n $article->al_desc = $request->input('al_desc');\n $article->tr_desc = $request->input('tr_desc');\n $article->stock = $request->input('stock');\n $article->age=$request->input('age');\n $article->pur_price=$request->input('pur_price');\n $article->sale_price=$request->input('sale_price');\n $article->prime_stock +=$articleStock;\n $article->save();\n\n return redirect()->route('articles.index')->with('success','Article Updated Successfully');\n }", "title": "" }, { "docid": "cdb8493452b057388fcb678d2dccb96c", "score": "0.5417866", "text": "public function update($id, Request $request);", "title": "" }, { "docid": "9f4a5e931ad31bad773803c3dc4cda90", "score": "0.5416135", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')){\n\n $filename = $this->productImage($request->file('image'));\n \n }else{\n\n $recent = Product::findOrFail($id);\n $filename = $recent->image;\n }\n\n $product = new Product;\n Product::where('id', $id)->update($product->productData($request->toArray())+['status' => true, 'image' => $filename]);\n\n return redirect()->route('products.index')->with('success', 'product successfully updated');\n }", "title": "" }, { "docid": "daac94b3950e759691b202ac44ca7b18", "score": "0.54159683", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->update($request->only($this->product_fields));\n $this->move_image($product, $request->get('image'));\n }", "title": "" }, { "docid": "b55b4c2da5ca8dec48b36986ba4711ee", "score": "0.54155767", "text": "public function update(Request $request, Product $product)\n\n {\n\n $input = $request->all();\n\n\n\n $validator = Validator::make($input, [\n\n 'name' => 'required',\n\n 'price' => 'required',\n\n 'stock' => 'required',\n\n 'shortDesc' => 'required',\n\n 'description' => 'required'\n\n ]);\n\n\n\n\n\n if($validator->fails()){\n\n return $this->sendError('Validation Error.', $validator->errors());\n\n }\n\n\n\n $product->name = $input['name'];\n\n $product->price = $input['price'];\n\n $product->stock = $input['stock'];\n\n $product->shortDesc = $input['shortDesc'];\n\n $product->description = $input['description'];\n\n\n\n $product->save();\n\n\n\n return $this->sendResponse(new ProductResource($product), 'Product updated successfully.');\n\n }", "title": "" }, { "docid": "fa4d35fe272f742ecbc45d6ae01985ba", "score": "0.5411923", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(),[\n 'name' => 'required|string|max:255',\n 'user_id' => 'required|exists:App\\Models\\User,id',\n 'category_id' => 'required|exists:App\\Models\\Category,id',\n 'description' => 'required',\n 'price' => 'required',\n 'photo' => 'image'\n\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()); \n }\n \n $product = Product::find($id);\n $product -> name = $request['name'];\n $product -> user_id = $request['user_id'];\n $product -> category_id = $request['category_id'];\n $product -> description = $request['description'];\n $product -> price = $request['price'];\n\n if($request->hasFile('photo')){\n if(File::exists(public_path(\"storage/\").$product -> photo)){\n File::delete(public_path(\"storage/\").$product -> photo);\n }\n $product -> photo=$request->photo->store('photo');\n }\n\n $product -> save();\n\n return response()\n ->json(['success' => 1,'message' => 'Updated succesfully!']);\n }", "title": "" }, { "docid": "daa5dabd0608fa1791ffe3d1866a3e16", "score": "0.5410523", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n \n $product = $this->repository->find($id);\n if(!$product){\n return redirect()->back();\n }\n\n $data = $request->all();\n\n // Upload de Imagem \n if($request->hasFile('image') && $request->image->isValid()){\n\n /** Verifica se o arquivo existe */\n if($product->image && Storage::exists($product->image)){\n /** Deleta o arquivo */\n Storage::delete($product->image);\n }\n // Salvando imagem e passando o caminho da imagem\n $imagePath = $request->image->store('products');\n\n // Passando o nome da imagem para armazenar no banco\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8cc682b417e81303d02cf6c27cfcadc5", "score": "0.540968", "text": "public function update(Request $request, $id)\n {\n $prds = Product::find($id);\n $prds->nombre = $request->input('nombre');\n if ($request->hasFile('foto')) {\n $file = time().'.'.$request->foto->extension();\n $request->foto->move(public_path('imgs'), $file);\n $prds->foto = \"imgs/\".$file;\n }\n $prds->directory_id = $request->input('directory_id');\n if($prds->save()) {\n return redirect('directories')\n ->with('status', 'La Noticia '.$prds->nombre.' se modifico con Exito!');\n }\n }", "title": "" }, { "docid": "51af550a7cfb8f966c66be0c2f793c3b", "score": "0.54074425", "text": "public function update($id, Request $request)\n\t{\n\t\t$content = Content::findOrFail($id);\n\t\t$data['name'] = $request->name;\n if($request['image-data'] != null){\n \t$image = $this->uploadAvatarAgent($request->image, $request['image-data']);\n \t$data['image'] = $image['url'];\n }\n\t\t$data['url'] = $request->url;\n\t\t$content->update($data); \n\t\treturn redirect()->route(config('quickadmin.route').'.content.index');\n\t}", "title": "" }, { "docid": "aa18b98fb17d4cb4052efc2798af1142", "score": "0.54064333", "text": "public function testUpdateStoreItem()\n {\n }", "title": "" }, { "docid": "0754ef21e342dbc988b4756156b2c0b9", "score": "0.5404135", "text": "public function update(Request $request, Product $product)\n {\n $data = $request->all();\n\n if($request->file('picturePath'))\n {\n $data['picturePath'] = $request->file('picturePath')->store('assets/product', 'public');\n }\n\n $product->update($data);\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
4e6e75d8f539ce3262f16a0433d5e815
/ Function: meager_config Gets a configuration setting from the $config array
[ { "docid": "8c92641c0e6589fd34d67aaf4d9869ab", "score": "0.70134693", "text": "function meager_config( $name, $default=null ) {\n\tglobal $config;\n\tif ( isset( $config[ $name ]))\n\t\treturn $config[ $name ];\n\treturn $default;\n}", "title": "" } ]
[ { "docid": "1d300a28a53d609e647cd7c27bb5b55d", "score": "0.7397635", "text": "public function get_config();", "title": "" }, { "docid": "bfedcc5c6cf5decdf542f280616f9278", "score": "0.73476136", "text": "abstract public function get_config();", "title": "" }, { "docid": "eea7cdab3d1fef70f3b881f21f60f764", "score": "0.71729183", "text": "function get_config() {\n\t\t$config_array = $this->ci->config_model->get('config_name, config_value')->result();\n\t\tif(count($config_array) > 0) {\n\t\t\tforeach($config_array as $key => $config) {\n\t\t\t\t$this->ci->data['config'][$config->config_name] = $config->config_value;\n\t\t\t}\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.71507627", "text": "public function getConfig();", "title": "" }, { "docid": "e9e6fdff763c21e6158ca56c06123afa", "score": "0.7071464", "text": "public function config($config = NULL)\n\t{\n\t\tif (is_array($config))\n\t\t{\n\t\t\t$this->config = $config;\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->config === NULL)\n\t\t{\n\t\t\tif (class_exists('Kohana') AND isset(\\Kohana::$config))\n\t\t\t{\n\t\t\t\t$this->config = \\Kohana::$config->load('the-cure')->as_array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->config = require __DIR__.'/../../config/the-cure.php';\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->config[$config]))\n\t\t{\n\t\t\treturn $this->config[$config];\n\t\t}\n\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "73c7779431cc87a7e902368438534cef", "score": "0.7027359", "text": "private function getConfig()\r\n\t{\r\n\t\t$url = $this->base . 'configuration?' . $this->key;\r\n\r\n\t\treturn $this->call($url);\r\n\t}", "title": "" }, { "docid": "e72b102c2dab28484f99109b290b730a", "score": "0.70269483", "text": "abstract public function getConfig();", "title": "" }, { "docid": "9e542f72cc0b365cfdf715e63a0e8ea4", "score": "0.70215416", "text": "function getconfig() {\n global $db;\n global $config;\n\n $sql = \"select * from config\";\n $settings = $db->query( $sql,false,true,'name' );\n foreach ($settings as $setting) {\n $name = $setting->name;\n $config->$name = $setting->value;\n }\n }", "title": "" }, { "docid": "0457987f56aa77ddaa5ebb4565d894d5", "score": "0.6918094", "text": "function getConfig();", "title": "" }, { "docid": "0457987f56aa77ddaa5ebb4565d894d5", "score": "0.6918094", "text": "function getConfig();", "title": "" }, { "docid": "2157319e130525520e0f51caa4eff172", "score": "0.6736159", "text": "function config($k,$m='system')\n{\n\tstatic $c;$c[$m]=empty($c[$m])?require(SP.($m!='system'?\"$m/\":'').'config'.EXT):$c[$m];return($k?$c[$m][$k]:$c[$m]);\n}", "title": "" }, { "docid": "06aad2c8de44c0fa0dfd18ae6dd21367", "score": "0.6713407", "text": "private static function getConfig() {\n\t\tglobal $addonPathData; \n\t\t$config = array();\n\t\t$conf = $addonPathData.'/config.php';\n\t\tif(file_exists($conf) ){\n\t\t\tinclude($conf);\n\t\t\t$config = $settings;\n\t\t}\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "a5beebf36e9a8a8c621f8cb8105d9532", "score": "0.6710058", "text": "public function GetConfig($config_name=\"\") : array|string{\n\t\tif( $this->configs == null ){\n\t\t\t$this->LoadFile();\n\t\t}\n\t\tif( empty($config_name) ){\n\t\t\treturn $this->configs;\n\t\t} else {\n\t\t\t$c_split = explode(\"/\", $config_name);\n\t\t\treturn ( count($c_split) == 1 ? $this->configs[$config_name] : $this->configs[$c_split[0]][$c_split[1]] );\n\t\t}\n\t}", "title": "" }, { "docid": "1197fc025c1a52936197bc2bfffa9d9e", "score": "0.6699551", "text": "abstract protected function config();", "title": "" }, { "docid": "bc89119a620f5017927cdc22cbde68d3", "score": "0.66770697", "text": "function config($param, $index = '') {\n $CI = & get_instance();\n return $CI->config->item($param, $index);\n }", "title": "" }, { "docid": "0c49d93cb5fca22d48b6ffd5d06cc8ed", "score": "0.6667498", "text": "protected function readConfig(array $config)\n {\n\n }", "title": "" }, { "docid": "8b71eda922a6e9d3c9e6dd21cc8e3465", "score": "0.666254", "text": "function &getConfig($_cfg_name=FALSE, $replace=array())\n{\n\tinclude(INS_PATH . 'config.php');\n\tif ( ! isset($config)) {\n\t\tdie('Config variable not found');\n\t}\n\n\t// replace config\n\tforeach ($replace as $key => $value) {\n\t\tif (isset($config[$key])) {\n\t\t\t$config[$key] = $value;\n\t\t}\n\t}\n\n\t// done\n\t$_config[0] =& $config;\n\tif ($_cfg_name && isset($_config[0][$_cfg_name])) {\n\t\treturn $_config[0][$_cfg_name];\n\t} else {\n\t\treturn $_config[0];\n\t}\n}", "title": "" }, { "docid": "b15841dca20ce8bcddb58ce171fa31fd", "score": "0.6660422", "text": "protected abstract function getConfigInstance();", "title": "" }, { "docid": "f161b3a02eebf5fd0cb6e668e5b7a828", "score": "0.662018", "text": "public static function config($config = array()) {\n\t\tif (!$config && MiCache::$setting) {\n\t\t\treturn array(MiCache::$setting => MiCache::$settings[MiCache::$setting]);\n\t\t}\n\t\t$_defaults = MiCache::$defaultSettings;\n\t\t$name = isset($config['name'])?$config['name']:'mi_cache';\n\t\tif (!MiCache::$setting) {\n\t\t\tMiCache::$setting = $name;\n\t\t}\n\t\tMiCache::$settings[$name] = array_merge($_defaults, $config);\n\t\tif (MiCache::$settings[$name]['path'][0] != '/') {\n\t\t\tMiCache::$settings[$name]['path'] = CACHE . MiCache::$settings[$name]['path'];\n\t\t}\n\t\tif (in_array(MiCache::$settings[$name]['engine'], array('File', 'MiFile')) && !is_dir(MiCache::$settings[$name]['path'])) {\n\t\t\tnew Folder(MiCache::$settings[$name]['path'], true);\n\t\t}\n\t\tCache::config($name, MiCache::$settings[$name]);\n\t\treturn array($name => MiCache::$settings[$name]);\n\t}", "title": "" }, { "docid": "9394052d01d26398ebe64a3f45f41538", "score": "0.6619038", "text": "public function getConfig()\n {\n return $this->conf();\n }", "title": "" }, { "docid": "f0dbb5db098226d6baa1e925b99ac217", "score": "0.65804523", "text": "public static function get_config($as_array = FALSE)\n\t{\n\t\t(self::$_config === NULL) AND self::$_config = Kohana::config('mmi-api');\n\t\t$config = self::$_config;\n\t\tif ($as_array)\n\t\t{\n\t\t\t$config = $config->as_array();\n\t\t}\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "d00ea02cbd92d60a4c762577c11ef92a", "score": "0.6567585", "text": "public function getConfig() : array ;", "title": "" }, { "docid": "d00ea02cbd92d60a4c762577c11ef92a", "score": "0.6567585", "text": "public function getConfig() : array ;", "title": "" }, { "docid": "c02d942da665f8631e3507a2ca428973", "score": "0.6543284", "text": "public function config(array $config = []);", "title": "" }, { "docid": "adbb6466609272d9f83cb33bd92eb9ef", "score": "0.6542235", "text": "public function get_config() {\n return $this->config;\n }", "title": "" }, { "docid": "83850ba07fc45061d40642d3adaf15c7", "score": "0.6529748", "text": "public function getConfig( $config )\n {\n return isset($this->config[$config]) ? $this->config[$config] : false;\n }", "title": "" }, { "docid": "d0edfdb0b07cb611691171f9b5e54e53", "score": "0.6510109", "text": "protected function getConfig() {\n\t\treturn PPI_Helper::getConfig();\n\t}", "title": "" }, { "docid": "cc79049f451100e42a0aa74a4875e512", "score": "0.6503005", "text": "public function getConfigByName($name) {\n\t\t\n\t\treturn BaseRepository::getSignleData(\n\t\t\t\t\t\t\t\t'config',\n\t\t\t\t\t\t\t\tarray('name','value'),\n\t\t\t\t\t\t\t\tarray('name'=>$name)\n\t\t\t\t\t\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "bea9b328fb405634bd15eebb486d9b15", "score": "0.6499484", "text": "function config($param,$value=''){\n\n $data=Configs::where('sys_type','cpanel')->get();\n $info=array();\n if($data){\n $config=Configs::transform($data);\n }\n if($config){\n if(isset($config[$param])){\n if($param=='language' || $param=='setting'){\n if(array_search($value,(array)$config[$param])!==false){\n return true;\n }\n return false;\n }else{\n return (array)$config[$param];\n }\n }\n return false;\n }\n }", "title": "" }, { "docid": "cb0bf145a6c8dce0fd568ed9ec2aebb4", "score": "0.64934355", "text": "protected function _config_object($config_name = NULL)\n {\n empty($config_name) AND $config_name = $this->object_name;\n\n //vraci nactenou konfiguraci\n return Kohana::config($config_name);\n }", "title": "" }, { "docid": "3e7421b1d8ec42e8907b4e58bf5ee429", "score": "0.648939", "text": "protected abstract function getConfigSection();", "title": "" }, { "docid": "15227c532b31cac20ec1a2f65ede6a9c", "score": "0.64852166", "text": "public function config();", "title": "" }, { "docid": "273bab4c5f85854b7623c0ab271d0935", "score": "0.6479931", "text": "function ipm_get_config($config_name) {\r\n\tglobal $ipm_site;\r\n\tif (!empty($ipm_site)) {\r\n\t\tif (array_key_exists($config_name, $ipm_site)) {\r\n\t\t\treturn $ipm_site[$config_name];\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "3e78a9a4ecb08852efca5cafea03dec0", "score": "0.6462517", "text": "public static function config($string) \n\t{ \n\t\treturn self::service('config')->get($string); \n\t}", "title": "" }, { "docid": "ce5cb33d18d321454a88f90fd59354d0", "score": "0.64485633", "text": "abstract protected function getRequiredConfig();", "title": "" }, { "docid": "4ab625b8a7f0854629203fa4b8af43ac", "score": "0.6444862", "text": "protected function getConfig() {\n return $this->configFactory->get('weather.settings');\n }", "title": "" }, { "docid": "03ea0bfb6a5f27c3a7e14fd204306391", "score": "0.64201033", "text": "function cms_get_config($config_name, $default_value = null, $module = 'global', $lang = 'vi')\n {\n if (Schema::hasTable('configs')) {\n $config_value = Config::where(['lang' => $lang, 'module' => $module, 'name' => $config_name])->get(['value'])->first();\n if ($config_value) return $config_value['value'];\n }\n return $default_value;\n }", "title": "" }, { "docid": "53bde56cedfd59d03b4be75d0dea5910", "score": "0.64139605", "text": "public function get_config()\n {\n return $this->_config;\n }", "title": "" }, { "docid": "4bcde483d89242c36647e1fbea53b0a1", "score": "0.6412294", "text": "public function getConfig()\r\n\t{\r\n\t\treturn Config::getInstance();\r\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.6401795", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.6401795", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "551aa08d8b21b0480329f9e70a9bc921", "score": "0.6401795", "text": "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "cbffabbf40b5d5f084b5417874fa3e10", "score": "0.63950515", "text": "public function config()\n {\n return $this->get('config');\n }", "title": "" }, { "docid": "3a9e9896f847a234707406696b44c4c9", "score": "0.63909125", "text": "public static function getConfig($name = false)\r\n\t{\r\n\t if (false === $name) {\r\n\t\t return Nine_Registry::get('config');\r\n\t } else {\r\n\t $config = Nine_Registry::get('config');\r\n\t return @$config[$name];\r\n\t }\r\n\t}", "title": "" }, { "docid": "0bcaf65398ce99c714bfe481c3a71c0d", "score": "0.6389509", "text": "function getConfig() {\r\n $rec=SQLSelectOne(\"SELECT * FROM project_modules WHERE NAME='\".$this->name.\"'\");\r\n $data=$rec[\"DATA\"];\r\n $this->config=unserialize($data);\r\n return $this->config;\r\n }", "title": "" }, { "docid": "40a7140db150394876ba191f3ea2f909", "score": "0.63840204", "text": "public function getConfig()\r\n {\r\n return self::$_config;\r\n }", "title": "" }, { "docid": "2a4dd0b7b1a07fbcbf10dd9103ac36bf", "score": "0.63838345", "text": "public static function config()\n {\n return static::$config;\n }", "title": "" }, { "docid": "2a4dd0b7b1a07fbcbf10dd9103ac36bf", "score": "0.63838345", "text": "public static function config()\n {\n return static::$config;\n }", "title": "" }, { "docid": "f055e29e6eb4b063e3101fb323a52270", "score": "0.63738614", "text": "function get_config($name) {\n\telgg_deprecated_notice(__FUNCTION__ . ' is deprecated. Use elgg_get_config().', '3.0');\n\treturn elgg_get_config($name);\n}", "title": "" }, { "docid": "93bf8d2091303e14ad3308223f14e902", "score": "0.6373674", "text": "public static function getConfig()\n {\n return self::$config;\n }", "title": "" }, { "docid": "6d26d0d4eddeb30b19320c13f409f1a9", "score": "0.63667303", "text": "function get_config($name, $default = '') {\n\tglobal $_CONFIG;\n\tif (isset($_CONFIG[$name]))\n\t\treturn $_CONFIG[$name];\n\telse\n\t\treturn $default;\n}", "title": "" }, { "docid": "615116734e7490416c6c9f5d74b4d74f", "score": "0.63534904", "text": "function getConfiguration();", "title": "" }, { "docid": "b879f99f1feb00198801a3db807879e7", "score": "0.6352951", "text": "function getConfiguration() ;", "title": "" }, { "docid": "87b812a39630b424fca4982ca5d52794", "score": "0.63505656", "text": "function getConfig() {\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "72511c66e7bc6daf1cfdb03818906400", "score": "0.6343309", "text": "public function getConfig(){\r\n return $this->_config;\r\n }", "title": "" }, { "docid": "c5331b7e2ee7861c6c028b2bb81d28c5", "score": "0.63418704", "text": "function getConfig($key = false);", "title": "" }, { "docid": "feb4f6cacc92f20a92b2af7444ab0560", "score": "0.6340615", "text": "public static function getConfig() {\n\t\t$class = get_called_class();\n\n\t\treturn (object)$class::$config;\n\t}", "title": "" }, { "docid": "c337b24990008db60e9d4f13e24db2ca", "score": "0.63387007", "text": "public function getConfig(){\r\n return $this->config;\r\n }", "title": "" }, { "docid": "625340fb628d07f41099373cc5687b7f", "score": "0.63386095", "text": "function PHP_GetConfig() {\r\n\t\tglobal $db;\r\n\t\t$data = array();\r\n\t\t$configs = $db->get(T_CONFIG);\r\n\t\tforeach ($configs as $key => $config) {\r\n\t\t\t$data[$config->name] = $config->value;\r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "83ffb4ecbdccee1c6c8981ab2d7baca0", "score": "0.63383067", "text": "function &getConfig() \n\t{\n\t\tstatic $params = null;\n\t\tif(is_null($params)) \n\t\t{\n\t\t\t$config =& JFactory::getConfig();\n\t\t\t$params = $config->getValue('config.memcache_settings');\n\t\t\tif (!is_array($params)) {\n\t\t\t\t$params = unserialize(stripslashes($params));\n\t\t\t}\n\n\t\t\tif (!$params) {\n\t\t\t\t$params = array();\n\t\t\t}\n\t\t\t$params['hash'] = $config->getValue('config.secret');\n\t\t}\n\t\t\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "56257ab9e3db7052314b5401a24b0564", "score": "0.63355845", "text": "public function getConfig()\n\t{\n\t\treturn $this->_config;\n\t}", "title": "" }, { "docid": "298c7588fd17eb962ba2311cd9f8b48a", "score": "0.63345903", "text": "public function &getConfigData();", "title": "" }, { "docid": "b5407c852cd10d2502a0204a6fe3b8f9", "score": "0.63198656", "text": "function get_config_item($key){\n require($GLOBALS[\"base_config_file\"]);\n if(isset($config[$key])){\n return $config[$key];\n }\n //\\merlin\\logger\\log(\"returning value: \" . var_export($value, true));\n return null;\n}", "title": "" }, { "docid": "ec08d8510ea42d014a92b92a038624aa", "score": "0.631068", "text": "function config($param)\n{\n $config = require \"config.php\";\n return $config[$param] ?? null;\n}", "title": "" }, { "docid": "c136997d55272f38cb23c33d1360468d", "score": "0.6308261", "text": "function get_config($name)\n{\n global $dbprefix, $SQL, $d_groups, $userinfo;\n\n $table = \"{$dbprefix}config c\";\n\n //what if this config is a group-configs related ?\n $group_id_sql = '';\n\n if (array_key_exists($name, $d_groups[$userinfo['group_id']]['configs']))\n {\n $table = \"{$dbprefix}groups_data c\";\n $group_id_sql = ' AND c.group_id=' . $userinfo['group_id'];\n }\n\n $query = [\n 'SELECT' => 'c.value',\n 'FROM' => $table,\n 'WHERE' => \"c.name = '\" . $SQL->escape($name) . \"'\" . $group_id_sql\n ];\n\n $result = $SQL->build($query);\n $v = $SQL->fetch($result);\n $return = $v['value'];\n\n is_array($plugin_run_result = Plugins::getInstance()->run('get_config_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook\n return $return;\n}", "title": "" }, { "docid": "bd5d4e5e33056ceceef997ad9ad7c58e", "score": "0.6307341", "text": "public static function parseConfig($config);", "title": "" }, { "docid": "e5fb4e901f7174ed292f38e8f0f8e505", "score": "0.630684", "text": "public static function getConfig() {\n return static::$config;\n }", "title": "" }, { "docid": "3bf871f0756121bf7b609b4a1a432380", "score": "0.63037956", "text": "public function getConfig($name) {\r\n return isset($this->settings[$name]) ? $this->settings[$name] : null;\r\n }", "title": "" }, { "docid": "8660a940b7262bea1bcd30093ab2c45d", "score": "0.6298641", "text": "public function getConfig()\n {\n $config = [\n 'foolsample' => [\n 'minimum_amount' => self::MINIMUM_AMOUNT,\n 'amount_edge' => self::AMOUNT_EDGE,\n 'image' => self::IMAGE,\n 'image2' => self::IMAGE2,\n 'imageR' => self::IMAGER,\n ],\n ];\n\n return $config;\n }", "title": "" }, { "docid": "81cb6899b68637051afdc3b34930b76b", "score": "0.62862587", "text": "public static function getConfig(): array {}", "title": "" }, { "docid": "19ada81931acd6746007c82b45eb73e4", "score": "0.62846696", "text": "protected function getConfig($name)\n {\n return $this->config->get(self::CONFIG_NAME . '.' . $name);\n }", "title": "" }, { "docid": "6b70ef6a79182b282d2977664cc5ed29", "score": "0.6281597", "text": "public static function config ($config = null)\n\t\t{\n\t\tif ($config !== null)\n\t\t\treturn self::ioc ('config')->group ($config);\n\t\t\n\t\treturn self::ioc ('config');\n\t\t}", "title": "" }, { "docid": "0205c67f0c9e70aa98ed7abf8e79e8e8", "score": "0.6269682", "text": "function config($key)\n{\n\ttry\n\t{\n\t\t$config = get('config');\n\t}\n\tcatch (Exception $e)\n\t{\n\t\t$config = get('config', load_config());\n\t}\n\t\n\tif (isset($config[$key]))\n\t{\n\t\treturn $config[$key];\n\t}\n\telse\n\t{\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "413ca3ab5181cab278babca92a470ec3", "score": "0.62661594", "text": "function config($dbconfig='',$config='')\n {\n include_once('core/class.config.php');\n return new config($dbconfig,$config);\n }", "title": "" }, { "docid": "b3fcf6e5e95b5c77f86d44a4af103a8f", "score": "0.62649626", "text": "public function get_config()\n\t{\n\t\treturn mod('email')->make_config();\n\t}", "title": "" }, { "docid": "0aed69e6a186719fa16cb0e5873659a1", "score": "0.6264892", "text": "protected function getConfig()\n {\n $config = Configuration::getMultiple(\n array(\n self::_CONFIG_PRIVATE_KEY,\n self::_CONFIG_SHOP_TOKEN,\n self::_CONFIG_PAIEMENT_ACCEPTED,\n self::_CONFIG_PAIEMENT_REFUSED,\n self::_CONFIG_SHOP_INPUT_METHOD,\n self::_CONFIG_CANCEL_ACTION,\n self::_CONFIG_VISIBLE,\n self::_CONFIG_PAYMENT_REFUND,\n self::_CONFIG_FOOTER_DISPLAY,\n self::_CONFIG_FOOTER_LOGO_COLOR,\n self::_CONFIG_VERIF_ADULT\n )\n );\n\n if (empty($config[self::_CONFIG_PAIEMENT_ACCEPTED])) {\n $config[self::_CONFIG_PAIEMENT_ACCEPTED] = $this->l('Your payment was accepted');\n }\n if (empty($config[self::_CONFIG_PAIEMENT_REFUSED])) {\n $config[self::_CONFIG_PAIEMENT_REFUSED] = $this->l('Your payment unsuccessful');\n }\n if (empty($config[self::_CONFIG_SHOP_INPUT_METHOD])) {\n $config[self::_CONFIG_SHOP_INPUT_METHOD] = 'POST';\n }\n if (empty($config[self::_CONFIG_CANCEL_ACTION])) {\n $config[self::_CONFIG_CANCEL_ACTION] = 0;\n }\n if (empty($config[self::_CONFIG_VISIBLE])) {\n $config[self::_CONFIG_VISIBLE] = 0;\n }\n if (empty($config[self::_CONFIG_PAYMENT_REFUND])) {\n $config[self::_CONFIG_PAYMENT_REFUND] = 0;\n }\n if (empty($config[self::_CONFIG_FOOTER_LOGO_COLOR])) {\n $config[self::_CONFIG_FOOTER_LOGO_COLOR] = 'white';\n }\n\n return $config;\n }", "title": "" }, { "docid": "0a02eb437553ad5c33813dc5913b829a", "score": "0.6259689", "text": "public function GetConfig($configName)\n {\n return $this->config[$configName];\n }", "title": "" }, { "docid": "39581da360ef60a0ba138942272d9c16", "score": "0.6256776", "text": "protected function _getConfig()\n {\n return $this->_aConfig;\n }", "title": "" }, { "docid": "d7c95861df271d27311b64d01b9e6bc0", "score": "0.6255065", "text": "private function get_config()\n\t{\n\t\t$config = unserialize(@$_COOKIE['config']);\n\t\t\n\t\tif ( ! $config)\n\t\t\t$config = array(\n\t\t\t\t'book' => 1,\n\t\t\t\t'chapter' => 1,\n\t\t\t\t'theme' => 'white',\n\t\t\t\t'font' => 'ledger',\n\t\t\t\t'font_size' => 'normal',\n\t\t\t);\n\t\t\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "3d80c4f4d07a0d01030bec6df49a96d8", "score": "0.62536454", "text": "public static function config(array $config = array()) {\n\t\t$defaults = array(\n\t\t\t'meta' => array(\n\t\t\t\t'service' => array('host' => 'en.gravatar.com')\n\t\t\t)\n\t\t);\n\t\t$config = array_merge_recursive($defaults, $config);\n\t\tparent::config($config);\n\t}", "title": "" }, { "docid": "648398b0dd62c20d7a23620920ae7716", "score": "0.62535906", "text": "protected function getConfig()\n\t{\n\t\treturn OLPBlackbox_Config::getInstance();\n\t}", "title": "" }, { "docid": "d5b926af599d200b91e9b0ccd83f07af", "score": "0.6249654", "text": "public function getConfig(){\n return $this->_config;\n }", "title": "" }, { "docid": "a65212530da6dd3c29c15c70a2e85502", "score": "0.62490004", "text": "public function getConfig() {\n\t\treturn $this->config;\n\t}", "title": "" }, { "docid": "566b014b0d99a9527b8819260b2fed3e", "score": "0.62487704", "text": "public function getConfig() {\n return $this->_config;\n }", "title": "" }, { "docid": "ed4f54fe71ffe224a6fcf64b8b0bcdb2", "score": "0.62410337", "text": "public static function getConfig() {\n return self::$_config;\n }", "title": "" }, { "docid": "c10c6ece1573ca39a9c1cda431b4ef78", "score": "0.6239796", "text": "public static function config($config = array()) {\n\t\tif (!$config) {\n\t\t\treturn array('classes' => static::$_classes, 'types' => static::$_types);\n\t\t}\n\t\tif (isset($config['classes'])) {\n\t\t\tstatic::$_classes = $config['classes'] + static::$_classes;\n\t\t}\n\t\tif (isset($config['types'])) {\n\t\t\tstatic::$_types = $config['types'] + static::$_types;\n\t\t}\t\n\t}", "title": "" }, { "docid": "c0de64ff4a2453fd2c7d333e37a65b0a", "score": "0.6239724", "text": "private static function fetchConfig() {\n\n\t\t////////////////////\n\t\t// Config array //\n\t\t////////////////////\n\t\tpreg_match('/.+public\\//', $_SERVER['REQUEST_URI'], $match);\n\n\t\t$publicFolder = implode('', $match);\n\n\t\t$cnf = [\n\t\t\t\"db\" => [\n\t\t\t\t\"host\" => \"localhost\",\n\t\t\t\t\"dbuser\" => \"root\",\n\t\t\t\t\"dbpass\" => \"\",\n\t\t\t\t\"dbname\" => \"great_wall_blog\",\n\t\t\t],\n\n\t\t\t\"paths\" => [\n\t\t\t\t////////////////////////////////////////////////////\n\t\t\t\t// TODO: ON DEPLOYMENT: \"root => '/'\" !!!!!!!!!!! //\n\t\t\t\t////////////////////////////////////////////////////\n\t\t\t\t\"root\" => $publicFolder,\n\t\t\t\t\"controllers\" => \"../app/controllers/\",\n\t\t\t\t\"models\" => \"../app/models/\",\n\t\t\t\t\"views\" => \"../app/views/\",\n\t\t\t\t\"incl\" => \"../app/incl/\",\n\t\t\t],\n\n\t\t];\n\n\t\t/////\n\t\t// //\n\t\t/////\n\t\treturn $cnf;\n\t}", "title": "" }, { "docid": "0b55a272505f3aef7d2447f90e5ef9b7", "score": "0.62359476", "text": "public function config($field, $config = null) {\n\n /*\n * A channel config, null or * means ignore it, has no default\n */\n if ($field == 'channel') {\n\n if ( array_get($config, $field) && array_get($config, $field) != '*') {\n return array_get($config, $field);\n } else {\n return null;\n }\n\n /*\n * Limit, returns an int, has a default\n */\n } else if ($field == 'limit') {\n\n if (array_get($config, $field) && is_int(array_get($config, $field))) {\n return array_get($config, $field);\n } else {\n return Config::get('bones::bones.limit');\n }\n\n /*\n * Page, returns an int, default is 1\n */\n } else if ($field == 'page') {\n\n if (array_get($config, $field) && is_int(array_get($config, $field))) {\n return array_get($config, $field);\n\n } else if (Input::get('page')) {\n return Input::get('page');\n\n } else {\n // Check if we can find a page number in the URL\n $segments = Request::segments();\n foreach ($segments as $segment) {\n // If a segment matches the pattern, use it\n if (preg_match(Config::get('bones::bones.page-segment-pattern'), $segment))\n // Return the string, with any none-numeric characters removed\n return preg_replace('/[^0-9]/', '', $segment);\n }\n\n // We didn't find anything, so return 1\n return 1;\n }\n }\n\n }", "title": "" }, { "docid": "2d3082dd0417705797f31ef7a22e8ac8", "score": "0.6228082", "text": "function config($key, $dval=null){\n if(is_array($key)){\n return exts\\Config::set($key);\n }else{\n return exts\\Config::get($key, $dval);\n }\n}", "title": "" }, { "docid": "6824794464dc7ffb578086d6667037da", "score": "0.62227565", "text": "public function __get($name)\n\t{\n\t\tif (array_key_exists($name, $this->_config))\n\t\t{\n\t\t\treturn $this->_config[$name];\n\t\t}\n\t}", "title": "" }, { "docid": "a7ceaa3eddd09209993ac4cc41ae769f", "score": "0.62156916", "text": "public function getModuleSetting($config_name){\n $setting = array();\n\n if(file_exists(DIR_CONFIG.$this->codename.'/'.$config_name.'.php')){\n $_ = array();\n require(DIR_CONFIG.$this->codename.'/'.$config_name.'.php');\n $setting = $_;\n }\n\n $this->load->language('extension/'.$this->codename.'_module/'.$config_name);\n\n $setting['name'] = $this->language->get('text_title');\n\n return $setting;\n }", "title": "" }, { "docid": "b9e68c1b0b74ab02df8fe7475a668b06", "score": "0.6210541", "text": "function config( $key )\n{\n global $config;\n if(!contains(\".\", $key))\n return $config[$key];\n\n $key = splitString(\".\", $key);\n return $config[$key[0]][$key[1]];\n}", "title": "" }, { "docid": "5bc4910c39a19096f34ef6e04214a7e3", "score": "0.6210245", "text": "public function config()\n {\n $this->deprecate('config');\n return call_user_func_array(array($this->config, 'config'), func_get_args());\n }", "title": "" }, { "docid": "051bdee5d28dad87374180cae01f54ba", "score": "0.6199548", "text": "public function get($config)\n {\n return isset(self::init()->_settings[$config]) ? self::init()->_settings[$config] : null;\n }", "title": "" } ]
bf79fc5e2679b780ec8cd1c80bbd4843
Declarte construct method which accepts three parameters
[ { "docid": "173b90f6468800775c9f80ca35c6bcda", "score": "0.0", "text": "function __construct($farm_id,$server_id,$photo_id,$secret,$title){ \n\t\t $this->$farm_id = $farm_id; \n\t\t $this->$server_id = $server_id; \n\t\t $this->$photo_id = $photo_id; \n\t\t $this->$secret = $secret; \n\t\t $this->$title = $title; \n\t\t }", "title": "" } ]
[ { "docid": "b692fcd6ad84644cfd325ce8c383c13b", "score": "0.78330505", "text": "public function __construct(){\r\n\t\t\t$params = func_get_args();\r\n\t\t\t$num_params = func_num_args();\r\n\t\t\t//atendiendo al siguiente modelo __construct1() __construct2()...\r\n\t\t\t$funcion_constructor ='__construct'.$num_params;\r\n\t\t\t//compruebo si hay un constructor con ese número de parámetros\r\n\t\t\tif (method_exists($this,$funcion_constructor)) {\r\n\t\t\t\tcall_user_func_array(array($this,$funcion_constructor),$params);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "b6dba22b014949a993ee9a6a267935be", "score": "0.7655549", "text": "abstract protected function construct():self;", "title": "" }, { "docid": "304855e5a7294c5d84d7bb7b86453e0a", "score": "0.7572025", "text": "public function __construct() {\r\n\t\t$args = func_get_args ();\r\n\t\t$num_args = func_num_args ();\r\n\t\t$method = \"__construct\" . $num_args;\r\n\t\t\r\n\t\tif (method_exists ( $this, $method ))\r\n\t\t\tcall_user_func_array ( array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t$method \r\n\t\t\t), $args );\r\n\t\telse\r\n\t\t\tdie ( \"CONSTRUCT '\" . $method . \"' NOT DEFINED!\" );\r\n\t}", "title": "" }, { "docid": "304855e5a7294c5d84d7bb7b86453e0a", "score": "0.7572025", "text": "public function __construct() {\r\n\t\t$args = func_get_args ();\r\n\t\t$num_args = func_num_args ();\r\n\t\t$method = \"__construct\" . $num_args;\r\n\t\t\r\n\t\tif (method_exists ( $this, $method ))\r\n\t\t\tcall_user_func_array ( array (\r\n\t\t\t\t\t$this,\r\n\t\t\t\t\t$method \r\n\t\t\t), $args );\r\n\t\telse\r\n\t\t\tdie ( \"CONSTRUCT '\" . $method . \"' NOT DEFINED!\" );\r\n\t}", "title": "" }, { "docid": "6b8d66f701bc0d83fc374daea61d2ece", "score": "0.7467844", "text": "public function __construct()\r\n\t{\r\n\t\t$args\t\t= func_get_args();\r\n $num_args\t= func_num_args();\r\n $method\t\t= \"__construct\".$num_args;\r\n\t\t\r\n\t\tif(method_exists($this,$method))\r\n\t\t\tcall_user_func_array(array($this,$method),$args);\r\n\t\telse\r\n\t\t\tdie(\"CONSTRUCT '\".$method.\"' NOT DEFINED!\");\r\n\t}", "title": "" }, { "docid": "88acbcc89e744b6a2b8eb24bc37414d6", "score": "0.7397068", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->createdDate = func_get_arg(1);\n $this->customerId = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "ccfebe96f3b01af42d89026dcb445be3", "score": "0.73402524", "text": "function __construct()\n\t{\n\t $a = func_get_args();\n\t $i = func_num_args();\n\t if (method_exists($this,$f='__construct'.$i)) {\n\t call_user_func_array(array($this,$f),$a);\n\t }\n\t}", "title": "" }, { "docid": "3c2a15b8b50c1ef8615672273fa232de", "score": "0.7339369", "text": "public function __CONSTRUCT(){\n }", "title": "" }, { "docid": "6a5a05db1d293df6ada787a306b753f2", "score": "0.7331688", "text": "function __construct() {\n $args = func_get_args();\n $num = func_num_args();\n if (method_exists($this, $fname='__construct'.$num)) {\n call_user_func_array(array($this, $fname), $args);\n }\n }", "title": "" }, { "docid": "d59f8dc1b8d6b053e12cf4d428b0945e", "score": "0.73288876", "text": "abstract public function __construct($params);", "title": "" }, { "docid": "8df080e826920de086bf1058edbb3a35", "score": "0.73035634", "text": "public function __construct()\n {\n //koji su mu prosledjeni\n $a = func_get_args();\n $i = func_num_args();\n $f = \"__construct\" . $i;\n if (method_exists($this, $f)) {\n call_user_func_array(array($this, $f), $a);\n\n }\n }", "title": "" }, { "docid": "4afc56d7ae77a3eaf736e7daff1b1363", "score": "0.7293635", "text": "function __construct() {\n $a = func_get_args();\n $i = func_num_args();\n if ($i != 0) {\n call_user_func_array(array($this, \"__constructAll\"), $a);\n }\n }", "title": "" }, { "docid": "77025027135935105476920e84bb5b3c", "score": "0.72893006", "text": "public function __CONSTRUCT()\n {\n }", "title": "" }, { "docid": "7cfecffae5cbb119f14c0fa2678ad7b2", "score": "0.72758466", "text": "public function __construct() { \r\n $a = func_get_args(); \r\n $i = func_num_args(); \r\n if (method_exists($this,$f='__construct'.$i)) { \r\n call_user_func_array(array($this,$f),$a); \r\n } \r\n }", "title": "" }, { "docid": "6c1ca453c212711e8efbca86f121850a", "score": "0.7253139", "text": "function __construct($param1, $param2)\n\t{\n\t}", "title": "" }, { "docid": "b75c3405cc4dff2d7a062fdb7a49d079", "score": "0.7227449", "text": "function __construct()\r\n { \t\r\n $argv = func_get_args();\t\r\n \tswitch( func_num_args() )\r\n \t{\r\n \t\tdefault:\r\n \t\tcase 1:\r\n\t \t\t$this->__constructFromExisting($argv[0]);\t\r\n\t \t\tbreak;\r\n \t\tcase 2:\r\n \t\t\t$this->__constructFromExistingOrder($argv[0], $argv[1]);\t\r\n\t \t\tbreak; \r\n \t\tcase 4:\r\n\t\t\t\t$this->__constructFromZero( $argv[0], $argv[1], $argv[2], $argv[3]);\r\n\t\t\t\tbreak; \t\t\r\n \t} \t\t \t \t\r\n }", "title": "" }, { "docid": "cb18d14c046e812972569a5e03fc1af9", "score": "0.7175441", "text": "function __construct() {\n $num = func_num_args();\n //le tableau des arguments passés avec 0 comme indice de départ\n $args = func_get_args();\n switch ($num) {\n //aucun argument passé\n case 0:\n break;\n //un argument passé\n case 1:\n parent::__construct($args[0]);\n break;\n default:\n }\n }", "title": "" }, { "docid": "257d24ce712b4ed8b6740632e6b8d1a5", "score": "0.7156841", "text": "public function __construct($a,$b,$c){\n\t\t\t\t//$this->subtract($a,$b,$c);\n\t\t\t\t//$this->add($a,$b,$c);\t\n\t\t\t}", "title": "" }, { "docid": "9808eb5df1d2898d5d5c326a5c2c8607", "score": "0.7155791", "text": "public function __construct() {\n\t\t$a = func_get_args();\n\t\t$i = func_num_args(); \n\t\tif($i==1)\n\t\t\tcall_user_func_array(array($this,'view'),$a);\n\t\tif($i==3)\n\t\t\tcall_user_func_array(array($this,'create'),$a);\n\t}", "title": "" }, { "docid": "e523b2ff24648492198382e27178d6e1", "score": "0.7155361", "text": "abstract protected function __construct();", "title": "" }, { "docid": "399e05907a3e1c34deae1813def730bd", "score": "0.7137681", "text": "public function __construct($params);", "title": "" }, { "docid": "399e05907a3e1c34deae1813def730bd", "score": "0.7137681", "text": "public function __construct($params);", "title": "" }, { "docid": "516c95f22ff14448250112eb198370c8", "score": "0.71137506", "text": "abstract function __construct();", "title": "" }, { "docid": "c16346d2152fa53122a228fb85ca9352", "score": "0.70857304", "text": "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->address = func_get_arg(0);\n $this->groupId = func_get_arg(1);\n $this->name = func_get_arg(2);\n $this->radius = func_get_arg(3);\n }\n }", "title": "" }, { "docid": "2cb00c67b6f7a7ffb9810e1112cbae57", "score": "0.70818514", "text": "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->name = func_get_arg(0);\n $this->type = func_get_arg(1);\n $this->currency = func_get_arg(2);\n $this->notes = func_get_arg(3);\n $this->price = func_get_arg(4);\n $this->userId = func_get_arg(5);\n }\n }", "title": "" }, { "docid": "9b63336e50a98b8dc16e61ce4be28eb1", "score": "0.7028176", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->type = func_get_arg(0);\n $this->days = func_get_arg(1);\n $this->date = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "c8f8cdc3f0a27cf2fe91c3cd52a99f5a", "score": "0.7025053", "text": "public function _construct()\n\t{\n\n\t}", "title": "" }, { "docid": "aa289ec8f415e447f57b309b27ec2d5e", "score": "0.7010709", "text": "public function __construct()\n {\n if (9 == func_num_args()) {\n $this->attributes = func_get_arg(0);\n $this->headers = func_get_arg(1);\n $this->attachments = func_get_arg(2);\n $this->to = func_get_arg(3);\n $this->cc = func_get_arg(4);\n $this->bcc = func_get_arg(5);\n $this->tokenTo = func_get_arg(6);\n $this->tokenCc = func_get_arg(7);\n $this->tokenBcc = func_get_arg(8);\n }\n }", "title": "" }, { "docid": "d0aba5f3ef289a92302a6d621e09acd9", "score": "0.69886935", "text": "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->type = func_get_arg(0);\n $this->bitbucket = func_get_arg(1);\n $this->generic = func_get_arg(2);\n $this->github = func_get_arg(3);\n $this->gitlab = func_get_arg(4);\n $this->imageChange = func_get_arg(5);\n }\n }", "title": "" }, { "docid": "7b5ca7d18f4345ac4eda57a480c39b0f", "score": "0.69802886", "text": "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->amount = func_get_arg(0);\n $this->amountCharged = func_get_arg(1);\n $this->createdDate = func_get_arg(2);\n $this->feePercent = func_get_arg(3);\n $this->referenceDepositID = func_get_arg(4);\n $this->status = func_get_arg(5);\n }\n }", "title": "" }, { "docid": "88c9e00d7b7f9aeb63df75c6eb26b05e", "score": "0.6978941", "text": "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->portfolioId = func_get_arg(1);\n $this->type = func_get_arg(2);\n $this->status = func_get_arg(3);\n $this->createdDate = func_get_arg(4);\n }\n }", "title": "" }, { "docid": "47b2b01b258c9d22048320b56b36981e", "score": "0.69749767", "text": "abstract public function __construct();", "title": "" }, { "docid": "1ea37f62aad261fb59ca46a91e33a315", "score": "0.69499654", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->enabled = func_get_arg(0);\n $this->autoReplace = func_get_arg(1);\n $this->institutions = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "6a2e64b1d8f66a3cddeaab228cd63666", "score": "0.69381255", "text": "public function __construct()\n {\n if (12 == func_num_args()) {\n $this->transactionId = func_get_arg(0);\n $this->orderId = func_get_arg(1);\n $this->paymentId = func_get_arg(2);\n $this->txnId = func_get_arg(3);\n $this->parentTxnId = func_get_arg(4);\n $this->txnType = func_get_arg(5);\n $this->isClosed = func_get_arg(6);\n $this->createdAt = func_get_arg(7);\n $this->childTransactions = func_get_arg(8);\n $this->parentId = func_get_arg(9);\n $this->additionalInformation = func_get_arg(10);\n $this->extensionAttributes = func_get_arg(11);\n }\n }", "title": "" }, { "docid": "02de6f3a34bfed6f94d28a0724955237", "score": "0.69364125", "text": "public function __construct()\n {\n if (13 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->companyId = func_get_arg(1);\n $this->dealId = func_get_arg(2);\n $this->productId = func_get_arg(3);\n $this->durationUnit = func_get_arg(4);\n $this->sumNoDiscount = func_get_arg(5);\n $this->sum = func_get_arg(6);\n $this->currency = func_get_arg(7);\n $this->addTime = func_get_arg(8);\n $this->lastEdit = func_get_arg(9);\n $this->activeFlag = func_get_arg(10);\n $this->tax = func_get_arg(11);\n $this->name = func_get_arg(12);\n }\n }", "title": "" }, { "docid": "8c58204c10ccad95ec2b8ff75ff9252b", "score": "0.6933998", "text": "protected function _construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "383596c4d1d61825fe6c280093666f9a", "score": "0.6926147", "text": "function __construct() {\n $numargs = func_num_args();\n $args = func_get_args();\n if( $numargs == 0 )\n $this->fromNothing();\n else if( $numargs == 1 )\n $this->fromRawData( $args[0] );\n else if( $numargs == 4 )\n $this->fromAllInfo( $args[0], $args[1], $args[2], $args[3] );\n \n }", "title": "" }, { "docid": "e8c0d1917a026eca98231d5a09b8f43b", "score": "0.69210017", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->ssn = func_get_arg(0);\n $this->dob = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "683ebb34b55d59ed02a5cace72ec8091", "score": "0.6919274", "text": "public function __construct()\n {\n if (9 == func_num_args()) {\n $this->globalCurrencyCode = func_get_arg(0);\n $this->baseCurrencyCode = func_get_arg(1);\n $this->storeCurrencyCode = func_get_arg(2);\n $this->quoteCurrencyCode = func_get_arg(3);\n $this->storeToBaseRate = func_get_arg(4);\n $this->storeToQuoteRate = func_get_arg(5);\n $this->baseToGlobalRate = func_get_arg(6);\n $this->baseToQuoteRate = func_get_arg(7);\n $this->extensionAttributes = func_get_arg(8);\n }\n }", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.68918926", "text": "private final function __construct() {}", "title": "" }, { "docid": "e91b5e52dc8e1cfd979b8736f69bf4f9", "score": "0.6887222", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->address = func_get_arg(0);\n $this->type = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "d3698c82329576bdfa3cdcccd3354538", "score": "0.6878081", "text": "public function __construct($a, $b, $c){\n\n\t\t$this->logradouro =$a;\n\t\t$this->numero =$b;\n\t\t$this->cidade =$c;\n\t}", "title": "" }, { "docid": "19d2ab76c03017ed3dcf53dba2026fbc", "score": "0.68671167", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->languageCode = func_get_arg(0);\n $this->countryCode = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "02850f8308d0f29d62d811677b60dea7", "score": "0.6850855", "text": "public function __construct()\r\n {\r\n if(3 == func_num_args())\r\n {\r\n $this->description = func_get_arg(0);\r\n $this->hsCode = func_get_arg(1);\r\n $this->name = func_get_arg(2);\r\n }\r\n }", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.6835358", "text": "function __construct() {}", "title": "" }, { "docid": "fd5216140e52de75efb6bb6a693524d2", "score": "0.68271756", "text": "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->from = func_get_arg(0);\n $this->importPolicy = func_get_arg(1);\n $this->includeManifest = func_get_arg(2);\n $this->referencePolicy = func_get_arg(3);\n $this->to = func_get_arg(4);\n }\n }", "title": "" }, { "docid": "cba67896b18818864bb298735a3a897d", "score": "0.6821423", "text": "public function __construct()\n {\n // with different parameters than the parent __construct() method has.\n // @see https://www.php.net/manual/en/language.oop5.decon.php\n }", "title": "" }, { "docid": "e4be2c1bc024c0b4c8b4f49366b9395f", "score": "0.6818894", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->rel = func_get_arg(0);\n $this->href = func_get_arg(1);\n $this->templated = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "7546e82d865a8061ace7689a2713ab19", "score": "0.6810898", "text": "public function __construct()\n {\n if (8 == func_num_args()) {\n $this->description = func_get_arg(0);\n $this->id = func_get_arg(1);\n $this->isActive = func_get_arg(2);\n $this->longName = func_get_arg(3);\n $this->name = func_get_arg(4);\n $this->parentCategoryId = func_get_arg(5);\n $this->shortName = func_get_arg(6);\n $this->subcategories = func_get_arg(7);\n }\n }", "title": "" }, { "docid": "b30d1706294ad43479a9b474a7f53919", "score": "0.6809896", "text": "public function __construct(array $args = array());", "title": "" }, { "docid": "b87a56dc9ff97e30b3f1bc3d1cc25495", "score": "0.6809421", "text": "private function __construct() {}", "title": "" }, { "docid": "35cfe9acbb997fad82d03b89ed5b5505", "score": "0.6804676", "text": "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->clientId = func_get_arg(0);\n $this->enabled = func_get_arg(1);\n $this->clientName = func_get_arg(2);\n $this->accountId = func_get_arg(3);\n $this->created = func_get_arg(4);\n $this->lastChanged = func_get_arg(5);\n }\n }", "title": "" }, { "docid": "ce2245499fa01ad455a7c613dde3b4a7", "score": "0.68046", "text": "public function __construct()\n {\n if(9 == func_num_args())\n {\n $this->invoiceId = func_get_arg(0);\n $this->storeId = func_get_arg(1);\n $this->storeName = func_get_arg(2);\n $this->harvestedName = func_get_arg(3);\n $this->quantity = func_get_arg(4);\n $this->price = func_get_arg(5);\n $this->unitPrice = func_get_arg(6);\n $this->purchaseDate = func_get_arg(7);\n $this->recordedAt = func_get_arg(8);\n }\n }", "title": "" }, { "docid": "16f0cad83dd35805989a934c5beca196", "score": "0.68037814", "text": "public function __construct()\n {\n switch (func_num_args()) {\n case 4:\n $this->assetIds = func_get_arg(0);\n $this->extractEarnings = func_get_arg(1);\n $this->extractDeductions = func_get_arg(2);\n $this->extractDirectDeposit = func_get_arg(3);\n break;\n\n default:\n $this->extractEarnings = true;\n $this->extractDeductions = false;\n $this->extractDirectDeposit = true;\n break;\n }\n }", "title": "" }, { "docid": "2541e745d33c3c8eab7ec7f9273ab730", "score": "0.67948186", "text": "public function __construct(){\n\t\t$args = func_get_args();\n\t\tforeach($args as $arg){\n\t\t\t$this->a($arg);\n\t\t}\n\t}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.67915857", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.67915857", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.67915857", "text": "final private function __construct() {}", "title": "" }, { "docid": "288c79a36bb0b98c38cd31039e3b24ee", "score": "0.6785482", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->countryCode = func_get_arg(0);\n $this->number = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "38f34c1076e70d02f8147868737e5dec", "score": "0.6783988", "text": "abstract protected function onConstruct();", "title": "" }, { "docid": "fa06f3efd5a04d4e4e9b4d8b597e5177", "score": "0.67744875", "text": "public function construct()\n\t{\n\t\t$this->introduceMethod([ \"who\", \"getWho\" ], \"retrieve\");\n\t}", "title": "" }, { "docid": "ddfdb90252e2081d77b371e4b62c1523", "score": "0.6768776", "text": "public function __Construct(){\n\t\t\n\t\tparent :: __Construct();\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "8aae73bf946b3834658fd0f7bb580397", "score": "0.67582154", "text": "function construct() {\n parent::construct();\n }", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.67489356", "text": "private function __construct(){}", "title": "" }, { "docid": "96aa4a8c82d019adbdf0f61aa93ea1ea", "score": "0.67416584", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->exec = func_get_arg(0);\n $this->httpGet = func_get_arg(1);\n $this->tcpSocket = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "b38b1d0db9a4303b9b64c322aed5317d", "score": "0.6726885", "text": "public function __contruct() {\n\t}", "title": "" }, { "docid": "88624f6ca028b17612008a7595220023", "score": "0.6716099", "text": "public function __construct()\n {\n if (4 == func_num_args()) {\n $this->sender = func_get_arg(0);\n $this->recipient = func_get_arg(1);\n $this->message = func_get_arg(2);\n $this->sendDate = func_get_arg(3);\n }\n }", "title": "" }, { "docid": "9f4d97076d8383a158bf1a1cc1a53eb2", "score": "0.6702731", "text": "public function __construct()\n {\n if (3 == func_num_args()) {\n $this->includeSignedFile = func_get_arg(0);\n $this->email = func_get_arg(1);\n $this->sms = func_get_arg(2);\n }\n }", "title": "" }, { "docid": "72bf6fc1f3a97a2b5ef13417662f73f4", "score": "0.6695606", "text": "function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}", "title": "" }, { "docid": "f3438a267682a3f84d1d3141a31e25f8", "score": "0.66941273", "text": "function __construct();", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6692626", "text": "private function __construct() {}", "title": "" } ]
25b60530d3eea072a53e4e4f46c04cae
Find the first table name referenced in a query
[ { "docid": "f35e1cb023b97f525ac356535a62dbe3", "score": "0.6006677", "text": "function get_table_from_query ( $q ) {\n\t\t// Remove characters that can legally trail the table name\n\t\t$q = rtrim($q, ';/-#');\n\t\t// allow (select...) union [...] style queries. Use the first queries table name.\n\t\t$q = ltrim($q, \"\\t (\"); \n\n\t\t// Quickly match most common queries\n\t\tif ( preg_match('/^\\s*(?:'\n\t\t\t\t. 'SELECT.*?\\s+FROM'\n\t\t\t\t. '|INSERT(?:\\s+IGNORE)?(?:\\s+INTO)?'\n\t\t\t\t. '|REPLACE(?:\\s+INTO)?'\n\t\t\t\t. '|UPDATE(?:\\s+IGNORE)?'\n\t\t\t\t. '|DELETE(?:\\s+IGNORE)?(?:\\s+FROM)?'\n\t\t\t\t. ')\\s+`?(\\w+)`?/is', $q, $maybe) )\n\t\t\treturn $maybe[1];\n\n\t\t// Refer to the previous query\n\t\tif ( preg_match('/^\\s*SELECT.*?\\s+FOUND_ROWS\\(\\)/is', $q) )\n\t\t\treturn $this->last_table;\n\n\t\t// Big pattern for the rest of the table-related queries in MySQL 5.0\n\t\tif ( preg_match('/^\\s*(?:'\n\t\t\t\t. '(?:EXPLAIN\\s+(?:EXTENDED\\s+)?)?SELECT.*?\\s+FROM'\n\t\t\t\t. '|INSERT(?:\\s+LOW_PRIORITY|\\s+DELAYED|\\s+HIGH_PRIORITY)?(?:\\s+IGNORE)?(?:\\s+INTO)?'\n\t\t\t\t. '|REPLACE(?:\\s+LOW_PRIORITY|\\s+DELAYED)?(?:\\s+INTO)?'\n\t\t\t\t. '|UPDATE(?:\\s+LOW_PRIORITY)?(?:\\s+IGNORE)?'\n\t\t\t\t. '|DELETE(?:\\s+LOW_PRIORITY|\\s+QUICK|\\s+IGNORE)*(?:\\s+FROM)?'\n\t\t\t\t. '|DESCRIBE|DESC|EXPLAIN|HANDLER'\n\t\t\t\t. '|(?:LOCK|UNLOCK)\\s+TABLE(?:S)?'\n\t\t\t\t. '|(?:RENAME|OPTIMIZE|BACKUP|RESTORE|CHECK|CHECKSUM|ANALYZE|OPTIMIZE|REPAIR).*\\s+TABLE'\n\t\t\t\t. '|TRUNCATE(?:\\s+TABLE)?'\n\t\t\t\t. '|CREATE(?:\\s+TEMPORARY)?\\s+TABLE(?:\\s+IF\\s+NOT\\s+EXISTS)?'\n\t\t\t\t. '|ALTER(?:\\s+IGNORE)?\\s+TABLE'\n\t\t\t\t. '|DROP\\s+TABLE(?:\\s+IF\\s+EXISTS)?'\n\t\t\t\t. '|CREATE(?:\\s+\\w+)?\\s+INDEX.*\\s+ON'\n\t\t\t\t. '|DROP\\s+INDEX.*\\s+ON'\n\t\t\t\t. '|LOAD\\s+DATA.*INFILE.*INTO\\s+TABLE'\n\t\t\t\t. '|(?:GRANT|REVOKE).*ON\\s+TABLE'\n\t\t\t\t. '|SHOW\\s+(?:.*FROM|.*TABLE)'\n\t\t\t\t. ')\\s+`?(\\w+)`?/is', $q, $maybe) )\n\t\t\treturn $maybe[1];\n\n\t\t// All unmatched queries automatically fall to the global master\n\t\treturn '';\n\t}", "title": "" } ]
[ { "docid": "130fb74b1794f3b37fcf74a63570fcb7", "score": "0.6644151", "text": "function getTableName($schema, $table_name){\n foreach (array_keys($schema[\"tables\"]) as $x) {\n if (strcasecmp($table_name,$x)==0) {\n return $x;\n }\n }\n return null;\n }", "title": "" }, { "docid": "7189da3fe8b350ea2191b441ffe04d7f", "score": "0.6584343", "text": "public static function table_name() {\n $annotes = \\phpx\\annotations_for(get_called_class());\n return $annotes['table_name'];\n }", "title": "" }, { "docid": "c7ee640505dc688becba1bba669d6338", "score": "0.6580439", "text": "public function getFirstTable()\n {\n return current($this->tables);\n }", "title": "" }, { "docid": "ec827d81bd42015f45f564e3b0c40043", "score": "0.6496951", "text": "public function getTableName()\n {\n if (is_array($this->_from)) {\n return $this->_from[0];\n }\n\n return $this->_from;\n }", "title": "" }, { "docid": "077146312f40df7f083441ea7cd264de", "score": "0.63692683", "text": "public function getFullTableName() {\n return $this->db->getTable() . (!empty($this->db->getAlias()) ? ' AS ' . $this->db->getAlias() : '');\n }", "title": "" }, { "docid": "5b2db3de186d870edb50cd3a82443c94", "score": "0.63606685", "text": "private static function getTableName()\n {\n $class_name_arr = explode('\\\\', get_called_class());\n $table_name = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', end($class_name_arr)));\n\n return $table_name;\n }", "title": "" }, { "docid": "ba8d37551964a9f2fba29501bee90446", "score": "0.6315893", "text": "public function findTableName()\n {\n if ($this->migration === null) return null;\n\n preg_match(\"/(?<=Schema::create\\(').*?(?=',)/\", $this->getBody(\"up\"), $create);\n preg_match(\"/(?<=Schema::table\\(').*?(?=',)/\", $this->getBody(\"up\"), $table);\n \n return collect($create)->first() ?: collect($table)->first();\n }", "title": "" }, { "docid": "b0ef1e8d0b3bbc7e175b5d5c69474bba", "score": "0.63010275", "text": "public function full_table_name()\n {\n if (isset($this->schema)) {\n return \"{$this->schema}{$this->schema_separator}{$this->table}\";\n }\n else {\n return $this->table;\n }\n }", "title": "" }, { "docid": "458b1a133919726b1a2afd35c58f2539", "score": "0.62741303", "text": "public function get_table_name(): string;", "title": "" }, { "docid": "749842849689a97b4d6beb9d522f62b5", "score": "0.62424684", "text": "private static function get_table($query)\n\t\t{\n\t\t\t// Capture query type\n\t\t\t$query_array = explode(\" \", $query);\n\t\t\t$query_type = $query_array[0];\n\n\t\t\t// Determine query table\n\t\t\tif ($query_type === \"UPDATE\")\n\t\t\t{\n\t\t\t\t$query_table = $query_array[1];\n\t\t\t}\n\t\t\telse if ($query_type === \"INSERT\" || $query_type === \"DELETE\")\n\t\t\t{\n\t\t\t\t$query_table = $query_array[2];\n\t\t\t}\n\t\t\telse if ($query_type === \"SELECT\")\n\t\t\t{\n\t\t\t\t// Shift array until FROM encountered, capture table name\n\t\t\t\twhile (array_shift($query_array) !== \"FROM\");\n\t\t\t\t$query_table = $query_array[0];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Should never happen due to query trap, but just in case\n\t\t\t\t$query_table = null;\n\t\t\t}\n\n\t\t\t// Strip any non alphanumeric characters from table\n\t\t\t$query_table = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $query_table);\n\n\t\t\treturn $query_table;\n\t\t}", "title": "" }, { "docid": "5eabe3c7253c75d9fdf50bda0b2618a6", "score": "0.62206024", "text": "public function getTableName()\n {\n return $this->model->getCurrentTable();\n }", "title": "" }, { "docid": "ebaa50feccb0926385cb453b7486d8ef", "score": "0.6212453", "text": "public static function getTableName() {\n\n\t\t$tableName = '';\n\n\t\t// gets caller class (subclass) name\n\t\t$subclass = static::class;\n\n\t\teval(\"\\$tableName = {$subclass}::\\$tableName;\");\n\n\t\treturn $tableName;\n\n\t}", "title": "" }, { "docid": "daede836b4814b911e94e5e4ed1196e2", "score": "0.6208667", "text": "public function key()\n {\n return $this->current()->getTableMetaData()->getTableName();\n }", "title": "" }, { "docid": "578002ca71c0ff6c3d880c4083ea9fa1", "score": "0.61489964", "text": "public function getCurTableName() {\n return $this->tableName;\n }", "title": "" }, { "docid": "e7e3a04b83edfb2b20676c6c9bf3bb5c", "score": "0.61365926", "text": "public function getTable()\n {\n if (static::$table !== null) {\n return static::$table;\n }\n $split = explode('\\\\', get_class($this));\n return strtolower($split[count($split) - 1]);\n }", "title": "" }, { "docid": "254d50cc41d6214d869d6e8d3c7ad736", "score": "0.6119859", "text": "public function getName() {\n return $this->_table;\n }", "title": "" }, { "docid": "ba6651cab064f7349bff67c2f70d5d35", "score": "0.60793024", "text": "public function table() {\n $cname = get_class($this); // return Comment_model / Person_model, etc\n $arr = explode('_', $cname); // ['Comment', 'model']\n return strtolower($arr[0]); // comment\n }", "title": "" }, { "docid": "ffcf4d32f7c3ce801ce0f50500686f5a", "score": "0.60776216", "text": "public function get_referenced_table() {\n\t\treturn $this->table->get_database()->get_table( $this->references );\n\t}", "title": "" }, { "docid": "875c1cd49826ad7b3c08b85232c3efb3", "score": "0.60768944", "text": "public function getTableName()\n {\n return $this->table['name'];\n }", "title": "" }, { "docid": "05f1eb7ee09a4ce9d76b122e38f342ee", "score": "0.6061699", "text": "static function getNameOfTable($table)\n {\n return CL::getConf('CLE_Ibdi/prefix').$table;\n }", "title": "" }, { "docid": "3fe3f581d0942868d88faa420d164611", "score": "0.6045246", "text": "protected function getTableClause()\n\t{\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "e82b3f5183b5877f5cd50a891c07208a", "score": "0.6042985", "text": "public function getQueryTable() {\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "fdcb3475d665c90a9dbe53d09f0083bb", "score": "0.6034576", "text": "public function getTableName()\r\n\t{\r\n\t\treturn $this->_table;\r\n\t}", "title": "" }, { "docid": "e08c77911bc309d996a78f5bddc9b742", "score": "0.60337305", "text": "public function get_table_name()\n {\n }", "title": "" }, { "docid": "7e370d8822fa979627ef7e5e26e422fc", "score": "0.6032642", "text": "public function getTableName($table)\n\t{\n\t\t//we're dealing with an alias so parse it for its parts\n\t\tif( is_array($table) )\n\t\t{\n\t\t\t$string = '';\n\t\t\tforeach($table AS $key => $value)\n\t\t\t{\n\t\t\t\t$string = $key;\n\t\t\t}\n\t\n\t\t\t$table = $string;\n\t\t}\n\t\t\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "21c001e6c381ed2bd76abd3b135fdd07", "score": "0.6027776", "text": "function UpperTableName() { return $this->Par()->GetName() ; }", "title": "" }, { "docid": "de785ea2f5335a121ff9a5885bcf5e98", "score": "0.6026447", "text": "public function getTableName()\n\t{\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "a15b4666ac1a0f795070171d6eb806e9", "score": "0.6019872", "text": "public function name ( ) { return $this->table; }", "title": "" }, { "docid": "c265414b67d3d1fc080c08e3af2deb92", "score": "0.60174227", "text": "public static function getTableName()\n {\n $class = get_called_class();\n\n return (new $class())->getTable();\n }", "title": "" }, { "docid": "aaf246dc73d0cb1ab50ac482cac8effb", "score": "0.6013729", "text": "final protected function _get_table_name () {\n\n\t\treturn $this->table_name;\n\n\t}", "title": "" }, { "docid": "df90a248d73225e7a3d621c3bf11bc48", "score": "0.6008768", "text": "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n $parent_class = get_parent_class($this);\n if ($parent_class == \"MY_Model\" || $parent_class == \"CI_Model\") {\n return camel_case_to_underscore(get_class($this));\n } else {\n return camel_case_to_underscore($parent_class);\n }\n }\n }", "title": "" }, { "docid": "8872e6daaf476f6f70c5d2fe47cf14e2", "score": "0.599936", "text": "public function getTable() {\n\n return $this->table->getName();\n\n }", "title": "" }, { "docid": "68f7b9df57e02994138995235d706446", "score": "0.59971935", "text": "private function _tableAliasToName($alias)\n {\n if (isset($this->_from[1]) && $this->_from[1] == $alias) {\n return $this->_from[0];\n }\n\n foreach ($this->_join as $join) {\n if (isset($join[\"table_alias\"]) && $join[\"table_alias\"] == $alias) {\n return $join[\"table_name\"];\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "9b5274b98c98a810162b542255c71fad", "score": "0.59930396", "text": "protected function visitSirelTable(Table $table)\n {\n return $table->getName();\n }", "title": "" }, { "docid": "a7360870923693b16f3319d8983926cc", "score": "0.59735376", "text": "public function getTable(): string\n\t{\n\t\tif(empty($this->tableName))\n\t\t{\n\t\t\t$this->tableName = Str::pluralize(Str::camelToSnake($this->getClassShortName()));\n\t\t}\n\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "cc23c0743b757ec80fb5f2e56942195f", "score": "0.5965343", "text": "public static function tableName(){\n\t\t$childClass = get_called_class();\n\n\t\treturn strtolower(substr($childClass, strrpos($childClass, '\\\\')+1));\n\t}", "title": "" }, { "docid": "af1b35b200176065841449873a717c91", "score": "0.5959776", "text": "protected function getTableName()\n {\n return \"`\" . $this->table . \"`\";\n }", "title": "" }, { "docid": "77d8505247958bfc7526e50082526e58", "score": "0.5958684", "text": "public function getTablePrefix()\n {\n if (!$this->appRef) {\n $this->locate();\n }\n\n return $this->appRef . '_';\n }", "title": "" }, { "docid": "16087c2cda0183766f32829282d7598d", "score": "0.5957426", "text": "protected function _get_table_name(){\n\n\t\treturn $this->table_name;\n\n\t}", "title": "" }, { "docid": "b83c86751f9f4e7df1dba34daf6111da", "score": "0.59352416", "text": "public function getTableName()\n {\n return $this->db->prefix . self::TABLE_NAME;\n }", "title": "" }, { "docid": "e3f4c8eb11022c4628d89c707f5a63a4", "score": "0.5933526", "text": "public function getTableName()\r\n {\r\n return $this->table;\r\n }", "title": "" }, { "docid": "7a2f9b9cb9bb42e60813a20ec218bb8f", "score": "0.5927525", "text": "public static function getTableName() {\n\t\treturn static::$table;\n\t}", "title": "" }, { "docid": "4a235043da257dbc3105c157f99e6ce2", "score": "0.5927419", "text": "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(preg_replace('#DB$#i', '', class_basename($this))));\n }", "title": "" }, { "docid": "eb229b2e61a59fe448cc14f939b19be2", "score": "0.59201586", "text": "public function getTable()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "d078c4916051d4ebfde735ac480fcf34", "score": "0.5913863", "text": "public static function getTableClassName()\n\t{\n\t\treturn ExternalLinkTable::className();\n\t}", "title": "" }, { "docid": "5cac82525f979522032fb0a9bf213241", "score": "0.5913177", "text": "public static function table_name() {\n $cls = static::$table_name ?: get_called_class();\n $cls = preg_replace(\"/[^A-Za-z0-9]/\", \"_\", $cls);\n return $cls;\n }", "title": "" }, { "docid": "8a3081ae07282243a0e47b774be35d48", "score": "0.5904485", "text": "public function getDormantTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "09cd1cd4c2e041f21c85ad244d74ea16", "score": "0.58888686", "text": "public static function get_table_with_prefix() : string\n {\n return static::get_database_access()->get_prefix() . static::get_table();\n }", "title": "" }, { "docid": "d48dc71134271f2c2d2e37fa2502fe83", "score": "0.5878585", "text": "protected function table( $table ){\n\t\t\n\t\t// Check if the tables array contains the table_name\n\t\tif( in_array( $table, $this->_tables, TRUE ) ) return $table;\n\t\t\n\t\telse return \"\";\n\t}", "title": "" }, { "docid": "b915b944e0ec795e9ea926ff6ff0e71e", "score": "0.58690214", "text": "public function getTable()\n {\n if (!isset($this -> table)) {\n return str_replace(\n '\\\\', '', Str ::snake(class_basename($this))\n );\n }\n return $this -> table;\n }", "title": "" }, { "docid": "bc7f4c95094dd9a9571007fbc58f7881", "score": "0.5846956", "text": "public function getTableName()\n {\n return $this->_table;\n }", "title": "" }, { "docid": "fec0799784c48be0131f243a6c2dec40", "score": "0.58439666", "text": "public function getTableName() : string {\n return $this->table;\n }", "title": "" }, { "docid": "fce6f9e08900aade3ed85fa7c8901efe", "score": "0.58430916", "text": "private function _getFullTableName() : string\n {\n return $this->_serverName . \".\" . $this->_name;\n }", "title": "" }, { "docid": "1249bd1539d6b7dd98cb8817b0a3aeab", "score": "0.58412427", "text": "protected function getTable(): string {\n if (!isset($this->_table)) {\n $table = explode('\\\\', $this::whoAmI());\n $table = array_pop($table);\n $table = str_replace('Controller', '', $table);\n $this->_table = strtolower($table);\n }\n\n return $this->_table;\n }", "title": "" }, { "docid": "e9637d1f59e9de792a1c436bb1096b47", "score": "0.58309734", "text": "public function getTableName() {\n return $this->getMapper()->getDbTable()->getTableName();\n }", "title": "" }, { "docid": "3cba187331fe692439f44f8be4c505e4", "score": "0.5829844", "text": "public function getTableName()\n {\n return $this->model->getTable();\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.58285975", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.58285975", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "9ee748106d6f34f87899d8b7efb6221e", "score": "0.58243495", "text": "protected function _getTemporaryTableName()\n {\n return 'searchindex_result_'.$this->getCode();\n }", "title": "" }, { "docid": "6f3f58c17dd1408ed74dae8611b7bff7", "score": "0.5815872", "text": "public function getFullName() {\n $ret = \"\";\n \n if ($this->isComputed()) {\n if (count($this->aliases) > 0) {\n // first alias\n $ret = $this->aliases[0];\n } else {\n // column position\n $columns = $this->query->getColumns();\n $ret = \"\" . array_search($this, $columns, TRUE);\n }\n } else {\n // table alias\n $table_alias = $this->table->getAlias();\n if (preg_match(\"/\\W+/\", $table_alias)) {\n $table_alias = \"`$table_alias`\";\n }\n \n // column name\n $column_name = $this->name;\n if (preg_match(\"/\\W+/\", $column_name)) {\n $column_name = \"`$column_name`\";\n }\n \n $ret = \"$table_alias.$column_name\";\n }\n \n return $ret;\n }", "title": "" }, { "docid": "ffc1b6b5905624b5d03ebdd645321c6d", "score": "0.5812921", "text": "public function getTableName()\n {\n $class = $this->modelClass;\n return $class::tableName();\n }", "title": "" }, { "docid": "ce4ee80bca0e4b8dba521242503eb6ee", "score": "0.5812232", "text": "public function get_table_short_name(): string;", "title": "" }, { "docid": "1003c34b5b00d30a4186427b5dcc7d7e", "score": "0.580979", "text": "public function getTableAlias()\n\t{\n\t\treturn $this->table_alias;\n\t}", "title": "" }, { "docid": "746fb8943ebc3b075f7ffedbc621c6ca", "score": "0.5801652", "text": "public static function get_table_name(){ return \"\"; }", "title": "" }, { "docid": "4b593141fd450530b65a3ab2e0a9c6ee", "score": "0.5799536", "text": "function getReferencedTableName($table, $column) {\n return $this->schema[$table]['columns'][$column]['references'];\n }", "title": "" }, { "docid": "d465675572da1ff662dc26d26079a2f1", "score": "0.57966083", "text": "protected static function getTableName(): string\n {\n global $wpdb;\n return $wpdb->prefix . self::TABLE_NAME;\n }", "title": "" }, { "docid": "6192774af6147904b2f202158c1c281c", "score": "0.57888234", "text": "public function getTable()\n {\n if (empty($this->table)) {\n $this->table = Str::snake(class_basename($this));\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.5788762", "text": "public function getTableName();", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.5788762", "text": "public function getTableName();", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.5788762", "text": "public function getTableName();", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.5788762", "text": "public function getTableName();", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.5788762", "text": "public function getTableName();", "title": "" }, { "docid": "ddf5a22900d648809c85504e09c32142", "score": "0.5785856", "text": "public static function getTableName() {\n $subClass = get_called_class();\n return $subClass::$_tableName;\n }", "title": "" }, { "docid": "8f40eb082b312e5ea14af3e8633d0623", "score": "0.57796574", "text": "public function getMainTable()\n {\n return $this->getFlatTableName($this->getStoreId());\n }", "title": "" }, { "docid": "8ede583b0d9a5789936edf098671b83e", "score": "0.5774694", "text": "protected function getTableRef(){\n\t\t\treturn $this->table;\n\t\t}", "title": "" }, { "docid": "551a457ae3bf6882b819e1fdd67d5952", "score": "0.57697046", "text": "function get_name()\r\n {\r\n return $this->table_name;\r\n }", "title": "" }, { "docid": "a03037fd3c9498aa5b858a2e58f8e60b", "score": "0.57665855", "text": "final public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(class_basename($this)));\n }", "title": "" }, { "docid": "6de4d72aa5237d0e571fc594bbd6dccd", "score": "0.5756876", "text": "final function getTablePrefix()\n\t{\n\t\treturn $this->getPrefix();\n\t}", "title": "" }, { "docid": "826c569f3a7344b70c8cf9010752675e", "score": "0.5755941", "text": "public function getTable()\n {\n if (!isset($this->table)) {\n return str_replace('\\\\', '', Tools::snake(Tools::plural(Tools::Basename($this))));\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "28b5a10a6f948d83f87e45bd11aeb9ab", "score": "0.57546955", "text": "function get_bo_tablename($name) {\r\n\r\n\t$str_sql = \"\r\n SELECT\r\n libelle\r\n FROM\r\n \"._CONST_BO_CODE_NAME.\"dic_data\r\n WHERE\r\n nom_table = \\\"\".$name.\"\\\"\r\n \";\r\n\r\n\t$rst = mysql_query($str_sql);\r\n\r\n\treturn(@mysql_result($rst,0,0));\r\n}", "title": "" }, { "docid": "0c56e7aee89c593839bf6a351c87e62a", "score": "0.57528937", "text": "public function getTableName()\n {\n\n return parent::getTableName();\n\n }", "title": "" }, { "docid": "b4744382000873a418e0b498bd0b9093", "score": "0.57496834", "text": "public function getTableName() {\r\n\t\treturn $this->tableName;\r\n\t}", "title": "" }, { "docid": "3322c2e6d42d6764bd2b26c136bc558f", "score": "0.5740547", "text": "function getTable() {\n return strtolower(get_class($this));\n }", "title": "" }, { "docid": "f15dacac58a775a4b4a49e47a62cf258", "score": "0.5737613", "text": "public function getTargetTableAlias();", "title": "" }, { "docid": "a8d187d7f8cde9a2761cd56a8cd44749", "score": "0.57360476", "text": "public static function getTablePrefix()\n {\n return self::getModelConnectionName()->getTablePrefix();\n }", "title": "" }, { "docid": "cdd79a86d7b0d40a663c0c7ce562e794", "score": "0.5731494", "text": "public function getTableName(): string {\n\n return $this->table_name;\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.57251966", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "16c7437f4933a05165e93c6a39dbdbaf", "score": "0.57251966", "text": "public function getTableName(): string\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "7dab167bf8e463622cd2b12f9307483c", "score": "0.5725059", "text": "public static function getTableName() {\n return self::$TABLE;\n }", "title": "" }, { "docid": "f5f5966aabe57b8104864d295f3b24f1", "score": "0.5720646", "text": "public static function getTableName() :string;", "title": "" }, { "docid": "c59fff3ba09ee44fde4c7f186bb56170", "score": "0.5718605", "text": "private function getTableNameForEntity(object $entity): ?string\n {\n return $this->getMetaDataForEntity($entity)?->getTableName();\n }", "title": "" }, { "docid": "f8d8a6c6044249f8451ca3ec223899ad", "score": "0.5706081", "text": "function getTablename($config, $table)\n{\n\tif (isset($config[$table][\"tablename\"])) {\n\t\treturn $config[$table][\"tablename\"];\n\t}\n\treturn $table;\n}", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.5699334", "text": "abstract public function getTableName();", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.5699334", "text": "abstract public function getTableName();", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.5699334", "text": "abstract public function getTableName();", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.5691946", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.5691946", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "0f848316c3ba64e4467e4944563f1a20", "score": "0.56910956", "text": "public function getTable(): string|null\n {\n return $this->getDataItem('table');\n }", "title": "" }, { "docid": "fc7cd0e03c3fe541752f071061c271e5", "score": "0.5684871", "text": "public function getMainTable()\n {\n return $this->_resource->getTableName(\n $this->_mainTable\n );\n }", "title": "" }, { "docid": "824763094b2f7226f73bcf2187d5c490", "score": "0.56822294", "text": "function getTableName(): string {\n return $this->table;\n }", "title": "" } ]
6494a52d8d759810bb4443c540541235
Creates a form to delete a site credential entity.
[ { "docid": "bfe0b795c43a703dcdb6375c6f9df302", "score": "0.77299523", "text": "private function createDeleteForm(SiteCredential $siteCredential)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('site_credentials_delete', ['id' => $siteCredential->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
[ { "docid": "761bb994384e49b2a8d66e5612f79309", "score": "0.66709816", "text": "public function createDeleteForm()\n {\n return $this->createForm(DeleteType::class);\n // return $this->createFormBuilder(null, array(\n // 'attr' => array(\n // 'class' => 'frm-delete'\n // )\n // ))\n // ->setAction($this->generateUrl($this->getRoutePrefix().'_delete', array('id' => $entity->getId()), static::ABSOLUTE_PATH, true))\n // ->setMethod('DELETE')\n // ->getForm()\n // ;\n }", "title": "" }, { "docid": "8157b0465c5a73d1badbc87efb193d85", "score": "0.65792626", "text": "function btrProject_delete_form($form, &$form_state) {\n // Suggest the username as the default value for the origin.\n $btr_user = oauth2_user_get();\n $default_origin = str_replace(' ', '', $btr_user['name']);\n if (!$default_origin) $default_origin = 'test';\n\n // Build the form.\n $form = [\n 'delete' => [\n '#type' => 'fieldset',\n '#title' => t('Delete a project'),\n //'#description' => $description,\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n\n 'origin' => [\n '#type' => 'textfield',\n '#title' => t('Origin'),\n '#default_value' => $default_origin,\n '#required' => TRUE,\n ],\n\n 'project' => [\n '#type' => 'textfield',\n '#title' => t('Project'),\n '#required' => TRUE,\n ],\n\n 'submit' => [\n '#value' => t('Delete'),\n '#type' => 'submit',\n ],\n ],\n ];\n return $form;\n}", "title": "" }, { "docid": "3c9d3d5d29f85e75c0dc4f92104b6cad", "score": "0.64963883", "text": "function %%MACHINE_NAME%%_type_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = '%%ENTITY_TYPE_ADMIN_PATH%%/manage/' . $form_state['%%MACHINE_NAME%%_type']->type . '/delete';\n}", "title": "" }, { "docid": "8e0b9a650b43d82104186e2e4719d457", "score": "0.6388787", "text": "private function createDeleteForm(Alert $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('alert_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "30f05ca1ba647f6bf9f5a6ca205fbbc8", "score": "0.6382003", "text": "private function createDeleteForm(sousEspace $sousEspace)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sousespace_delete', array('id' => $sousEspace->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7d771cfa43a011160f6f85c6cc929ff7", "score": "0.6297262", "text": "private function createDeleteForm(Moyennes $moyenne)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('moyennes_delete', array('id' => $moyenne->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aff60c55a499d90ca7467a2c1942a4ca", "score": "0.6281251", "text": "private function createDeleteForm(Comisiones $comisione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comisiones_delete', array('id' => $comisione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9e23fec76c34227e807bffe934df488d", "score": "0.6225626", "text": "private function createDeleteForm(Vente $vente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vente_delete', array('id' => $vente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f6523026ab644546d90f01aa75ad1c49", "score": "0.6221866", "text": "private function createDeleteForm($entity, $path)\n {\n return $this->formFactory->createBuilder()\n ->setAction($this->router->generate($path, array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "521383ceca91da77d00463b1d6584da3", "score": "0.6201105", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ss_product_delete', array('token' => $token)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c6581af1dcadcb1f908b45c6e44735bd", "score": "0.6185378", "text": "private function createDeleteForm(SvCfgGeometria $svCfgGeometria)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svcfggeometria_delete', array('id' => $svCfgGeometria->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "92c9519277ebefb349e19022b52d27db", "score": "0.6173735", "text": "private function createDeleteForm(VhloActaTraspaso $vhloActaTraspaso)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vhloactatraspaso_delete', array('id' => $vhloActaTraspaso->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "75aa6292f58688b282dad2f2588ec945", "score": "0.6139982", "text": "private function createDeleteForm(EcoDopplerColorVenMiemSup $ecoDopplerColorVenMiemSup)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ecodopplercolorvenmiemsup_delete', array('id' => $ecoDopplerColorVenMiemSup->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0570819a422bc7ae9b2fa6c7e772d38f", "score": "0.6136945", "text": "private function createDeleteForm(CtlNivelSatisfaccion $ctlNivelSatisfaccion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('levelcustomersatisfaction_delete', array('id' => $ctlNivelSatisfaccion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "53fa186421a919d5016153a9162569a2", "score": "0.6121226", "text": "private function createDeleteForm(TypeAbsence $typeAbsence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typeabsence_delete', array('id' => $typeAbsence->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "33e1462cebd7259fd32f3d0ca81147ed", "score": "0.6105178", "text": "private function createDeleteForm(Temas $tema)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('temas_delete', array('id' => $tema->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a8a3827542eb601c4022a8c04ff530a6", "score": "0.60896623", "text": "private function createDeleteForm(SeanceRegion $seanceRegion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('seanceregion_delete', array('id' => $seanceRegion->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "ecd5410277e6b2f1567409e3eb82f00b", "score": "0.6079939", "text": "private function createDeleteForm(DetalleVenta $detalleVentum) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('detalleventa_delete', array('id' => $detalleVentum->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "76d1bede0e9dc4b0f5a282a0160f93cd", "score": "0.60775477", "text": "private function createDeleteForm(Huesped $huesped)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('huesped_delete', array('id' => $huesped->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c26da9b15aaa8d50c7bace9f8ab1060d", "score": "0.6067693", "text": "private function createDeleteForm(Ejemplar $ejemplar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ejemplar_delete', array('idejemplar' => $ejemplar->getIdejemplar())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "eeff3c754275255ee1c0209c74ab8fc4", "score": "0.6048599", "text": "public function delete(HostingControlPanelEntityInterface $entity);", "title": "" }, { "docid": "51728459875aa5a4e999871def1a90aa", "score": "0.60470116", "text": "private function createDeleteForm(Serviciosocial $serviciosocial)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('serviciosocial_delete', array('id' => $serviciosocial->getIdServiciosocial())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cdf8944a6c888eb3afac6f179b9d7da6", "score": "0.5989674", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('perfiles_envio_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n //->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "bc9b6c32d79ec05f50be0a0c98575bf5", "score": "0.59868115", "text": "function produto_type_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/structure/produtos/manage/' . $form_state['produto_type']->name . '/delete';\n}", "title": "" }, { "docid": "d3892ef9de835bb6a23af42b75b3f1b3", "score": "0.5959862", "text": "private function createDeleteForm(InfoEmploye $infoEmploye)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('infoemploye_delete', array('id' => $infoEmploye->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "75fc72f7a490afaee00f435c3dc8581b", "score": "0.59570545", "text": "private function createDeleteForm(TypeComtrad $typeComtrad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typecomtrad_delete', array('id' => $typeComtrad->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f09e4223e0b2f1db593716e67cceabae", "score": "0.5951256", "text": "function invite_form_submit_delete($form, &$form_state) {\n $invite = $form_state['invite'];\n $invite_uri = entity_uri('invite', $invite);\n $form_state['redirect'] = $invite_uri['path'] . '/delete';\n}", "title": "" }, { "docid": "f621e4be2bea6aaaa576d91975f04889", "score": "0.594341", "text": "private function createDeleteForm(UserCfgRole $userCfgRole)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usercfgrole_delete', array('id' => $userCfgRole->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4ed43dac107659a99ff8dc3f46dacd64", "score": "0.5937659", "text": "private function createDeleteForm(TypeConfig $typeConfig)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typeconfig_delete', array('id' => $typeConfig->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fbd958c69bd26a078e6e03a40146a55f", "score": "0.5932634", "text": "function cps_review_delete_form($form, &$form_state, CPSReview $entity) {\n $form_state['entity'] = $entity;\n $uri = $entity->permalink();\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $entity->label())),\n $uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "title": "" }, { "docid": "840b4acdbb75ee9a6f2e0519f1a87e50", "score": "0.5923642", "text": "private function createDeleteForm(TypeEvaluation $typeEvaluation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('parametrage_evaluation_delete', array('id' => $typeEvaluation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2ced2d32415f0259469bdb682131249b", "score": "0.59225243", "text": "private function createDeleteForm(CfgTipoVehiculo $cfgTipoVehiculo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cfgtipovehiculo_delete', array('id' => $cfgTipoVehiculo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1f445f4732bbab6dd3a79648596a4d0b", "score": "0.59222186", "text": "function custom_entity_form_delete_submit($form, &$form_state) {\n $form_state['redirect'] = 'custom_entity/' . $form_state['custom_entity']->id. '/delete';\n}", "title": "" }, { "docid": "9aeed104cae628d90e368cdc39f585d1", "score": "0.592193", "text": "private function createDeleteForm(SvCfgVisualDisminuida $svCfgVisualDisminuida)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svcfgvisualdisminuida_delete', array('id' => $svCfgVisualDisminuida->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9d80c08869bf0568f2a19881a9ab89be", "score": "0.5892066", "text": "private function createDeleteForm(Publicites $publicite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('publicites_delete', array('id' => $publicite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ab97417fcce40e8fd9ffee85e985c409", "score": "0.5886581", "text": "private function createDeleteForm(DatPeriodos $datPeriodo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('datperiodos_delete', array('id' => $datPeriodo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2dc6b40b628e0f584f230e3c9f93c08a", "score": "0.5884576", "text": "private function createDeleteForm(Platform $platform)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('platform_delete', array('id' => $platform->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "262052ae4a6da002127923c01554553c", "score": "0.58762056", "text": "private function createDeleteForm(Antecedente $antecedente) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('antecedente_delete', array('id' => $antecedente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "679476af74a3a56ccd9b602fe42fb806", "score": "0.5864275", "text": "private function createDeleteForm(Proceso $proceso)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proceso_delete', array('id' => $proceso->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f87cf82913147eabf0e00e2dfef3b3c1", "score": "0.5847634", "text": "private function createDeleteForm(SoftwareTag $softwareTag)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_softwaretag_delete', array('id' => $softwareTag->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c9b45e9dac01cd477dd5b348daba6511", "score": "0.58476084", "text": "private function createDeleteForm($id)\n {\n // On crée le formulaire de désactivation du client\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('translation_domain' => 'FOSUserBundle', 'label' => 'actions.lock_unlock', 'attr' => array( 'class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ac2a0772060406da9b52ba4df7d9cd41", "score": "0.58447415", "text": "private function createDeleteForm(Tesis $tesi)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tesis_delete', array('id' => $tesi->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "07dbb4d4de6d6d8c646532a4d5882ba7", "score": "0.5837384", "text": "private function createDeleteForm($id) {\r\n $session = $this->get(\"session\");\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('occupy_delete', array('id' => $id,\r\n )))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "1c4ed60c1160d022e4cbf83aad293386", "score": "0.5833025", "text": "private function createDeleteForm(Page $page)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('page_page_delete', array('id' => $page->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e581d5955a65a86be52ffa1a7f747eb5", "score": "0.58318377", "text": "private function createDeleteForm(\\FOS\\UserBundle\\Model\\User $user)//\\FOS\\UserBundle\\Model\\User $user)\n {\n $this->denyAccessUnlessGranted('ROLE_USER');\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_delete', array('id' => $user->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "bb766d4b449dbd1e628c9999f1d069ca", "score": "0.5831584", "text": "private function createDeleteForm(Thread $thread)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('thread_delete', array('id' => $thread->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e85a9489be46efbca6ec688fd978bbf9", "score": "0.58292365", "text": "private function createDeleteForm( PagoClub $pagoClub ) {\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction( $this->generateUrl( 'pagoclub_delete', array( 'id' => $pagoClub->getId() ) ) )\n\t\t ->setMethod( 'DELETE' )\n\t\t ->getForm();\n\t}", "title": "" }, { "docid": "2c1d943b37e2282bd3a19d8237b4bd63", "score": "0.5824199", "text": "private function createDeleteForm(PageMeta $pageMeta)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('czesio_pagemeta_delete', array('id' => $pageMeta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e2197c2ba23dbabb03d3efadf12f16cb", "score": "0.58218586", "text": "private function createDeleteForm(ParamServices $paramService)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('paramservices_delete', array('id' => $paramService->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "055de1e4c16b37a2c8a63cd6abd5fc8d", "score": "0.58131623", "text": "public function deleteFormAction()\n {\n // use the template from the Flexform if there is one\n if (!empty($this->templateFile)) {\n $this->view->setTemplatePathAndFilename($this->templateFile);\n }\n\n return $this->showAction();\n }", "title": "" }, { "docid": "ea1a6fdc9c050a8efc75f504b543996f", "score": "0.5810991", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('consigne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1141b9f6580bdd4f40af422a33c27f3b", "score": "0.5809795", "text": "private function createDeleteForm(OrdenCreada $ordenCreada)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_orden_delete', array('id' => $ordenCreada->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b4e4d5c8d48a939316508af7e5174376", "score": "0.5800838", "text": "private\n function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "191c59d33430d28ba1ef8db5867f334d", "score": "0.5798921", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administrador_educacion_curso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => \"btn btn-danger btn-lg\", 'onClick' => 'return ConfirmarAccion();')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b2a3285e4792f45e9a297294fc78ad24", "score": "0.5788738", "text": "private function createDeleteForm(NatureAbsence $natureAbsence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('natureabsence_delete', array('id' => $natureAbsence->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "884359b1ad7dda0d9edde485713472b2", "score": "0.5783416", "text": "private function createDeleteForm(Subscription $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('subscription_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "c6f81c1928ed7dae546f7f6f427d9ab2", "score": "0.5765093", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete account', 'attr' => array('class' => 'orange-btn col-xs-12 col-sm-6 col-md-6')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "86c263261bd2842bb9d1d922473cfe6d", "score": "0.57618773", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pedidodetalle_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn btn-danger entity-submit-delete pull-right')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ae06914e3326195aef04b8d0e9b12cd8", "score": "0.5760312", "text": "private function createDeleteForm(ProjectT $banner)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cms_project_type_delete', array('id' => $banner->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "d4970018cfcfb0d0fa37de23ddd3326c", "score": "0.5759285", "text": "private function createDeleteForm(Favorite $favorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('favorite_delete', array('id' => $favorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0be48913fcc923fd1aa38925c9a03cce", "score": "0.5753733", "text": "public function deletePage()\n {\n return view('delete_form');\n }", "title": "" }, { "docid": "260808d24bfc76394d3aa9d0fb7bd382", "score": "0.57415354", "text": "private function createDeleteForm(anneCompet $anneCompet)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annecompet_delete', array('id' => $anneCompet->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f57c83f831d7a7e5ab58584557b9bbf0", "score": "0.5740962", "text": "private function createDeleteForm(Roles $role)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('roles_delete', array('id' => $role->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fef6cc53aab22fdd7d0e5eccdb70161e", "score": "0.5740312", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n /* return $this->createFormBuilder()\n ->setAction($this->generateUrl('serviciosocial_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;*/\n }", "title": "" }, { "docid": "8491635994573c210a8ccc78282b8635", "score": "0.5736558", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('chorasextras_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aed247507eaeeb8e4f590996672f1261", "score": "0.5734606", "text": "private function createDeleteForm(Fitness $fitness)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fitness_delete', array('id' => $fitness->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "64d800f9804e9b6505929773d392615d", "score": "0.57335913", "text": "private function createDeleteForm(ArusEntityTask $task)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t->setAction($this->generateUrl('task_delete', array('id' => $task->getId())))\n\t\t->setMethod('DELETE')\n\t\t->getForm()\n\t\t\t;\n\t}", "title": "" }, { "docid": "6e71b5f04ed146559cdf4a540c390376", "score": "0.5730999", "text": "private function createDeleteForm(Eliquide $eliquide)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eliquide_delete', array('id' => $eliquide->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9adde70bdb0e386fd972b28014777356", "score": "0.57246286", "text": "protected function delForm()\n {\n \n }", "title": "" }, { "docid": "9b79b8a1a8f90e51a7239d4a3d9f7cd7", "score": "0.5717775", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('historiaclinica_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar Historia', 'attr'=>array('class'=>'btn btn-warning entity-submit pull-left')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5ccf1403db54d7fec25d4cf29240cd3c", "score": "0.57141984", "text": "private function createDeleteForm(RhPersona $rhPersona) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rhpersona_delete', array('id' => $rhPersona->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "96f147c20af0a0c67e5443a34192a33a", "score": "0.5707866", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personal_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c158559e257fde2f47bc2bbedf81b0ea", "score": "0.57046473", "text": "private function createDeleteForm(Util $util)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('util_delete', array('id' => $util->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bf1958478b5f017c4b6c111789c3c11e", "score": "0.5704284", "text": "private function createDeleteForm(Service $service)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('services_delete', array('id' => $service->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "95cff5fa1ac1b5380f19da061d968bb6", "score": "0.5700759", "text": "function styleguide_palette_swatch_delete_form($form, &$form_state, array $swatch) {\n $form['swatch_id'] = array(\n '#type' => 'value',\n '#value' => $swatch['id'],\n );\n return confirm_form($form,\n t('Are you sure you want to delete %title?', array('%title' => $swatch['name'])),\n 'admin/config/user-interface/styleguide-palette/edit',\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "title": "" }, { "docid": "7fdbcd5842d9365485235f65b7568214", "score": "0.5696429", "text": "function deleteUserPage($form, &$form_state)\n{\n $form['header'] = array( // general header\n\t\t\t '#markup'=>'<h1>Delete User Account</h1>'\n\t\t\t );\n\n $form['warning'] = array( // warning message to make sure that the user really wants to delete their account\n\t\t\t '#markup'=>t('You will no longer be able to log into CROMA, and will be removed from all your associated teams. Note that your members will still be able to view your hours and outreaches, but not your profile.')\n\t\t\t );\n \n $form['acknowledgement'] = array( // check box to ensure that they understand the warning\n\t\t\t\t '#type'=>'checkbox',\n\t\t\t\t '#title'=>t('By checking this box, I acknowledge that I am permanently deleting my account.')\n\t\t\t\t );\n $form['misc'] = array( // any feedback as to why the user is leaving\n\t\t\t'#type'=>'textarea',\n\t\t\t'#title'=>t('Feedback')\n\t\t\t);\n\n $form['delete'] = array( // button which actually deletes the user\n\t\t\t '#prefix'=>'<div align=\"right\">',\n\t\t\t '#type'=>'submit',\n\t\t\t '#value'=>'Delete account',\n\t\t\t '#suffix'=>'</div>'\n\t\t\t );\n\n return $form;\n}", "title": "" }, { "docid": "e3d479ae3dec1895880c97a84178ae06", "score": "0.5694877", "text": "function flexiform_form_submit_delete(&$form, &$form_state) {\n $form_state['redirect'] = 'admin/structure/flexiforms/manage/' . $form_state['flexiform']->type . '/delete';\n}", "title": "" }, { "docid": "2a86be4d6ba0d7b9d161f10b3fbf94bb", "score": "0.5691425", "text": "private function createDeleteForm(GdTrazabilidad $gdTrazabilidad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gdtrazabilidad_delete', array('id' => $gdTrazabilidad->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c39c3afbd898867327c8da38517b75f0", "score": "0.5690593", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "8487574b7796fc1251566a69e641e9e1", "score": "0.56900346", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partner_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit',\n array(\n 'label' => 'Supprimer',\n 'attr' => array('class' => 'btn btn-danger')\n ))\n ->getForm();\n }", "title": "" }, { "docid": "702e289e7a4ed584f857e65a4dc242eb", "score": "0.5689288", "text": "private function createDeleteForm(Txostena $txostena)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('txostena_delete', array('id' => $txostena->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9dbf9527896b10a00359624991353903", "score": "0.5688194", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administrador_configuracion_tipodocumentoidentidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete', 'attr' => array('class' => \"btn btn-danger btn-lg\", 'onClick' => 'return ConfirmarAccion();')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b2c167a47dbdba943cfb8adb403186d2", "score": "0.5684947", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9272fb9acfdbe494c580128b9aaf52eb", "score": "0.56813157", "text": "public function deleteAction ()\n {\n $this->view->id = (int) $this->_getParam('id');\n /* $HeadlinesModel = new Admin_Model_Headlines(); */\n $this->auth_session->deleteCrsf = sha1(microtime(TRUE));\n $this->view->csrf = $this->auth_session->deleteCrsf;\n $this->view->canDelete = true;\n /* $this->view->canDelete = $HeadlinesModel->canModify($this->auth_session->username, $this->view->id); */\n }", "title": "" }, { "docid": "ff50d735f852ac07be80e08cf0b2e971", "score": "0.5678916", "text": "function btrProject_delete_form_submit($form, &$form_state) {\n if (!oauth2_user_is_authenticated()) {\n oauth2_user_authenticate($form_state, $redirection = ($form===NULL));\n return;\n }\n\n $btr = wsclient_service_load('btr');\n $result = $btr->delete_project([\n 'origin' => $form_state['values']['origin'],\n 'project' => $form_state['values']['project'],\n ]);\n bcl::display_messages([$result['message']]);\n}", "title": "" }, { "docid": "7faff9ae7234843819952c36f2f1c379", "score": "0.5674431", "text": "private function createDeleteForm(Curricullum $curricullum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('curricullum_delete', array('id' => $curricullum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1a6b1cf0d762737ca1b2dff0caefde8d", "score": "0.5664698", "text": "private function createDeleteForm(Taille $taille)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('taille_delete', array('id' => $taille->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "12173b137c9debf7274b0f0304ac6cb3", "score": "0.56640786", "text": "private function createDeleteForm(SocialCharge $socialCharge) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_socialcharge_delete', array('id' => $socialCharge->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5ac38dba34156d997224d2a528968635", "score": "0.56633097", "text": "private function createDeleteForm(Concejalia $concejalium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('concejalia_delete', array('id' => $concejalium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ea6b870322c183a921a4000725e22b8b", "score": "0.5659789", "text": "private function createDeleteForm(Services $service)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('services_delete', array('idServices' => $service->getIdservices())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2d18bf722dfb631beeef5486e94a3058", "score": "0.56570125", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "babf54efc5ff3c0b0999afa4d5fcaeb9", "score": "0.5656554", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('supprimer_utilisateur', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm();\r\n }", "title": "" }, { "docid": "697bcaa5669be202f470a2c2b896b83d", "score": "0.5654866", "text": "private function createDeleteForm(Transferences $transference)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('transferences_delete', array('id' => $transference->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "79164d21d948dda0f4726f742191cb96", "score": "0.5652389", "text": "private function createDeleteForm(Evenement $evenement)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('evenement_delete', array('id' => $evenement->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "867ffb25425ee88220955a89719ab725", "score": "0.56510687", "text": "private function createDeleteForm(Data $datum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('data_delete', array('id' => $datum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4f76035ed7c9d3eb8af37836cb23e210", "score": "0.56505775", "text": "private function createDeleteForm($id) {\n //echo $id;exit;\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ecomponentessalariales_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar', 'attr' => array('class' => 'btn btn-primary')))\n ->getForm();\n }", "title": "" }, { "docid": "bd0056752abaccd6ea402ed426d3a5ab", "score": "0.56493044", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('habitacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar Habitación', 'attr' => array('class'=>'btn btn-block btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "839d79e1dcd9f425ea987dab6d579246", "score": "0.5648979", "text": "private function createDeleteForm(MethodeDispline $methodeDispline)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('methodedispline_delete', array('id' => $methodeDispline->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4b04032aef3092443859e4e62ab68e92", "score": "0.5641205", "text": "private function createDeleteForm(Activiteiten $activiteiten)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('activiteiten_delete', array('id' => $activiteiten->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "00d84af4a565ad9a726f68cf73e43d75", "score": "0.5637731", "text": "private function createDeleteForm(NoteExemplaire $notecomEx)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('notecommentaire_delete', array('id' => $notecomEx->getIdcommentaire())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "3ddceb4d51ea9a730fad1e3aac10d0de", "score": "0.0", "text": "public function run()\n {\n CacheHelper::forgetCache(PreArticleCache::statusList());\n\n $statusList = $this->statusList();\n\n $article_status_type = ArticleStatusType::with('statusList')->get();\n\n $this->seed($article_status_type, $statusList);\n }", "title": "" } ]
[ { "docid": "026cbaddf68d6d6a45da6661bc9c4127", "score": "0.79270625", "text": "public function run() {\n\n $this->call([\n CategorySeeder::class,\n ColorSeeder::class,\n SubCategorySeeder::class\n ]);\n// $products = Product::factory()->count(1000)\n// ->has(Image::factory()->count(4))\n// ->hasAttached(Size::factory()->count(3))\n// ->hasAttached(Price::factory()->count(3), [\n// 'discounted_price' => 0\n// ])\n// ->create();\n//\n// foreach($products as $product) {\n// $product->colors()->attach(Color::whereIn('id', [1, 6, 8, 14])->get());\n// }\n//\n $categories = Category::all();\n $subcategories = Subcategory::all();\n foreach($categories as $category) {\n $category->slug = Str::slug($category->name);\n $category->save();\n }\n foreach($subcategories as $subcategory) {\n $subcategory->slug = Str::slug($subcategory->name);\n $subcategory->save();\n }\n\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'customer']);\n }", "title": "" }, { "docid": "9ebafd651532d8097278ffd87e4126dd", "score": "0.7914175", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('Admin'),\n 'isadmin' => 1,\n 'remember_token' => Str::random(10),\n ]);\n User::create([\n 'name' => 'User',\n 'username' => 'user',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('password'),\n 'remember_token' => Str::random(10),\n ]);\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Author::factory(10)->create();\n\n $authors = Author::all();\n\n foreach ($authors as $author) {\n $booksNumber = rand(1, 10);\n\n for ($i = 0; $i < $booksNumber; $i++) {\n $book = new Book;\n $faker = Faker::create();\n $book->create([\n 'author_id' => $author->id,\n 'title' => $faker->sentence(6),\n 'year' => $faker->year(),\n 'isbn' => $faker->isbn13\n ]);\n }\n }\n }", "title": "" }, { "docid": "652f431dbbffe4e36aa5c0bfc4a05f31", "score": "0.79028475", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //factory(App\\User::class, 3)->create();\n /*factory(App\\Project::class, 20)->create();\n factory(App\\Position::class, 20)->create();*/\n DB::table('position_categories')->insert([\n 'name' => 'Architecture',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Design',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Economics',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Programming',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Network',\n ]);\n\n DB::table('users')->insert([\n 'firstname' => 'Admin',\n 'lastname' => 'Admin',\n 'type' => 'admin',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n DB::table('users')->insert([\n 'firstname' => 'Tomas',\n 'lastname' => 'Svetlik',\n 'type' => 'supervisor',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n }", "title": "" }, { "docid": "dfe583e94e177ff570601466401e1b2b", "score": "0.78664804", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = f::create();\n foreach (range(1,20) as $item) {\n DB::table('persons')->insert([\n 'firstName' => $faker->name,\n 'documentType' => \"CC\",\n 'document' => 123456,\n\t 'lastName' => $faker->lastName,\n 'company' => $faker->company,\n 'emailAddress' => $faker->email,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'province' => $faker->state,\n 'country' => $faker->countryCode,\n 'phone' =>$faker->tollFreePhoneNumber,\n 'mobile'=>$faker->e164PhoneNumber\n\t ]);\n }\n }", "title": "" }, { "docid": "f571785bdbff3ab02c615eb8fd1f1aa1", "score": "0.78613377", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Address::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 Address::create([\n 'addressName' => $faker->randomLetter,\n 'addressStreet' => $faker->streetName,\n 'addressNumber' => $faker->randomNumber(1),\n 'addressZip' => $faker->postcode,\n 'addressPlace' => $faker->city,\n 'addressCountry' => $faker->country,\n 'addressState' => $faker->state,\n 'addressMailBoxNumber' => $faker->buildingNumber,\n 'addressExtraInfo' => $faker->realText($maxNbChars = 30, $indexSize = 2),\n 'loadingPresent' => $faker->boolean(50),\n 'trailerAccess' => $faker->randomLetter\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "56e4a3e209083146c894bf986fe10c2d", "score": "0.7851426", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Articulo::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articulos in our database:\n for ($i = 0; $i < 50; $i++) {\n Articulo::create([\n 'titulo' => $faker->sentence,\n 'cuerpo' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "b7a61e5a71620bfa33e1faa0f7e7a4e0", "score": "0.7838723", "text": "public function run()\n {\n $users = factory(App\\Book::class, 1000)->create();\n // $this->call(UserSeeder::class);\n// DB::table('books')->insert([\n// 'title' => Str::random(10),\n// 'author' => Str::random(10),\n// 'category' => Str::random(10),\n// 'piece' => 5,\n// ]);\n }", "title": "" }, { "docid": "5637d7e19c1ec7123232747c49238622", "score": "0.7834799", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Product')->create(['name' => 'Fanta', 'price' => 140]);\n factory('App\\Product')->create(['name' => 'Coca Cola', 'price' => 180]);\n factory('App\\Product')->create(['name' => 'Pepsi Cola', 'price' => 160, 'discount' => 20]);\n factory('App\\Product')->create(['name' => 'Sprite', 'price' => 120]);\n factory('App\\Product')->create(['name' => 'Limonade', 'price' => 200]);\n }", "title": "" }, { "docid": "b444ac88819a191047d8feec2c185e1c", "score": "0.78344816", "text": "public function run()\n {\n\n DB::table('posts')->delete();\n\n $faker = Faker::create();\n $cats_id = Category::all()->pluck('id')->toArray();\n $pers_id = Person::all()->pluck('id')->toArray();\n foreach (range(1,20) as $i) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'cat_id' => $faker->randomElement($cats_id),\n 'per_id' => $faker->randomElement($pers_id)\n ]);\n }\n }", "title": "" }, { "docid": "b2d9243b0e4d2434d34d38fb01906601", "score": "0.78318644", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n // Donation::truncate();\n // Transacton::truncate();\n // DB::table('category_donation')->truncate();\n\n User::create([\n 'name' => 'Busola Okeowo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'verified' => User::VERIFIED,\n 'admin' => true,\n ]);\n\n factory(User::class, 500)->create();\n\n factory(Category::class, 10)->create();\n\n factory(Donation::class, 1000)->create()->each(\n function ($donation) {\n $categories = Category::all()->random(mt_rand(1, 3))->pluck('id');\n $donation->categories()->attach($categories);\n }\n );\n\n factory(Transacton::class, 1000)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6c432cf75a7b37364927c71d18b2a940", "score": "0.7817219", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Country::class, 10)->create();\n factory(App\\Supplier::class, 5)->create();\n factory(App\\User::class, 3)->create();\n factory(App\\Phone::class, 3)->create();\n factory(App\\Post::class, 3)->create();\n factory(App\\Comment::class, 15)->create();\n factory(App\\Role::class, 5)->create();\n factory(App\\History::class, 5)->create();\n }", "title": "" }, { "docid": "cddbf6f9d3cf8855efd49fd8690a82a9", "score": "0.78134006", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker= Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n \t$title=$faker->sentence(5);\n \t$slug=str_slug($title, \"-\");\n CatalogCategory::create([\n 'catalog_id'=>2,\n 'parent' => 0,\n 'title' => $title,\n 'content' => $faker->realText(250),\n 'meta_title' => $faker->sentence(5),\n 'meta_keywords' => $faker->sentence(10),\n 'meta_description' => $faker->realText(50),\n 'active' => 'active',\n 'language' => 'en',\n 'slug' => $slug, \n ]);\n }\n }", "title": "" }, { "docid": "e085eed193e63f3018e503b814f52203", "score": "0.7808198", "text": "public function run()\n {\n // DB::table('articles')->insert(\n // [\n\n // [\n // 'category_id' => 4,\n // 'title' => '文章4',\n // 'content' => '内容4'\n // ],\n // [\n // 'category_id' => 5,\n // 'title' => '文章5',\n // 'content' => '内容5'\n // ]\n // ]\n // );\n\n // Let's truncate our existing records to start from scratch.\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 'category_id' => array_random([1, 2, 3, 4, 5, 6]),\n 'title' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString()\n\n ]);\n }\n\n }", "title": "" }, { "docid": "f919a3f40e792d8990ecc3b06279bfa2", "score": "0.780527", "text": "public function run()\n {\n $db = DB::table('users');\n\n $this->faker = Faker\\Factory::create();\n\n $values ['firstName'] = 'Роман';\n $values ['lastName'] = 'Телепнёв';\n $values ['email'] = '[email protected]';\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 2;\n\n $db->insert($values);\n\n for($i = 0; $i < 10; $i++) {\n\n $values ['firstName'] = $this->faker->firstName;\n $values ['lastName'] = $this->faker->lastName;\n $values ['email'] = $this->faker->email;\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 1;\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "dafd5ed6a9dfac3846fdf76150c59c25", "score": "0.7797067", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::factory(15)->create();\n Categorie::factory(10)->create();\n Product::factory(200)->create();\n UserProduct::factory(50)->create();\n }", "title": "" }, { "docid": "c11978691651e5bb5ec8631cb4f07e6e", "score": "0.7793273", "text": "public function run()\n {\n //$this->labFacultiesSeeder();\n $this->labRolesSeeder();\n $this->labMembersSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labSkillsTableSeeder();\n $this->labPreferencesTableSeeder();\n $this->labPositionsTableSeeder();\n }", "title": "" }, { "docid": "b9287aff88d859492bd31ea1291e44cc", "score": "0.7793", "text": "public function run()\n {\n // Truncate existing records to start from scratch\n // Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // create products in DB\n for($i = 0; $i < 10; $i++) {\n // Product::create([\n // 'name' => $faker->word,\n // 'description' => $faker->realText($maxNbChars = 20, $indexSize = 1),\n // 'qty' => $faker->randomDigit\n // ]);\n }\n }", "title": "" }, { "docid": "84a5c18a5563f5fd35652bc3991e7a13", "score": "0.7788151", "text": "public function run()\n {\n // reset the students table\n DB::table('students')->truncate();\n // generate 100 dummy students data\n $students = [];\n $faker = Factory::create();\n for ($i = 1; $i <= 100; $i++) {\n $students[] = [\n 'teacher_id' => rand(1, 2),\n 'classroom_id' => rand(1, 3),\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'gender' => $faker->randomElement(['M', 'F']),\n 'joined_year' => $faker->randomElement([2017, 2018, 2019])\n ];\n }\n DB::table('students')->insert($students);\n }", "title": "" }, { "docid": "11c50d315926c6e7b655ef6b05e875c4", "score": "0.778813", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n 'is_admin' => \"0\",\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'nrc' => '9/MaKaNa(N)123456',\n 'passport' => $faker->creditCardNumber,\n 'city' => $faker->city,\n 'country' => $faker->country,\n 'is_foreigner' => $faker->numberBetween(0, 1),\n 'status' => \"1\"\n ]);\n }\n foreach (range(1, 5) as $index) {\n DB::table('room_types')->insert([\n 'type' => $faker->word,\n ]);\n }\n foreach (range(1, 100) as $index) {\n DB::table('rooms')->insert([\n 'name' => 'Room-' . $faker->numberBetween(0, 100),\n 'price' => $faker->numberBetween(1000, 5000),\n 'roomtype_id' => $faker->numberBetween(1, 5),\n 'maxPerson' => $faker->numberBetween(2, 5)\n ]);\n }\n\n }", "title": "" }, { "docid": "0d82c7815e29e8d3580735f06d9c1aaf", "score": "0.7787371", "text": "public function run()\n {\n\n \t/*DB::table('posts')->insert([\n \t\t'title'=>'Hello World Post!',\n \t\t'is_private'=>false,\n \t\t'content'=>'Primeiro Post do Blog!',\n \t\t'tag'=>'tests']);\n\t\t*/\n \t$faker = Faker\\Factory::create();\n \t\n \tfor ($i=0;$i<=50;$i++){\n \t\tDB::table('posts')->insert([\n \t\t\t'title'=>$faker->sentence(4,true),\n \t\t\t'is_private'=>$faker->numberBetween(0,1),\n \t\t\t'content'=>$faker->realText(),\n \t\t\t'tag'=>$faker->word,\n \t\t\t'created_at'=>date(\"Y-m-d H:i:s\"),\n \t\t\t'updated_at'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t'user_id'=>$faker->numberBetween(1,10),\n \t\t\t]);\n\n \t}\n }", "title": "" }, { "docid": "764ce860db37bfaef26f84398a089d37", "score": "0.77847266", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(MenuSeeder::class);\n $this->call(SubMenuSeeder::class);\n $this->call(AspirationCategorySeeder::class);\n $this->call(RoleSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\Aspiration::class,100)->create();\n factory(App\\Comment::class, 50)->create();\n factory(App\\Upvote::class,1000)->create();\n }", "title": "" }, { "docid": "1008c0f54658330473447dc378540eff", "score": "0.77835673", "text": "public function run()\n {\n // $this->call(\n // UsersTableSeeder::class\n // AdminTableSeeder::class\n // );\n $faker = Faker\\Factory::create();\n // users Table ..\n /*\n for ($i=0; $i < 4; $i++) { \n App\\User::create([\n 'name'=> $faker->name,\n 'email'=>$faker->unique()->email,\n 'password' => bcrypt('test'),\n 'remember_token' => str_random(10),\n ]);\n }\n */\n\n // questions Table ..\n /*\n for ($i=0; $i < 20; $i++) { \n App\\Question::create([\n 'title'=>$faker->text,\n 'a' => str_random(10),\n 'b' => str_random(10),\n 'c' => str_random(10),\n 'correct_answer'=> str_random(10),\n 'chapter'=> '2',\n 'process_group'=>'3',\n 'feedback'=>$faker->text,\n 'created_at'=>$faker->date,\n 'updated_at'=>$faker->date\n ]);\n }\n */\n }", "title": "" }, { "docid": "7a448194d3ffeafa2e4480cbd7d668c7", "score": "0.7781228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Schema::disableForeignKeyConstraints();\n Estudiante::truncate();\n Nota::truncate();\n\n factory(Estudiante::class, 1000)->create();\n factory(Nota::class, 10000)->create();\n\n }", "title": "" }, { "docid": "0f84f24f66f5b72c344f056d5c4ac2be", "score": "0.7779334", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n //Zbog relacija moramo prvo napraviti seed tablica na koje se oslanjaju relacije. Koristimo reference. \n CategoryTableSeeder::class,\n MealsTableSeeder::class, \n IngredientsTableSeeder::class, \n TagsTableSeeder::class,\n LanguagesTableSeeder::class,\n\n CategoryTranslationSeeder::class,\n IngredientsTranslationSeeder::class,\n MealsTranslationSeeder::class,\n TagsTranslationSeeder::class,\n\n IngredientsMealsSeeder::class,\n TagsMealsSeeder::class,\n ]);\n }", "title": "" }, { "docid": "3367ba7c5de754802d54125c0434d35b", "score": "0.77788985", "text": "public function run()\n {\n // $this->call(DatabaseSeeder::class);\n\n $users = factory(App\\User::class)->times(20)->create();\n \t\t\t$products = factory(App\\Product::class)->times(40)->create();\n \t\t\t$categories = factory(App\\Category::class)->times(5)->create();\n $projects = factory(App\\Project::class)->times(5)->create();\n $organizations = factory(App\\Organization::class)->times(4)->create();\n\n foreach ($products as $oneProduct) {\n \t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->project()->associate($projects->random(1)->first()->id);\n \t\t\t\t$oneProduct->save();\n }\n foreach ($projects as $oneProject) {\n \t\t\t\t$oneProject->Organization()->associate($organizations->random(1)->first()->id);\n \t\t\t\t$oneProject->save();\n }\n foreach ($organizations as $oneONG) {\n $oneONG->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneONG->save();\n }\n foreach ($organizations as $oneONG) {\n $user = $oneONG->User->id;\n $ElUser = User::find($user);\n $ElUser->organization()->associate($oneONG->id);\n // $ElUser->organization_id = $oneONG->id;\n $ElUser->save();\n }\n }", "title": "" }, { "docid": "73d68c75e35031be9ad04679b3f01bbb", "score": "0.7776164", "text": "public function run()\n {\n // $faker init\n $faker = Factory::create();\n\n // Disable foreign key\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n // truncate users table and start fresh\n DB::table('users')->truncate();\n // Insert three users\n DB::table('users')->insert([\n [\n 'name' => 'Fares Kato',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jhon Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jane Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n\n ]);\n }", "title": "" }, { "docid": "9ccf154b9532504223396f096629de84", "score": "0.77724695", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 1)->create();\n factory(Business::class, 10)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "a876d481bffb816b3f928cdd2f048955", "score": "0.77708864", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate(); // bila tidak ingin menyimpan data tabel user saat generate seed\n DB::table('posts')->truncate(); // bila tidak ingin menyimpan data tabel post saat generate seed\n DB::table('authors')->truncate();\n\n User::factory(10)->create()->each(function($user){\n $user->posts()->save(Post::factory()->make());\n });\n }", "title": "" }, { "docid": "cb0cb2bf6e95ebc39e97de57dc88be67", "score": "0.77682835", "text": "public function run()\n {\n $faker = Faker::create();\n\n $data = array();\n foreach (range(1, 30) as $index)\n {\n $data[] = [\n 'title' => $faker->unique()->realText(40, 3),\n 'summary' => $faker->realText(300, 3),\n 'content' => '<p>'. $faker->realText(500, 3) .'</p>',\n 'is_hidden' => mt_rand(0, 1),\n 'read_num' => mt_rand(10, 1000),\n 'published_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'created_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'updated_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months')\n ];\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "2d7708bdf4209a991289a027ee4a826a", "score": "0.7767735", "text": "public function run()\n {\n // a way of seeding using set rather than random entries\n// Category::create([\n// 'slug' => 'personal',\n// 'name' => 'Personal'\n// ]);\n User::truncate();\n Category::truncate();\n Post::truncate();\n Comment::truncate();\n\n User::factory(2)->create();\n\n// User::factory(2)->create([\n// 'name' => 'Gay Lord'\n// ]);\n\n Category::factory(4)->create();\n Post::factory(10)->create();\n Comment::factory(30)->create();\n }", "title": "" }, { "docid": "e035961a57b8995e91904afa3ddca96a", "score": "0.77625465", "text": "public function run()\n {\n /*$this->call(RoleTableSeeder::class);\n $this->call(UsersTableSeeder::class);*/\n\n //factory(Category::class, 182)->create();\n factory(Tag::class, 182)->create();\n }", "title": "" }, { "docid": "ba2b70724958ce50610fe0a518ac2278", "score": "0.77595687", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $password = Hash::make('toptal');\n\n \\App\\User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \\App\\User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n }", "title": "" }, { "docid": "d98bd94d2928528bf0080703ee7ddf4e", "score": "0.77595174", "text": "public function run()\n {\n DB::table('users')->insert([\n \t'name'=> 'Andrius',\n \t'surname'=> 'Kamarauskas',\n \t'phone'=> '37064103803',\n \t'city'=> 'Vilnius',\n \t'car'=> 'Mercedes-Benz',\n \t'car_year'=> 2017,\n \t'email'=> '[email protected]',\n \t'password'=> bcrypt('inzinierius'),\n 'status' => 'admin',\n \t'rating' => 8.8\n ]);\n\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\t DB::table('users')->insert([\n\t 'name' => $faker->firstNameMale,\n\t 'surname' => $faker->lastName,\n\t 'phone' => rand(37061546100,37069546100),\n\t 'city' => $faker->city,\n\t 'car' => $faker->company,\n\t 'car_year' => rand(1980,2017),\n\t 'email' => $faker->email,\n\t 'password' => bcrypt('inzinierius'),\n\t 'rating' => rand(55, 99) / 10,\n\t ]);\n\t }\n }", "title": "" }, { "docid": "b1559fc256ac5c4b5c1045c0f0e8a8a4", "score": "0.7757995", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n \\App\\Models\\User::factory(500)->create();\n \\App\\Models\\Producto::factory(600)->create();\n \\App\\Models\\Pregunta::factory(1601)->create();\n \\App\\Models\\Comentario::factory(1514)->create();\n \\App\\Models\\Follower::factory(5000)->create();\n \\App\\Models\\Respuesta::factory(3401)->create();\n }", "title": "" }, { "docid": "acd8c5aa6a40c4d8772af72a60c15231", "score": "0.77574354", "text": "public function run()\n {\n \t$this->call(PersonSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(PostSeeder::class);\n /*--Con esto creo 10 usuarios y 3 posteos--\n factory(\\App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(\\App\\Post::class, 3)->make());\n });*/\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "aca60e38bfce5fae0fb865e4ccea4601", "score": "0.77563274", "text": "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n $authors = \\App\\Models\\Author::factory(8)->create();\n $categories = \\App\\Models\\Category::factory(5)->create();\n \n $books = \\App\\Models\\Book::factory(22)->create();\n\n $books->each(function(\\App\\Models\\Book $bk) use($authors) {\n $bk->authors()->attach(\n $authors->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n\n $books->each(function(\\App\\Models\\Book $bk) use($categories) {\n $bk->categories()->attach(\n $categories->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "d29f10984b7a9a2b2a29680ef7f29b48", "score": "0.775588", "text": "public function run()\n {\n DB::table('books')->delete();\n\n Book::create(array(\n 'title' => 'First Title',\n 'isbn' => \"4675455555555557\",\n 'price'=> '12.10',\n 'cover' => 'a.jpg',\n 'author_id' => 1\n ));\n\n Book::create(array(\n 'title' => 'Second Title',\n 'isbn' => \"555555557\",\n 'price'=> '16.10',\n 'cover' => 'b.jpg',\n 'author_id' => 2\n ));\n\n Book::create(array(\n 'title' => 'Third Title',\n 'isbn' => \"46754555\",\n 'price'=> '10.10',\n 'cover' => 'c.jpg',\n 'author_id' => 3\n ));\n }", "title": "" }, { "docid": "0c2ded42e9d0c10f029db7e3ed4b12d8", "score": "0.77556497", "text": "public function run()\n {\n Collaborator::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 Collaborator::create([\n 'Sector' => 'Administractive',\n 'full_name' => $faker->name,\n 'birth_date' => $faker->date('Y-m-d'),\n 'salary' => mt_rand(1500, 2000),\n 'status' => true,\n ]);\n }\n }", "title": "" }, { "docid": "00db072ab00cec4bd1725e29a0bb3cb7", "score": "0.7751737", "text": "public function run()\n {\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'remember_token' => null,\n ]\n );\n\n UserRole::create(\n [\n 'user_id' => $user->id,\n 'role_id' => AppHelper::USER_SUPERADMIN\n ]\n );\n\n }", "title": "" }, { "docid": "064f1e23710aabe50f7131210d3ee5a4", "score": "0.77514464", "text": "public function run()\n {\n \n factory(App\\Type::class, 80)->create(); \n factory(App\\Photo::class, 80)->create();\n factory(App\\Contenu::class, 40)->create(); \n $this->call(menuTableSeeder::class);\n $this->call(UserTableSeeder::class); \n $this->call(UserMenuTableSeeder::class);\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('contenus')->insert([\n 'titre'=> 'voici titre ' . $j ,\n 'prix'=> rand(1, 400),\n 'menu_id' => rand(1, 14),\n 'type_id' => $j,\n 'photo_id' => $j,\n ]);\n }\n }\n \n }", "title": "" }, { "docid": "1f0a50fa2842591d8fbae9ae56978f0b", "score": "0.7750377", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $this->call(RolesTableSeeder::class);\n\n // $faker = Faker::create('id_ID');\n\n // for ($i=0; $i < 10 ; $i++) { \n // DB::table('coba2')\n // ->insert([\n // 'nama'=>$faker->name\n // ]);\n // }\n }", "title": "" }, { "docid": "4958ed0abf866906c5d7a7246225bf5b", "score": "0.77496284", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(ProductoTableSeeder::class);\n factory('App\\Producto', 5)->create();\n factory('App\\Proveedor', 5)->create();\n factory('App\\Client', 5)->create();\n factory('App\\Mascota', 5)->create();\n }", "title": "" }, { "docid": "24b9c38dd60797bf8156ad42fe9fa447", "score": "0.7745141", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory( \\App\\User::class , 100 )->create();\n factory(\\App\\Post::class, 1500)->create();\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Image::class, 1500)->create();\n factory(\\App\\Comment::class, 2500)->create();\n factory(\\App\\Bid::class, 1500)->create();\n factory(\\App\\Report::class, 15)->create();\n\n }", "title": "" }, { "docid": "c493764ad5b414fc41be06adcd91283d", "score": "0.7744368", "text": "public function run()\n {\n $this->call(CategorySeeder::class);\n factory(\\App\\Models\\User::class,1)->create();\n factory(\\App\\Models\\Announcement::class,15)->create();\n\n }", "title": "" }, { "docid": "756e1e45f695ea39ad39e056034c1896", "score": "0.77388614", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class, 5)->create();\n factory(Terms::class, 3)->create();\n factory(Levels::class, 4)->create();\n factory(ClassType::class, 5)->create();\n factory(Classes::class, 6)->create();\n factory(Subject::class, 10)->create();\n }", "title": "" }, { "docid": "c01585794619650e65c31c6fc9573d03", "score": "0.77383953", "text": "public function run()\n {\n factory(User::class, 10)->create();\n\n factory(Post::class, 20)->create();\n\n factory(Comment::class, 20)->create();\n //\n // $this->call(CategoriesTableSeeder::class);\n // $this->call(BooksTableSeeder::class);\n }", "title": "" }, { "docid": "b43ea34f0172c41cb99daf105ded89cf", "score": "0.77383405", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n DB::table('empresa')\n ->insert([\n 'rif' => 'V123456789',\n 'razon_social' => 'Empresa de prueba, C.A',\n 'direccion' => 'Carupano',\n 'dias_utilidades' => 30,\n 'estatus' => 'activa'\n ]);\n\n DB::table('asignaciones')\n ->insert([\n 'he_diurnas' => 1.5,\n 'he_nocturnas' => 1.8,\n 'feriados' => 1.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('deducciones')\n ->insert([\n 'ivss' => 4,\n 'faov' => 1,\n 'paro_forzoso' => 0.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('cesta_ticket')\n ->insert([\n 'cantidad' => '1800',\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('salario_minimo')\n ->insert([\n 'monto' => 18000,\n 'tipo' => 'mensual',\n 'desde' => '01-01-2019',\n 'estatus' => 'activo'\n ]);\n }", "title": "" }, { "docid": "d5c75e93f0f8e33ad3dafaae89c3f7a2", "score": "0.7737602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n (new Train())->truncate();\n (new Schedule())->truncate();\n (new Country())->truncate();\n\n $trainData = [\n 'train_number' => '1'\n ];\n\n $scheduleData = [\n 'time_departure' => '12:00',\n 'time_arrival' => '14:00',\n 'id_train' => '1'\n ];\n\n $countryData = [\n 'country' => 'Dnepr'\n ];\n\n $train = App\\Train::create($trainData);\n\n $schedule = App\\Schedule::create($scheduleData);\n\n $country = App\\Country::create($countryData);\n }", "title": "" }, { "docid": "de69c5c7f3e24fa429ea61201ee8058d", "score": "0.7736333", "text": "public function run()\n {\n // Create a faker instance\n $faker = Faker::create();\n\n // For covering the users, we get the count from user model.\n // So that way the foreign key user_id won't give us any problems.\n\n Category::create(\n [\n 'name'=>'Abogado',\n 'description'=>'Todo lo relacionado a la ley',\n 'role_id'=>0,\n 'role'=>0\n\n ]\n );\n\n for ($i=0; $i < 40; $i++) {\n Category::create(\n [\n 'name'=>$faker->text(45),\n 'description'=>$faker->text(500),\n\t\t\t\t\t'role_id'=>0,\n\t\t\t\t\t'role'=>0\n\n ]\n );\n }\n }", "title": "" }, { "docid": "8a376d33104830ce6aa1e08f1eccb298", "score": "0.7736265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'username' => \"Alice\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Bob\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Professor\",\n 'role'=>\"lecturer\",\n 'user_session'=>0,\n ]);\n\n\n }", "title": "" }, { "docid": "3ac6186a7420c809b274788c1c9f0c6c", "score": "0.77233964", "text": "public function run()\n {\n \tSchema::disableForeignKeyConstraints();\n \tAd::truncate();\n \tSchema::enableForeignKeyConstraints();\n \t$faker = Faker::create();\n for ($i=0; $i < env('SEEDER_ITEM_LIMT'); $i++) { \n \t$title = \"My Test Advert - \".$i;\n \t$title = $title.\"-\".$i;\n \t$slug = \\Str::slug($title, '-');\n\t \tAd::insert([\n\t 'title' => $title,\n\t 'slugurl' => $slug,\n\t 'price' => mt_rand(10, 500),\n\t 'contactnumber' => mt_rand(12, 12),\n\t 'email' => \\Str::random(10, 20).$i.'@mail.com',\n\t 'description' => \"Grab this Christmas special before prices go up!\",\n\t 'category_id' => mt_rand(1,4),\n\t 'currency_id' => mt_rand(1,2),\n\t 'created_at' => \\Carbon\\Carbon::now(),\n\t ]);\n \t}\n }", "title": "" }, { "docid": "f3fac8bb5058ea57eef4e10aa6eee1b8", "score": "0.77152103", "text": "public function run()\n {\n $faker = Faker\\Factory::create('uk_UA');\n\n Doctor::create([\n 'user_id' => 1,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 5,\n 'is_active' => true,\n ]);\n\n Doctor::create([\n 'user_id' => 2,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 3,\n 'is_active' => true,\n ]);\n }", "title": "" }, { "docid": "969c4dd5fd7ea0964ba7c8d0fe24bf29", "score": "0.77092785", "text": "public function run()\n {\n factory(\\App\\Models\\Category::class, 50)->create();\n factory(\\App\\Models\\Tag::class, 50)->create();\n\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'administrator']);\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'user']);\n\n factory(\\App\\Models\\User::class, 50)->create()->each(function($u){\n $team = factory(\\App\\Models\\Team::class)->make();\n $u->own_team()->save($team);\n $u->teams()->save($team);\n $u->roles()->attach(\\App\\Models\\Role::all()->random()->id);\n $u->profile()->save(factory(\\App\\Models\\Profile::class)->make());\n $u->projects()->saveMany(factory(\\App\\Models\\Project::class, rand(3,10))->make())->each(function($p){\n $p->users()->attach(\\App\\Models\\User::all()->random()->id);\n $p->categories()->attach(\\App\\Models\\Category::all()->random()->id);\n $p->tags()->attach(\\App\\Models\\Tag::all()->random()->id);\n });\n $u->clients()->saveMany(factory(\\App\\Models\\Client::class,50)->make());\n });\n }", "title": "" }, { "docid": "045f6aee16de66fd4cb5b31782c1124f", "score": "0.7708508", "text": "public function run()\n {\n Model::unguard();\n // $this->call('UsersTableSeeder');\n factory('App\\PageType', 2)->create();\n factory('App\\OrderStatus', 5)->create();\n factory('App\\Category', 10)->create();\n factory('App\\CompensationPlan', 5)->create();\n factory('App\\Field', 30)->create();\n factory('App\\FindingLine', 30)->create();\n factory('App\\Heading', 200)->create();\n factory('App\\LocalForeign', 5)->create();\n factory('App\\AdType', 30)->create();\n factory('App\\PayPlan', 10)->create();\n factory('App\\PrimaryBook', 50)->create();\n factory('App\\SalesRep', 20)->create();\n factory('App\\SourceBook', 250)->create();\n factory('App\\Udac', 250)->create();\n factory('App\\Customer', 500)->create();\n factory('App\\Order', 500)->create();\n factory('App\\OrderLine', 2000)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "b9ff2268495aff5817159bd76ba8023c", "score": "0.7705018", "text": "public function run()\n {\n //adds the category lists\n $this->call(CategorySeeder::class);\n\n //adds 15 companies (entidades) for testing\n factory(\\App\\Company::class, 15)->create();\n\n //adds 3 accounts for testing\n factory(\\App\\Account::class, 3)->create();\n\n //adds 50 transactions for testing\n factory(\\App\\Transaction::class, 100)->create();\n }", "title": "" }, { "docid": "749d8b2282722f907beee85a97ad43ae", "score": "0.7703396", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $user = factory(User::class)->create([\n 'name' => 'Amitav Office',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 10);\n\n $user = factory(User::class)->create([\n 'name' => 'Amitav Personal',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 4);\n }", "title": "" }, { "docid": "f562a75a25e951d5d5b616b128f2a23d", "score": "0.77031195", "text": "public function run()\n { \n \n // $this->call(UsersTableSeeder::class);\n\n // temporarily disables mass assignment protection for our tables, needed to seed from .sql files.\n \tEloquent::unguard();\n\n \t// seed the locations table\n \t$locations_path = 'sql/locations.sql';\n \tDB::unprepared(file_get_contents($locations_path));\n $this->command->info('Locations table seeded!');\n\n // seed the happy_hours table\n $happy_hours_path = 'sql/happy_hours.sql';\n DB::unprepared(file_get_contents($happy_hours_path));\n $this->command->info('Happy Hours table seeded!');\n\n // seed the roles table.\n $roles_path = 'sql/roles.sql';\n DB::unprepared(file_get_contents($roles_path));\n $this->command->info('Roles table seeded!');\n }", "title": "" }, { "docid": "11f6e7c2dabe7122d9342081e225136f", "score": "0.7699845", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(CategoriaSeeder::class);\n $this->call(InvitadoSeeder::class);\n $this->call(RegaloSeeder::class);\n $this->call(UserSeeder::class);\n Evento::factory(50)->create();\n $this->call(RegistroSeeder::class);\n }", "title": "" }, { "docid": "7ccfa8092296c64ec8e74b65a7ffadc8", "score": "0.7695215", "text": "public function run()\n {\n DB::table('users')->truncate();\n DB::table('suppliers')->truncate();\n DB::table('categories')->truncate();\n DB::table('vendors')->truncate();\n DB::table('products')->truncate();\n\n // $this->call(UsersTableSeeder::class);\n factory(Supplier::class, 50)->create();\n factory(Category::class, 20)->create();\n factory(User::class, 50)->create();\n factory(Vendor::class, 50)->create()->each(static function($v) {\n $v->products()->saveMany(factory(Product::class, rand(1,10))->make());\n });\n }", "title": "" }, { "docid": "acca81c2cdc382edc11610c07dd17bdb", "score": "0.7694645", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n \n\n\n DB::table('categories')->truncate(); \n DB::table('categories')->insert(\n ['name' => 'Clothing'],\n );\n DB::table('categories')->insert(\n ['name' => 'Footwear'],\n );\n DB::table('categories')->insert(\n ['name' => 'Beauty'],\n );\n DB::table('categories')->insert(\n ['name' => 'Cars'],\n );\n DB::table('categories')->insert(\n ['name' => 'Mobile technology'],\n );\n DB::table('categories')->insert(\n ['name' => 'Animals'],\n );\n DB::table('categories')->insert(\n ['name' => 'Sports'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Technology'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Specify'],\n );\n\n\n \n \t \n }", "title": "" }, { "docid": "0d3fa3d1d24b4594f3e479d62e2be438", "score": "0.76877815", "text": "public function run()\n {\n //Static seed for Categories table\n\n Category::create(\n [\n 'name' => 'Controllo Access',\n 'description' => 'Sistemi di controlo accessi integrati'\n ]);\n Category::create(\n [\n 'name' => 'TVCC',\n 'description' => 'Realizzaione sistemi di TVCC'\n ]);\n Category::create(\n [\n 'name' => 'Fornitura e configurazione',\n 'description' => 'Fornitura di apparati configurati'\n ]);\n Category::create(\n [\n 'name' => 'Consulenza',\n 'description' => 'Consulenza Tecnica'\n ]);\n }", "title": "" }, { "docid": "b87cc0dffbf57617ce6dfdb861f468e0", "score": "0.7686323", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //Desativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n\n //Executo as factories\n dump(factory(\"App\\\\Models\\\\Aluguel\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Ator\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Categorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cidade\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cliente\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Endereco\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Filme\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeAtor\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeCategorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeTexto\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Funcionario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Idioma\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Inventario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Loja\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pagamento\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pai\", 2)->create()->toJson());\n\n //Ativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "title": "" }, { "docid": "ad87f4a74146c171f1e42a1d771bd24e", "score": "0.76850647", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\ProductCategory::class, 10)->create();\n factory(App\\ProductSize::class, 10)->create();\n factory(App\\ProductColor::class, 10)->create();\n factory(App\\Product::class, 50)->create()->each(function($product) {\n $product->images()->saveMany(factory(App\\ProductImage::class, 5)->make());\n });\n }", "title": "" }, { "docid": "068a939918fda33f9082cfedcea0988f", "score": "0.7684781", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n\n $models = factory(Model::class )->times(self::GENERATE_NUMBER)->make()->each(function ($model){\n $model->mmid = generate_mmid();\n $model->price = rand(1000 , 9999) / 100;\n $model->download = rand(10 , 999);\n $model->fav = rand(10 , 999);\n $model->view = rand(10 , 999);\n $model->polygons = rand(10 , 999);\n $model->vertices = rand(10 , 999);\n $model->textures = mt_rand(1,2);\n $model->materials = mt_rand(1,2);\n $model->rigged = mt_rand(1,2);\n $model->animated = mt_rand(1,2);\n $model->printable_ready_3d = mt_rand(1,2);\n $model->game_ready = mt_rand(1,2);\n $model->uv_mapped = mt_rand(1,2);\n $model->created_at = \\Carbon\\Carbon::now();\n $model->updated_at = \\Carbon\\Carbon::now();\n\n });\n\n Model::insert($models->toArray());\n }", "title": "" }, { "docid": "bdf30ecf76a15345de09c1ece359c2df", "score": "0.76804036", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Desigination::class, 5)->create();\n factory(Department::class, 5)->create();\n factory(User::class, 10)->create();\n }", "title": "" }, { "docid": "b31fbf2926f8429938cfe290400a6c2f", "score": "0.7674838", "text": "public function run()\n {\n\n Storage::deleteDirectory('menu');\n Storage::makeDirectory('menu');\n\n Category::factory(5)->create();\n $this->call(UserSeeder::class);\n Client::factory(10)->create();\n Role::factory(8)->create();\n State::factory(9)->create();\n $this->call(MenuSeeder::class);\n $this->call(OrderSeeder::class);\n }", "title": "" }, { "docid": "07ea31818e19b1faf98dd1b38d81ebcb", "score": "0.7672805", "text": "public function run()\n {\n Candidate::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 Candidate::create([\n 'firstName' => $faker->firstName,\n 'lastName' => $faker->lastName,\n 'phone' => $faker->phoneNumber,\n 'email'=> $faker->email,\n 'linkCv' => $faker->url,\n 'origin' => rand(1,3),\n 'position'=> rand(1,3),\n 'status'=> rand(0,1),\n ]);\n }\n }", "title": "" }, { "docid": "6b5f957c69605b7e58e0f80311a997a8", "score": "0.7667893", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n $animals = [];\n for ($i = 0; $i < 20; $i++) {\n $animals[] = [\n 'name' => $faker->firstName,\n 'species' => $faker->randomElement($array = array (1, 2)),\n 'breed' => $faker->lastName,\n 'sex' => $faker->randomElement($array = array (1, 2)),\n 'age' => $faker->randomNumber(2),\n 'notes' => $faker->sentence,\n 'contacts' => $faker->phoneNumber,\n 'main_foto' => $faker->imageUrl(500, 500, 'cats'),\n 'published' => 1,\n ];\n }\n DB::table('animals')->insert($animals);\n }", "title": "" }, { "docid": "7c9bdd789d5f65269e40b2e2f526a8ab", "score": "0.7663764", "text": "public function run()\n {\n // $this->call(RolesAndPermissionsSeeder::class);\n // factory(App\\Model\\Place::class, 15)->create();\n // factory(App\\Model\\Scenic_Culture::class, 30)->create();\n // factory(App\\Model\\Promotion::class, 20)->create();\n // factory(App\\Model\\TourGuider::class, 30)->create();\n // factory(App\\Model\\Schedule::class, 5)->create();\n // factory(App\\Model\\Review::class, 30)->create();\n factory(App\\Model\\News::class, 15)->create();\n // factory(App\\Model\\Tour::class, 15)->create();\n\n }", "title": "" }, { "docid": "1a1406408dd87b056312265f6b8605cc", "score": "0.7663735", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //\n\n// factory(App\\User::class, 80)->create();\n factory(App\\Client::class, 5)->create();\n factory(App\\Contact::class, 20)->create()->each(function ($contact) {\n App\\Client::all()->random()->contacts()->attach($contact);\n });\n factory(App\\Task::class, 5)->create();\n factory(App\\BillablePurchaseOrder::class, 20)->create();\n factory(App\\NonBillablePurchaseOrder::class, 20)->create();\n // factory(App\\Category::class, 8)->create();\n // factory(App\\Dispatch::class, 500)->create();\n // factory(App\\Item::class, 1000)->create()->each(function ($item) {\n // App\\Dispatch::dispatch()->get()->random()->items()->attach($item);\n // });\n }", "title": "" }, { "docid": "dafd840dc1f11c0cbdd36e194644c7a8", "score": "0.7662661", "text": "public function run()\n {\n //$this->call('UsersTableSeeder');\n $faker = Faker\\Factory::create();\n\n for( $i = 0; $i < 10; $i++ ) {\n \tDB::table('books')->insert([\n\t 'title' => $faker->title,\n\t 'author' => $faker->name,\n\t 'isbn' => $faker->isbn10,\n\t ]);\n }\n }", "title": "" }, { "docid": "831749eecbd9350d2739ac1b2536d247", "score": "0.76618975", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Blog::truncate();\n Category::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = ['Pendidikan','Pengetahuan', 'Sosial','Umum'];\n foreach($categories as $cat){\n Category::create(['name'=>$cat]);\n }\n\n $faker = Faker::create('id_ID');\n $category_id = Category::all()->pluck('id');\n $user_id = User::all()->pluck('id');\n for($i=0;$i<15;$i++){\n Blog::create([\n 'category_id'=>$category_id->random(),\n 'title'=>$faker->sentence(10),\n 'banner'=>'banner'.rand(1,5).'.png',\n 'content'=>implode('<br><br>',$faker->paragraphs),\n 'user_id'=>$user_id->random(),\n 'status'=>'accepted'\n ]);\n }\n }", "title": "" }, { "docid": "0969356d2e9fdf8b6e6080a629d07215", "score": "0.7657977", "text": "public function run()\n {\n $this->call([\n RolesSeeder::class,\n CategoriesSeeder::class,\n FilesSeeder::class\n ]);\n Country::factory()->count(10)->create();\n User::factory()->count(10)->create();\n Category::factory()->count(20)->create();\n Product::factory()->hasAttached(File::factory()->count(5)->create(),[], 'images')->count(30)->create();\n Order::factory()->has(Product::factory()->count(2))->count(20)->create();\n Newsletter::factory()->count(12)->create();\n Promotion::factory()->has(Product::factory()->count(2));\n }", "title": "" }, { "docid": "6a627f470c7a9c5cbcb294efa94e3dbe", "score": "0.76559", "text": "public function run()\n {\n //factory(App\\Book::class, 200)->create();\n $faker = Faker::create();\n \n foreach(range(1, 200) as $x)\n {\n \t$book = Book::create([\n \t\t'name' => $faker->name,\n \t\t'author' => $faker->name,\n \t\t'publishedDate' => $faker->date,\n \t]);\n\n \tforeach(range(1, mt_rand(2, 4)) as $y)\n \t{\n \t\t$book->categories()->attach(Category::all()->random()->id);\n \t}\n }\n }", "title": "" }, { "docid": "05177be6524fe4d70cf88eb80b07f0f9", "score": "0.76558113", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionTableSeeder::class);\n \n $this->call(CreateAdminUserSeeder::class);\n\n \n factory(App\\User::class,1)->create();\n factory(App\\Models\\Category::class,1)->create();\n factory(App\\Models\\Brand::class,1)->create();\n factory(App\\Models\\Subcategory::class,1)->create();\n factory(App\\Models\\Product::class,10)->create();\n factory(App\\Models\\Color::class,1)->create();\n factory(App\\Models\\Size::class,1)->create();\n }", "title": "" }, { "docid": "b07e760db9234bd6822f6d81a39f753f", "score": "0.76546866", "text": "public function run()\n {\n $this->seeds([\n KlasifikasiPenyakit::class => ['master/penyakit/klasifikasi_penyakit.csv', 22],\n KelompokPenyakit::class => ['master/penyakit/kelompok_penyakit.csv', 537],\n Penyakit::class => ['master/penyakit/penyakit.csv', 13309],\n ]);\n }", "title": "" }, { "docid": "7faf74d1087f03f60414bc0fbbc49004", "score": "0.76546746", "text": "public function run()\n {\n //\n\n// Students::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('de_DE');\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Students::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'registration_number' => $faker->numberBetween(0, 99999),\n 'starting_course' => ( $faker->numberBetween(0, 1) == 0 ) ? 'MPP' : 'FPP'\n ]);\n }\n }", "title": "" }, { "docid": "9a0aab2ba333b8672b30964e15cc6493", "score": "0.76514786", "text": "public function run()\n {\n //使用DB方式\n /*DB::table('users')->insert([\n 'name' => str_random(10),\n 'email' => str_random(10).'@gmail.com',\n 'password' => bcrypt('secret'),\n ]);*/\n\n //使用模型工厂\n /*factory(App\\Model\\Role::class, 50)->create()->each(function ($u) {\n $u->posts()->save(factory(App\\Post::class)->make()); //模型关联插入\n });*/\n\n factory(App\\Model\\Role::class, 5)->create();\n //执行命令 php artisan db:seed --class=RolesSeeder\n }", "title": "" }, { "docid": "05857a6ff127b2c1e1f9f0bcb8aa242c", "score": "0.76498", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'admin'],\n ['name' => 'youke',\n 'email' => '[email protected]',\n 'password' => 'youke'],\n ]);\n\n DB::table('menus')->insert([\n ['name'=>'skill','url'=>'/admin'],\n ['name'=>'portfolio','url'=>'/admin'],\n ['name'=>'education','url'=>'/admin'],\n ['name'=>'work','url'=>'/admin'],\n ['name'=>'菜单列表','url'=>'/admin/menu/index'],\n ]);\n }", "title": "" }, { "docid": "e4f4934df5701d0ca97044ef7d5c2079", "score": "0.7649058", "text": "public function run()\n {\n // clear our database ------------------------------------------\n DB::table('users')->delete();\n \n\n $first_user = User::create(array(\n 'name' => 'Muhammad Nauman',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ));\n\n \n \n $this->command->info('Users are seeded!');\n \n // now seed the departments\n DB::table('department')->delete();\n \n\n $first_dpt = Department::create(array(\n 'department_name' => 'Computer Science',\n 'contact' => '0313',\n 'status' => 'Active',\n 'hod_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n ));\n \n $this->command->info('Department are seeded!');\n \n // now seed the programs\n DB::table('programs_offered')->delete();\n \n\n $first_program = ProgramOffered::create(array(\n 'program_name' => 'BSCS',\n 'duration' => '4',\n 'code' =>'BS',\n 'status' => 'Active',\n 'incharge_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n 'department_id' => $first_dpt->id,\n ));\n $this->command->info('Program are seeded!');\n \n }", "title": "" }, { "docid": "d7ebe12cdf5432aa34add67af7be50b3", "score": "0.76487887", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Species($faker));\n foreach(range(0,7) as $i){\n DB::table('plants')->insert([\n 'name' => $faker->plant,\n 'description' => $faker->sentence(20,true),\n 'price' => $faker->randomNumber(6),\n 'rate' => $faker->randomFloat(NULL,0,5),\n 'types' => 'popular',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }\n }", "title": "" }, { "docid": "c73b07e08ed90eb5b38fd5ee302292bc", "score": "0.7647306", "text": "public function run()\n {\n /*\n * Calling the seeds in the following order ensures that foreign key \n * constraints are not violated\n */\n factory(App\\Hostel::class, 1)->create(); //add 10 hostels\n factory(App\\AuthorizationLevel::class, 1)->create(); //add 3 auth levels\n DB::table('complaints_status')->insert(array(\n array('name'=>'submitted','message'=>'Your complaint has been submitted','is_viewable'=>true, 'is_editable'=>true, 'is_creatable'=>true, 'is_deletable'=>true),\n array('name'=>'in progress','message'=>'Your complaint is in progress','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false),\n array('name'=>'completed','message'=>'Your complaint has been completed','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false))); \n \n /*Submitted, In progress, completed*/\n }", "title": "" }, { "docid": "18fd1caf8ca6a7017a4b6b4067046cb1", "score": "0.7647273", "text": "public function run()\n {\n $this->call(AdminSeeder::class);\n $this->call(SuperAdminRoleseeder::class);\n $this->call(ProductCategorySeeder::class);\n $this->call(ProductColorSeeder::class);\n $this->call(ProductTagSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(ProductSizeSeeder::class);\n\n factory(\\App\\User::class,10)->create();\n factory(\\App\\Tag::class,5)->create();\n factory(\\App\\Post::class,10)->create()->each(function ($post){\n return $post->like()->save(factory(\\App\\Like::class)->make());\n });\n factory(\\App\\Comment::class,50)->create();\n\n }", "title": "" }, { "docid": "e962f279a1dbddfaa2db67cf48a15f39", "score": "0.76464486", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\"name\" => \"Administrador\"]);\n Role::create([\"name\" => \"Común\"]);\n User::create([\n \"name\" => \"4dm1n\",\n \"email\" => \"[email protected]\",\n \"role_id\" => 1,\n \"password\" => bcrypt(\"Pollo\")\n ]);\n }", "title": "" }, { "docid": "3754b8504d32198111105ff3083d9046", "score": "0.76400363", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('grades')->truncate();\n DB::table('teachers')->truncate();\n DB::table('lessons')->truncate();\n DB::table('students')->truncate();\n DB::table('marks')->truncate();\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Grade::factory(5)->create();\n Teacher::factory(5)->create();\n Lesson::factory(4)->create();\n Student::factory(10)->create();\n Mark::factory(20)->create();\n\n User::factory(3)->state(new Sequence(\n [\n 'name' => 'Nicolas',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Alexis',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Karine',\n 'email' => '[email protected]',\n ],\n ))->create();\n }", "title": "" }, { "docid": "8e6adf883c596121b0906ea06e5abf6c", "score": "0.76395786", "text": "public function run()\n {\n $faker = Faker::create();\n $categories = Category::pluck('id')->all();\n $roles = Role::pluck('id')->all();\n foreach (range(1,20) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->safeEmail,\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'biography' => $faker->paragraph,\n 'password' => $faker->password,\n 'category_id' => $faker->randomElement($categories),\n 'role_id' => $faker->randomElement($roles),\n 'birth' => $faker->date,\n 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "b063def35fe79f7a0710248af466f402", "score": "0.76395", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $article = DB::table('articles');\n\n $article->truncate();\n\n for($i = 0; $i < 100; $i++){\n $title = $faker->sentence;\n\n $article->insert([\n 'title' => $title,\n 'slug' => str_slug($title),\n 'short_description' => $faker->realText(500),\n 'description' => $faker->realText(10000),\n 'created_at' => $faker->dateTimeBetween(),\n 'updated_at' => $faker->dateTimeBetween(),\n ]);\n }\n }", "title": "" }, { "docid": "b3e9a647fe40c3c7848b4498aaefaeb3", "score": "0.76392335", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES_DETAILS')->delete();\n $data = [];\n foreach (range(1, 100) as $value) {\n foreach (range(1, 5) as $value_v) {\n $data[] = [\n 'sales_id' => $value,\n 'product_id' => $value_v,\n 'price' => 400\n ];\n }\n }\n DB::table('MST_SALES_DETAILS')->insert($data);\n }", "title": "" }, { "docid": "3b722497c87d9f24b84a12a29c4abd9f", "score": "0.76390076", "text": "public function run()\n {\n\n // $this->call(UserTableSeeder::class);\n\n // App\\User::create([\n // 'name'=>'tester',\n // 'email'=>'[email protected]',\n // 'password'=>bcrypt('secret')\n // ]);\n\n $severities = [\n [\n 'rating' => 1,\n 'description' => 'easy walk',\n ],\n [\n 'rating' => 2,\n 'description' => 'moderate walk',\n ],\n [\n 'rating' => 3,\n 'description' => 'strenuous walk',\n ],\n [\n 'rating' => 4,\n 'description' => 'very strenuous walk',\n ]\n ];\n\n $exposures = [\n [\n 'rating' => '1',\n 'description' => 'no exposure to heights',\n ],\n [\n 'rating' => '2',\n 'description' => 'mild exposure to heights',\n ],\n [\n 'rating' => '3',\n 'description' => 'moderate exposure to heights',\n ],\n [\n 'rating' => '4',\n 'description' => 'extreme exposure to heights',\n ]\n ];\n\n DB::table('severities')->delete();\n foreach ($severities as $severity) {\n DB::table('severities')->insert($severity);\n }\n\n DB::table('exposures')->delete();\n foreach ($exposures as $exposure) {\n DB::table('exposures')->insert($exposure);\n }\n\n if (!$severities = DB::table('severities')->select('id')->get()) {\n exit('There are no severities in the db.');\n }\n\n if (!$exposures = DB::table('exposures')->select('id')->get()) {\n exit('There are no exposures in the db.');\n }\n\n $severity_ids = [];\n foreach ($severities as $s) {\n $severity_ids[] = $s->id;\n }\n\n $exposure_ids = [];\n foreach ($exposures as $e) {\n $exposure_ids[] = $e->id;\n }\n\n $trails = [\n [\n 'name' => 'Skeleton Gorge',\n 'description' => 'strenuous shady trail, that leads to a dam',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-09 22:14:06',\n ],\n [\n 'name' => 'Contour Path',\n 'description' => 'very long level path that goes almost around the table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-07-10 10:16:11',\n ],\n [\n 'name' => 'Pipe Track',\n 'description' => 'easy trail with historical water pipes.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-06 13:04:06',\n ],\n [\n 'name' => 'platteklip gorge',\n 'description' => 'steep trail up the face of table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-02-28 16:10:06',\n ],\n [\n 'name' => 'kasteels poort',\n 'description' => 'goes from the pipe track up to the twelve apostles',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'table mountain road',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'tokai forest',\n 'description' => 'walk under the trees',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'muizenberg peak',\n 'description' => 'ajofda owerij pasofk ewfjolefakfdj oa fej, asldfj',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-05-22 19:01:38',\n ],\n [\n 'name' => 'sIlvermines',\n 'description' => 'o accessused t plowerf the mountain by carts oar',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'newlands Ravine',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2014-12-31 23:59:59',\n ],\n [\n 'name' => 'the saddle',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-06-10 00:14:06',\n ],\n [\n 'name' => 'cable car',\n 'description' => 'fsadofewm fpaofk epwfkpwef faehg kuylo ',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'hely hutchinson dam',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'old dogs trail',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-10-16 15:14:06',\n ],\n [\n 'name' => '1234 32432 afasdfsa',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-08-19 22:14:06',\n ],\n [\n 'name' => 'pfasdf 99',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n ];\n\n DB::table('trails')->delete();\n foreach ($trails as $trail) {\n DB::table('trails')->insert($trail);\n }\n\n $trails = DB::table('trails')->select('id')->get();\n\n $trail_ids = [];\n foreach ($trails as $trail) {\n $trail_ids[] = $trail->id;\n }\n\n $count = count($trail_ids);\n\n $hikes = [\n [\n 'title' => 'newlands forest to the blockhouse',\n 'description' => 'Hike from newlands forest to the King\\'s Blockhouse.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('newlands forest to the blockhouse'),\n ],\n [\n 'title' => 'cecilia forest to hely hutchinson dam via skeleton gorge',\n 'description' => 'A steep climb up skeleton gorge to hely hutchinson dam and back down via nursery ravine',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('cecilia forest to hely hutchinson dam via skeleton gorge'),\n ],\n [\n 'title' => 'Rhodes Memorial to Woodstock Cave',\n 'description' => 'A nice hike from Rhodes Mem to Woodstock Cave.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Rhodes Memorial to Woodstock Cave'),\n ],\n [\n 'title' => 'Twelve Apostles',\n 'description' => 'A very long hike.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Twelve Apostles'),\n ],\n ];\n\n DB::table('hikes')->delete();\n DB::table('hike_trail')->delete();\n foreach ($hikes as $hike) {\n $id = DB::table('hikes')->insertGetId($hike);\n $number_of_trails_to_add = rand(0, $count);\n\n $i = 0;\n $used_trail_ids = [];\n while($number_of_trails_to_add >= $i) {\n\n while(in_array($trail_id = rand(0, ($count - 1)), $used_trail_ids)) {\n continue;\n }\n\n $used_trail_ids[] = $trail_id;\n $hike_trail = [\n 'hike_id' => $id,\n 'trail_id' => $trail_ids[$trail_id],\n ];\n DB::table('hike_trail')->insert($hike_trail);\n $i++;\n }\n\n }\n\n\n }", "title": "" }, { "docid": "154cba18dfdeb8c4ad5a965ced753dd9", "score": "0.76387894", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,25) as $value) {\n DB::table('posts')->insert([\n 'title' => $faker->title(),\n 'image' => $faker->imageUrl('public/storage/images', 640, 480, null, false),\n 'description' => $faker->text(),\n 'category_id' => rand(1,5),\n 'user_id' => rand(1,15),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n }", "title": "" }, { "docid": "2484f545498eece99a69d15fb3058fc2", "score": "0.76387566", "text": "public function run()\n {\n // Create fixed statuses\n foreach (array('hotovo', 'rozpracované', 'v poradí') as $status) {\n DB::table('statuses')->insert([\n 'name' => $status,\n ]);\n };\n\n $this->call([\n UsersTableSeeder::class,\n GrantsTableSeeder::class,\n SolventsTableSeeder::class,\n SpectrometersTableSeeder::class,\n LabsTableSeeder::class,\n AnalysesTableSeeder::class,\n SamplesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "db33a8329f4133fb77121f041bfcf078", "score": "0.7637611", "text": "public function run()\n\t{\n\t\tDB::table('users')->delete();\n\n\t\t$faker = Faker\\Factory::create();\n\t\t\n\t\t$seeds = array(\n\t\t\tarray(\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'admin',\n\t\t\t\t'slug' => 'admin',\n\t\t\t\t'first_name' => 'John',\n\t\t\t\t'last_name' => 'Doe',\n\t\t\t\t'location' => 'Anytown, USA',\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'username',\n\t\t\t\t'slug' => 'username',\n\t\t\t\t'first_name' => $faker->firstName,\n\t\t\t\t'last_name' => $faker->lastName,\n\t\t\t\t'location' => $faker->city . ', ' . $faker->country,\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => false\n\t\t\t)\n\t\t);\n\n\t\tDB::table('users')->insert($seeds);\n\n\t\t$users = factory(App\\User::class, 8)->create();\n }", "title": "" }, { "docid": "a94882201bbeb65b0ddb261fe6987a0a", "score": "0.76362485", "text": "public function run()\n { \n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 2\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret'),\n 'role' => 1\n ]);\n User::create([\n 'name' => 'Infinety Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'role' => 1\n ]);\n // \\App\\Models\\User::factory(10)->create();\n Categorias::factory(20)->create();\n Productos::factory(100)->create();\n }", "title": "" }, { "docid": "d63961b4949c2a17bd2ffc48673c0ad3", "score": "0.763493", "text": "public function run()\n {\n factory(App\\User::class, 50)->create();\n\n factory(App\\Team::class, 10)->create();\n\n App\\Role::insert([\n ['id' => 1, 'title' => 'developer'],\n ['id' => 2, 'title' => 'junior developer'],\n ['id' => 3, 'title' => 'quality assurance'],\n ['id' => 4, 'title' => 'project manager'],\n ['id' => 5, 'title' => 'team leader']\n ]);\n }", "title": "" }, { "docid": "4ae83842aaa0c70b457171306e60ba4a", "score": "0.7630802", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user=factory(\\App\\User::class)->create();\n factory(\\App\\Course::class,6)->create(['user_id'=>$user->id])->each(function($course){\n factory(\\App\\Episode::class,rand(5,20))->make()->each(function($episode,$key) use ($course){\n $episode->number=$key+1;\n $course->episodes()->save($episode);\n });\n });\n }", "title": "" }, { "docid": "09a6cf87bc1f7ee46aa35dd6a863c3f3", "score": "0.7628901", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n DB::table('companies')->insert([\n 'ar_name' => 'نبذة تعريفية عن الشركة',\n 'ar_profile' => 'نبذة',\n 'en_name' => 'A brief about the company',\n 'en_profile' => 'Details',\n 'projectSuccessful' => '1',\n 'yearsOfExperienced' => '2',\n 'professionalExpert' => '3',\n 'happyCustomers' => '4',\n ]);\n factory(\\App\\User::class, 1)->create();\n factory(\\App\\Account::class, 1)->create();\n factory(\\App\\Affair::class, 1)->create();\n factory(\\App\\System::class, 1)->create();\n factory(\\App\\Pharmacy::class, 1)->create();\n factory(\\App\\Support::class, 1)->create();\n // $this->call(CompaniesSeeder::class);\n }", "title": "" }, { "docid": "576a34543681e3fe684e1e40febacb80", "score": "0.7628569", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // $user = \\App\\Models\\User::factory()\n // ->has(\\App\\Models\\Article::factory()->count(10))\n // ->create();\n\n $posts = Article::factory()\n ->count(10)\n ->for(User::factory()->state([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]))\n ->create();\n\n // \\App\\Models\\Article::factory(10)->create();\n \\App\\Models\\Tag::factory(20)->create();\n $tags = Tag::all();\n Article::all()->each(function ($article) use ($tags) { \n $article->tags()->attach(\n $tags->random(rand(1, 3))->pluck('id')->toArray()); \n });\n }", "title": "" }, { "docid": "d2507ab89d2d83f52c957a1a22b5f496", "score": "0.76283425", "text": "public function run()\n {\n $faker = Factory::create();\n\n GrupoEquipo::truncate();\n Equipo::truncate();\n\n foreach(range(1, 5) as $i) {\n GrupoEquipo::create([\n 'zona_id' => $i,\n 'name' => $faker->unique()->name,\n 'description' => $faker->paragraph\n ]);\n foreach(range(1, 10) as $i) {\n Equipo::create([\n 'grupo_equipo_id' => mt_rand(1, 5),\n 'name' => $faker->unique()->name,\n 'marca' => $faker->name,\n 'tipo' => $faker->name,\n 'tarifa' => $faker->randomFloat($nbMaxDecimals = 5, $min = 0, $max = 400)\n ]);\n }\n }\n }", "title": "" }, { "docid": "0ec002cddee037e0013565674e9189ca", "score": "0.76273686", "text": "public function run()\n {\n $this->call([\n BlogStatusSeeder::class,\n CategorySeeder::class,\n SiteConfigSeeder::class,\n ]);\n User::factory(1)->create();\n\n Blog::factory(100)->create();\n\n BlogView::factory(200)->create();\n\n BlogComment::factory(200)->create();\n\n ContactMessage::factory(15)->create();\n }", "title": "" }, { "docid": "3c41de562e9a6d240427b1bd3d7ddd73", "score": "0.76248515", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Master User',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n $faker = Faker\\Factory::create();\n\n \tfor ($i=0; $i < 9; $i++) { \n\t \tDB::table('posts')->insert([\n\t 'title' => $faker->sentence($nbWords = 4, $variableNbWords = true) , \n\t 'body' => $faker->text,\n\t 'created_at' => date(\"Y-m-d h:i:s\"),\n\t 'updated_at' => date(\"Y-m-d h:i:s\"),\n\t 'author' => 'Master User',\n\t 'thumbnail' => 'blog_pic.png',\n\t 'user_id' => 1\n\t ]);\n\n \t}\n }", "title": "" }, { "docid": "fb3e6d03992e991fc3469db9d336e1d0", "score": "0.7623802", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n for ($i = 1; $i <= 20; $i++) {\n Fruit::create([\n 'nom' => $faker->name,\n 'pays_origin' => $faker->name,\n 'price' => mt_rand(1, 1000)\n ]);\n }\n }", "title": "" } ]
e7ad2cd21d3a075b675ba32a6eccdefe
Make sure all versions of the povided file are stored in the correct asset store.
[ { "docid": "c60000adfe3d08d2f6a1d02441417ab8", "score": "0.0", "text": "public function fix(File $file)\n {\n $success = true;\n $actions = $this->needToMove($file);\n\n // Make sure restricted live files are protected\n if (isset($actions[Versioned::LIVE]) && $actions[Versioned::LIVE] === AssetStore::VISIBILITY_PROTECTED) {\n $liveFile = $this->getLive($file);\n $this->markFolderForTruncating($liveFile);\n if ($liveFile) {\n $liveFile->protectFile();\n $this->info(sprintf('Protected live file %s', $liveFile->getFilename()));\n } else {\n $message = sprintf('Could not protected live file %s', $file->getFilename());\n $success = false;\n $this->error($message);\n $this->errors[] = $message;\n }\n }\n\n // Make sure draft files are protected\n if (isset($actions[Versioned::DRAFT]) && $actions[Versioned::DRAFT] === AssetStore::VISIBILITY_PROTECTED) {\n $this->markFolderForTruncating($file);\n $file->protectFile();\n $this->info(sprintf('Protected draft file %s', $file->getFilename()));\n }\n\n // Make sure unrestricted live files are public\n if (isset($actions[Versioned::LIVE]) && $actions[Versioned::LIVE] === AssetStore::VISIBILITY_PUBLIC) {\n $liveFile = $this->getLive($file);\n if ($liveFile) {\n $liveFile->publishFile();\n $this->info(sprintf('Published live file %s', $liveFile->getFilename()));\n } else {\n $message = sprintf('Could not published live file %s', $file->getFilename());\n $this->error($message);\n $success = false;\n $this->errors[] = $message;\n }\n }\n\n return $success;\n }", "title": "" } ]
[ { "docid": "579e1e04d59fe6849a3afaedc6f3aca8", "score": "0.5899773", "text": "public function onBeforeWrite() {\n\t\t$this->owner->setField('Filename', 'assets/' . $this->owner->generateFilename());\n\t}", "title": "" }, { "docid": "4252bd72e288648e2eed4266dfbd9b11", "score": "0.5723811", "text": "function theme_asset_version($file)\n{\n $file = get_template_directory() . '/assets/optimised/' . $file;\n\n if (true === file_exists($file)) {\n return hash_file('md5', $file);\n } else {\n return;\n }\n}", "title": "" }, { "docid": "b6416e06b0376be2ad0cf12a56c2dfac", "score": "0.56019896", "text": "public function makeBundleFiles()\n {\n if (!empty($this->type)) {\n $assetFilePath = config(\"presets.asset_file_path\");\n\n foreach ($this->bundles as $bundle) {\n if (!Storage::exists($bundle->url)) {\n continue;\n }\n \n // $path = \"Assets/\" . self::ASSET_TYPE_ALIASES[$this->type] . \"/{$assetFilePath[$bundle->type]}\";\n $path = $this->getAssetBundlePath($assetFilePath[$bundle->type]);\n\n /**\n * {AssetID}_{AssetVersion}\n */\n $assetBundleName = $this->getAssetBundleName();\n\n /**\n * Looks like: a1/b2/c3\n */\n $assetSubFolder = getSubFolder($assetBundleName);\n\n $file = \"{$path}/{$assetSubFolder}/{$assetBundleName}\";\n\n if (!Storage::exists($file)) {\n /**\n * Remove old version\n */\n if ($this->version > 1) {\n $version = $this->version - 1;\n $oldAssetName = \"{$this->id}_{$version}\";\n $oldAssetSubFolder = getSubFolder($oldAssetName);\n $oldFile = \"{$path}/{$oldAssetSubFolder}/{$oldAssetName}\";\n if (Storage::exists($oldFile)) {\n Storage::delete($oldFile);\n }\n }\n\n /**\n * Copy ADP file with bundle to asset\n */\n Storage::copy($bundle->url, $file);\n }\n }\n }\n }", "title": "" }, { "docid": "d422bbe463edccaaba226dd46ae9456b", "score": "0.5586658", "text": "public function test_version_file()\n {\n $version = get_complete_version([]);\n $this->assertCount(3, $version);\n }", "title": "" }, { "docid": "1722b0b545b110cfb69692f20160b485", "score": "0.54688275", "text": "public function onBeforeWrite()\n {\n if (!$this->isInDB()) {\n $this->CreatorID = Member::currentUserID();\n }\n\n if (!$this->VersionNumber) {\n $versions = DataObject::get(\n 'FileVersion', sprintf('\"FileID\" = %d', $this->FileID)\n );\n\n if ($versions) {\n $this->VersionNumber = $versions->Count() + 1;\n } else {\n $this->VersionNumber = 1;\n }\n }\n\n if (!$this->Filename) {\n $this->Filename = $this->saveCurrentVersion();\n }\n\n parent::onBeforeWrite();\n }", "title": "" }, { "docid": "065d65cd0fb83d64d0c31defc59ee778", "score": "0.5461719", "text": "function test_assets_version () {\n\t\t$this->assertEquals ('', Page::assets_version ());\n\t\t$this->assertEquals ('...', Page::assets_version ('...'));\n\t\t$this->assertEquals ('http://www.google.com/', Page::assets_version ('http://www.google.com/'));\n\n\t\t// should add ?v=123 to these\n\t\tPage::$assets_version = '123';\n\t\t$this->assertEquals ('?v=123', Page::assets_version ());\n\t\t$this->assertEquals ('/js/urlify.js?v=123', Page::assets_version ('/js/urlify.js'));\n\t\t$this->assertEquals ('/css/style.css?v=123', Page::assets_version ('/css/style.css'));\n\n\t\t// should not add ?v=123 to these\n\t\t$this->assertEquals ('<script src=\"/js/urlify.js\"></script>', Page::assets_version ('<script src=\"/js/urlify.js\"></script>'));\n\t\t$this->assertEquals ('<link rel=\"stylesheet\" href=\"style.css\" />', Page::assets_version ('<link rel=\"stylesheet\" href=\"style.css\" />'));\n\t\t$this->assertEquals ('http://www.google.com/script.js', Page::assets_version ('http://www.google.com/script.js'));\n\t\t$this->assertEquals ('//www.google.com/script.js', Page::assets_version ('//www.google.com/script.js'));\n\t}", "title": "" }, { "docid": "5d436c277e9569fcfb193de4a637dbde", "score": "0.5460448", "text": "function mark_upgraded($name, $dbVersion, $fileVersion){\r\n\t$query = \"DELETE FROM versions WHERE name='$name'\";\r\n\t$GLOBALS['db']->query($query);\r\n\t$version = new Version();\r\n\t$version->name = $name;\r\n\t$version->file_version = $fileVersion;\r\n\t$version->db_version = $dbVersion;\r\n\t$version->save();\r\n\tif(isset($_SESSION['invalid_versions'][$name])) {\r\n\t\tunset($_SESSION['invalid_versions'][$name]);\r\n\t}\r\n}", "title": "" }, { "docid": "49fd2cf927cab15df496f21da870d8ef", "score": "0.54003686", "text": "function __update_post($version) {\n\t\n\t// remove the opfitalia plugins files and directory\n\t$files = array(\n\t\tAPPLICATION_PATH.'/../public/images/opfitalia/logo.png',\n\t\tAPPLICATION_PATH.'/../library/X/VlcShares/Plugins/OPFItalia.php'\n\t);\n\t\n\t$folders = array(\n\t\tAPPLICATION_PATH.'/../public/images/opfitalia/'\n\t);\n\t\n\tforeach ($files as $file) {\n\t\tif ( !@unlink($file) ) {\n\t\t\techo \"File not deleted: <b>'$file'</b>. Please, delete it manually!!!<br/>\";\n\t\t}\n\t}\n\t\n\tforeach ($folders as $folder) {\n\t\tif ( !@rmdir($folder) ) {\n\t\t\techo \"Folder not deleted: <b>'$file'</b>. Please, delete it manually!!!<br/>\";\n\t\t}\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "e2a7e99e4492189444189a29c7c29b62", "score": "0.5392", "text": "protected function saveCurrentVersion()\n {\n // Ensure we re-fetch fresh record from database (in case it was recently renamed / moved)\n $file = File::get()->byID($this->FileID);\n if ($file->ParentID) {\n $base = Controller::join_links(\n $file->Parent()->getFullPath(),\n self::VERSION_FOLDER,\n $this->FileID\n );\n } else {\n $base = Controller::join_links(\n Director::baseFolder(),\n ASSETS_DIR,\n self::VERSION_FOLDER,\n $this->FileID\n );\n }\n\n Filesystem::makeFolder($base);\n\n $extension = $file->getExtension();\n $basename = basename($file->Name, $extension);\n $version = $this->VersionNumber;\n\n $cachedPath = Controller::join_links(\n $base, \"{$basename}$version.$extension\"\n );\n\n if (!copy($file->getFullPath(), $cachedPath)) {\n throw new Exception(\n \"Unable to copy version #$version of file #$this->FileID from:\\n \\\"{$file->getFullPath()}\\\"\\nto:\\n\\\"$cachedPath\\\"\"\n );\n }\n\n return Director::makeRelative($cachedPath);\n }", "title": "" }, { "docid": "b228a74c3c8cf34564ccc0bb51d51929", "score": "0.5387286", "text": "public function handler_init_filecheck()\r\n\t\t{\r\n\t\t\t$settings = $this->get_settings();\r\n\t\t\tif( empty( $settings ) )\r\n\t\t\t{\r\n\t\t\t\t/**\r\n\t\t\t\t * Keep alive to allow to clean up in case when deleting a widget and check_all_instances() have run at same time.\r\n\t\t\t\t * Due to internal WP caching this might have lead to inconsistent data structure.\r\n\t\t\t\t */\r\n\t\t\t\tif( $this->activate_cron )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->restart_cron_job();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Fallback on version update - we need to switch to new data structure\r\n\t\t\t * Can be removed in very very future versions.\r\n\t\t\t * \r\n\t\t\t * @since 4.3.1\r\n\t\t\t */\r\n\t\t\t$instance = array_shift( $settings );\r\n\t\t\tif( ! isset( $instance['avia_key'] ) || empty( $instance['avia_key'] ) )\r\n\t\t\t{\r\n\t\t\t\t$instances = $this->get_settings();\r\n\t\t\t\tforeach( $instances as $key => &$instance ) \r\n\t\t\t\t{\r\n\t\t\t\t\t$key = $this->create_avia_key( $instance, $this->id_base . \"-{$key}\" );\r\n\t\t\t\t\t$instance['avia_key'] = $key;\r\n\t\t\t\t\t$this->cache['instances'][ $key ] = array();\r\n\t\t\t\t}\r\n\t\t\t\tunset( $instance );\r\n\t\t\t\t$this->save_settings( $instances );\r\n\r\n\t\t\t\t$this->cache['last_updated'] = 0;\r\n\t\t\t\t$this->update_cache();\r\n\r\n\t\t\t\t$this->check_all_instances();\r\n\t\t\t}\r\n\r\n\t\t\tif( $this->activate_cron )\r\n\t\t\t{\r\n\t\t\t\t$this->restart_cron_job();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Check if we need to run an update\r\n\t\t\t */\r\n\t\t\tif( $this->cache['last_updated'] + $this->expire_time > time() )\r\n\t\t\t{\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t/**\r\n\t\t\t * Only run update in backend\r\n\t\t\t */\r\n\t\t\tif( is_admin() )\r\n\t\t\t{\r\n\t\t\t\t$this->check_all_instances();\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "d34c940969947e694b1fba71f6c68194", "score": "0.5360588", "text": "function asset_version($file) {\n\t\tstatic $manifest = NULL;\n\t\tif (is_null($manifest)) {\n\t\t\t$manifest = json_decode(file_get_contents(base_path() . '/public/build/rev-manifest.json'), TRUE);\n\t\t}\n\t\tif (isset($manifest[$file])) {\n\t\t\treturn '/public/build/' . $manifest[$file];\n\t\t} else {\n\t\t\treturn $file;\n\t\t}\n\t}", "title": "" }, { "docid": "b237be24ed0b88e473d7cb0f39a53a4c", "score": "0.52857155", "text": "public function beforeUpdate()\n {\n $this->initCitrix();\n foreach ($this->attributes as $attribute => $config) {\n $id = $this->saveFile($attribute, false);\n /**\n * @var Model $this->owner\n */\n $this->owner->setAttribute($config['id'], $id);\n }\n }", "title": "" }, { "docid": "27a2d5bcbeb903d0a4e3a92b34a17ba3", "score": "0.52310014", "text": "protected function getAssets_VersionEncoreService()\n {\n return $this->privates['assets._version_encore'] = new \\Symfony\\Component\\Asset\\VersionStrategy\\JsonManifestVersionStrategy((\\dirname(__DIR__, 4).'/public/build/manifest.json'));\n }", "title": "" }, { "docid": "fc930ff55190f74c497f59a79536a0e1", "score": "0.5224041", "text": "function _get_asset_version( $relative_path ) {\n\treturn filemtime( _get_plugin_directory() . '/' . $relative_path );\n}", "title": "" }, { "docid": "d58dd868c9351eec1779180598c9dec2", "score": "0.51907116", "text": "private function validatePlugins()\n {\n foreach ($this->cache['plugins'] as $plugin_file => $plugin_info) {\n if (!file_exists(WPMU_PLUGIN_DIR . '/' . $plugin_file)) {\n $this->updateCache();\n break;\n }\n }\n }", "title": "" }, { "docid": "2840baa79c34d45157a81ece20c24c7a", "score": "0.5180373", "text": "function validateVersionFolder($check){\n\n\t\t// get project alias from db\t \n\t\t$old_data = $this->find('first', array(\n\t\t 'conditions' => array('id' => $this->id), //array of conditions\n\t\t\t'fields' => array('project_alias'),\n\t\t\t'recursive' => -1\n\t\t));\n\t $project_alias = $old_data[\"Project\"][\"project_alias\"];\n\t \t \n\t // get webroot from Prosty class\n\t $path = $this->getWebRoot().$project_alias.'/prod/'.$check[\"current_version\"];\n return file_exists($path); //return true if it exists\n\n }", "title": "" }, { "docid": "82b11794052977278518f6e0efc26956", "score": "0.5159963", "text": "public function check() {\n\t\tfile_put_contents($this->pluginPath . \"/Core/temp/\".$this->id, serialize($this));\n\t}", "title": "" }, { "docid": "a65e9fadc227ed77156dfa6230a9199e", "score": "0.51431596", "text": "public function testVersionFileRelationship(): void\n {\n /** @var User $user */\n $user = User::factory()->create();\n $this->be($user);\n /** @var Version $version */\n $version = Version::factory()->create();\n $this->assertInstanceOf(Collection::class, $version->files);\n $this->assertEmpty($version->files);\n }", "title": "" }, { "docid": "287a03bd1c224d42600c0bc2f4beb269", "score": "0.5142316", "text": "private function setVersion(): void\n {\n $rootFile = (dirname(dirname(__FILE__)) . '/plugin-root.php');\n $fileData = get_file_data($rootFile, ['version' => 'Version']);\n\n $this->version = $fileData['version'];\n }", "title": "" }, { "docid": "4cb58e3472052323e76b10bd000d8e5b", "score": "0.5122736", "text": "public function testCacheInvalidates() {\n\tManifestTest::putApprootFile([\n\t\t\"/Style/Main.scss\" => \n\t\t\t\"body {\n\t\t\t\t> h1 {\n\t\t\t\t\tcolor: red;\n\t\t\t\t}\n\t\t\t}\",\n\t]);\n\t$manifest = ManifestTest::createManifest([\n\t\t\"Style\" => [\"/Style/Gt.css\", \"/Style/Main.scss\",],\n\t]);\n\n\t$fileOrganiser = new FileOrganiser($manifest);\n\n\t$this->assertFalse($manifest->isCacheValid());\n\t$this->assertFalse($fileOrganiser->isStyleScriptFilesCacheValid());\n\n\t$fileOrganiser->organise();\n\n\t$this->assertTrue($manifest->isCacheValid());\n\t$this->assertTrue($manifest->isCacheValid());\n\t$this->assertTrue($fileOrganiser->isStyleScriptFilesCacheValid());\n\t$this->assertTrue($fileOrganiser->isStyleScriptFilesCacheValid());\n\n\tManifestTest::putApprootFile([\n\t\t\"/Style/Main.scss\" => \n\t\t\t\"body {\n\t\t\t\t> h1 {\n\t\t\t\t\tcolor: blue;\n\t\t\t\t}\n\t\t\t}\",\n\t]);\n\t$manifest = ManifestTest::createManifest([\n\t\t\"Style\" => [\"/Style/Gt.css\", \"/Style/Main.scss\",],\n\t]);\n\t$fileOrganiser = new FileOrganiser($manifest);\n\t$this->assertFalse($fileOrganiser->isStyleScriptFilesCacheValid());\n\t$this->assertFalse($fileOrganiser->isStyleScriptFilesCacheValid());\n}", "title": "" }, { "docid": "34393db63dd22289aa1d44f1bfe6ff44", "score": "0.5120738", "text": "function custom_file_save(stdClass $file) {\n $file->timestamp = REQUEST_TIME;\n\n $uri = FileMigration::SOURCE_DIR . str_replace('public://', '', $file->uri);\n $file->filesize = file_exists($uri) ? filesize($uri) : 1;\n\n // Load the stored entity, if any.\n if (!empty($file->fid) && !isset($file->original)) {\n $file->original = entity_load_unchanged('file', $file->fid);\n }\n\n module_invoke_all('file_presave', $file);\n module_invoke_all('entity_presave', $file, 'file');\n\n if (empty($file->fid)) {\n drupal_write_record('file_managed', $file);\n // Inform modules about the newly added file.\n module_invoke_all('file_insert', $file);\n module_invoke_all('entity_insert', $file, 'file');\n }\n else {\n drupal_write_record('file_managed', $file, 'fid');\n // Inform modules that the file has been updated.\n module_invoke_all('file_update', $file);\n module_invoke_all('entity_update', $file, 'file');\n }\n\n // Clear internal properties.\n unset($file->original);\n // Clear the static loading cache.\n entity_get_controller('file')->resetCache(array($file->fid));\n\n return $file;\n}", "title": "" }, { "docid": "3021b17e239c9abfe5579186ee1208b4", "score": "0.5115245", "text": "public function onSiteSaved(SiteSavedEvent $event)\n {\n $fs = new Filesystem();\n $fs->mirror(\n $this->configurationHandler->uploadAssetsDir(),\n $this->configurationHandler->uploadAssetsDirProduction()\n );\n }", "title": "" }, { "docid": "cec445220cc3cbb46b57b443b2af85e0", "score": "0.51130694", "text": "function onBeforeWrite(){\r\n\t\tif($this->owner->HasVariations()) {\r\n\t\t\t$price = $this->owner->getCalculatedPrice();\r\n\t\t\tif($price == 0) {\r\n\t\t\t\t$this->owner->Price = $this->owner->LowestVariationPrice();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ba5eb07ccba9abf060d350f10c483058", "score": "0.5106138", "text": "public function storeFiles()\n {\n $storage = $this->getStorage();\n $filename = $this->filename;\n $derivativeFilename = $this->getDerivativeFilename();\n $storage->store($this->getPath('original'), $this->getStoragePath('original'));\n if ($this->has_derivative_image) {\n $types = array_keys(self::$_pathsByType);\n foreach ($types as $type) {\n if ($type != 'original') {\n $storage->store($this->getPath($type), $this->getStoragePath($type));\n }\n }\n }\n $this->stored = '1';\n $this->save();\n }", "title": "" }, { "docid": "bf44d6795481d72767c88b995061d73c", "score": "0.5102001", "text": "public function testCopyAsset() {\n\tManifestTest::putApprootFile([\n\t\t\"/Asset/ChristmasList.txt\" => \n\t\t\t\"Socks,\n\t\t\tGloves,\n\t\t\tPants\",\n\t]);\n\n\t$manifest = ManifestTest::createManifest();\n\t$fileOrganiser = new FileOrganiser($manifest);\n\n\t$this->assertFalse($fileOrganiser->isAssetFilesCacheValid());\n\n\t$this->assertFileNotExists(APPROOT . \"/www/Asset/ChristmasList.txt\");\n\t$fileOrganiser->organise();\n\t$this->assertFileExists(APPROOT . \"/www/Asset/ChristmasList.txt\");\n\t$this->assertTrue($fileOrganiser->isAssetFilesCacheValid());\n\n\tremoveTestApp();\n\tcreateTestApp();\n\n\tManifestTest::putApprootFile([\n\t\t\"/Asset/ChristmasList.txt\" => \n\t\t\t\"Socks,\n\t\t\tGloves,\n\t\t\tPants\",\n\t\t\"/Asset/InnerDirectory/ShoppingList.txt\" =>\n\t\t\t\"Milk,\n\t\t\tPie,\n\t\t\tChocolate\",\n\t]);\n\n\t$manifest = ManifestTest::createManifest();\n\t$fileOrganiser = new FileOrganiser($manifest);\n\n\t$fileOrganiser->organise();\n\t$this->assertFileExists(APPROOT . \"/www/Asset/ChristmasList.txt\");\n\t$this->assertFileExists(\n\t\tAPPROOT . \"/www/Asset/InnerDirectory/ShoppingList.txt\");\n\t$this->assertTrue($fileOrganiser->isAssetFilesCacheValid());\n\n\tManifestTest::putApprootFile([\n\t\t\"/Asset/InnerDirectory/ShoppingList.txt\" =>\n\t\t\t\"Milk,\n\t\t\tPie,\n\t\t\tChocolate,\n\t\t\tPancakes!\",\n\t]);\n\t$this->assertFalse($fileOrganiser->isAssetFilesCacheValid());\n\n\tunlink(APPROOT . \"/Asset/ChristmasList.txt\");\n\t$this->assertFalse($fileOrganiser->isAssetFilesCacheValid());\n}", "title": "" }, { "docid": "e2a52af9b2c5352e960ea9db9cbba7ca", "score": "0.5094901", "text": "public function testVersionFileRelationship()\n {\n $user = factory(User::class)->create();\n $this->be($user);\n $version = factory(Version::class)->create();\n $this->assertInstanceOf(Collection::class, $version->files);\n $this->assertEmpty($version->files);\n }", "title": "" }, { "docid": "0bf24e7f16bf0ba00cb0b757f4b20296", "score": "0.50921965", "text": "protected function assignVersion()\n {\n\n }", "title": "" }, { "docid": "572163237c2ada46e7eb9c810dfe76f2", "score": "0.50698197", "text": "function a12sfactory_post_update_8005() {\n module_load_include('install', 'a12sfactory');\n a12sfactory_update_field_storage('paragraph', ['field_card_image_link']);\n}", "title": "" }, { "docid": "be4cb566d6fc6304841cabaa19af56aa", "score": "0.5061029", "text": "function maybe_version_asset( $src, $handle, &$deps ) {\n\n\t// Short-circuit the process if SCRIPT_DEBUG is true.\n\tif ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {\n\t\treturn $src;\n\t}\n\n\t// Return early if we don't have a matching handle.\n\tif ( ! isset( $deps->registered[ $handle ] ) ) {\n\t\treturn $src;\n\t}\n\n\t// If the file already has a version, return early.\n\tif ( ! empty( $deps->registered[ $handle ]->ver ) ) {\n\t\treturn $src;\n\t}\n\n\t// Don't mess with files in the default directories, as the WP version (default behavior) works.\n\t$path = parse_url( $src, PHP_URL_PATH );\n\n\tforeach ( $deps->default_dirs as $dir ) {\n\t\tif ( 0 === strpos( $path, $dir ) ) {\n\t\t\treturn $src;\n\t\t}\n\t}\n\n\t// If we've gotten this far, it's time to get a version.\n\t$version = get_file_version( $src );\n\t$deps->registered[ $handle ]->ver = $version;\n\n\treturn add_query_arg( 'ver', $version, $src );\n}", "title": "" }, { "docid": "55fd482d5510ec5ffc7d29002b8e59c8", "score": "0.5056788", "text": "function thrive_load_dash_version() {\n\t$_dash_path = get_template_directory() . '/thrive-dashboard';\n\t$_dash_file_path = $_dash_path . '/version.php';\n\n\tif ( is_file( $_dash_file_path ) ) {\n\t\t$version = require_once( $_dash_file_path );\n\t\t$GLOBALS['tve_dash_versions'][ $version ] = $_dash_path . '/thrive-dashboard.php';\n\n\t\t$GLOBALS['tve_dash_versions'][ $version ] = array(\n\t\t\t'path' => $_dash_path . '/thrive-dashboard.php',\n\t\t\t'folder' => 'pressive',\n\t\t\t'from' => 'themes'\n\t\t);\n\t}\n}", "title": "" }, { "docid": "5c6f444b66d44ba596d8bdd3fbbcb2e6", "score": "0.5052853", "text": "public static function markAllToRebuild(): void\n\t{\n\t\tif (File::markAssetToRebuild())\n\t\t{\n\t\t\tManager::clearCache();\n\t\t}\n\t}", "title": "" }, { "docid": "b5b5c7adca691dc0773fec1673ab041e", "score": "0.5049699", "text": "function priceoverride_update_db_check() {\n\tglobal $priceoverride_db_version;\n\tif ( get_option( 'priceoverride_db_version' ) != $priceoverride_db_version ) {\n\t\tpriceoverride_install();\n\t}\n}", "title": "" }, { "docid": "12459f983a930bbbfc21ada024230b5b", "score": "0.50380135", "text": "public function overrule_transients() {\n return ( defined('WP_GITHUB_FORCE_UPDATE') && WP_GITHUB_FORCE_UPDATE );\n }", "title": "" }, { "docid": "0a3f1bbe97cb01b151cceab1dd40dbb7", "score": "0.5035084", "text": "public function testWritesVersionFile()\n {\n $this->action->execute();\n $this->assertFileExists(sys_get_temp_dir() . '/version.php');\n $contents = file_get_contents(sys_get_temp_dir() . '/version.php');\n $this->assertContains('TEST_VERSION', $contents);\n $this->assertContains('XYZ', $contents);\n }", "title": "" }, { "docid": "baf2b2076bf2f32995daadb3383fc01f", "score": "0.49965996", "text": "function versioningCreateNewVersionPrepare($docID) {\n\n\t\t\t\t// ---- getting the new record\n\t\t\t$newDoc = $this->getDocument($docID);\n\t\t\t$filename = $GLOBALS['TSFE']->fe_user->getKey('ses','uploadFileName');\n\t\t\t$filetype = $newDoc['file_type'];\n\n\t\t\t\t// ---- get the latest version id of an existing old file\n\t\t\t$FIELDS = 'MAX(tx_damfrontend_version),uid, tx_damfrontend_version';\n\t\t\t$TABLE = 'tx_dam';\n\t\t\t$GROUPBY = 'tx_damfrontend_version';\n\t\t\t$WHERE = 'file_dl_name = \\''.$filename.' \\' AND uid != '.$docID . ' AND deleted = 0';\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($FIELDS,$TABLE,$WHERE,$GROUPBY);\n\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t$oldID = $row['uid'];\n\t\t\t\t$oldversion = $row['tx_damfrontend_version'];\n\t\t\t}\n\t\t\tif ($oldversion == '') $oldversion = 0;\n\t\t\t\t// store the ID of the old record, so that if can be overwritten in the last step\n\t\t\t$GLOBALS['TSFE']->fe_user->setKey('ses','versioningNewVersionID',$oldID);\n\n\t\t\t\t// ---- getting rest of the old record\n\t\t\t$oldDoc = $this->getDocument($oldID);\n\t\t\t$newVersion = $oldversion +1;\n\t\t\t\t// copying the old data to the new id\n\t\t\t\t// record with the old file\n\t\t\t$oldDoc['uid']=$docID;\n\t\t\t$oldDoc['tx_damfrontend_version']=$newVersion;\n\t\t\t$oldDoc['file_name']=$newDoc['file_name'];\n\t\t\t$oldDoc['file_path']=$newDoc['file_path'];\n\t\t\t$oldDoc['date_cr']=$newDoc['date_cr'];\n\t\t\t$oldDoc['date_mod']=$newDoc['date_mod'];\n\t\t\t$oldDoc['tstamp']=time();\n\t\t\t$TABLE = 'tx_dam';\n\t\t\t$WHERE = 'uid = '.$docID;\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$oldDoc);\n\n\t\t\treturn $docID;\n\n\t\t}", "title": "" }, { "docid": "d31ba269876b419eda0d43cd5f66cee7", "score": "0.49844715", "text": "public function safeUp()\n\t{\n\t\t// Move any files in the old redactor plugins directory to the new location under /public\n\t\t$configDirectory = craft()->path->getConfigPath() . '/redactor_plugins';\n\t\t$publicDirectory = craft()->path->appPath . '../../public/redactor_plugins';\n\n if (IOHelper::folderExists($configDirectory) && !IOHelper::folderExists($publicDirectory)) {\n $files = array_filter(\n scandir($configDirectory),\n function($file) use ($configDirectory) {\n return is_file(\"$configDirectory/$file\");\n }\n );\n\n foreach ($files as $file) {\n if (preg_match('((.js|.css)$)i', $file)) {\n IOHelper::copyFile(\n \"$configDirectory/$file\",\n \"$publicDirectory/$file\"\n );\n }\n }\n }\n\t}", "title": "" }, { "docid": "7786fea994084712c99403cc7bc351f6", "score": "0.49768677", "text": "public function loadVersionInfo() {}", "title": "" }, { "docid": "155ec5ad56a7a56787d260256d883657", "score": "0.4966799", "text": "public function savevariants()\n {\n\n $aParams = oxRegistry::getConfig()->getRequestParameter(\"editval\");\n if (is_array($aParams)) {\n foreach ($aParams as $soxId => $aVarParams) {\n $this->savevariant($soxId, $aVarParams);\n }\n }\n\n $this->resetContentCache();\n }", "title": "" }, { "docid": "a40f9b7c1b0853140e39562840443599", "score": "0.49646726", "text": "function OnBeforeEdit() {\n\t\tif(strpos($this->library_ID, \"publications\") !== false){\n\t\t\t$this->removeParamColumns();\n\t\t\t$this->stored_version = $this->Storage->Get(array(\"publication_id\" => $this->_data[\"publication_id\"]));\n\t\t\t$this->_data[\"is_declined\"] = 0;\n\t\t\tif(!$this->UserIsManager()){\n\t\t\t\tif($this->stored_version[\"is_modified\"] == 0){\n\t\t\t\t\t$this->CopyEditPublication();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c53c595f7b593420f642f18abb49d75a", "score": "0.49608514", "text": "function versioningCreateNewVersionExecute($docID) {\n\t\t\t$newDoc = $this->getDocument($docID);\n\n\t\t\t$filename = $GLOBALS['TSFE']->fe_user->getKey('ses','uploadFileName');\n\t\t\t$filetype = $newDoc['file_type'];\n\t\t\t$filepath = $newDoc['file_path'];\n\n\t\t\t\t// ---- getting the pure filename\n\t\t\tlist($purename,$type) = split('\\.',$filename);\n\t\t\t$newversion = $newDoc['tx_damfrontend_version'];\n\t\t\t$new_filename = $purename.'_v'.$newversion.'.'.$filetype;\n\n\t\t\tif (!$this->moveFile(PATH_site.$newDoc['file_path'].$newDoc['file_name'],$GLOBALS['TSFE']->fe_user->getKey('ses','uploadFilePath').$new_filename)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t//\n\n\t\t\t\t//copying the old data to the new id\n\t\t\t\t// record with the old file\n\t\t\t$oldDoc = $this->getDocument($GLOBALS['TSFE']->fe_user->getKey('ses','versioningNewVersionID'));\n\n\t\t\t// set the record of the old version to new ID\n\t\t\t$oldID = $oldDoc['uid'];\n\t\t\t$oldDoc['uid']=$docID;\n\t\t\t$TABLE = 'tx_dam';\n\t\t\t$WHERE = 'uid = '.$docID;\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$oldDoc);\n\n\t\t\t\t// \t---- changing the id's of the records and copying the old meta data to the file\n\t\t\t\t//\trecord with the new file\n\t\t\t$newDoc['uid'] = $oldID;\n\t\t\t$newDoc['deleted']=0;\n\t\t\t$newDoc['file_name']=$new_filename;\n\t\t\t$newDoc['file_path']=$GLOBALS['TSFE']->fe_user->getKey('ses','uploadFilePath');\n\t\t\t$newDoc['tx_damfrontend_version']= $newversion;\n\t\t\t$newDoc['date_mod']=time();\n\t\t\t$newDoc['crdate']=time();\n\n\t\t\t$TABLE = 'tx_dam';\n\t\t\t$WHERE = 'uid = '.$oldID;\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$newDoc);\n\n\t\t\t// change the categories UID\n\t\t\t$newDoc = array();\n\t\t\t$newDoc[uid_local]='-'.$GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t\t$TABLE = 'tx_dam_mm_cat';\n\t\t\t$WHERE = 'uid_local = '.$oldID;\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$newDoc);\n\n\t\t\t// change the categories UID\n\t\t\t$newDoc = array();\n\t\t\t$newDoc[uid_local]=$oldID;\n\t\t\t$TABLE = 'tx_dam_mm_cat';\n\t\t\t$WHERE = 'uid_local = '.$docID;\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$newDoc);\n\n\t\t\t// change the categories UID\n\t\t\t$newDoc = array();\n\t\t\t$newDoc[uid_local]=$docID;\n\t\t\t$TABLE = 'tx_dam_mm_cat';\n\t\t\t$WHERE = 'uid_local = -'.$GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery($TABLE,$WHERE,$newDoc);\n\n\t\t\treturn $oldID;\n\n\t\t}", "title": "" }, { "docid": "837d3bf20b35fe2fdffffb82315d58d2", "score": "0.49477887", "text": "public function beforeSave()\n {\n $model = $this->owner;\n foreach ($this->attributes as $attr => $options) {\n self::ensureAttributes($attr, $options);\n if ($file = UploadedFile::getInstance($model, $attr)) {\n $this->createDirIfNotExists($attr);\n if (!$model->isNewRecord) {\n $this->deleteFiles($attr);\n }\n $fileName = uniqid('', true) . '.' . $file->extension;\n $model->{$attr} = $fileName;\n $file->saveAs($this->getSavePath($attr) . $fileName);\n } elseif (isset($model->oldAttributes[$attr])) {\n $model->{$attr} = $model->oldAttributes[$attr];\n }\n }\n }", "title": "" }, { "docid": "f63043220d63c9f7fac35cafa964b256", "score": "0.49465436", "text": "function allvideogallery_update_db_check() {\r\n\tglobal $wpdb;\r\n\t\r\n if (get_site_option('allvideogallery_version') == \"1.0\") {\r\n\t \t$table_name = $wpdb->prefix . \"allvideogallery_profiles\";\r\n\t\t$sql = $wpdb->prepare( \"ALTER TABLE \" . $table_name . \" ADD `custom_page_url` VARCHAR(255) NOT NULL AFTER `gallery_css`\" );\r\n \t\t$wpdb->query( $sql );\r\n update_option( \"allvideogallery_version\", \"1.2\" );\r\n }\r\n}", "title": "" }, { "docid": "db41d83f145477b859f6b847905572fe", "score": "0.49414465", "text": "private function saveDatabaseToStorages() {\n\n FileSystem::mkdir(VERSIONPRESS_MIRRORING_DIR);\n\n $storageNames = $this->storageFactory->getAllSupportedStorages();\n foreach ($storageNames as $entityName) {\n $this->saveEntitiesOfTypeToStorage($entityName);\n $this->reportProgressChange(\"All \" . $entityName . \" saved into files\");\n }\n }", "title": "" }, { "docid": "a5022b52f940f2e9251e60b5cd349b7c", "score": "0.4939325", "text": "public function test_an_asset_can_be_stored()\n\t{\n\t\t$school = factory(School::class)->create();\n\t\t$category = factory(Category::class)->create();\n\t\t$type = factory(Type::class)->create();\n\t\t$asset = factory(Asset::class)->create();\n\n\t\t$this->assertDatabaseHas('assets', [\n\t\t\t'id' => $asset->id,\n\t\t\t'name' => $asset->name\n\t\t]);\n\t}", "title": "" }, { "docid": "e86c7a012ef9e0b8b1d5ca946cb7e229", "score": "0.49324477", "text": "protected function _afterSave() {\r\n Mage::app()->cleanCache( array(\r\n\t Mage_Core_Model_Store::CACHE_TAG,\r\n\t Mage_Cms_Model_Block::CACHE_TAG,\r\n\t Ves_Tabs_Model_Product::CACHE_BLOCK_TAG\r\n\t ) );\r\n\t Mage::app()->cleanCache( array(\r\n\t Mage_Core_Model_Store::CACHE_TAG,\r\n\t Mage_Cms_Model_Block::CACHE_TAG,\r\n\t Ves_Tabs_Model_Product::CACHE_WIDGET_TAG\r\n\t ) );\r\n\t}", "title": "" }, { "docid": "0f4bff7421dc27ec710e4855f4e2df5d", "score": "0.49110085", "text": "public function testAssetServerUpdateSecurityEntry()\r\n {\r\n\r\n }", "title": "" }, { "docid": "a8bedde2e0c7906b489a22ae30d95ef7", "score": "0.49033183", "text": "public function checkApiVersion() {\n\t $content = oxNew(\"oxContent\");\n\t\t$content->updateJanolawApiVersion();\n\t}", "title": "" }, { "docid": "cf5b0932f4a9435b25c8b65d60169085", "score": "0.48967832", "text": "protected function assertPublicAssetsPath()\n {\n $themeAssetsPath = $this->getPath('public');\n\n if (file_exists($themeAssetsPath)) {\n $publicThemeAssetsPath = public_path($this->getAssetsPath());\n $publicThemeVendorPath = dirname($publicThemeAssetsPath);\n\n // Create target public theme vendor directory if required\n if (! file_exists($publicThemeVendorPath)) {\n app(Filesystem::class)->makeDirectory($publicThemeVendorPath, 0755, true);\n }\n\n // Create target symlink public theme assets directory if required\n if (! file_exists($publicThemeAssetsPath) && file_exists($themeAssetsPath)) {\n if (Config::get('themes-manager.symlink_relative', false)) {\n app(Filesystem::class)->relativeLink($themeAssetsPath, rtrim($publicThemeAssetsPath, '/'));\n } else {\n app(Filesystem::class)->link($themeAssetsPath, rtrim($publicThemeAssetsPath, '/'));\n }\n }\n }\n }", "title": "" }, { "docid": "06bf86720ace1fecb47a4ee2998bef60", "score": "0.48918375", "text": "public function updateSchemas()\n\t{\n\t\tforeach($this->app_entities as $bundle_name=>$bundle_data) {\n\t\t\t$schema_content = \\Sybil\\Yaml::dump($bundle_data,2,4);\n\t\t\t$schema_directory = $_SERVER['PWD'].'/bundle/'.$bundle_name.'/';\n\t\t\t$schema_file = $schema_directory.'schema.yml';\n\t\t\t\n\t\t\tif (file_exists($schema_file)) {\n\t\t\t\tcopy($schema_file,$schema_directory.'_schema.yml');\n\t\t\t\tchmod($schema_directory.'_schema.yml', 0777);\n\t\t\t\t\n\t\t\t\tfile_put_contents($schema_file, $schema_content);\n\t\t\t\tchmod($schema_file, 0777);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1639822bc18a88882ac411a6c176baab", "score": "0.48915604", "text": "function db_version_check() {\n\t\t\n\t\t$settings = Settings::getInstance();\n\t\t\n\t\t//Log::debug( \"settings->db_version = {$settings->db_version}\" );\n\t\t\n\t\tif( $settings->db_version == DATABASE_VERSION ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$lock_name = 'DATABASE_VERSION_update';\n\t\t\n\t\tif( $settings-> db_version < 2 ) {\n\t\t\t// convert from multiple site options to one\n\t\t\t$settings->banned_message = get_site_option( 'suh_banned_message' );\n\t\t\t$settings->is_permban_active = ( get_site_option( 'suh_permban_active', 'false' ) == 'true' );\n\t\t\t$settings->permban_ready = get_site_option( 'suh_permban_ready', false );\n\t\t\t$settings->db_version = 2;\n\n\t\t\tdelete_site_option( 'suh_banned_message' );\n\t\t\tdelete_site_option( 'suh_permban_active' );\n\t\t\tdelete_site_option( 'suh_permban_ready' );\n\t\t\t\n\t\t\tLog::info( 'SUH_DB_VERSION upgraded from 1 to 2.');\n\t\t\t$settings->db_version = 2;\n\t\t\t\n\t\t\t$settings->save();\n\t\t}\n\t\t\n\t\t/* Now db_version is at least 2. */\n\t\t\n\t\tif( $settings->db_version < 3 ) {\n\t\t\tLog::debug( 'Upgrading DATABASE_VERSION from 2 to 3.' );\n\t\t\tif( $settings->permban_ready ) {\n\t\t\t\t// remove duplicate ip entries and alter permban table so that it is unique\n\t\t\t\t// (only if we have the table already created)\n\t\t\t\tLog::debug( 'Removing duplicate ip entries in suh_permban_table.' );\n\t\t\t\tglobal $wpdb;\n\t\t\t\tif( $wpdb->get_var( 'SELECT IS_FREE_LOCK(\\''.$lock_name.'\\')' ) != '1' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$locked = $wpdb->get_var( 'SELECT GET_LOCK(\\''.$lock_name.'\\', 0)' );\n\t\t\t\tif( $locked != '1' ) {\n\t\t\t\t\tLog::debug( 'Cannot get lock because: '.$wpdb->last_error );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif( $wpdb->query( \"ALTER IGNORE TABLE \" . pb\\tn( pb\\PERMBAN ) . \" ADD UNIQUE INDEX(ip)\" ) === FALSE ) {\n\t\t\t\t\tLog::fatal(\n\t\t\t\t\t\t\tsprintf (\n\t\t\t\t\t\t\t\t\t'MySQL while upgrading DATABASE_VERSION.<br/>last query: \"%s\"<br/>result: \"%s\"<br/>error: %s.',\n\t\t\t\t\t\t\t\t\t$wpdb->last_query,\n\t\t\t\t\t\t\t\t\tprint_r( $wpdb->last_result, true ),\n\t\t\t\t\t\t\t\t\t$wpdb->last_error ) );\n\t\t\t\t\t/*if( is_admin() ) {\n\t\t\t\t\t\tsuh_nagerr( 'Database error when upgrading Superadmin Helper. Please contact plugin developer.' );\n\t\t\t\t\t}*/\n\t\t\t\t\t$wpdb->query( 'SELECT RELEASE_LOCK(\\''.$lock_name.'\\')' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$wpdb->query( 'SELECT RELEASE_LOCK(\\''.$lock_name.'\\')' );\n\t\n\t\t\t}\n\t\t\t$settings->db_version = 3;\n\t\t\t$settings->save();\n\t\t\tLog::info( 'DATABASE_VERSION upgraded from 2 to 3.');\n\t\t}\n\t\t\n\t\t/* Now db_version is at least 3 */\n\t\t\n\t\tif( $settings->db_version < 4 ) {\n\t\t\tLog::debug( 'Upgrading DATABASE_VERSION from 3 to 4.' );\n\t\t\tif( $settings->permban_ready ) {\n\t\t\t\tglobal $wpdb;\n\t\t\t\tif( $wpdb->get_var( 'SELECT IS_FREE_LOCK(\\''.$lock_name.'\\')' ) != '1' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$locked = $wpdb->get_var( 'SELECT GET_LOCK(\\''.$lock_name.'\\', 0)' );\n\t\t\t\tif( $locked != '1' ) {\n\t\t\t\t\tLog::debug( 'Cannot get lock because: '.$wpdb->last_error );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif( $wpdb->query( \"ALTER TABLE \" . pb\\tn( pb\\PERMBAN ) . \" ADD COLUMN (attempt_count INT DEFAULT 0, last_attempt DATETIME)\" ) === FALSE ) {\n\t\t\t\t\tLog::fatal(\n\t\t\t\t\t\t\tsprintf (\n\t\t\t\t\t\t\t\t\t'MySQL while upgrading DATABASE_VERSION.<br/>last query: \"%s\"<br/>result: \"%s\"<br/>error: %s.',\n\t\t\t\t\t\t\t\t\t$wpdb->last_query,\n\t\t\t\t\t\t\t\t\tprint_r( $wpdb->last_result, true ),\n\t\t\t\t\t\t\t\t\t$wpdb->last_error ) );\n\t\t\t\t\t/*if( is_admin() ) {\n\t\t\t\t\t\tsuh_nagerr( 'Database error when upgrading Superadmin Helper. Please contact plugin developer.' );\n\t\t\t\t\t}*/\n\t\t\t\t\t$wpdb->query( 'SELECT RELEASE_LOCK(\\''.$lock_name.'\\')' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$wpdb->query( 'SELECT RELEASE_LOCK(\\''.$lock_name.'\\')' );\n\t\t\t} else {\n\t\t\t\tLog::debug( 'No action needed.' );\n\t\t\t}\n\t\t\t$settings->db_version = 4;\n\t\t\t$settings->save();\n\t\t\tLog::info( 'DATABASE_VERSION upgraded from 3 to 4.' );\n\t\t}\n\t\t\n\t\t/* Now db_version is at least 4 */\n\t\t\n\t\tif( $settings->db_version < 5 ) {\n\t\t\t\n\t\t\tLog::debug( \"Upgrading DATABASE_VERSION from 4 to 5.\" );\n\t\t\t//Log::debug( \"before: settings->permban_ready = {$settings->permban_ready}, settings->db_version = {$settings->db_version}\" );\n\t\t\tif( !$settings->permban_ready ) {\n\t\t\t\tLog::debug( \"Permban table was not present, creating it now.\" );\n\t\t\t\tpb\\create_tables();\n\t\t\t}\n\t\t\t$settings->permban_ready = true;\n\t\t\t$settings->db_version = 5;\n\t\t\t$settings->save();\n\t\t\tLog::info( \"DATABASE_VERSION upgraded from 4 to 5.\" );\n\t\t\t//Log::debug( \"after: settings->permban_ready = {$settings->permban_ready}, settings->db_version = {$settings->db_version}\" );\n\t\t}\n\t\t\n\t\t/* Now db_version is at least 5 */\n\t}", "title": "" }, { "docid": "fdf546c31be0fc3deee848b4264499d8", "score": "0.48836958", "text": "protected function getFileAssets() {\n $config = $this->wire('config');\n $assets = $this->getBareFileAssetArray();\n\n /**\n * Populate each asset's discoverable information...\n */\n foreach ($assets as $name => &$asset) {\n $path = $asset['path'];\n $exists = file_exists($path);\n $perms = null;\n $permission = '';\n $readable = null;\n $writable = null;\n $world_readable = null;\n $world_writable = null;\n $owner = '';\n $group = '';\n $puser_matches_owner = null;\n $puser_matches_group = null;\n $needs_world_access = null;\n $is_file = is_file($path);\n\n if ($exists) {\n $perms = fileperms($path);\n $world_readable = $perms & 0x0004;\n $world_writable = $perms & 0x0002;\n $permission = substr(sprintf('%o', $perms), -4);\n $readable = is_readable($path);\n $writable = is_writeable($path);\n\n if(function_exists('posix_getpwuid')) {\n $owner = posix_getpwuid(fileowner($path))['name'];\n $group = posix_getgrgid(filegroup($path))['name'];\n }\n\n $puser_matches_owner = $this->process_user === $owner;\n $puser_matches_group = $this->process_user === $group;\n\n $needs_world_access = (!$puser_matches_owner && !$puser_matches_group);\n }\n\n $asset['shortpath'] = str_replace($config->paths->root, '/', $asset['path']);\n $asset['name'] = $name;\n $asset['exists'] = $exists;\n $asset['int_perms'] = $perms;\n $asset['perms'] = $permission;\n $asset['readable'] = $readable;\n $asset['writable'] = $writable;\n $asset['wreadable'] = $world_readable;\n $asset['wwritable'] = $world_writable;\n $asset['owner'] = $owner;\n $asset['group'] = $group;\n $asset['is_file'] = $is_file;\n $asset['needs_world'] = $needs_world_access;\n $asset['perm_fix'] = array(\n 'u-' => array(),\n 'u+' => array(),\n 'g-' => array(),\n 'g+' => array(),\n 'o-' => array(),\n 'o+' => array(),\n );\n $asset['minimum_perm_class'] = '';\n }\n\n return $assets;\n }", "title": "" }, { "docid": "53aded7dea2a46d4b295713f670f41c5", "score": "0.48805264", "text": "function phpmv_verif_install(){\n\t\tif (defined('_DIR_TMP')){\n\t\t\tdefine('_PHPMV_DIR_DATA',realpath(_DIR_TMP . \"phpmvdatas\"));\n\t\t\tif (!is_dir(_DIR_TMP.\"phpmvdatas\"))\n\t\t\t\tsous_repertoire(_DIR_TMP, \"phpmvdatas\");\n\t\t}\n\t\telse {\n\t\t\tdefine('_PHPMV_DIR_DATA',realpath(_DIR_SESSIONS . \"phpmvdatas\"));\n\t\t\tif (!is_dir(_DIR_SESSIONS.\"phpmvdatas\"))\n\t\t\t\tsous_repertoire(_DIR_SESSIONS, \"phpmvdatas\");\n\t\t}\n\t\tif (defined('_DIR_ETC')){\n\t\t\tif (!is_dir(_DIR_ETC.\"phpmvconfig\"))\n\t\t\t\tsous_repertoire(_DIR_ETC, \"phpmvconfig\");\n\t\t\tif (is_dir(_DIR_ETC.\"phpmvconfig\"))\n\t\t\t\tdefine('_PHPMV_DIR_CONFIG',realpath(_DIR_ETC . \"phpmvconfig\"));\n\t\t}\n\t\tif (!defined('_PHPMV_DIR_CONFIG')){\n\t\t\tdefine('_PHPMV_DIR_CONFIG',realpath(_DIR_SESSIONS . \"phpmvconfig\"));\n\t\t\tif (!is_dir(_DIR_SESSIONS.\"phpmvconfig\"))\n\t\t\t\tsous_repertoire(_DIR_SESSIONS, \"phpmvconfig\");\n\t\t}\n\t\tecrire_meta('phpmv_dir_config',_PHPMV_DIR_CONFIG,'non');\n\t\tecrire_meta('phpmv_dir_data',_PHPMV_DIR_DATA,'non');\n\t\tecrire_meta('_PHPMV_DIR_CONFIG',realpath(_PHPMV_DIR_CONFIG));\n\t\tecrire_meta('_PHPMV_DIR_DATA',realpath(_PHPMV_DIR_DATA));\n\t\tecrire_meta('_DIR_PLUGIN_PHPMV',_DIR_PLUGIN_PHPMV);\n\n\t\tif (!isset($GLOBALS['meta']['PHPMyVisites_no_admin_stat']))\n\t\t\tecrire_meta('PHPMyVisites_no_admin_stat','non');\n\n\t\tecrire_metas();\n\t\t\n\t\tif (@file_exists(_PHPMV_DIR_CONFIG.\"config.php\"))\n\t\t\treturn;\n\t\n\t\tif (!defined('_FILE_CONNECT')){\n\t\t\tdefine('_FILE_CONNECT',\n\t\t\t (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f\n\t\t\t:\t(@is_readable($f = _DIR_RESTREINT . 'inc_connect.php3') ? $f\n\t\t\t:\tfalse)));\n\t\t}\n\t\tif (lire_fichier(_FILE_CONNECT,$connect) && preg_match(',spip_connect_db\\(([^\\)]*)\\),i',$connect,$r)){\n\t\t\t$pars = explode(',',$r[1]);\n\t\t\t$host = substr($pars[0],1,strlen($pars[0])-2);\n\t\t\t$port = substr($pars[1],1,strlen($pars[1])-2);\n\t\t\t$login = substr($pars[2],1,strlen($pars[2])-2);\n\t\t\t$pass = substr($pars[3],1,strlen($pars[3])-2);\n\t\t\t$db = substr($pars[4],1,strlen($pars[4])-2);\n\t\t\t$url = url_de_base()._DIR_PLUGIN_PHPMV;\n\t\t\t\n\t\t\tdefine('DB_LOGIN',$login);\n\t\t\tdefine('DB_PASSWORD',$pass);\n\t\t\tdefine('DB_HOST',$host);\n\t\t\tdefine('DB_NAME',$db);\n\t\n\t\t\t$conf = '<'.'?php \n\t$siteInfo = array ('.\"\n\t 1 => \n\t array (\n\t 'idsite' => '1',\n\t 'name' => '\".addslashes($GLOBALS['meta']['nom_site']).\"',\n\t 'logo' => 'pixel.gif',\n\t 'params_choice' => 'all',\n\t 'params_names' => '',\n\t ),\n\t);\n\t?\".'>';\n\t\t\tecrire_fichier(_PHPMV_DIR_CONFIG.\"/site_info.php\",$conf);\n\t\t\t$conf = '<'.'?php \n\t$siteUrls = array ('.\"\n\t 1 => \n\t array (\n\t 0 => '\".$GLOBALS['meta']['adresse_site'].\"',\n\t ),\n\t);\n\t?\".'>';\n\t\t\tecrire_fichier(_PHPMV_DIR_CONFIG.\"/site_urls.php\",$conf);\n\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "bdc58e341d277935bd65e98945be7f80", "score": "0.48738617", "text": "public function beforeSave() {\n\n\n $this->setUploadVars();\n $this->updateAllToUndefault();\n return parent::beforeSave();\n }", "title": "" }, { "docid": "f593008a42bc7ee72426c402df3dd1fa", "score": "0.48734117", "text": "public function beforeValidate()\n {\n $model = $this->owner;\n if (in_array($model->scenario, $this->scenarios)) {\n if (($file = $model->getAttribute($this->attribute)) instanceof UploadedFile) {\n $this->_file = $file;\n } else {\n if ($this->instanceByName === true) {\n $this->_file = UploadedFile::getInstanceByName($this->attribute);\n } else {\n $this->_file = UploadedFile::getInstance($model, (isset($this->arrayKey) ? '['. $this->arrayKey. ']' : ''). $this->attribute);\n }\n }\n if ($this->_file instanceof UploadedFile) {\n $this->_file->name = $this->getFileName($this->_file);\n $model->setAttribute($this->attribute, $this->_file);\n }\n }\n }", "title": "" }, { "docid": "77f89e90790a292e8ec4201557e75bb4", "score": "0.4873405", "text": "public function setAssetVersion(?string $value): void {\n $this->getBackingStore()->set('assetVersion', $value);\n }", "title": "" }, { "docid": "96a184353f2b69c9982b73f63b279aed", "score": "0.4867781", "text": "public function testStyleScriptFileModificationRemovesAllCaches() {\n\tManifestTest::putApprootFile([\n\t\t\"/Style/RedBody.css\" => \n\t\t\t\"body#red {\n\t\t\t\tbackground: red;\n\t\t\t}\",\n\t\t\"/Style/BlueBody.css\" =>\n\t\t\t\"body#blue {\n\t\t\t\tbackground: blue;\n\t\t\t}\",\n\t\t\"/Script/Test.js\" =>\n\t\t\t\"alert('Just a test...');\",\n\t]);\n\t$manifestRed = ManifestTest::createManifest([\n\t\t\"Style\" => [\"/Style/Gt.css\", \"/Style/RedBody.css\",],\n\t]);\n\t$manifestBlue = ManifestTest::createManifest([\n\t\t\"Style\" => [\"/Style/Gt.css\", \"/Style/BlueBody.css\",],\n\t\t\"Script\" => [\"/Script/Test.js\"],\n\t]);\n\n\t$fingerprintRed = $manifestRed->getFingerprint();\n\t$fileOrganiserRed = new FileOrganiser($manifestRed);\n\t$copyDoneRed = $fileOrganiserRed->organise();\n\n\t$this->assertTrue($manifestRed->isCacheValid());\n\t$this->assertTrue($fileOrganiserRed->isStyleScriptFilesCacheValid());\n\t$this->assertFileExists(APPROOT . \"/www/Style_$fingerprintRed\");\n\n\t$fingerprintBlue = $manifestBlue->getFingerprint();\n\t$fileOrganiserBlue = new FileOrganiser($manifestBlue);\n\t$copyDoneBlue = $fileOrganiserBlue->organise();\n\n\t$this->assertTrue($manifestBlue->isCacheValid());\n\t$this->assertTrue($fileOrganiserBlue->isStyleScriptFilesCacheValid());\n\t$this->assertFileExists(APPROOT . \"/www/Style_$fingerprintRed\");\n\t$this->assertFileExists(APPROOT . \"/www/Style_$fingerprintBlue\");\n\n\t// Only change red's content.\n\tManifestTest::putApprootFile([\n\t\t\"/Style/RedBody.css\" => \n\t\t\t\"body#red {\n\t\t\t\tbackground: red;\n\t\t\t\tcolor: white;\n\t\t\t}\",\n\t]);\n\n\t$this->assertFalse($fileOrganiserRed->isStyleScriptFilesCacheValid());\n\t$this->assertFalse($fileOrganiserBlue->isStyleScriptFilesCacheValid());\n\n\t$copyDoneRed = $fileOrganiserRed->organise();\n\n\t$this->assertTrue($manifestRed->isCacheValid());\n\t$this->assertFalse($manifestBlue->isCacheValid());\n\n\t// Change blue's scropt content.\n\tManifestTest::putApprootFile([\n\t\t\"/Script/Test.js\" => \n\t\t\t\"alert('Modified');\",\n\t]);\n\n\t$this->assertFalse($fileOrganiserRed->isStyleScriptFilesCacheValid());\n\t$this->assertFalse($fileOrganiserBlue->isStyleScriptFilesCacheValid());\n\n\t$copyDoneRed = $fileOrganiserRed->organise();\n\n\t$this->assertTrue($manifestRed->isCacheValid());\n\t$this->assertFalse($manifestBlue->isCacheValid());\n}", "title": "" }, { "docid": "f7f4fd2270535aff47960e5695fa902d", "score": "0.4864453", "text": "public function action_update_check()\n\t{\n\t\tUpdate::add('Quoticious', 'cffb07c5-ab53-42e7-b42d-08133097244c', $this->info->version);\n\t}", "title": "" }, { "docid": "10766d5da11d1c196ab8e754d99c3bce", "score": "0.48630673", "text": "public function check_version() {\n\n\t\t$theme = wp_get_theme( get_template() );\n\t\t$this->db_version = get_theme_mod( 'flatsome_db_version', '3.0.0' );\n\t\t$this->running_version = $theme->version;\n\n\t\t// If current version is new and current version has any update run it.\n\t\tif ( version_compare( $this->db_version, $this->running_version, '<' ) && version_compare( $this->db_version, max( array_keys( $this->updates ) ), '<' ) ) {\n\t\t\t$this->update();\n\t\t\tif ( $this->is_upgrade_completed ) {\n\t\t\t\t$this->update_db_version();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a234fa2afd10b74366f0870d4a5f0ce5", "score": "0.48609915", "text": "private function needToMoveVersion(File $file)\n {\n $visibility = $file->getVisibility();\n $this->validateVisibility($file, $visibility);\n $canView = Member::actAs(null, function () use ($file) {\n return $file->canView();\n });\n\n if (!$canView && $visibility === AssetStore::VISIBILITY_PUBLIC) {\n // File should be protected but is on the public store\n return AssetStore::VISIBILITY_PROTECTED;\n }\n\n if ($canView && $visibility === AssetStore::VISIBILITY_PROTECTED) {\n // File should be public but is on the protected store\n return AssetStore::VISIBILITY_PUBLIC;\n }\n\n return false;\n }", "title": "" }, { "docid": "34f24a9357b3ad5db940d596cba5b3d2", "score": "0.4856303", "text": "public function setUsesOriginalFile()\n {\n // @todo check if some of these properties can/should be set in a generic update method\n $this->identifier = $this->originalFile->getIdentifier();\n $this->updated = true;\n $this->originalFileSha1 = $this->originalFile->getSha1();\n }", "title": "" }, { "docid": "166c00995ec8114967d7d02455d59187", "score": "0.48494914", "text": "public function testNoViolationsInFileOnValidVersion()\n {\n $file = $this->sniffFile(__FILE__, '7.3');\n $this->assertNoViolation($file);\n }", "title": "" }, { "docid": "166c00995ec8114967d7d02455d59187", "score": "0.48494914", "text": "public function testNoViolationsInFileOnValidVersion()\n {\n $file = $this->sniffFile(__FILE__, '7.3');\n $this->assertNoViolation($file);\n }", "title": "" }, { "docid": "939b3ff1ef0b2ba54ea4b23ecf9bc345", "score": "0.48446098", "text": "public function store(Request $request)\n {\n if ( ! Auth::user()->can(\"edit-virtues\")){\n return HomeController::returnError(403);\n }\n\n if( ! session('company')){\n return $this->returnError(403, trans('general.http.select_company'), route('companies'));\n }\n\n $totalVirtues = Virtue::where('company','=',session('company'))->get();\n\n if (count($totalVirtues) > 5) {\n Session::flash('update', ['code' => 500, 'title' => 'Hierarchy constraint violation', 'message' => \"Trying to add too many virtues, max number is 6. \"]);\n return redirect(route('virtues'));\n }\n\n $validateto = [\n 'virtue_id' => 'required|unique:virtues',\n 'name' => 'required',\n 'weight' => 'required',\n 'attachment' => 'required|mimes:jpeg,jpg,png,gif,svg|max:10000',\n ];\n\n $this->validate($request, $validateto);\n $attributes = $request->all();\n $attributes[\"active\"] = (array_key_exists('active', $attributes)) ? intval($attributes[\"active\"]) : 0;\n \n\n\t\t$file = FRequest::file('attachment');\n\t\t$extension = $file->getClientOriginalExtension();\n\t\t$uuid = Uuid::generate(4);\n\t\t$filename = $uuid.'.'.$extension;\n\t\t$path = session('company').'/virtues/'.$filename;\n\n\t\t$savelocal = Storage::disk('local')->put($path, FFile::get($file));\n\t\tif (!$savelocal) {\n\t\t\treturn HomeController::returnError(404);\n\t\t}\n\t\t$contents = Storage::disk('local')->read($path);\n\t\t$save = Storage::disk('s3')->put($path, $contents);\n\t\tif ($save) {\n\t\t\tStorage::disk('local')->delete($path);\n\n Storage::disk('s3')->setVisibility( $path , 'public');\n $bucket = Config::get('filesystems.disks.s3.bucket');\n $s3 = Storage::disk('s3');\n $url = $s3->getDriver()->getAdapter()->getClient()->getObjectUrl($bucket, $path);\n\n\t\t\tSession::flash('update', ['code' => 200, 'message' => 'File was uploaded']);\n\n\n\t\t\tFile::create([\n\n\t\t\t\t'file_id' => $uuid,\n 'company' => session('company'),\n 'type' => 'virtues',\n 'path' => $path,\n 'name' => $filename,\n 'public_url' => $url,\n\n ]);\n Virtue::create([\n\n 'virtue_id' => $attributes['virtue_id'],\n 'company' => session('company'),\n 'name' => $attributes['name'],\n 'description' => $attributes['description'],\n 'file' => $uuid,\n 'weight' => $attributes['weight'],\n 'active' => $attributes[\"active\"],\n \t]);\n\n \tSession::flash('update', ['code' => 200, 'message' => 'Core Value was added']);\n\t\t}else{\n \t return HomeController::returnError(404);\n\t\t}\n\n\n\t\treturn redirect(route('virtues'));\n }", "title": "" }, { "docid": "4c4a5ceb08134c0f43f3333958ee7931", "score": "0.4837355", "text": "private static function save_plugin_version() {\n \t$current_version = get_option( 'jpid_version', '' );\n \t$update_version = empty( $current_version ) || ( version_compare( $current_version, JPID_VERSION ) < 0 );\n\n \tif ( $update_version ) {\n \t\tupdate_option( 'jpid_version', JPID_VERSION );\n \t}\n }", "title": "" }, { "docid": "fdf7c309418d6e90ea7d518c21d946b6", "score": "0.48345447", "text": "function multisite_audio_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {\n list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);\n\n // On new revisions, all files are considered to be a new usage and no\n // deletion of previous file usages are necessary.\n if (!empty($entity->revision)) {\n foreach ($items as $item) {\n $file = (object) $item;\n file_usage_add($file, 'file', $entity_type, $id);\n }\n return;\n }\n\n // Build a display of the current FIDs.\n $current_fids = array();\n foreach ($items as $item) {\n $current_fids[] = $item['fid'];\n }\n\n // Compare the original field values with the ones that are being saved. Use\n // $entity->original to check this when possible, but if it isn't available,\n // create a bare-bones entity and load its previous values instead.\n if (isset($entity->original)) {\n $original = $entity->original;\n }\n else {\n $original = entity_create_stub_entity($entity_type, array(\n $id,$vid, $bundle));\n field_attach_load($entity_type, array($id => $original), FIELD_LOAD_CURRENT, array('field_id' => $field['id']));\n }\n $original_fids = array();\n if (!empty($original->{$field['field_name']}[$langcode])) {\n foreach ($original->{$field['field_name']}[$langcode] as $original_item) {\n $original_fids[] = $original_item['fid'];\n if (isset($original_item['fid']) && !in_array($original_item['fid'], $current_fids)) {\n // Decrement the file usage count by 1 and delete the file if possible.\n file_field_delete_file($original_item, $field, $entity_type, $id);\n }\n }\n }\n\n // Add new usage entries for newly added files.\n foreach ($items as $item) {\n if (!in_array($item['fid'], $original_fids)) {\n $file = (object) $item;\n file_usage_add($file, 'file', $entity_type, $id);\n }\n }\n}", "title": "" }, { "docid": "de331bc21ffe8de701abe4cbd4919ac7", "score": "0.48330092", "text": "public function testVersioning()\n\t{\n\t\t$document = R::dispense( 'document' );\n\n\t\t$page = R::dispense( 'page' );\n\n\t\t$document->title = 'test';\n\n\t\t$page->content = 'lorem ipsum';\n\n\t\t$user = R::dispense( 'user' );\n\n\t\t$user->name = 'Leo';\n\n\t\t$document->sharedUser[] = $user;\n\t\t$document->ownPage[] = $page;\n\n\t\t$document->starship_id = 3;\n\t\t$document->planet = R::dispense( 'planet' );\n\n\t\tR::store( $document );\n\n\t\t$duplicate = R::dup( $document );\n\n\t\tR::store( $duplicate );\n\n\t\t$duplicate = R::dup( $document );\n\n\t\tR::store( $duplicate );\n\n\t\tasrt( R::count( 'planet' ), 1 );\n\t\tasrt( R::count( 'user' ), 1 );\n\t\tasrt( R::count( 'document' ), 3 );\n\t\tasrt( R::count( 'page' ), 3 );\n\t\tasrt( R::count( 'spaceship' ), 0 );\n\t}", "title": "" }, { "docid": "180e8361457d0c5203a3c450b45873e7", "score": "0.48294348", "text": "public function after_update()\n {\n if ($this->bean->html) {\n $filename = Flight::get('flight.views.path').'/cache/htm'.md5($this->bean->name).'.php';\n file_put_contents($filename, $this->bean->html);\n }\n if ($this->bean->txt) {\n $filename = Flight::get('flight.views.path').'/cache/txt'.md5($this->bean->name).'.php';\n file_put_contents($filename, $this->bean->txt);\n }\n }", "title": "" }, { "docid": "9932a7455fed96dc5c7cf78695e51df1", "score": "0.48286048", "text": "function asset_version($assetPath, $realPath = null)\n {\n try {\n clearstatcache();\n $filemtime = filemtime($realPath ?: public_path($assetPath));\n return asset(preg_replace('/\\.([^\\.]+)$/', \".$1?$filemtime\", $assetPath));\n } catch (Exception $e) {\n return $assetPath;\n }\n }", "title": "" }, { "docid": "b206062006b0b3e501e75c16eecf7bfb", "score": "0.48265767", "text": "public function afterInstall()\n {\n if ($this->uploadAliasPath && !file_exists(Yii::getPathOfAlias($this->uploadAliasPath)))\n CFileHelper::createDirectory(Yii::getPathOfAlias($this->uploadAliasPath), 0777);\n\n\n if (file_exists(Yii::getPathOfAlias(\"mod.{$this->id}.sql\") . DS . 'dump.sql')) {\n\n if(Yii::app()->settings->get('database', 'tables_engine')){\n Yii::app()->db->importSqlFile(Yii::getPathOfAlias(\"mod.{$this->id}.sql\") . DS . 'dump.sql', Yii::app()->settings->get('database', 'tables_engine'));\n }else{\n Yii::app()->db->importSqlFile(Yii::getPathOfAlias(\"mod.{$this->id}.sql\") . DS . 'dump.sql');\n }\n\n }\n\n\n if (isset($this->configFiles)) {\n foreach ($this->configFiles as $name => $class) {\n $configClass = new $class;\n if (method_exists($configClass, 'defaultSettings')) {\n Yii::app()->settings->set($name, $configClass::defaultSettings());\n }\n }\n }\n\n\n Yii::app()->cache->flush();\n Yii::app()->widgets->clear();\n return true;\n }", "title": "" }, { "docid": "e121ee3f6df91202d1cbd3334b9a5734", "score": "0.48249438", "text": "private function __setVersion() {\n $cache = Zend_Registry::get('cache');\n if (($version = $cache->get('SITE_VERSION')) === false) {\n //no version, load it from file\n if (file_exists(APPLICATION_PATH . '/.version')) {\n $version = trim(file_get_contents(APPLICATION_PATH . '/.version'));\n } else {\n $version = '2.0';\n }\n $cache->set($version, 'SITE_VERSION');\n }\n\n $this->view->siteVersion = $version;\n $this->view->VER = '?' . $version; // for brevity\n }", "title": "" }, { "docid": "6b5275f28c8701fe11d59a023d5de8be", "score": "0.4824799", "text": "function onAfterWrite(){\r\n\t\tparent::onAfterWrite();\r\n\t\t$this->cleaningUpVariationData();\r\n\t}", "title": "" }, { "docid": "81f4da381e7f0896e10dfdd85cc64b0d", "score": "0.481536", "text": "private static function save_db_version() {\n \t$current_db_version = get_option( 'jpid_db_version', '' );\n \t$update_db_version = empty( $current_db_version ) || version_compare( $current_db_version, JPID_DB_VERSION, '<' );\n\n \tif ( $update_db_version ) {\n \t\tupdate_option( 'jpid_db_version', JPID_DB_VERSION );\n \t}\n }", "title": "" }, { "docid": "bcc45d923f66ee18bd4f22c4e82581b0", "score": "0.4814254", "text": "protected function upsertAsset($payload)\n {\n $locales = Locale::all();\n $locales = is_array($locales) ? collect($locales) : $locales;\n $this->assets->toContentfulModel($payload, $locales);\n }", "title": "" }, { "docid": "50f25c173f4bacf89af1f17f28879381", "score": "0.4813798", "text": "function storePackageContents()\n {\n }", "title": "" }, { "docid": "df0e416765150bb1d9e536b5f9661fa5", "score": "0.4811207", "text": "function mafia_upgrade($nom_meta_base_version,$version_cible){\n\t$current_version = 0.0;\n\tif ( (!isset($GLOBALS['meta'][$nom_meta_base_version]) )\n\t\t\t|| (($current_version = $GLOBALS['meta'][$nom_meta_base_version])!=$version_cible)){\n\t\tinclude_spip('base/mafia');\n\t\tif (version_compare($current_version,'0.0','<=')){\n\t\t\tinclude_spip('base/create');\n\t\t\tcreer_base();\n\t\t\tecrire_meta($nom_meta_base_version,$current_version=$version_cible,'non');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7a15896fd3767d7234d91e5abc2fc6d6", "score": "0.48092565", "text": "public function update(Request $request, $slug)\n {\n if(!checkRole(getUserGrade(8)))\n {\n prepareBlockUserMessage();\n return back();\n }\n \t$record = LibraryMaster::getRecordWithSlug($slug);\n\t\t$rules = [\n 'asset_type_id' => 'bail|required' ,\n 'title' => 'bail|required|max:60' ,\n 'author_id' => 'bail|required' ,\n 'publisher_id' => 'bail|required' ,\n 'actual_price' => 'bail|required|numeric' ,\n 'chargible_price_if_lost' => 'bail|required|numeric' ,\n ];\n\n $asset_belongs_to_subject = $request->asset_belongs_to_subject;\n\n if($asset_belongs_to_subject)\n {\n $rules['subject_id'] = 'bail|required|integer';\n }\n\n //Validate the overall request\n $this->validate($request, $rules);\n $name = $request->title;\n if($name != $record->title)\n $record->slug = $record->makeSlug($name);\n\n $record->title = $name;\n\n $record->asset_type_id = $request->asset_type_id;\n $record->author_id = $request->author_id;\n $record->publisher_id = $request->publisher_id;\n $record->actual_price = $request->actual_price;\n $record->chargible_price_if_lost = $request->chargible_price_if_lost;\n $record->description = $request->description;\n $record->isbn = $request->isbn;\n $record->edition = $request->edition;\n $record->record_updated_by = Auth::user()->id;\n $record->update_stamp($request);\n $record->save();\n $file_name = 'image';\n if ($request->hasFile($file_name))\n {\n\n $rules = array( $file_name => 'mimes:jpeg,jpg,png,gif|max:10000' );\n $this->validate($request, $rules);\n /**\n * Delete the old file\n * upload the new file\n */\n\n $librarySettings = (object) json_decode((new LibrarySettings())->getSettings());\n if(!env('DEMO_MODE')) {\n $this->deleteFile($record->image, $librarySettings->libraryImagepath);\n $this->deleteFile($record->image, $librarySettings->libraryImageThumbnailpath);\n $record->image = $this->processUpload($request, $record,$file_name);\n }\n $record->update_stamp($request);\n $record->save();\n }\n\n flash(getPhrase('success'),getPhrase('record_updated_successfully'), 'success');\n return redirect('library/master');\n }", "title": "" }, { "docid": "be35139e3343802288affaa03a41ccb1", "score": "0.48058084", "text": "function produktliste_update_db_check() {\n global $produktliste_db_version;\n if (get_site_option( 'produktliste_db_version' ) != $produktliste_db_version ) {\n produktliste_install();\n }\n}", "title": "" }, { "docid": "f44656931049bfe0f0038a7adaa2310c", "score": "0.4802603", "text": "function version_ensure_unique( $p_version, $p_project_id = null ) {\n\tif( !version_is_unique( $p_version, $p_project_id ) ) {\n\t\ttrigger_error( ERROR_VERSION_DUPLICATE, ERROR );\n\t}\n}", "title": "" }, { "docid": "a468da8a44656c7bfde2b527fcd991fe", "score": "0.48021215", "text": "public static function handleChanges() {\n /*$app = JFactory::getApplication();\n $saved = plgSystemJBetolo::param('templates');\n $curr = $app->getTemplate();\n $appName = $app->getName();\n\n if (!isset($saved[$appName]) || $saved[$appName] != $curr) {\n jbetoloHelper::resetCache($appName);\n $saved[$appName] = $curr;\n plgSystemJBetolo::param('templates', $saved, 'set');\n }\n\n if (!jbetoloHelper::isJ16()) {\n $saved = plgSystemJBetolo::param('mooversion');\n\n jimport('joomla.plugin.plugin');\n $curr = JPluginHelper::getPlugin('system', 'mtupgrade') ? '+1.2' : '1.1';\n\n if (!isset($saved) || $saved != $curr) {\n jbetoloHelper::resetCache();\n plgSystemJBetolo::param('mooversion', $curr, 'set');\n }\n }*/\n }", "title": "" }, { "docid": "84218f213092478f0e1b110bd8e953d8", "score": "0.47932202", "text": "public function _actualizar(){\r\n \r\n $ultima = trim($this->_ultmaVersion()); \r\n $conjuntodearchivos = $this->url_get_contents(__SERVER_UPGRADE_DIR.$ultima.'/index.php') or die (__SERVER_UPGRADE_DIR.$ultima.'/index.php'); \r\n if ( !is_dir( __SITE_PATH.'/versiones/'.$ultima ) ){ \r\n mkdir ( __SITE_PATH.'/versiones/'.$ultima );\r\n }\r\n $archivos = explode(\";\", $conjuntodearchivos);\r\n # models*a.txt*php; \r\n # bajamos los archivs de la actualizacion\r\n foreach ($archivos as $value) {\r\n $value = str_replace(\"\\\\n\", \"\", $value);\r\n $array_data = explode(\"*\", $value);\r\n $data_ruta = $array_data[0];\r\n $data_archivo = $array_data[1];\r\n $data_extension = $array_data[2];\r\n $contenido_archivo = $this->url_get_contents(__SERVER_UPGRADE_DIR.$ultima.'/'.$data_archivo); \r\n $ar = fopen(__SITE_PATH.'/versiones/'.$ultima.'/'.$data_archivo,\"w\") or die(\"Problemas en la creacion \".__SITE_PATH.'/versiones/'.$ultima.'/'.$data_archivo);\r\n fputs($ar,$contenido_archivo);\r\n fclose($ar);\r\n $res = explode(\".\", $data_archivo);\r\n # renombramos el archivo\r\n $res_final = $res[0].\".\".$data_extension;\r\n $archivo_final = __SITE_PATH.'/versiones/'.$ultima.'/'.$res[0].\".\".$data_extension;\r\n rename(__SITE_PATH.'/versiones/'.$ultima.'/'.$data_archivo,$archivo_final);\r\n #renombramos y reemplazamos el nuevo archivo \r\n copy($archivo_final,__SITE_PATH.'/'.trim($data_ruta).'/'.$res_final);\r\n }\r\n $ar = fopen(__VERSION_FILE,\"w+\");\r\n fputs($ar,$ultima);\r\n fclose($ar); \r\n \r\n }", "title": "" }, { "docid": "cfe639b4f585faec6d035c7100a9e613", "score": "0.47898126", "text": "public function postUpdate(File $file, LifecycleEventArgs $args): void\n {\n if ($file->getExternalUrl()) {\n // Externally stored files are not present in filesystem.\n return;\n }\n\n $changeSet = $args->getObjectManager()->getUnitOfWork()->getEntityChangeSet($file);\n if (!empty($changeSet['filename'][0])) {\n $this->filesShouldBeDeleted[] = $changeSet['filename'][0];\n }\n }", "title": "" }, { "docid": "12f22fcb9b7de06295ef534027564213", "score": "0.47890434", "text": "public function upgrade() {\n if (file_exists($this->fullpath)) {\n // Save the new file and report it\n return $this->handleSave();\n }\n\n return false;\n }", "title": "" }, { "docid": "b5cfde2cf48cf1f84882c9d629ba4cfb", "score": "0.47884396", "text": "public function upgrade()\n\t{\n\t\t$files = $this->getOption();\t\t\n\t\t$filesExist = $this->_filesExist( $files );\n\t\tif( !$filesExist ) {\n\t\t\t$this->deleteOption();\n\t\t\t$files = array();\t\t\t\n\t\t}\n\t\t\n\t\t// only upgrade if files already exist\n\t\tif( !empty( $files ) || !$filesExist ) {\n\t\t\t$this->create( $files );\n\t\t\t$this->deleteAll( false, true );\n\t\t\t$this->deleteOption();\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "e4b1aba66e9af5bbaf7a02c4498b558b", "score": "0.4786523", "text": "private function fromUnversioned()\n {\n $this->out->writeln('Updating database from unknown version');\n // There's already a bookmark table, but no settings yet.\n // Basically the state of the project as this was written.\n $sql = '\n CREATE TABLE IF NOT EXISTS \"setting\" (\n \"key\" text NOT NULL,\n \"value\" text NOT NULL\n )';\n DBA::execute($sql);\n return true;\n }", "title": "" }, { "docid": "31f058134ea93184914c6a5bf581760e", "score": "0.47816828", "text": "protected function updateRelatedAssets()\n {\n if ($this->asset_count) {\n Asset::updateAll(['entry_id' => $this->entry_id], ['section_id' => $this->id]);\n }\n }", "title": "" }, { "docid": "aaa4063a70d27e3999853f33070f6993", "score": "0.4779989", "text": "public function beforeValidate()\n {\n /** @var BaseActiveRecord $model */\n $model = $this->owner;\n $this->files = UploadedFile::getInstances($model, $this->imageVariable);\n if ($this->files instanceof UploadedFile) {\n $model->{$this->imageVariable} = $this->files;\n }\n }", "title": "" }, { "docid": "b941b28fc04854e8832b94c65f6c0fc6", "score": "0.47745225", "text": "public function actionAsset()\n {\n $hash_id = $this->getHashID('use/asset');\n if ($hash_id != \"\") {\n if (Asset::model()->fileName($hash_id)->exists()) {\n $asset = Asset::model()->fileName($hash_id)->find();\n\n $asset->is_used = Asset::IS_USED;\n $asset->save();\n\n $this->renderJSON([\n 'success' => \"Asset is now used.\"\n ]);\n } else {\n $this->renderJSONError(\"Asset not found.\");\n }\n } else {\n $this->renderJSONError(\"Please send the asset file_name\");\n }\n }", "title": "" }, { "docid": "cbb7ee51dfbb76e98ab727271151fcef", "score": "0.47742078", "text": "function checkFpmMagentoFilesUptodate()\n {\n $sampleConfig = PATH_CONFIG_FPM;\n\n return (filemtime($sampleConfig . '/pool.d/magento.conf') <= filemtime('/etc/php5/fpm/pool.d/magento.conf'));\n }", "title": "" }, { "docid": "cb81ec5afce67a7eedf06a0130286220", "score": "0.4768905", "text": "private function checkFile(): void\n {\n if (!file_exists($this->imdbFolder . $this->file)) {\n rename($this->imdbFolder . self::TEMP_FILE, $this->imdbFolder . $this->file);\n unlink($this->imdbFolder . self::TEMP_FILE);\n }\n return;\n }", "title": "" }, { "docid": "86abff8fa89ba338490decaa17f7a389", "score": "0.4766789", "text": "protected function beforeUpdate()\n\t{\n\t\tif ($this->getMode() != \"filelist\")\n\t\t{\n\t\t\t$this->updateMetaData();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4db420ee58ce731d64d1dc7ec39e1d94", "score": "0.47566965", "text": "function _core_asset($asset)\n{\n echo base_url() . 'assets/core/' . $asset . '?v=' . get_setting('current_version');\n}", "title": "" }, { "docid": "94a4403ed914ea5b18233587417b4823", "score": "0.47560963", "text": "public function cleanupFiles() {\n\t\t\n\t\t//go through assets/ dir and find downloadable_* files\n\n\t\t$dir = ASSETS_PATH . \"/\";\n\t\t$pattern = 'downloadable_*';\n\t\t$files = $this->findFile($dir, $pattern);\n\n\t\tif ($files && is_array($files)) foreach ($files as $file) {\n\t\t\t$filelastmodified = filemtime($file);\n\n\t\t\tif($filelastmodified < strtotime('-'.Downloadable_Item::$downloadWindow)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "title": "" }, { "docid": "08386de489f8bbcca2c62c609168fe57", "score": "0.47539732", "text": "public function store()\n\t{\n\t if(!(Auth::User()->admin || Auth::User()->manager))\n\t return redirect()->back();\n\t $input = Input::all();\n\t $rules = ['asset_tag' => ['required', 'min:6', 'max:6', 'unique:assets'],\n\t 'description' => 'required'\n\t ];\n\t \n\t $validator = Validator::make($input, $rules); \n\t \n\t if($validator->fails())\n\t return redirect()->back()->withErrors($validator);\n\t \n\t \n\t\t$asset = new Asset();\n\t\t$asset->asset_tag = $input['asset_tag'];\n\t\t$asset->description = $input['description'];\n\t\t$asset->broken = false;\n\t\t$asset->save();\n\t\t\n\t\treturn redirect('assets/')->withMessage('Asset '.$asset->asset_tag.' created!');\n\t}", "title": "" }, { "docid": "817912470477adc51546a5d674661806", "score": "0.47495514", "text": "function maybe_version_script( $src, $handle ) {\n\tglobal $wp_scripts;\n\n\treturn maybe_version_asset( $src, $handle, $wp_scripts );\n}", "title": "" }, { "docid": "c5b597355ddf110e3445be8417a4cc06", "score": "0.47470883", "text": "public function defineAssetPublishing()\n {\n $this->publishes([\n RABC_PATH.'/public' => public_path('vendor/rbac'),\n ], 'assets');\n }", "title": "" }, { "docid": "efbf31a5b63a4dfb3f7df4376e39b8ce", "score": "0.47464627", "text": "public function testNoViolationsInFileOnValidVersion()\n {\n $file = $this->sniffFile(__FILE__, '5.1');\n $this->assertNoViolation($file);\n }", "title": "" }, { "docid": "7422f799fb6f9ca620edc919b8b635a4", "score": "0.47449836", "text": "function asset_path($filename)\n {\n // In development environment, just use the file with no hash\n if (App::environment() === 'local') {\n return asset('assets/'.$filename);\n }\n\n // In other environments, assets come with hashes\n $path = base_path('rev.json');\n $manifest = file_exists($path)\n ? json_decode(file_get_contents($path), true)\n : [];\n\n return array_key_exists($filename, $manifest)\n ? asset('assets/'.$manifest[$filename])\n : asset('assets/'.$filename);\n }", "title": "" }, { "docid": "198abf214202753a61bd579c03a3f06c", "score": "0.47428435", "text": "function my_block_plugin_scripts() {\n\tif(!is_admin()){\n\t\n\t\t$post = get_post(); \n\t\tif ( has_blocks( $post->post_content ) ) {\n\t\t\t\t$blocks = parse_blocks( $post->post_content );\n\t\t\t\tforeach ($blocks as $key => $value) {\n\n\t\t\t\t\t$blockName = str_replace('asb/', \"\", $value['blockName']);\n\t\t\t\t\t$blockFilePath = plugin_dir_path( __DIR__ ) . 'dist/'.$blockName.'.js' ;\n\t\t\t\t\t\n\t\t\t\t\tif(file_exists($blockFilePath)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$version = date(\"ymd-Gis\", filemtime( $blockFilePath ));\n\n\t\t\t\t\t\twp_enqueue_script( $blockName, plugins_url( '/dist/'.$blockName.'.js', dirname( __FILE__ ) ), array(), $version, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "d1e8f5cd5c800b3bdd2d1e4d0c29437c", "score": "0.47419122", "text": "protected function setAssets() {\n\t\tif ($this->dev) {\n\t\t\t$this->assetPath = \"/assets\";\n\t\t} else {\n\t\t\t$this->assetPath = \"https://s3.amazonaws.com/2721west-assets\";\n\t\t}\n\t}", "title": "" }, { "docid": "3be22ce16ebf439689de4d7219a1aa29", "score": "0.47417638", "text": "public function validateURIs(){\n\t\n\t\t $URIs = array(\"ia_thumb\" => $this->thumbURI,\n\t\t\t \"ia_preview\" => $this->previewURI,\n\t\t\t \"ia_fullfile\" => $this->fullURI);\n\t\t \n\t\t foreach($URIs as $key => $uri){\n\t\t\t\t$fileSize = $this->remote_filesize($uri);\n\t\t\t\tif($fileSize < 1){\n\t\t\t\t\t $uriArray = explode(\".\", $uri);\n\t\t\t\t\t $dotCount = count($uriArray);\n\t\t\t\t\t $lastItem = $dotCount - 1;\n\t\t\t\t\t $lastExtension = \".\".$uriArray[$lastItem];\n\t\t\t\t\t $lowerExtension = strtolower($lastExtension);\n\t\t\t\t\t $upperExtension = strtoupper($lastExtension);\n\t\t\t\t\t $lowerURI = str_replace($lastExtension, $lowerExtension, $uri);\n\t\t\t\t\t $upperURI = str_replace($lastExtension, $upperExtension, $uri);\n\t\t\t\t\t if($lowerURI != $uri){\n\t\t\t\t\t\t $newURI = $lowerURI;\n\t\t\t\t\t\t $fileSize = $this->remote_filesize($lowerURI);\n\t\t\t\t\t }\n\t\t\t\t\t elseif($upperURI != $uri){\n\t\t\t\t\t\t $newURI = $upperURI;\n\t\t\t\t\t\t $fileSize = $this->remote_filesize($upperURI);\n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t if($fileSize>0){\n\t\t\t\t\t\t $doUpdate = true;\n\t\t\t\t\t\t $data[$key] = $newURI;\n\t\t\t\t\t\t if($key == \"ia_thumb\"){\n\t\t\t\t\t\t\t\t$this->thumbURI = $newURI;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t if($key == \"ia_preview\"){\n\t\t\t\t\t\t\t\t$this->previewURI = $newURI;\n\t\t\t\t\t\t }\n\t\t\t\t\t\t if($key == \"ia_fullfile\"){\n\t\t\t\t\t\t\t\t$this->fullURI = $newURI;\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($key == \"ia_fullfile\" && $fileSize>0){\n\t\t\t\t\t $this->fileSize = $fileSize;\n\t\t\t\t\t $data[\"filesize\"] = $fileSize;\n\t\t\t\t}\n\t\n\t\t }//end loop\n\t\n\t\t if($this->fileSize > 0){\n\t\t //update the data \n\t\t\t\t$db = $this->db;\n\t\t\t\tif($this->dbPenelope){\n\t\t\t\t\t $where = array();\n\t\t\t\t\t $where[] = \"uuid = '\".$this->itemUUID.\"' \";\n\t\t\t\t\t $db->update(\"resource\", $data, $where);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $where = array();\n\t\t\t\t\t $where[] = \"uuid = '\".$this->itemUUID.\"' \";\n\t\t\t\t\t $db->update(\"resource\", $data, $where);\n\t\t\t\t} \n\t\t }\n\t\n }", "title": "" }, { "docid": "2d7a4f6e15ab44e9a4a443ab0ccaae72", "score": "0.47401956", "text": "function hook_shrinkdb_entity_types() {\n return ['file', 'media'];\n}", "title": "" } ]
201560bc76028c6fa2e2b91099162353
Populates Yii::$app with a new application The application will be destroyed on tearDown() automatically.
[ { "docid": "f52aac95ee0c61eb96322aa3f21d0742", "score": "0.59020346", "text": "protected function mockApplication($config = [], $appClass = '\\yii\\console\\Application')\n {\n new $appClass(ArrayHelper::merge([\n 'id' => 'testapp',\n 'basePath' => __DIR__,\n 'vendorPath' => __DIR__ . '/../vendor',\n ], $config));\n }", "title": "" } ]
[ { "docid": "0f63229afc2f2997decbd42e38fd7abb", "score": "0.76173264", "text": "protected function mockApplication()\n {\n new Application($this->loadConfig());\n Yii::$container = new Container();\n }", "title": "" }, { "docid": "b7d32c847a32c87924aa5c4b3b80cdab", "score": "0.75576496", "text": "protected function refreshApplication()\n {\n $this->app = $this->createApplication();\n\n $this->app['env'] = 'testing';\n\n $this->app->boot();\n }", "title": "" }, { "docid": "35c97b6eb0e0ec6606236e2c3a49af0c", "score": "0.7368716", "text": "protected function refreshApplication()\n {\n putenv('APP_ENV=testing');\n $this->app = $this->createApplication();\n }", "title": "" }, { "docid": "5d5311ed9e862da736c44c9e9f22563f", "score": "0.7316709", "text": "protected function refreshApplication()\n {\n $this->app = $this->createApplication();\n }", "title": "" }, { "docid": "ed8a73ba00ecef3fbcfb0fb88ed31455", "score": "0.7099861", "text": "private static function getYiiApplication()\n\t{\n\t\tif (self::$_app) {\n\t\t\treturn self::$_app;\n\t\t}\n\t\t$vendor = realpath(\n\t\t\t__DIR__ . DIRECTORY_SEPARATOR\n\t\t\t. '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR\n\t\t\t. 'vendor'\n\t\t);\n\t\tself::$_app = \\core\\MelonApp::create(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'console', $vendor, true);\n\t\treturn self::$_app;\n\t}", "title": "" }, { "docid": "8ff585d587e661a0dcd4cb9a89b88874", "score": "0.70513713", "text": "public function setUp(): void\n {\n if (isset(\\Yii::$app)) {\n return;\n }\n \\Yii::$container = new Container();\n \\Yii::createObject([\n 'class' => Application::class,\n 'id' => mt_rand(),\n 'basePath' => __DIR__,\n ]);\n }", "title": "" }, { "docid": "688f902a18d7288ae7587bd57137075e", "score": "0.6874724", "text": "protected function createApplication() {\n if (!defined('SLUG')) {\n define('SLUG', '');\n }\n $this->_app = require __DIR__ . '/../app.php';\n $this->_app['debug'] = true;\n $this->_app['exception_handler']->disable();\n }", "title": "" }, { "docid": "d4c28acc806bd5e8b22e24de0bf99399", "score": "0.67640966", "text": "private function refreshApplication(): void\n {\n $this->app = self::$application;\n $unsullied = $this->database . '/unsullied.sqlite';\n $testing = $this->database . '/testing.sqlite';\n\n copy($unsullied, $testing);\n Facade::setFacadeApplication($this->app);\n Facade::clearResolvedInstances();\n\n $this->client = new Client(static function ($verb, $payload) {\n return Application::onRequest($verb, $payload);\n }, $this->app);\n }", "title": "" }, { "docid": "eeada3b604220dedd4f25c3cd9a56c16", "score": "0.6705212", "text": "protected function destroyApplication() {\r\n Yii::$app = null;\r\n Yii::$container = new Container();\r\n }", "title": "" }, { "docid": "fe6cbfece4d0e4dea3153d0c4835adf4", "score": "0.67021567", "text": "private function createApplication(): void\n {\n if (self::$application) {\n $this->refreshApplication();\n return;\n }\n\n /** @var Application|mixed $app */\n $app = new Application();\n Facade::setFacadeApplication($app);\n $app->setBasePath($this->basePath);\n\n $app->singleton('app', static function () use ($app) {\n return $app;\n });\n\n if ($this->path && !count($this->paths)) {\n foreach (['', 'storage', 'view', 'public', 'base'] as $part) {\n $this->paths[$part] = $this->path;\n }\n }\n\n foreach ($this->paths as $path => $value) {\n $second = $path;\n if ($second) {\n $second = '.' . $second;\n }\n\n $app->instance('path' . $second, $value);\n }\n\n $this->executeBindings($app);\n\n $pagination = new PaginationServiceProvider($app);\n $pagination->register();\n\n $views = new ViewServiceProvider($app);\n $views->register();\n\n /** @var ServiceProvider[] $providers */\n $providers = [];\n foreach ($this->providers as $provider) {\n $providers[] = new $provider($app);\n }\n\n foreach ($providers as $provider) {\n $provider->register();\n }\n\n $this->bindings($app);\n\n $this->boot($providers);\n\n $this->app = $app;\n $this->setDatabases($app);\n\n foreach ($this->routes as $route) {\n /** @noinspection PhpIncludeInspection */\n require $route;\n }\n\n $this->booted($app);\n\n self::$application = $this->app;\n $this->client = new Client(static function ($verb, $payload) {\n return Application::onRequest($verb, $payload);\n }, $this->app);\n }", "title": "" }, { "docid": "aefd72f08ffdf17c4eed19727f9790a6", "score": "0.66411215", "text": "protected function destroyApplication()\n {\n Yii::$app = null;\n Yii::$container = new Container();\n }", "title": "" }, { "docid": "aefd72f08ffdf17c4eed19727f9790a6", "score": "0.66411215", "text": "protected function destroyApplication()\n {\n Yii::$app = null;\n Yii::$container = new Container();\n }", "title": "" }, { "docid": "af17b0445d2db78df693d914bdce2f3d", "score": "0.65844774", "text": "public function testCreateApp()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "0e8b121f9493bfb266f11c55424532fa", "score": "0.65690947", "text": "public function createApplication()\n {\n $app = parent::createApplication();\n $app['config']->set('app.key', 'base64:LAgRRIqqEFcnz1FU5Or1IX3YVIRNnQk4lXsaxI26Hb4=');\n $app['config']->set('auth.providers.users.model', 'Tests\\Fixtures\\User');\n $app['config']->set('admin.models', []);\n\n Hash::setRounds(4);\n\n return $app;\n }", "title": "" }, { "docid": "09e7812e8a55effbb9f92c2801d8f048", "score": "0.65360165", "text": "public function createApplication(){\n\t}", "title": "" }, { "docid": "76b2251dbe7690006374fa449810d5be", "score": "0.6526923", "text": "public function setUp()\n {\n if ($this->app === null) {\n $this->refreshApplication();\n }\n }", "title": "" }, { "docid": "ed582e69ae0d574588451ea6f8cfcd3c", "score": "0.65238607", "text": "protected function refreshApplication(): void\n {\n // Builder::rebuild();\n\n $container = new Container(\n require Builder::path('tests'),\n require Builder::path('providers'),\n );\n $this->container = $container;\n $this->permission = $this->container->get(Permission::class);\n }", "title": "" }, { "docid": "4b16d799cf49db0dec24179e0871a291", "score": "0.6510833", "text": "function createApplication() {\n\n $app = require ROOT.'/src/app.php';\n \n $app[\"debug\"] = true;\n //var_dump($app['database']);die;\n\tunset($app['exception_handler']);\n return $app;\n}", "title": "" }, { "docid": "8cafd54c40a6499be4634c0e221b3bfd", "score": "0.64940083", "text": "public function createApplication()\n {\n require __DIR__.'/../../../../vendor/autoload.php';\n require __DIR__.'/../../../../app/bootstrap.php';\n\n date_default_timezone_set('Europe/Paris');\n\n $app = new ArtsperApp;\n $app['session.test'] = true;\n $app['debug'] = true;\n unset($app['exception_handler']);\n\n return $this->app = $app;\n }", "title": "" }, { "docid": "3af61b36673a835c77402e8394bdd051", "score": "0.6469754", "text": "abstract public function createApplication();", "title": "" }, { "docid": "3af61b36673a835c77402e8394bdd051", "score": "0.6469754", "text": "abstract public function createApplication();", "title": "" }, { "docid": "cee42e09bb71e22e6d6f438ab9a881c9", "score": "0.6467204", "text": "public function setUp()\n {\n $this->app = $this->createApplication();\n }", "title": "" }, { "docid": "e1444b3a442b584e651ca3cdc744e147", "score": "0.64370406", "text": "protected function mockApp()\n {\n $this->app = Mockery::mock(\n 'Illuminate\\Foundation\\Application',\n 'Illuminate\\Container\\Container'\n );\n }", "title": "" }, { "docid": "a0183da5ba065d6bdb81cbc778d01945", "score": "0.6417551", "text": "public function createApplication()\n {\n return require __DIR__ . \"/../bootstrap/app.php\";\n }", "title": "" }, { "docid": "bdd55675801a3fc32d5eb3f239c698c5", "score": "0.63925856", "text": "public static function mock_apps() {\n\n\t\tself::$backup_app = WordPoints_App::$main;\n\n\t\tWordPoints_App::$main = new WordPoints_PHPUnit_Mock_App_Silent(\n\t\t\t'apps'\n\t\t);\n\n\t\treturn WordPoints_App::$main;\n\t}", "title": "" }, { "docid": "2c4304b399b448d89d40fa07464a6fee", "score": "0.63698584", "text": "public function testUpdateApp()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "916a7685d05311221085688ffd435543", "score": "0.6359229", "text": "public function setUp() {\n if (!class_exists(static::$applicationClass)) {\n throw new \\RuntimeException('Application class \"'. static::$applicationClass .'\" does not exist. Has it been properly loaded?');\n }\n\n $appClass = static::$applicationClass;\n $this->application = new $appClass();\n Framework::run($this->application, 'test', true, Framework::MODE_TEST);\n }", "title": "" }, { "docid": "dcbd0b6d039daee683dd486d2dff75b8", "score": "0.6351736", "text": "public function createApplication()\n {\n return new \\Illuminate\\Foundation\\Application();\n }", "title": "" }, { "docid": "6b3736c21a9554047114d4ab12c09a50", "score": "0.6342385", "text": "function app() {\n return Yii::$app;\n}", "title": "" }, { "docid": "1d16c3a35b05af63c41af0796e1908bb", "score": "0.63326794", "text": "function initiate() {\n $app = new App();\n }", "title": "" }, { "docid": "55c8ed46ecd678f5a03d17786f4e6ed4", "score": "0.63294154", "text": "private function getApplication(): Application\n {\n $application = new Application();\n $application->setConfig(new Config());\n $application->setAutoExit(false);\n $this->createTestDb($application);\n\n return $application;\n }", "title": "" }, { "docid": "cf97080f86f71ebacdde8426ab5babba", "score": "0.63258713", "text": "public function createApplication()\n {\n require __DIR__.'/../../src/app.php';\n\n $app['debug'] = true;\n unset($app['exception_handler']);\n\n $this->app = $app;\n\n $rateMock = new RateLimitMock();\n $this->mockProvider('ratelimit', $rateMock->setRateLimited(false));\n\n require __DIR__.'/../../config/prod.php';\n require __DIR__.'/../../src/routes.php';\n require __DIR__.'/../../src/controllers.php';\n\n return $app;\n }", "title": "" }, { "docid": "cc40d698f1ed94b0b6a4b0e9ce789833", "score": "0.6304276", "text": "function app()\n{\n return Yii::app();\n}", "title": "" }, { "docid": "7424c42bd7a620eeba43d30bd74c1be1", "score": "0.6295233", "text": "function app() {\n return Yii::app();\n}", "title": "" }, { "docid": "8d3854b4479fcbe4f9dd2d81be6db4f1", "score": "0.628876", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\t$this->previousApplication = \\YapepBase\\Application::getInstance();\n\t\t$this->object = new Mock\\ApplicationMock;\n\t\tApplication::setInstance($this->object);\n\t}", "title": "" }, { "docid": "16f1ce7b0bfb7b529eaef28eab4dac59", "score": "0.6279994", "text": "protected function initializeApplication()\n {\n if ($this->isApplicationInitialized) {\n return;\n }\n\n $this->application = new Application();\n $this->application->build($this->options);\n\n }", "title": "" }, { "docid": "64063cc3f7c1ebd242345590c91ebe7c", "score": "0.62628186", "text": "public function testCreateAnApplication()\n {\n }", "title": "" }, { "docid": "83852693480dc76c4a61164883190d94", "score": "0.62304425", "text": "public function createApplication(): Application\n {\n return require __DIR__ . '/bootstrap.php';\n }", "title": "" }, { "docid": "79c05f4bae7d7f7bedb21b414a643315", "score": "0.62201667", "text": "function app(): \\App\\Kernel\\Application\\App\n {\n global $app;\n return $app;\n }", "title": "" }, { "docid": "e2c43b3d7dd61f6eed2803ed5d4adbea", "score": "0.620636", "text": "public static function app()\n {\n return Application::instance();\n }", "title": "" }, { "docid": "33e16d703b9382edcc8a20dea07a85e6", "score": "0.6185665", "text": "protected function setUp(): void\n {\n // Code before application created.\n\n parent::setUp();\n\n // Code after application created.\n }", "title": "" }, { "docid": "551a5ca8b8f8f6d73068e900a936f434", "score": "0.6149844", "text": "static private function getApp()\n {\n if (self::$app === null) {\n self::$app = new \\Silex\\Application();\n }\n \n return self::$app;\n }", "title": "" }, { "docid": "e97253c92aa2d1e9cbb47428da618222", "score": "0.61282486", "text": "public function It_should_append_new_app()\n\t{\n\t\t$cascade = Prack_Cascade::with( array(), array( 404, 403 ) );\n\t\t\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/' );\n\t\t$this->assertTrue( $response->isNotFound() );\n\t\t\n\t\t$cascade->concat( $this->app2 );\n\t\t\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/cgi/test' );\n\t\t$this->assertTrue( $response->isNotFound() );\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/cgi/../test' );\n\t\t$this->assertTrue( $response->isNotFound() );\n\t\t\n\t\t$cascade->concat( $this->app1 );\n\t\t\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/cgi/test' );\n\t\t$this->assertTrue( $response->isOK() );\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/cgi/../test' );\n\t\t$this->assertTrue( $response->isForbidden() );\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/foo' );\n\t\t$this->assertTrue( $response->isNotFound() );\n\t\t\n\t\t$cascade->concat( $this->app3 );\n\t\t\n\t\t$response = Prack_Mock_Request::with( $cascade )->get( '/foo' );\n\t\t$this->assertTrue( $response->isOK() );\n\t}", "title": "" }, { "docid": "1076c87af536a48bc428b7e23ba0af7d", "score": "0.61265993", "text": "private function loadApplication ()\n\t{\n\t\timport('system.application.App');\n\t\timport('system.application.WebApp');\n\n\t\t$appConfig = null;\n\n\t\tforeach ($this->appsConfig as $appUrl => $app) {\n\t\t\t$k = array_keys($this->appsConfig);\n\t\t\tif (strpos($this->_request->Url->getUri(), $appUrl) !== false) {\n\t\t\t\t$appConfig = $app;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ($appConfig == null) {\n\t\t\timport('system.exceptions.ApplicationNotFoundException');\n\t\t\tthrow new ApplicationNotFoundException(Msg::System_application_not_found);\n\t\t}\n\n\t\tself::$config = $appConfig;\n\t\tdefine('NB_LIB_URL', $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : '') . self::$config->siteRoot);\n\t\t\n\t\t$this->app = WebApp::getInstance();\n\n\t\t// converting the Zend_Config_Xml to AppConfig\r\n\t\t$cfg = new AppConfig($appConfig);\n\t\t\n\t\t$this->app->init($cfg);\n\t}", "title": "" }, { "docid": "830c3fa6bbca1338a7aca5ba4e333f82", "score": "0.6118789", "text": "public function setUp()\n {\n // a persistent singleton. reset() de-registers the class to\n // reset internal instances.\n \\App::reset();\n\n $this->app = new Application(\n (new ConfigFileReader(CONFIG))->preloadPath(),\n new EventDispatcher(),\n new RouteCollection(),\n new Paths(include __DIR__ . '/../support/paths.php')\n );\n\n $this->app->setContainer(new AurynDI());\n }", "title": "" }, { "docid": "0c32a834372751ce5b83a60f53db45c1", "score": "0.61047477", "text": "protected function mockApplication($config = [], $appClass = '\\yii\\console\\Application')\n {\n new $appClass(ArrayHelper::merge([\n 'id' => 'testapp',\n 'basePath' => __DIR__,\n 'vendorPath' => $this->getVendorPath(),\n 'components' => [\n 'db' => [\n 'class' => 'yii\\db\\Connection',\n 'dsn' => 'sqlite::memory:'\n ],\n 'i18n' => [\n 'translations' => [\n '*' => [\n 'class' => 'yii\\i18n\\PhpMessageSource',\n ]\n ]\n ],\n ],\n 'modules' => [\n 'lookup' => [\n 'class' => 'zacksleo\\yii2\\lookup\\Module',\n 'layout' => '@tests/layouts/main'\n ]\n ]\n ], $config));\n }", "title": "" }, { "docid": "5650781884e0e09de6af951a35e398ee", "score": "0.6091693", "text": "protected function setUp()\n {\n $this->application = \\App\\Application::getInstance();\n }", "title": "" }, { "docid": "b44d25a28deeb3a4a5eca709b2695dac", "score": "0.60710794", "text": "protected function initDefaultApp()\n {\n $this->app = new App(['skin'=>$this->skin, 'catch_exceptions'=>false, 'always_run'=>false]);\n $this->app->init();\n }", "title": "" }, { "docid": "aebf7678bf820f981b2a20fa05674b78", "score": "0.6065785", "text": "protected function mockApplication($config = [], $appClass = '\\CWebApplication')\n {\n if (Yii::app() !== null) {\n $this->destroyApplication();\n }\n Yii::createApplication($appClass, \\CMap::mergeArray([\n 'id' => 'testapp',\n 'basePath' => __DIR__,\n ], $config));\n }", "title": "" }, { "docid": "2fcc107436952abab14344bd5c7ac43f", "score": "0.6054762", "text": "public function getApplication()\n {\n $app = new Application;\n foreach (Setup::getCommandClasses() as $class) {\n $app->add(new $class);\n }\n return $app;\n }", "title": "" }, { "docid": "c0d72a672941f0dffacb838ef571b7cf", "score": "0.60225165", "text": "protected function destroyApplication()\n {\n// Yii::$app = null;\n\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\AccessTokenModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\AuthCodeModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\ClientModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\CypherKeyModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\JtiModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\JwtModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\RefreshTokenModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\ScopeModelInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\UserModelInterface');\n\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\AccessTokenServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\AuthCodeServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\ClientServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\CypherKeyServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\JtiServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\JwtServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\RefreshTokenServiceInterface');\n Yii::$container->clear('sweelix\\oauth2\\server\\interfaces\\ScopeServiceInterface');\n }", "title": "" }, { "docid": "1c32756c11e26be33fb9d3c046bfc3c0", "score": "0.60210264", "text": "public static function app()\n {\n if (NULL === self::$_app)\n {\n self::$_app = new Konekt_Framework_Core_Model_App();\n }\n return self::$_app;\n }", "title": "" }, { "docid": "f7025cdb2b082158f21f24d8b93ab568", "score": "0.6016853", "text": "protected function getFreshApplication()\n {\n return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) {\n $app->make(ConsoleKernelContract::class)->bootstrap();\n });\n }", "title": "" }, { "docid": "6237b71c5a3faa402c2b51a9d20c171e", "score": "0.6011173", "text": "protected function setUp()\n {\n $this->object = new Application;\n }", "title": "" }, { "docid": "d152d0f4c6b633aacc508f6f4872c9ad", "score": "0.6005817", "text": "public function getAppInstance() {\n $app = require Path::getAppPath() . '/bootstrap/app.php';\n $routes = require Path::getAppPath() . '/router/route.php';\n $app->addRoutes($routes);\n\n return $app;\n }", "title": "" }, { "docid": "d03883847dd32c8df85f1b0578aef232", "score": "0.6001269", "text": "public function bootstrap($app)\n {\n if (!$webHookUrlHash = $app->cache->get('webHookUrl')) {\n $webHookUrlHash = md5(time().mktime());\n $app->cache->set('webHookUrl', $webHookUrlHash);\n }\n\n $app->setModule('memesRedirectorBot', Module::class);\n\n\n if ($app instanceof \\yii\\console\\Application) {\n $app->getModule('memesRedirectorBot')->controllerNamespace = 'bobroid\\memesRedirectorBot\\console';\n } else {\n $app->urlManager->addRules([\n '/bot/web-hook/set' => 'memesRedirectorBot/default/set-hook',\n \"/bot/web-hook/get-{$webHookUrlHash}\" => 'memesRedirectorBot/default/get-hook'\n ]);\n }\n }", "title": "" }, { "docid": "02f93fc81d86c55e2e897790365549e2", "score": "0.5998096", "text": "protected function app(): App\n {\n return self::$app;\n }", "title": "" }, { "docid": "59d6abe952fb4bfcdc1fb1baf33b6704", "score": "0.5997773", "text": "protected function tearDown()\n {\n Yii::$app = null;\n Yii::$container = new Container();\n parent::tearDown();\n }", "title": "" }, { "docid": "e3ca6ac4d0b9041bb5f51f17c6955196", "score": "0.598926", "text": "protected function mockApplication($appClass = '\\yii\\web\\Application') {\r\n $config = TestConfig::$ADLDAP_CONFIG;\r\n \r\n $config['basePath'] = __DIR__;\r\n $config['vendorPath'] = dirname(__DIR__) . '/vendor';\r\n \r\n new $appClass($config);\r\n }", "title": "" }, { "docid": "a4b944c777fdeb7937bd0772a7aee1f1", "score": "0.59858847", "text": "public function createApplication()\n {\n $unitTesting = true;\n $testEnvironment = 'testing';\n\n /** @var Application $app */\n $app = require __DIR__.'/../../../../bootstrap/start.php';\n\n \\Config::set('database.default', 'sqlite');\n \\Config::set('database.connections', [\n 'sqlite' => array(\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n 'prefix' => '',\n ),\n ]);\n\n $this->createDatabase();\n\n return $app;\n }", "title": "" }, { "docid": "c9f924e9cb15afa1a0f5d0fa75362902", "score": "0.5976625", "text": "public function createApplication(){\n $app = require __DIR__.'/../../../bootstrap/app.php';\n $app->make(Kernel::class)->bootstrap();\n return $app;\n }", "title": "" }, { "docid": "b9e6cd2349a4e6000ae6f28fb240a2d7", "score": "0.59627503", "text": "public function testApplicationsCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "fc31446d1aab85ebeb88b7ca0106592d", "score": "0.59582466", "text": "public function bootstrap(Application $application): void;", "title": "" }, { "docid": "a6704bc6bdbebe7b2a120dae69b984fa", "score": "0.59560007", "text": "public function testApp()\n {\n $this->assertEquals('foo', Yii::$app->runAction('', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest/', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest/test', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest/test/', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest/test/index', []));\n $this->assertEquals('foo', Yii::$app->runAction('moduletest/test/index/', []));\n $this->assertEquals('bar', Yii::$app->runAction('moduletest/test/bar', []));\n $this->assertEquals('bar', Yii::$app->runAction('moduletest/test/bar/', []));\n // other controller\n $this->assertEquals('index', Yii::$app->runAction('moduletest/other', []));\n $this->assertEquals('index', Yii::$app->runAction('moduletest/other/', []));\n $this->assertEquals('index', Yii::$app->runAction('moduletest/other/index', []));\n $this->assertEquals('index', Yii::$app->runAction('moduletest/other/index/', []));\n $this->assertEquals('baz', Yii::$app->runAction('moduletest/other/baz', []));\n $this->assertEquals('baz', Yii::$app->runAction('moduletest/other/baz/', []));\n }", "title": "" }, { "docid": "0810c07449f93bec1a969713e4c29255", "score": "0.5950101", "text": "public function setUp()\n {\n // initialize the Application instance to test\n $this->_app = TDProject_Factory::get();\n $this->_app->cleanCache();\n }", "title": "" }, { "docid": "1e05e031f924619d3fa7c4097a996637", "score": "0.59478426", "text": "public function registerApp()\r\n {\r\n static::$instance = $this;\r\n }", "title": "" }, { "docid": "006206c62a526474125816f01ca320c3", "score": "0.594167", "text": "function app(){\n static $instance = null;\n if(is_null($instance)){\n $instance = new App;\n }\n return $instance;\n }", "title": "" }, { "docid": "a5b0f2ead020031f0257430324d5fc40", "score": "0.5910862", "text": "protected function mockApplication($config = [], $appClass = '\\yii\\console\\Application')\n {\n new $appClass(ArrayHelper::merge([\n 'id' => 'testapp',\n 'basePath' => __DIR__,\n 'vendorPath' => dirname(__DIR__) . '/vendor',\n ], $config));\n }", "title": "" }, { "docid": "8027a6df65a093fa65c8384a6d6f5702", "score": "0.59070164", "text": "public function init() {\n $app = new Application();\n $app->run();\n\n }", "title": "" }, { "docid": "2d755f38163bd0d9441275e52c5c577c", "score": "0.5901103", "text": "public function testGetApp()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "7d4b223a2757e0b22a604d024e477954", "score": "0.59001505", "text": "public function bootstrap($app): void\n {\n $container = \\Yii::$container;\n \n $container->setSingleton(MailerInterface::class, function () use ($app) {\n return $app->mailer;\n });\n\n $container->setSingleton(ManagerInterface::class, function () use ($app) {\n return $app->authManager;\n });\n\n $container->setSingleton(CheckCan::class, function () use ($app) {\n return new CheckCan($app->user);\n });\n\n $container->setSingleton(CacheEntity::class, function () use ($app) {\n return new CacheEntity($app->cache);\n });\n\n $container->setSingleton(SettingService::class, function () use ($app) {\n return new SettingService(new CacheEntity($app->cache));\n });\n\n $container->setSingleton(OrderService::class, function () use ($app) {\n return new OrderService($app->session, $app->user, new OrderRepository());\n });\n\n $container->setSingleton(GetDiscount::class, function () use ($app) {\n return new GetDiscount(new CacheEntity($app->cache));\n });\n\n $container->setSingleton(OrderCheckService::class, function () use ($app) {\n return new OrderCheckService($app->session, $app->user, new GetDiscount(new CacheEntity($app->cache)), new OrderRepository());\n });\n\n $container->setSingleton(OrderFormService::class, function () use ($app) {\n return new OrderFormService($app->user);\n });\n }", "title": "" }, { "docid": "33642f6871d51801c73bb49f3e204698", "score": "0.5899836", "text": "public function testItShouldInitTheApplication()\n {\n $this->assertNotNull(\n Application::init(TestHelper::getApplicationConfig())\n );\n }", "title": "" }, { "docid": "666dada40665578a5000fb1303b4fc00", "score": "0.58949536", "text": "protected function mockWebApplication($config = [], $appClass = '\\yii\\web\\Application')\n {\n $baseConfig = require(__DIR__ . '/../config/test.php');\n // $this->destroyApplication();\n new $appClass(ArrayHelper::merge($baseConfig, $config));\n }", "title": "" }, { "docid": "9d7ffbc4240e65b1ad2bf4365a9c66bc", "score": "0.58647054", "text": "private function initializeAppClass(){\n require 'app.class.php';\n }", "title": "" }, { "docid": "cc5f816b7fc600a982e70c79045d6c63", "score": "0.5861283", "text": "public function getApplication();", "title": "" }, { "docid": "f345671bf6eb6705344c84099296800c", "score": "0.586127", "text": "public function createApplication()\n {\n $app = parent::createApplication();\n\n Hash::setRounds(4);\n\n return $app;\n }", "title": "" }, { "docid": "d12b9c134388644d7089b5f41095ff91", "score": "0.58570683", "text": "public static function getAppInstance()\n {\n if (empty(self::$appInstance)){\n self::$appInstance = new App();\n }\n return self::$appInstance;\n }", "title": "" }, { "docid": "1cb17c1783c0adfe6c1df254dedb53cc", "score": "0.5838628", "text": "static public function getApp()\n\t{\n\t\treturn self::$application;\n\t}", "title": "" }, { "docid": "aabde3e3525737a0734f3b32af66aacf", "score": "0.583169", "text": "public function getApp(){\n\t\t\t\t$db = DB::createDb($GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWD'] );\n\t\t\t\t$app=new App($db);\n\t\t\t\treturn $app;\n\n\t\t}", "title": "" }, { "docid": "523de8143b8f130ab01186c79d331013", "score": "0.58302325", "text": "public function bootstrap($app)\n {\n $container = \\Yii::$container;\n $container->setSingleton('app\\dispatchers\\EventDispatcher', function ($container) {\n return new EventDispatcher([\n 'app\\events\\NewTaskEvent' => TaskStatusListener::class,\n 'app\\events\\TaskStatusChangeEvent' =>TaskStatusChangeListener::class\n ]);\n });\n $container->setSingleton(ManagerInterface::class, function () use ($app) {\n return $app->get('authManager');\n });\n\n }", "title": "" }, { "docid": "dcc53a84c79d0015d5cee1a7fb77ed86", "score": "0.5822169", "text": "function apine_application () {\n\t\n\treturn Apine\\Application\\Application::get_instance();\n\t\n}", "title": "" }, { "docid": "bd1624c132c90cd9a97e90c96a9190d3", "score": "0.5816617", "text": "public static function initialize(): Application\n {\n if (!self::$initialised) {\n $app = require __DIR__ . '/../../bootstrap/app.php';\n\n $app->make(Kernel::class)->bootstrap();\n\n Artisan::call('migrate --seed');\n Artisan::call(\n 'db:seed',\n ['--class' => 'TestDataSeeder']\n );\n\n self::$configurationApp = $app;\n self::$initialised = true;\n\n return $app;\n }\n\n return self::$configurationApp;\n }", "title": "" }, { "docid": "02b99fad21b48a420297d91abdfb6372", "score": "0.5814211", "text": "public function getApplication() {\n\t\treturn parent::getApplication();\n\t}", "title": "" }, { "docid": "fa8c049773814f8f8a7bee3a9a49cd11", "score": "0.58056647", "text": "public function initialize(\\PXApplication $app);", "title": "" }, { "docid": "6797de255e5be37796014a34f0e5e130", "score": "0.58047634", "text": "protected static function app() : BaseApp\n {\n return \\XF::app();\n }", "title": "" }, { "docid": "6a877a708abe60a98872b1a35103cb13", "score": "0.58042485", "text": "public function getApp()\r\n {\r\n }", "title": "" }, { "docid": "70cd4981614f4cc0d392bf136ed847f2", "score": "0.5799241", "text": "protected function mockApplication($config = [], $appClass = '\\yii\\console\\Application')\n {\n new $appClass(ArrayHelper::merge([\n 'id' => 'testapp',\n 'basePath' => __DIR__,\n 'vendorPath' => $this->getVendorPath(),\n ], $config));\n }", "title": "" }, { "docid": "5ae76389b9e8563c81272c84642a0e07", "score": "0.5794712", "text": "protected function destroyApplication()\n {\n if (\\Yii::$app && \\Yii::$app->has('session', true)) {\n \\Yii::$app->session->close();\n }\n \\Yii::$app = null;\n }", "title": "" }, { "docid": "0155669f80904c827005898bab929f6b", "score": "0.57801193", "text": "public static function app()\n {\n return self::$_app;\n }", "title": "" }, { "docid": "1259b1d2a194de1293df6ba56b81e9d3", "score": "0.57749295", "text": "protected static function init()\n {\n $application = new self;\n $application->setCore(new Core($_SERVER, $_GET, $_POST));\n self::setInstance($application);\n /* in questo modo ho il routing(router) già istanziato prima di runnare l'app e \n * posso agganciare le callback dei relativi hook prima di runnarlo\n * \n */\n $application->setRouter();\n }", "title": "" }, { "docid": "30d1ad180e9778c05498b084e71d2475", "score": "0.5761636", "text": "public static function setApp(Application $app)\n {\n self::$app = $app;\n }", "title": "" }, { "docid": "6b283a8d6fe450ec9f51d1bc0340ce50", "score": "0.57496125", "text": "protected function setUp()\n {\n $this->app = new Container();\n }", "title": "" }, { "docid": "cf009b2fd25292a0650457af1b5a5747", "score": "0.5736497", "text": "protected function loadApplicationCore()\n\t{\n\t\t$autoloader = Autoloader::getInstance();\n\t\t$dependencies = new InjectionContainer();\n\t\t$providers = new ProviderRegistry($dependencies);\n\t\t$application = new Application($autoloader, $dependencies, $providers);\n\n\t\t$provider = $application->addProvider(\n\t\t\tSYSPATH.'ee/EllisLab/ExpressionEngine',\n\t\t\t'app.setup.php',\n\t\t\t'ee'\n\t\t);\n\n\t\t$provider->setConfigPath($this->getConfigPath());\n\n\t\t$dependencies->register('App', function($di, $prefix = NULL) use ($application)\n\t\t{\n\t\t\tif (isset($prefix))\n\t\t\t{\n\t\t\t\treturn $application->get($prefix);\n\t\t\t}\n\n\t\t\treturn $application;\n\t\t});\n\n\t\t$this->legacy->getFacade()->set('di', $dependencies);\n\n\t\treturn $application;\n\t}", "title": "" }, { "docid": "35b96a8576a7ea630c03012252fc92e9", "score": "0.5729602", "text": "public function createApplication()\n {\n $app = require __DIR__ . '/../vendor/laravel/laravel/bootstrap/app.php';\n $app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap();\n\n return $app;\n }", "title": "" }, { "docid": "e6f5e953e97f471d65a3fc2b6fe18861", "score": "0.5727956", "text": "public static function setApplication($app)\n {\n /** @var \\Illuminate\\Database\\DatabaseManager $instance */\n return $instance->setApplication($app);\n }", "title": "" }, { "docid": "069bcb135e3f3ce4818f33a245155e25", "score": "0.57203966", "text": "public static function getApp()\n {\n return self::$app;\n }", "title": "" }, { "docid": "15581738910801a969fe8ab87919021d", "score": "0.5705171", "text": "public function run()\n {\n factory(App::class, 100)->create();\n }", "title": "" }, { "docid": "cca98484d6d669a677d7e22460fedbb7", "score": "0.5704615", "text": "protected function app() {\n return $this->app;\n }", "title": "" }, { "docid": "2a8f3c1dbed6a9867b7431ed5eae3407", "score": "0.56950116", "text": "protected function _getApp(){return self::$app;}", "title": "" }, { "docid": "6f07428a9fcdf3477bf6c178afbfbf58", "score": "0.5692283", "text": "public function bootstrap($app)\n {\n /**\n * @var Module $gii\n */\n \\Yii::setAlias('@yiix', '@vendor/melkov/yiix-libs');\n\n }", "title": "" } ]
c2fd0b89acecd91f78eb4f55a4e832c2
Indicates whether to send a copy of the email to the merchant.
[ { "docid": "d612a4d2f50dca4a29ba3c22faeeeffa", "score": "0.5341012", "text": "public function getSendToMerchant()\n {\n return $this->send_to_merchant;\n }", "title": "" } ]
[ { "docid": "cb94b03272497fa81092b8e526c3b172", "score": "0.65336484", "text": "protected function shouldSendEmail(): bool\r\n {\r\n return $this->sendEmail === Boolean::YES;\r\n }", "title": "" }, { "docid": "8abe7b3893cccb292ab1163cf82e2f02", "score": "0.6432331", "text": "private function sendCopy() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'domain' => $_SERVER['SERVER_NAME'],\r\n 'email' => $data['contactform_email'],\r\n 'subject' => $data['contactform_subject'],\r\n 'message' => nl2br(htmlentities($data['contactform_message']))\r\n );\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->addTo($data['contactform_email'], $data['contactform_name'])\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact_copy.phtml');\r\n }", "title": "" }, { "docid": "76b3e08091fa8cb8d3e1f13dba9d22ff", "score": "0.63082236", "text": "public function sendCopyTo()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_ADMIN) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::sendCopyTo();\n $this->attachmentContainer->resetAttachments();\n }", "title": "" }, { "docid": "f961a16555cdd33eab86ef648cf2997c", "score": "0.623875", "text": "public function isSendmail()\n {\n }", "title": "" }, { "docid": "26bb7b242b9887dd6e87fc88c33f21c0", "score": "0.61975163", "text": "public function getUseDestinationConfirmMail() : bool\n\t{\n\t\treturn $this->useDesinationConfirmMail;\n\t}", "title": "" }, { "docid": "dfaf7d42f0613deb7addaa7dcc70e739", "score": "0.6130402", "text": "function send() {\n\t\ttry {\n\t\t\tif ( ! $this->preSend() )\n\t\t\t\treturn false;\n\n\t\t\t$this->mock_sent[] = array(\n\t\t\t\t'to' => $this->to,\n\t\t\t\t'cc' => $this->cc,\n\t\t\t\t'bcc' => $this->bcc,\n\t\t\t\t'header' => $this->MIMEHeader,\n\t\t\t\t'body' => $this->MIMEBody,\n\t\t\t);\n\n\t\t\treturn true;\n\t\t} catch ( phpmailerException $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "bec3a674460e100ea7bbd8f5482ea1bf", "score": "0.5980665", "text": "public function isSendmail() {\n\t\t$this->getSendmail();\n\t}", "title": "" }, { "docid": "db89e14794e7b0accb2b5743e1fcac8e", "score": "0.59588057", "text": "function completeCopyedit($copyeditorSubmission, $send = false) {\n\t\t$copyeditorSubmissionDao = &DAORegistry::getDAO('CopyeditorSubmissionDAO');\n\t\t$userDao = &DAORegistry::getDAO('UserDAO');\n\t\t$journal = &Request::getJournal();\n\n\t\tif ($copyeditorSubmission->getDateCompleted() != null) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$user = &Request::getUser();\n\t\timport('mail.ArticleMailTemplate');\n\t\t$email = &new ArticleMailTemplate($copyeditorSubmission, 'COPYEDIT_COMPLETE');\n\n\t\t$editAssignments = $copyeditorSubmission->getEditAssignments();\n\n\t\t$author = $copyeditorSubmission->getUser();\n\n\t\tif (!$email->isEnabled() || ($send && !$email->hasErrors())) {\n\t\t\tHookRegistry::call('CopyeditorAction::completeCopyedit', array(&$copyeditorSubmission, &$editAssignments, &$author, &$email));\n\t\t\tif ($email->isEnabled()) {\n\t\t\t\t$email->setAssoc(ARTICLE_EMAIL_COPYEDIT_NOTIFY_COMPLETE, ARTICLE_EMAIL_TYPE_COPYEDIT, $copyeditorSubmission->getArticleId());\n\t\t\t\t$email->send();\n\t\t\t}\n\n\t\t\t$copyeditorSubmission->setDateCompleted(Core::getCurrentDate());\n\t\t\t$copyeditorSubmission->setDateAuthorNotified(Core::getCurrentDate());\n\t\t\t$copyeditorSubmissionDao->updateCopyeditorSubmission($copyeditorSubmission);\n\n\t\t\t// Add log entry\n\t\t\timport('article.log.ArticleLog');\n\t\t\timport('article.log.ArticleEventLogEntry');\n\t\t\tArticleLog::logEvent($copyeditorSubmission->getArticleId(), ARTICLE_LOG_COPYEDIT_INITIAL, ARTICLE_LOG_TYPE_COPYEDIT, $user->getUserId(), 'log.copyedit.initialEditComplete', Array('copyeditorName' => $user->getFullName(), 'articleId' => $copyeditorSubmission->getArticleId()));\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tif (!Request::getUserVar('continued')) {\n\t\t\t\t$email->addRecipient($author->getEmail(), $author->getFullName());\n\t\t\t\t$email->ccAssignedEditingSectionEditors($copyeditorSubmission->getArticleId());\n\t\t\t\t$email->ccAssignedEditors($copyeditorSubmission->getArticleId());\n\n\t\t\t\t$paramArray = array(\n\t\t\t\t\t'editorialContactName' => $author->getFullName(),\n\t\t\t\t\t'copyeditorName' => $user->getFullName(),\n\t\t\t\t\t'authorUsername' => $author->getUsername(),\n\t\t\t\t\t'submissionEditingUrl' => Request::url(null, 'author', 'submissionEditing', array($copyeditorSubmission->getArticleId()))\n\t\t\t\t);\n\t\t\t\t$email->assignParams($paramArray);\n\t\t\t}\n\t\t\t$email->displayEditForm(Request::url(null, 'copyeditor', 'completeCopyedit', 'send'), array('articleId' => $copyeditorSubmission->getArticleId()));\n\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b24edfcae8d037c4b9ceda33069d793d", "score": "0.5884575", "text": "public function isInCopyMode() {}", "title": "" }, { "docid": "78a86836a813414bc5952ce3eb42b265", "score": "0.58537817", "text": "protected function _send() {\n\t\t$return = false;\n\t\t$to = !$this->_bcc_batch_running ? implode(', ', $this->_sanitize_emails($this->recipients)) : '';\n\t\t$subject = $this->_prep_q_encoding($this->subject);\n\t\t$message = $this->_message;\n\t\t$headers = $this->_headers;\n\t\t$sender = $this->_clean_email($this->sender);\n\t\tif ($this->safe_mode == TRUE && mail($to, $subject, $message, $headers)) {\n\t\t\t$return = true;\n\t\t} else if (mail($to, $subject, $message, $headers, \"-f \" . $sender)) {\n\t\t\t// most documentation of sendmail using the \"-f\" flag lacks a space after it, however\n\t\t\t// we've encountered servers that seem to require it to be in place.\n\t\t\t$return = true;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "c5cebeb5f24bc8c5072d690abdb9f51b", "score": "0.5832092", "text": "public function isSent() {}", "title": "" }, { "docid": "9a81d0a4bcb1739d2f81a59950c25b19", "score": "0.57869357", "text": "public function should_send_email() {\n\t\t$options = get_option( 'mylisting_notifications', [] );\n\t\t$notification = $this->get_key();\n\t\t$should_send = true;\n\n\t\tif ( isset( $options[ $notification ], $options[ $notification ]['send_email'] ) && $options[ $notification ]['send_email'] === 'disabled' ) {\n\t\t\t$should_send = false;\n\t\t}\n\n\t\treturn apply_filters( sprintf( 'mylisting/emails/%s:enabled', $notification ), $should_send );\n\t}", "title": "" }, { "docid": "87c162021fdf9e65d523796f46743ffd", "score": "0.57838595", "text": "public function send(): bool{\n \n return ($this->smtp) ? $this->_mail->send() : mail(implode(\", \", $this->_to), $this->_subject, $this->_body, $this->getFormatedHeaders());\n\n }", "title": "" }, { "docid": "50248e54ba8e4dd55b4fa8b4e075dfc0", "score": "0.57807815", "text": "public function sendMailToNotifiyMerchant($observer) {\r\n\r\n //check if Enable out of stock \r\n $enableOutOfStock = Mage::getStoreConfig('Outofstocknotification/general/activate_apptha_outofstock_enable');\r\n\r\n //check if Enable out of stock threshod qty of product stock\r\n $enableOutOfStockAdminNotify = Mage::getStoreConfig('Outofstocknotification/general/merchant_apptha_outofstock_mail');\r\n\r\n // store currency code eg. USD, INR\r\n $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();\r\n\r\n // store currency symbol eg. $ \r\n $currency_symbol = Mage::app()->getLocale()->currency($currency_code)->getSymbol();\r\n\r\n if (intval($enableOutOfStockAdminNotify) > 0 && intval($enableOutOfStock) > 0) {\r\n\r\n // get threshold qty as mentioned by Merchant\r\n $thresholdQty = Mage::getStoreConfig('Outofstocknotification/general/stocklimit_apptha_outofstock_mail');\r\n\r\n $orderIds = $observer->getData('order_ids');\r\n foreach ($orderIds as $_orderId) {\r\n $order = Mage::getModel('sales/order')->load($_orderId);\r\n $items = $order->getAllItems();\r\n foreach ($items as $itemId => $item) {\r\n $ids[] = $item->getProductId();\r\n }\r\n }\r\n\r\n foreach ($ids as $pid) {\r\n\r\n $products = Mage::getModel('catalog/product')->load($pid);\r\n\r\n $producttype = $products->getTypeId();\r\n\r\n if ($producttype == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) { // check if product is configurable\r\n $flag = 1;\r\n } else {\r\n $flag = 0;\r\n }\r\n\r\n\r\n $qty = $products->getStockItem()->getQty();\r\n\r\n if ($thresholdQty >= $qty && $flag != 1) {\r\n\r\n $emailTemplateVariables = array();\r\n\r\n $emailTemplateVariables['productName'] = $products->getName();\r\n $emailTemplateVariables['productPrice'] = $currency_symbol . $products->getPrice();\r\n $emailTemplateVariables['productUrl'] = $products->getProductUrl();\r\n $emailTemplateVariables['productImg'] = $products->getImageUrl();\r\n $emailTemplateVariables['productQty'] = $qty;\r\n $emailTemplateVariables['thresholdQty'] = $thresholdQty;\r\n $emailTemplateVariables['productDesc'] = $products->getDescription();\r\n $marchentNotificationMailId = Mage::getStoreConfig('Outofstocknotification/outofstock_email/outofstock_sender_email_identity');\r\n $senderMailId = Mage::getStoreConfig(\"trans_email/ident_$marchentNotificationMailId/email\");\r\n $senderName = Mage::getStoreConfig(\"trans_email/ident_$marchentNotificationMailId/name\");\r\n $templeId = (int) Mage::getStoreConfig('Outofstocknotification/general/outofstock_admin_template');\r\n\r\n //if it is user template then this process is continue\r\n if ($templeId) {\r\n $emailTemplate = Mage::getModel('core/email_template')->load($templeId);\r\n } else { // we are calling default template\r\n $emailTemplate = Mage::getModel('core/email_template')\r\n ->loadDefault('Outofstocknotification_general_outofstock_admin_template');\r\n }\r\n\r\n $emailTemplateVariables['storeName'] = Mage::getStoreConfig(\"general/store_information/name\");\r\n $emailTemplateVariables['siteLink'] = Mage::getBaseUrl();\r\n\r\n $toMailId = $senderMailId;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n $emailTemplate->setSenderName($senderName); //mail sender name\r\n $emailTemplate->setSenderEmail($senderMailId); //mail sender email id\r\n $emailTemplate->setTemplateSubject('Out of stock Notification from ' . $emailTemplateVariables['storeName']);\r\n $emailTemplate->setDesignConfig(array('area' => 'frontend'));\r\n $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables); //it return the temp body\r\n\t\t\t\t\t\r\n $emailTemplate->send($toMailId, $senderName, $emailTemplateVariables); //send mail to admin email ids\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f55018cf787acd483886c49bfbcdb07e", "score": "0.5767026", "text": "public function canSend()\n {\n $flag = intval(setting(\"mail_notify_{$this->getTemplateTag()}\"));\n\n return !!$flag;\n }", "title": "" }, { "docid": "cb1b4c780dc7de36c2ed90c106765b71", "score": "0.57454157", "text": "private function mailerNative()\n { \n if( ! mail($this->rcptToCtring, $this->subject, $this->message, $this->header()) ){\n $this->debugMessages[] = 'Error: Sending email failed';\n return false;\n }\n else {\n $this->debugMessages[] = 'Success: Sending email succeeded';\n return true;\n }\n }", "title": "" }, { "docid": "13a94b2756f49935c070d261818e6151", "score": "0.57282317", "text": "public function sendEmail() {\n\n Mage::app()->setCurrentStore($this->getStoreId());\n\n try {\n\n $data = $this->getJsonPayload();\n\n $email = (string)$this->_getQueryParameter('email');\n\n $validEmail = filter_var($email, FILTER_VALIDATE_EMAIL);\n if ($validEmail === false) {\n Mage::throwException(Mage::helper('bakerloo_restful')->__('The provided email is not a valid email address.'));\n }\n\n $emailType = (string)Mage::helper('bakerloo_restful')->config('pos_coupon/coupons', $this->getStoreId());\n\n $emailSent = false;\n\n if(isset($data->attachments) and is_array($data->attachments) and !empty($data->attachments)) {\n\n $couponData = current($data->attachments);\n\n $coupon = Mage::helper('bakerloo_restful/email')->sendCoupon($email, $couponData, $this->getStoreId());\n\n $emailSent = (bool)$coupon->getEmailSent();\n\n }\n\n $result['email_sent'] = $emailSent;\n\n } catch (Exception $e) {\n Mage::logException($e);\n\n $result['error_message'] = $e->getMessage();\n $result['email_sent'] = false;\n }\n\n return $result;\n\n }", "title": "" }, { "docid": "8371eaf15267199b96a713694189c4cf", "score": "0.5706705", "text": "public function sendEmail($notifyCustomer = true, $comment = '')\r\n {\r\n $order = $this->getOrder();\r\n $storeId = $order->getStore()->getId();\r\n\r\n // Get the destination email addresses to send copies to\r\n $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);\r\n $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD);\r\n // Check if at least one recepient is found\r\n if (!$notifyCustomer && !$copyTo) {\r\n return $this;\r\n }\r\n\r\n // Start store emulation process\r\n $appEmulation = Mage::getSingleton('core/app_emulation');\r\n $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);\r\n\r\n try {\r\n // Retrieve specified view block from appropriate design package (depends on emulated store)\r\n $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())\r\n ->setIsSecureMode(true);\r\n $paymentBlock->getMethod()->setStore($storeId);\r\n $paymentBlockHtml = $paymentBlock->toHtml();\r\n } catch (Exception $exception) {\r\n // Stop store emulation process\r\n $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);\r\n throw $exception;\r\n }\r\n\r\n // Stop store emulation process\r\n $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);\r\n\r\n // Retrieve corresponding email template id and customer name\r\n if ($order->getCustomerIsGuest()) {\r\n $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE);\r\n $customerName = $order->getBillingAddress()->getName();\r\n } else {\r\n $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE);\r\n $customerName = $order->getCustomerName();\r\n }\r\n\r\n $mailer = Mage::getModel('core/email_template_mailer');\r\n if ($notifyCustomer) {\r\n $emailInfo = Mage::getModel('core/email_info');\r\n $emailInfo->addTo($order->getCustomerEmail(), $customerName);\r\n if ($copyTo && $copyMethod == 'bcc') {\r\n // Add bcc to customer email\r\n foreach ($copyTo as $email) {\r\n $emailInfo->addBcc($email);\r\n }\r\n }\r\n $mailer->addEmailInfo($emailInfo);\r\n }\r\n\r\n // Email copies are sent as separated emails if their copy method is 'copy' or a customer should not be notified\r\n if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {\r\n foreach ($copyTo as $email) {\r\n $emailInfo = Mage::getModel('core/email_info');\r\n $emailInfo->addTo($email);\r\n $mailer->addEmailInfo($emailInfo);\r\n }\r\n }\r\n\r\n // Set all required params and send emails\r\n $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY));\r\n $mailer->setStoreId($storeId);\r\n $mailer->setTemplateId($templateId);\r\n $mailer->setTemplateParams(array(\r\n 'order' => $order,\r\n 'shipment' => $this,\r\n 'comment' => $comment,\r\n 'billing' => $order->getBillingAddress(),\r\n 'payment_html' => $paymentBlockHtml\r\n )\r\n );\r\n $mailer->send();\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "d0141bc0c4038a66b82193a0a31bfc95", "score": "0.56541646", "text": "public function shouldBeSentViaMail($notifiable): bool\n {\n return true;\n }", "title": "" }, { "docid": "be2270f2803a171aae4b28e78068544c", "score": "0.564223", "text": "protected function sendEmail()\n {\n // Don't send to themself\n if ($this->userFrom->id == $this->userTo->id)\n {\n return false;\n }\n \n // Ensure they hae enabled emails\n if (! $this->userTo->options->enableEmails)\n {\n return false;\n }\n \n // Ensure they are not online\n if ($this->userTo->isOnline())\n {\n return false;\n }\n \n // Send email\n switch ($this->type)\n {\n case LOG_LIKED:\n if ($this->userTo->options->sendLikes)\n {\n $emailer = new Email('Liked');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id, $this->userFrom);\n }\n break;\n \n case LOG_ACCEPTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Accepted');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n \n case LOG_REJECTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Rejected');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n }\n }", "title": "" }, { "docid": "3c2bff78329719581038b2912665a65a", "score": "0.56399286", "text": "public function getAllowSendToCustomer()\n {\n return $this->allow_send_to_customer;\n }", "title": "" }, { "docid": "b092513ea96fb5d82cd42b3e802452e9", "score": "0.5614331", "text": "public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }", "title": "" }, { "docid": "98057e586ef493259d65ebbcd86ca181", "score": "0.5589304", "text": "public function send() : bool {\n $to = $this->email;\n $subject = $this->subject;\n $txt = $this->content;\n $headers = \"From: [email protected]\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n return (mail($to,$subject,$txt,$headers));\n }", "title": "" }, { "docid": "37cc0480f1a9f5555b972472a444c051", "score": "0.5580246", "text": "public function isRedelivered();", "title": "" }, { "docid": "9f3a5c8a34db6083aa30fe8ddf8377d8", "score": "0.5578433", "text": "public function send()\n {\n if (!$this->isMailingEnabled()) {\n return false;\n }\n\n Yii::$app->user->switchIdentity($this->user);\n self::switchLanguage($this->user);\n\n $notifications = $this->renderNotifications();\n $activities = $this->renderActivities();\n\n // Check there is content to send\n if ($activities['html'] !== '' || $notifications['html'] !== '') {\n\n try {\n $mail = Yii::$app->mailer->compose([\n 'html' => '@humhub/modules/content/views/mails/Update',\n 'text' => '@humhub/modules/content/views/mails/plaintext/Update'\n ], [\n 'activities' => $activities['html'],\n 'activities_plaintext' => $activities['text'],\n 'notifications' => $notifications['html'],\n 'notifications_plaintext' => $notifications['text'],\n ]);\n\n $mail->setFrom([Yii::$app->settings->get('mailer.systemEmailAddress') => Yii::$app->settings->get('mailer.systemEmailName')]);\n $mail->setTo($this->user->email);\n $mail->setSubject($this->getSubject());\n if ($mail->send()) {\n return true;\n }\n } catch (\\Exception $ex) {\n Yii::error('Could not send mail to: ' . $this->user->email . ' - Error: ' . $ex->getMessage());\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "fcb6f14169252728443105e2f1e8e851", "score": "0.5538882", "text": "function send()\n\t{\n\t\tif (!$this->toemail)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t@ini_set('sendmail_from', $this->fromemail);\n\n\t\tif ($this->registry->options['needfromemail'])\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers), '-f ' . $this->fromemail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers));\n\t\t}\n\t}", "title": "" }, { "docid": "96420a723a547666b4df9bf9f9195906", "score": "0.55352575", "text": "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "title": "" }, { "docid": "8057e441c74a42db00141e1badcdad27", "score": "0.5525469", "text": "private function smtpSend()\n { \n if(!$this->doConnect())\n return false;\n \n if( ! $this->smtpFrom())\n return false;\n \n foreach($this->rcptTo as $recipient)\n $this->smtpRecipient($recipient);\n\n\t\tif (count($this->rcptCc) > 0)\n\t\t{\n \tforeach($this->rcptCc as $recipient)\n \t$this->smtpRecipient($recipient);\n\t\t}\n\t\t\n\t\tif (count($this->rcptBcc) > 0)\n\t\t{\n\t foreach($this->rcptBcc as $recipient)\n\t $this->smtpRecipient($recipient);\n\t\t}\n\n if( ! $this->smtpData() )\n return false;\n \n $this->smtpClose();\n \n return true;\n }", "title": "" }, { "docid": "f9f750f9d39a6717b50ca235e5ed0ad3", "score": "0.55209905", "text": "public function sendConfirmEmail()\n {\n\t\t$emailSettings = craft()->email->getSettings();\n\n //create the template params\n $templateParams = $this->data;\n $templateParams['toEmail'] = $this->toEmail;\n\n //instantiate email model\n $email = new EmailModel();\n\n //populate with all the things\n //for testing\n $email->fromEmail = $emailSettings['emailAddress'];\n\t\t$email->toEmail = $this->template->notifyEmailToAddress;\n\t\t$email->subject = $this->template->confirmEmailSubject;\n\t\t$email->body = $this->template->confirmEmailBody;\n\n //send that goodness\n\t\treturn craft()->email->sendEmail($email, $templateParams);\n\n }", "title": "" }, { "docid": "84b69331062c6e87da1153d5b9b8157d", "score": "0.5493619", "text": "public function sendRestoreEmail();", "title": "" }, { "docid": "4f0ffc0cbef8047c25ecacf71dde4fd1", "score": "0.547949", "text": "public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }", "title": "" }, { "docid": "a523f3737bb4e5bdb38e35329e05175e", "score": "0.5471793", "text": "function sendThankYouEmail($customerId) {\n $params = array();\n if (!$this->generateMinimalDashboardParams($customerId, $params)) {\n return false;\n }\n\n $reviewWidget = $this->getReadReviewWidget($params['business']->getId());\n $respondToEmail = array($params['owner']->getEmail() => $params['business']->getName());\n\n $siteInfo = $this->container->get('e2w_siteinfo_service');\n $whitelabel = $siteInfo->getLabeledUrl($params['owner']->getLabel(), $params['owner']->getAgentId());\n $params['isAllstate'] = $siteInfo->isAllstate($whitelabel['domain']);\n $params['isWhitelabeled'] = $whitelabel['labeled'];\n\n if ($params['customer']->getRecommend() >= $reviewWidget->getShowSocialLinksRequired()) {\n $params['copyButtonBeforeSocialLinks'] = true;\n if (isset($params['kiosk']) && $params['kiosk']) {\n $this->generateNotification($params, 'kiosk-positive');\n $this->generateNotification($params, 'thanks-kiosk-positive');\n } else {\n $this->generateNotification($params, 'positive');\n $this->generateNotification($params, 'thanks-positive');\n }\n\n if (intval($reviewWidget->getShouldSendPositiveEmail()) === 1) {\n $this->sendNotificationEmail($respondToEmail, $params['customer']->getEmail(), $params);\n }\n } else {\n $this->generateNotification($params, 'negative');\n $this->generateNotification($params, 'thanks-negative');\n\n if (!$this->container->get('e2w_siteinfo_service')->isWhitesparkSeanHeffernanBusiness($params['business']->getId(), $params['business']->getAgentId())) {\n if (intval($reviewWidget->getShouldSendNegativeEmail()) === 1) {\n $this->sendNotificationEmail($respondToEmail, $params['customer']->getEmail(), $params);\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "fd028e5fb03149c9ca38134596cda406", "score": "0.5470355", "text": "public function sendEmailWithApplyLink(){\n\t}", "title": "" }, { "docid": "391622cf6fd2c642e47b0850dbd57d39", "score": "0.54562676", "text": "public function isSent() : bool {\n $status = $this->delivery_status;\n return\n $status === WebhookEvent::EVENT_SENT ||\n $status === WebhookEvent::EVENT_OPEN ||\n $status === WebhookEvent::EVENT_CLICK ||\n $status === WebhookEvent::EVENT_UNSUB ||\n $status === WebhookEvent::EVENT_SPAM;\n }", "title": "" }, { "docid": "242b2a0608bc567e309cb8045314be32", "score": "0.5445057", "text": "public function send()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n //check type of invoice and configuration for attachment\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_CUSTOMER) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::send();\n }", "title": "" }, { "docid": "89287487c179273307cd971526938adf", "score": "0.54448694", "text": "public function isSending()\n {\n return $this->status === 'sending';\n }", "title": "" }, { "docid": "0af7a73bb017f49fa80a70509974edfe", "score": "0.54378635", "text": "protected function _send()\n\t{\n\t\t$message = $this->build_message();\n\t\t\\Log::debug(\"Sending mail using noop driver\");\n\t\t\\Log::debug('To: '. $this->to);\n\t\t\\Log::debug('Subject: '. $this->subject);\n\t\t\\Log::debug('Body: '. $message['body']);\t\t\n\t\t\\Log::debug('Header: '. $message['header']);\n\t\t\\Log::debug('From: '. $this->config['from']['email']);\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7f8171075858e7b8f24e795ec400350e", "score": "0.5430844", "text": "function completeFinalCopyedit($copyeditorSubmission, $send = false) {\n\t\t$copyeditorSubmissionDao = &DAORegistry::getDAO('CopyeditorSubmissionDAO');\n\t\t$userDao = &DAORegistry::getDAO('UserDAO');\n\t\t$journal = &Request::getJournal();\n\n\t\tif ($copyeditorSubmission->getDateFinalCompleted() != null) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$user = &Request::getUser();\n\t\timport('mail.ArticleMailTemplate');\n\t\t$email = &new ArticleMailTemplate($copyeditorSubmission, 'COPYEDIT_FINAL_COMPLETE');\n\n\t\t$editAssignments = $copyeditorSubmission->getEditAssignments();\n\n\t\tif (!$email->isEnabled() || ($send && !$email->hasErrors())) {\n\t\t\tHookRegistry::call('CopyeditorAction::completeFinalCopyedit', array(&$copyeditorSubmission, &$editAssignments, &$email));\n\t\t\tif ($email->isEnabled()) {\n\t\t\t\t$email->setAssoc(ARTICLE_EMAIL_COPYEDIT_NOTIFY_FINAL_COMPLETE, ARTICLE_EMAIL_TYPE_COPYEDIT, $copyeditorSubmission->getArticleId());\n\t\t\t\t$email->send();\n\t\t\t}\n\n\t\t\t$copyeditorSubmission->setDateFinalCompleted(Core::getCurrentDate());\n\t\t\t$copyeditorSubmissionDao->updateCopyeditorSubmission($copyeditorSubmission);\n\n\t\t\tif ($copyEdFile =& $copyeditorSubmission->getFinalCopyeditFile()) {\n\t\t\t\t// Set initial layout version to final copyedit version\n\t\t\t\t$layoutDao = &DAORegistry::getDAO('LayoutAssignmentDAO');\n\t\t\t\t$layoutAssignment = &$layoutDao->getLayoutAssignmentByArticleId($copyeditorSubmission->getArticleId());\n\n\t\t\t\tif (isset($layoutAssignment) && !$layoutAssignment->getLayoutFileId()) {\n\t\t\t\t\timport('file.ArticleFileManager');\n\t\t\t\t\t$articleFileManager = &new ArticleFileManager($copyeditorSubmission->getArticleId());\n\t\t\t\t\tif ($layoutFileId = $articleFileManager->copyToLayoutFile($copyEdFile->getFileId(), $copyEdFile->getRevision())) {\n\t\t\t\t\t\t$layoutAssignment->setLayoutFileId($layoutFileId);\n\t\t\t\t\t\t$layoutDao->updateLayoutAssignment($layoutAssignment);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add log entry\n\t\t\timport('article.log.ArticleLog');\n\t\t\timport('article.log.ArticleEventLogEntry');\n\t\t\tArticleLog::logEvent($copyeditorSubmission->getArticleId(), ARTICLE_LOG_COPYEDIT_FINAL, ARTICLE_LOG_TYPE_COPYEDIT, $user->getUserId(), 'log.copyedit.finalEditComplete', Array('copyeditorName' => $user->getFullName(), 'articleId' => $copyeditorSubmission->getArticleId()));\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\tif (!Request::getUserVar('continued')) {\n\t\t\t\t$assignedSectionEditors = $email->toAssignedEditingSectionEditors($copyeditorSubmission->getArticleId());\n\t\t\t\t$assignedEditors = $email->ccAssignedEditors($copyeditorSubmission->getArticleId());\n\t\t\t\tif (empty($assignedSectionEditors) && empty($assignedEditors)) {\n\t\t\t\t\t$email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));\n\t\t\t\t\t$paramArray = array(\n\t\t\t\t\t\t'editorialContactName' => $journal->getSetting('contactName'),\n\t\t\t\t\t\t'copyeditorName' => $user->getFullName()\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$editorialContact = array_shift($assignedSectionEditors);\n\t\t\t\t\tif (!$editorialContact) $editorialContact = array_shift($assignedEditors);\n\n\t\t\t\t\t$paramArray = array(\n\t\t\t\t\t\t'editorialContactName' => $editorialContact->getEditorFullName(),\n\t\t\t\t\t\t'copyeditorName' => $user->getFullName()\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$email->assignParams($paramArray);\n\t\t\t}\n\t\t\t$email->displayEditForm(Request::url(null, 'copyeditor', 'completeFinalCopyedit', 'send'), array('articleId' => $copyeditorSubmission->getArticleId()));\n\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "913b3575637a82af6c41b6fc4725dd7d", "score": "0.541353", "text": "public function sendOtp(): bool\n {\n $appName = Yii::$app->name;\n $otp = $this->generateOtp();\n\n return Yii::$app->mailer->compose()\n ->setFrom(Yii::$app->params['mailer.from'])\n ->setTo($this->getEmail())\n ->setSubject(\"OTP confirmations - {$appName}\")\n ->setHtmlBody(\"Hi, <br/> Please use the following OTP <b>{$otp}</b> to verify your email id.\")\n ->queue();\n }", "title": "" }, { "docid": "da826c60a2c1164ce1cba80e1ddf7fb0", "score": "0.5410813", "text": "public function isSendType()\n {\n return $this->type_id == TransferType::SEND;\n }", "title": "" }, { "docid": "980856d364c003afc577ecc9d3d2836a", "score": "0.5399476", "text": "public function getIsSendLink()\n {\n return $this->isSendLink;\n }", "title": "" }, { "docid": "93ad0aefae9c9f09fea6e3e911d94837", "score": "0.53811663", "text": "public function isRedeliver()\n {\n return $this->redeliver;\n }", "title": "" }, { "docid": "e8fa67a4770eb42bf74a6c8995a12679", "score": "0.5369227", "text": "function dsf_send_sagepay_mail($savedorder, $address_confirmations=''){\nglobal $basket, $customer_id, $payment, $currencies;\n\n\t\t\t\t\t$good_mail_id = '3';\n\t\t\t\t\t$bad_mail_id = '6';\n\n\n\t\t\t\t\tif ($address_confirmations == 'OK'){ // status OK and addresses OK\n\t\t\t\t\t\t\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t }elseif (MODULE_PAYMENT_PROTXCC_CHECK_ADDRESS == 'false'){\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t}elseif ($address_confirmations == 'ALLOW'){ // status OK Adress failed under threshold.\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t }else{\n\t\t\t\t\t $email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $bad_mail_id .\"'\");\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n// lets start with the email confirmation\n\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t$email_details = dsf_db_fetch_array($email_query);\n\t\t\t\t\t\t\t\t\t\t$signature_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='1'\");\n\t\t\t\t\t\t\t\t\t $signature_details = dsf_db_fetch_array($signature_query);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_subject = $email_details['subject'];\n\t\t\t\t\t\t\t\t\t $email_footer = $signature_details['details'];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// overwrite subject as per Christian emails 2011-09-28\n\t\t\t\t\t\t\t\t\t $email_subject = TRANSLATION_EMAIL_YOUR_ORDER . ' ' . SAP_ORDER_PREFIX . $savedorder->info['id'];\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// plain text;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order = TRANSLATION_WORD_DEAR . ' ' . $savedorder->customer['name'] . \"\\n\\n\" . $email_details['details'] . \"\\n\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t// get products ordered by doing email function.\n\t\t\t\t\t\t\t\t\t $products_ordered = dsf_order_email_items($savedorder, 'true');\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\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order .= $products_ordered['plain'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order .= \"\\n\" .EMAIL_SEPARATOR .\"\\n\" . $email_footer;\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \t\t// html\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $html_order = TRANSLATION_WORD_DEAR . ' ' . $savedorder->customer['name'] . \"<br /><br />\";\n\t\t\t\t\t\t\t\t\t $html_order .= $email_details['details'] . \"<br /><br />\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $html_order .= $products_ordered['html'] . '<br /><br />';\n\t\t\t\t\t\t\t\t\t $html_order .= $email_footer;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order = str_replace(\"[ORDER_NUMBER]\" , SAP_ORDER_PREFIX . $savedorder->info['id'], $email_order);\n\t\t\t\t\t\t\t\t\t $html_order = str_replace(\"[ORDER_NUMBER]\" , SAP_ORDER_PREFIX . $savedorder->info['id'], $html_order);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t // end of email.\n\t\t\t\t\t\t \n\n\n \n\t\t\t\t\t dsf_send_email($savedorder->customer['name'], $savedorder->customer['email_address'], $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t\n\t\t\t\t\t// send emails to other people\n\t\t\t\t\t if (SEND_EXTRA_ORDER_EMAILS_TO != '') {\n\t\t\t\t\t\tdsf_send_email(STORE_OWNER, SEND_EXTRA_ORDER_EMAILS_TO, $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t }\n\n\n\t\t\t\t\t// send emails to other people\n\t\t\t\t\t if (SEND_EXTRA_ORDER_EMAILS_DUPLICATE != '') {\n\t\t\t\t\t\tdsf_send_email(STORE_OWNER, SEND_EXTRA_ORDER_EMAILS_DUPLICATE, $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t }\n\n\n\n\n\n// just for consistancy.\n\nreturn true;\n\n\n\n\n}", "title": "" }, { "docid": "4bdc237782b06d62fa134eb31ff78f0d", "score": "0.5367807", "text": "function _spool_email()\n\t{\n\t\t// ------------------------------------------------------\n\t\t// 'email_send' hook.\n\t\t// - Optionally modifies and overrides sending of email.\n\t\t//\n\t\tif (ee()->extensions->active_hook('email_send') === TRUE)\n\t\t{\n\t\t\t$ret = ee()->extensions->call(\n\t\t\t\t'email_send',\n\t\t\t\tarray(\n\t\t\t\t\t'headers'\t\t=> &$this->_headers,\n\t\t\t\t\t'header_str'\t=> &$this->_header_str,\n\t\t\t\t\t'recipients'\t=> &$this->_recipients,\n\t\t\t\t\t'cc_array'\t\t=> &$this->_cc_array,\n\t\t\t\t\t'bcc_array'\t\t=> &$this->_bcc_array,\n\t\t\t\t\t'subject'\t\t=> &$this->_subject,\n\t\t\t\t\t'finalbody'\t\t=> &$this->_finalbody\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (ee()->extensions->end_script === TRUE)\n\t\t\t{\n\t\t\t\tee()->extensions->end_script = FALSE;\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::_spool_email();\n\t}", "title": "" }, { "docid": "a4839e6d0daad175c594bdc9695f0eb4", "score": "0.5366136", "text": "public function sendPersonal() {\n return $this->_gtmHelper->sendPersonal();\n }", "title": "" }, { "docid": "dcfe7e3fee165502d01514112b0b3eb0", "score": "0.5363688", "text": "public function sendHTML(): bool {\n\t\tif(! $this->getSender() || ! $this->getTo() || ! $this->getSubject() || ! $this->getMsg()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Header\n\t\t$header = 'MIME-Version: 1.0' . PHP_EOL;\n\t\t$header .= 'Content-type: text/html; charset=' . $this->getCharset() . PHP_EOL;\n\t\t$header .= 'From: ' . $this->getSender() . PHP_EOL;\n\t\tif($this->getCc()) {\n\t\t\t$header .= 'Cc: ' . $this->getCcList() . PHP_EOL;\n\t\t}\n\t\tif($this->getBcc()) {\n\t\t\t$header .= 'Bcc: ' . $this->getBccList() . PHP_EOL;\n\t\t}\n\t\tif($this->getReplyTo()) {\n\t\t\t$header .= 'Reply-To: ' . $this->getReplyTo() . PHP_EOL;\n\t\t}\n\t\t$header .= 'X-Mailer: PHP/' . PHP_VERSION . PHP_EOL;\n\n\t\t$this->makeLineBreaksHTML();\n\n\t\treturn mail(\n\t\t\t$this->getToList(),\n\t\t\t'=?' . mb_strtolower($this->getCharset()) . '?B?' . base64_encode($this->getSubject()) . '?=',\n\t\t\t$this->getMsg(),\n\t\t\t$header\n\t\t);\n\t}", "title": "" }, { "docid": "3d9144369bb15d17d7e07bc3b2c7b6ba", "score": "0.5357182", "text": "function send(){\n\t\t\t$to = $this->getTo();\n\t\t\t$header = $this->getHeader();\n\t\t\t$subject = $this->getSubject();\n\t\t\t$msg = $this->getMessage();\n\t\t\tif(@mail($to,$subject,$msg,$header)){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "3e935ff5802e190c5ef72778bc702cc7", "score": "0.5355127", "text": "protected function hasCustomerMessage()\n {\n return $this->SendInvoiceToCustomer;\n }", "title": "" }, { "docid": "b1d3e80c4449ba05fc8f52eaafdb8049", "score": "0.5354059", "text": "public function sendWithViewAction() {\n __mail::init('example/view/mail/example', array(\n 'name' => 'Foo'\n ));\n\n __mail::send('[email protected]', '[email protected]', 'title', 'me');\n\n return false;\n }", "title": "" }, { "docid": "667e11ad3da6c499479b91114c8d881a", "score": "0.5345803", "text": "public function send(): bool\n {\n $this->lastError = '';\n\n try {\n if (!$this->mailObj->send()) {\n $this->lastError = $this->mailObj->ErrorInfo;\n }\n } catch (\\Throwable $err) {\n $this->lastError = $err->getCode() . ': ' . $err->getMessage();\n }\n\n return empty($this->lastError);\n }", "title": "" }, { "docid": "56aed100d94eeee1c31d3f4a2f42b2f4", "score": "0.5344706", "text": "public function getSendingAttribute(): bool\n {\n return $this->status_id === CampaignStatus::STATUS_SENDING;\n }", "title": "" }, { "docid": "100e524cd13c9a0af01334d79498b1e0", "score": "0.5344698", "text": "public function isSent()\n {\n return $this->isInStatus($this::SENT);\n }", "title": "" }, { "docid": "c3e30b3767468934ab09d9c76b3e9067", "score": "0.53383917", "text": "public function send() {\n\t\t/** @var modPHPMailer $mail */\n\t\t$mail = $this->xpdo->getService('mail', 'mail.modPHPMailer');\n\t\t$mail->set(modMail::MAIL_BODY, $this->email_body);\n\t\t$mail->set(modMail::MAIL_FROM, $this->email_from);\n\t\t$mail->set(modMail::MAIL_FROM_NAME, $this->email_from_name);\n\t\t$mail->set(modMail::MAIL_SUBJECT, $this->email_subject);\n\t\t$mail->address('to', $this->email_to);\n\t\t$mail->address('reply-to', $this->reply_to);\n\t\t$mail->setHTML(true);\n\t\tif (!$mail->send()) {\n\t\t\t$this->xpdo->log(xPDO::LOG_LEVEL_ERROR, 'An error occurred while trying to send the email: '.$mail->mailer->ErrorInfo);\n\t\t\t$mail->reset();\n\t\t\treturn $mail->mailer->ErrorInfo;\n\t\t}\n\t\telse {\n\t\t\t$mail->reset();\n\t\t\t$this->remove();\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "f6246f4fe2bb2adebaf7627da95e7d14", "score": "0.5335668", "text": "public function send (): bool\n {\n /**\n * Empfänger*innen vorbereiten.\n */\n $recipients = $this->prepareRecipients();\n /**\n * E-Mail Header vorbereiten.\n */\n $this->prepareHeaders();\n\n /**\n * Mail mit der PHP mail() Funktion abschicken.\n *\n * Der Grund, wieso wir eine eigene Mail Klasse geschrieben haben, liegt genau hier. Wenn aus irgendeinem Grund eine andere Versandart verwendet werden soll (bspw. SMTP oder irgendein gehostet Service, das über eine API angesprochen wird), dann können wir hier die mail() Funktion einfach austauschen - überall, wo wir die Mail Klasse verwenden, brauchen wir aber keinerlei Änderung machen.\n */\n $success = mail($recipients, $this->subject, $this->message, $this->headers);\n\n /**\n * Wenn ein Fehler aufgetreten ist, holen wir uns diesen in die $error Property.\n */\n if (!$success) {\n $this->error = error_get_last();\n }\n\n return $success;\n }", "title": "" }, { "docid": "fc5e37ff16fbc9454615be7b0d2fd1fd", "score": "0.5334944", "text": "public function sendAction() {\n __mail::send('[email protected]', '[email protected]', 'title', 'me', 'hello world');\n\n return false;\n }", "title": "" }, { "docid": "81806e95d9bdbec64d22e66b0079ffc2", "score": "0.5325951", "text": "private function sendEmail( string $message , string $email ): bool\n {\n return true;\n }", "title": "" }, { "docid": "fcabec8586a3155ce69ad00a7a36ad48", "score": "0.5317298", "text": "public function send() {\n\t\t//$isActive = EmailHelper::isActive('string parameter');\n\n\t\t// this is the refactored external static method\n\t\t$isActive = forward_static_call_array(\n\t\t\tarray($this->emailHelperClass, 'isActive'),\n\t\t\tarray('string parameter'));\n\n\t\tif($isActive) {\n\t\t\t// send logic here\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1bc355bb561fed70d0335bcf7828f351", "score": "0.53111213", "text": "public function SendMail($sm) {\n return false;\n }", "title": "" }, { "docid": "272c4c3fef36c85570ee01a10f6e8909", "score": "0.5308944", "text": "function useSendmail($sendmail = null)\n\t{\n\t\t$this->Sendmail = $sendmail;\n\n\t\tif (!empty ($this->Sendmail)) {\n\t\t\t$this->IsSendmail();\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->IsMail();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "80ca33de6ccfc90e8dfec6fb189b8c10", "score": "0.5300687", "text": "function Send(){\n $result = parent::Send();\n if( $result ){\n Flash::addInfo( \"An email, \\\"\".$this->getSubject().\"\\\" has been sent to \".$this->getRecipientCount().\" recipients\" );\n }else{\n Flash::addError( \"There was a problem attempting to send the email\" );\n }\n return $result;\n }", "title": "" }, { "docid": "ab35f83c1b7a9739ec5abcab96511f3b", "score": "0.5295313", "text": "function Send()\r\n\t\t{\r\n\t\t// build the headers\r\n\t\t$this->_build_headers();\r\n\r\n\t\t// include attached files\r\n\t\tif( isset( $this->aattach[0] ) )\r\n\t\t\t{\r\n\t\t\t$this->_build_attachement();\r\n\t\t\t$body = $this->fullBody . $this->attachment;\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\t$this->headers .= \"Content-type: text/plain; charset=\\\"utf-8\\\"\\n\";\r\n\r\n\t\t\t$body = $this->body;\r\n\t\t\t}\r\n\r\n\t\t// envoi du mail aux destinataires principaux\r\n//\t\tif( count($this->abcc) > 0 )\r\n//\t\t\t$res = mail( '', $this->msubject, $body, $this->headers );\r\n//\t\telse\r\n\t\t\t{\r\n\t\t\tfor( $i=0; $i< sizeof( $this->sendto ); $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t$res = mail( $this->sendto[$i], $this->msubject, $body, $this->headers );\r\n\t\t\t\tif( ! $res ) break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tif( ! $res )\r\n\t\t\t{\r\n\t\t\t$this->errNum = ERR_FONCTION_MAIL;\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "eda016b6f224624186c39768253d621a", "score": "0.5282875", "text": "public function getSendMeACopy(): ?bool\n {\n return $this->sendMeACopy;\n }", "title": "" }, { "docid": "076875d6f82bd434a721d3f436fb4246", "score": "0.52753013", "text": "public function isSent()\r\n {\r\n return $this->sent;\r\n }", "title": "" }, { "docid": "605f4339f19375bdff4116d872f7ec93", "score": "0.5274048", "text": "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "title": "" }, { "docid": "7f8264ce00bf757630916ecdcc7b448b", "score": "0.52739733", "text": "public function getSentAttribute(): bool\n {\n return $this->status_id === CampaignStatus::STATUS_SENT;\n }", "title": "" }, { "docid": "1d1d1ecbe9d9ea7ea083cc62bd74160d", "score": "0.52656347", "text": "public function canBeCopied() {}", "title": "" }, { "docid": "c31e9556a40f869fab6f75dfd9a02785", "score": "0.52640164", "text": "public function isSent() {\n\treturn $this->status != self::$WAITING;\n }", "title": "" }, { "docid": "3dc15e385c162a8616d65b9d49c0d435", "score": "0.52583164", "text": "protected function sendTestMail() {}", "title": "" }, { "docid": "079929f2d6dc65fa5341f17032fa421b", "score": "0.5252284", "text": "public function sendEmail($template, $subject, $copyToAdmin = true)\n {\n $email = $this->buildEmail($template, $subject);\n\n if ($copyToAdmin) {\n $email->setBcc(Email::config()->admin_email);\n }\n if ($this->debugMode) {\n return $this->debug($email);\n } else {\n return $email->send();\n }\n }", "title": "" }, { "docid": "892a57ce2704bd94de1f5e3dd4d88449", "score": "0.52451205", "text": "public function isSent()\n {\n return (bool) $this->sentAt;\n }", "title": "" }, { "docid": "aea22b4319f8cc396bc0e710f3df433d", "score": "0.5233922", "text": "public function hasBeenSent()\n {\n return $this->status === 'sent';\n }", "title": "" }, { "docid": "9e4f5f96ea9442c8d39942823909c344", "score": "0.5228799", "text": "public function canMail() {\n\t\tif ($this->ignoredUser || ($this->onlyBuddyCanMail && !UserProfile::isBuddy($this->userID)) || (!$this->userCanMail && !$this->onlyBuddyCanMail)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b4cd52a97ada6c0d60c113a6eee7da0d", "score": "0.5228314", "text": "public function set_sender(EmailAddress $address) {\n $this->sender = $address->as_string();\n return TRUE;\n }", "title": "" }, { "docid": "1530a59f50ed5af25d56a4f8c93b5c4a", "score": "0.52276266", "text": "public function approved_sender()\n\t{\n\t\t//pe($this->that);\n\t\tif (is_null($this->approved_sender))\n\t\t{\n\t\t\t$add = strtolower($this->get_address_from());\n\t\t\t$approved_arr = $this->get_approved();\n\t\t\tforeach($approved_arr as $check_add)\n\t\t\t{\n\t\t\t\tif ($add == strtolower($check_add))\n\t\t\t\t{\n\t\t\t\t\t$this->approved_sender = TRUE;\n\t\t\t\t\tbreak;\n\t\t\t\t};\n\t\t\t}\n\t\t\t$this->that->log_state('Sender '. $add .' approved? : ' . var_export($this->approved_sender,TRUE));\n\t\t}\n\t\treturn $this->approved_sender;\n\t}", "title": "" }, { "docid": "7ec6378b767d507c27c01764227d0fef", "score": "0.5226793", "text": "public function getEmailCopyTo()\n {\n $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());\n if (!empty($data)) {\n return array_map('trim', explode(',', $data));\n }\n return false;\n }", "title": "" }, { "docid": "8fd0760796fda81846bdc3244e152fa1", "score": "0.52235585", "text": "public function isNotSent()\n {\n return ! $this->isSent();\n }", "title": "" }, { "docid": "5fc9a675b5f39dafbd991667b22c6ec4", "score": "0.52170813", "text": "public function getDeliverable()\n {\n return false;\n }", "title": "" }, { "docid": "720c8119553252678019e368914c83d1", "score": "0.52123874", "text": "public function send() {\n $mail = $this->initializeMail();\n $mail->subject = $this->subject; \n $mail->MsgHTML($this->body);\n if($this->is_admin) {\n //send email to the admin\n $mail->setFrom($this->sender->email, $this->sender->name);\n $mail->addAddress(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n }else{\n $mail->addAddress($this->recipient->email, $this->recipient->name);\n $mail->setFrom(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n \n }\n $mail->send();\n return $mail;\n }", "title": "" }, { "docid": "722f8f105ccddf5d8460ade60a6acc8a", "score": "0.5211542", "text": "function customer_email_confirmation_notification($send_data)\n {\n $to_email_address = $send_data['sender_email'];\n $subject = $send_data['subject'];\n $message = $send_data['message'];\n $data['msg'] = $message;\n $mess = $this->load->view('mailer/email_template', $data, true);\n $result_dfee = $this->common_model->sendEmails($to_email_address, $subject, $mess);\n\n if ($result_dfee) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5181073a3edaab229610a8473da1a086", "score": "0.51921993", "text": "public function isValidForDelivery();", "title": "" }, { "docid": "0d51937b1134430c21a77ddd59ed770c", "score": "0.5190703", "text": "public function isSent(): bool\n {\n return $this->status === static::STATUS_QUEUED || $this->status === static::STATUS_COMPLETE;\n }", "title": "" }, { "docid": "e9990c75935061e1211cc4c291281771", "score": "0.5186915", "text": "function edd_pup_ajax_send_email( $payment_id, $email_id, $test_mode = null ) {\n\n\t$userid \t = get_current_user_id();\n\t$emailpost \t = get_post( $email_id );\n\t$emailmeta \t = get_post_custom( $email_id );\n\t$payment_data = edd_get_payment_meta( $payment_id );\n\t$email = isset( $payment_data['user_info']['email'] ) ? $payment_data['user_info']['email'] : $payment_data['email'];\n\t$from_name \t = $emailmeta['_edd_pup_from_name'][0];\n\t$from_email = $emailmeta['_edd_pup_from_email'][0];\n\t$attachments = apply_filters( 'edd_pup_attachments', array(), $payment_id, $payment_data );\n\t$lognotes\t = edd_get_option( 'edd_pup_log_notes' );\n\n\tadd_filter('edd_email_template', 'edd_pup_template' );\n\n\t/* If subject doesn't use tags (and thus is the same for each customer)\n\t * then store it in a transient for quick access on subsequent loops. */\n\t$subject = get_transient( 'edd_pup_subject_'. $userid );\n\n\tif ( false === $subject || $emailmeta['_edd_pup_subject'][0] != $subject ) {\n\n\t\tif ( empty( $emailmeta['_edd_pup_subject'][0] ) ) {\n\n\t\t\t$subject = '(no subject)';\n\t\t\twp_update_post( array( 'ID' => $email_id, 'post_excerpt' => $subject ) );\n\t\t\tupdate_post_meta ( $email_id, '_edd_pup_subject', $subject );\n\t\t\tset_transient( 'edd_pup_subject_'. $userid, $subject, 60 * 60 );\n\n\t\t} else {\n\n\t\t\t$subject = edd_do_email_tags( $emailmeta['_edd_pup_subject'][0], $payment_id );\n\n\t\t\tif ( $subject == $emailmeta['_edd_pup_subject'][0] ) {\n\t\t\t\tset_transient( 'edd_pup_subject_'. $userid, $subject, 60 * 60 );\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( version_compare( get_option( 'edd_version' ), '2.1' ) >= 0 ) {\n\n\t\t$edd_emails = new EDD_emails();\n\n\t\t$updated_links = edd_pup_products_links_tag( $payment_id, null, $email_id);\n\t\t$updated_products = edd_pup_products_tag( $payment_id, null, $email_id );\n\n\t\tif( $updated_links || $updated_products ){\n\t\t\t$message = str_replace( '{updated_products_links}', $updated_links, $emailpost->post_content );\n\t\t\t$replaced_products = str_replace( '{updated_products}', $updated_products, $message );\n\n\n\n\t\t\t$message = edd_do_email_tags( $replaced_products, $payment_id );\n\t\t\t$edd_emails->__set( 'from_name', $from_name );\n\t\t\t$edd_emails->__set( 'from_address', $from_email );\n\t\t\t$stripped_message = stripslashes( $message );\n\n\t\t\t$mailresult = ( isset( $test_mode ) && $test_mode == true ) ? compact( 'email', 'subject', 'stripped_message', 'headers', 'attachments' ) : $edd_emails->send( $email, $subject, $stripped_message, $attachments );\n\t\t} else {\n\t\t\t$mailresult = 'nothig';\n\t\t}\n\n\t} else {\n\t\t$updated_links = edd_pup_products_links_tag( $payment_id, null, $email_id);\n\t\t$updated_products = edd_pup_products_tag( $payment_id, null, $email_id );\n\n\t\tif( $updated_links || $updated_products ){\n\n\t\t\t$email_body_header = get_transient( 'edd_pup_email_body_header_'. $userid );\n\n\t\t\tif ( false === $email_body_header ) {\n\n\t\t\t\t$email_body_header = edd_get_email_body_header();\n\n\t\t\t\tset_transient( 'edd_pup_email_body_header_'. $userid, $email_body_header, 60 * 60 );\n\t\t\t}\n\n\t\t\t$email_body_footer = get_transient( 'edd_pup_email_body_footer_'. $userid );\n\n\t\t\tif ( false === $email_body_footer ) {\n\n\t\t\t\t$email_body_footer = edd_get_email_body_footer();\n\n\t\t\t\tset_transient( 'edd_pup_email_body_footer_'. $userid, $email_body_footer, 60 * 60 );\n\t\t\t}\n\n\t\t\t$headers = \"From: \" . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . \" <$from_email>\\r\\n\";\n\t\t\t$headers .= \"Reply-To: \". $from_email . \"\\r\\n\";\n\t\t\t$headers .= \"Content-Type: text/html; charset=utf-8\\r\\n\";\n\n\t\t\t$message = $email_body_header;\n\n\t\t\t$_message = str_replace( '{updated_products_links}', $updated_links, $emailpost->post_content );\n\t\t\t$replaced_products = str_replace( '{updated_products}', $updated_products, $_message );\n\n\t\t\t$message .= apply_filters( 'edd_pup_message', edd_email_template_tags( $replaced_products, $payment_data, $payment_id ), $payment_id, $payment_data );\n\n\t\t\t$message .= $email_body_footer;\n\t\t\t$stripped_message = stripslashes( $message );\n\n\t\t\t$mailresult = ( isset( $test_mode ) && $test_mode == true ) ? compact( 'email', 'subject', 'stripped_message', 'headers', 'attachments' ) : wp_mail( $email, $subject, $stripped_message, $headers, $attachments );\n\t\t} else {\n\t\t\t$mailresult = 'nothig';\n\t\t}\n\t}\n\n\t// Update payment notes to log this email being sent\n\tif ( !isset( $lognotes['sent'] ) ) {\n\t\tedd_insert_payment_note( $payment_id, 'Sent product update email \"'. $subject .'\" <a href=\"'.admin_url( 'edit.php?post_type=download&page=edd-prod-updates&view=view_pup_email&id='.$email_id ).'\">View Email</a>' );\n\t}\n\n\n return $mailresult;\n}", "title": "" }, { "docid": "bafb934d5b81b67f4badc4e05c603097", "score": "0.51844275", "text": "public function canContactApplicantBySMSAndEmail()\n {\n return $this->canContactApplicantBySMSAndEmail;\n }", "title": "" }, { "docid": "3a4ba72fee94cc567bfefa45e515b01f", "score": "0.5180788", "text": "private function checkEmailSettings(): bool\n {\n return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc']));\n }", "title": "" }, { "docid": "966cc602362df6f3bf36ed00ce39c34a", "score": "0.518055", "text": "public function wasSent() {\n return $this->success;\n }", "title": "" }, { "docid": "c662d6e2727d5d59daf0512b5cb1ce40", "score": "0.5180354", "text": "public function sendConfirmation()\n {\n $subject = _t(\n 'SilverShop\\ShopEmail.ConfirmationSubject',\n 'Order #{OrderNo} confirmation',\n '',\n ['OrderNo' => $this->order->Reference]\n );\n return $this->sendEmail(\n 'SilverShop/Model/Order_ConfirmationEmail',\n $subject,\n self::config()->bcc_confirmation_to_admin\n );\n }", "title": "" }, { "docid": "ca7d91af86ae3c33067719fbf97e4e8c", "score": "0.5179361", "text": "public static function sendVerificationMail($email){\n $userId = $email;\n $url = $GLOBALS['server_url'] . $GLOBALS['user_dir'] . $GLOBALS['prj_dir'].\"/controller/verify_mail.php\";\n\n /**\n * Mailer script provided by the school\n * - We just added the $email, $url variables from our site\n */\n // create a new cURL resource\n $ch = curl_init();\n // set URL and other appropriate options\n $id = md5(uniqid(rand(), 1));\n\n $areWeStored = self::storeVerificationMailToDb($userId, $id);\n\n if($areWeStored == true) {\n curl_setopt($ch, CURLOPT_URL, \"http://kark.uit.no/internett/php/mailer/mailer.php?address=\" . $email . \"&url=\" . $url . \"?id=\" . $id);\n //curl_setopt($ch, CURLOPT_URL, \"http://www.dagbladet.no/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // grab URL and pass it to the browser\n $output = curl_exec($ch);\n /**\n * Mailer script provided by the school ends here\n */\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "d74a58c9a6c385c4d024a1f6193f1bea", "score": "0.5174697", "text": "public function destinatary_email_verification_is_good()\n {\n //Se usa para fngir envío de correo\n Mail::fake();\n $this->withoutMiddleware();\n\n //1. Given -> Teniendo un usuario\n $user = factory(User::class)->create();\n $petition = factory(Petition::class)->create([\n 'ID_user' => $user->ID,\n ]);\n\n //2. When -> Se envía un correo a dicho usuario\n Mail::to($user)->send(new UserCreatedEmail($user,$petition));\n\n //3. Then -> Entonces el coreo destinatario es el mismo que el ingresado por el usuario\n Mail::assertSent(UserCreatedEmail::class, function ($mail) use ($user,$petition) {\n return $mail->to[0]['address'] === $user['email'];\n });\n }", "title": "" }, { "docid": "1047b3563d8edf7c7b671d29c9a1db48", "score": "0.51702595", "text": "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "title": "" }, { "docid": "8d3054449fd66b0c9105f00117ec8531", "score": "0.5168728", "text": "function paid_sendEmail_owner($details) {\n\t\t\t\t$currencycode = $details->currCode;\n\t\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\n\t\t\t\t$sendto = $this->ownerEmail($details->module, $details->itemid);\n\t\t\t\t$sitetitle = \"\";\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"<h4><b>Booking Paid Successfully</b></h4>\";\n\t\t\t\t$message .= \"Invoice No.: \" . $invoiceid . \".<br>\";\n\t\t\t\t//$message .= \"Payment Method: \" . $paymethod . \".<br><br>\";\n\t\t\t\t$message .= \"Deposit Amount: \" . $currencycode . \" \" . $currencysign . $deposit . \"<br>\";\n\t\t\t\t$message .= \"Total Amount: \" . $currencycode . \" \" . $currencysign . $totalamount . \"<br><br>\";\n\t\t\t\t$message .= \"<h4><b>Customer Information</b></h4>\";\n\t\t\t\t$message .= \"Customer ID: \" . $custid . \"<br>\";\n\t\t\t\t$message .= \"Name : \" . $name . \"<br>\";\n\t\t\t\t$message .= \"Email : \" . $custemail . \"<br>\";\n\t\t\t\t$message .= \"Country : \" . $country . \"<br>\";\n\t\t\t\t$message .= \"Phone : \" . $phone . \"<br>\";\n\t\t\t\t$message .= \"<br> To view Invoice <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "title": "" }, { "docid": "89158333fdd9ad6f2b51c488764c243a", "score": "0.5162809", "text": "function isRedeemed() {\n // we get if it wasn't used yet\n return $this->getUsed_at() != '';\n }", "title": "" }, { "docid": "e08efd1b36cf0bc95d576a388825de13", "score": "0.5158788", "text": "public function isMail()\n {\n }", "title": "" }, { "docid": "d11b6d3105112a8eddf33d239e9a5d74", "score": "0.5155149", "text": "public function isEmailDisabled()\n {\n return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');\n }", "title": "" }, { "docid": "51a8435f02124fd8e65ce8f20f2cc41e", "score": "0.515071", "text": "public function sendEmail()\n {\n $user = User::findOne([\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $verifyLink = Yii::$app->urlManager->createAbsoluteUrl(['site/verify-email', 'token' => $user->verification_token]);\n\n // Получатель\n $sendTo = $this->email;\n\n // Формирование заголовка письма\n $subject = 'Подтверждение регистрации на ' . Yii::$app->name;\n\n // Формирование тела письма\n $msg = \"<html><body style='font-family:Arial,sans-serif;'>\";\n $msg .= \"<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>\" . $subject . \"</h2>\\r\\n\";\n $msg .= \"<p>Приветствуем, \" . Html::encode($user->username) . \",</p>\\r\\n\";\n $msg .= \"<p>Перейдите по ссылке ниже, чтобы подтвердить свою электронную почту:</p>\\r\\n\";\n $msg .= \"<p>\" . Html::a(Html::encode($verifyLink), $verifyLink) . \"</p>\\r\\n\";\n $msg .= \"</body></html>\";\n\n // Отправитель\n $headers = \"From: \". Yii::$app->params['supportEmail'] . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html;charset=utf-8 \\r\\n\";\n\n // отправка сообщения\n if(@mail($sendTo, $subject, $msg, $headers)) {\n return true;\n } else {\n return false;\n }\n /*\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'emailVerify-html', 'text' => 'emailVerify-text'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject('Подтверждение регистрации на ' . Yii::$app->name)\n ->send();\n */\n }", "title": "" }, { "docid": "5bcd38e00377858a25ef0798a831c010", "score": "0.5150496", "text": "public function isSubscribedToMailchimpList();", "title": "" }, { "docid": "19d3e8387eac7f45bc86ce178de2720a", "score": "0.51432997", "text": "function paid_sendEmail_admin($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$additionaNotes = $details->additionaNotes;\t\t\t\t\n\t\t\t\t$sendto = $this->adminemail;\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidadmin\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidadmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "title": "" }, { "docid": "6f543305e2fd74e69efdc34ecdcb360d", "score": "0.51422817", "text": "public function overwriteMessage(): bool\n {\n return $this->overwriteMessage;\n }", "title": "" }, { "docid": "36a32bded4ec3ae9941cc2c0c20baa83", "score": "0.51419246", "text": "public function contact($email)\n {\n if ($this->validate()) {\n Yii::$app->mailer->compose()\n ->setTo($email)\n ->setFrom([Yii::$app->params['senderEmail'] => Yii::$app->params['senderName']])\n ->setReplyTo([$this->email => $this->name])\n ->setSubject($this->subject)\n ->setTextBody($this->body)\n ->send();\n\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "445d6abf3ddffc701b145c6db2b07796", "score": "0.51416045", "text": "public function email_buyer_service_purchase(){\n\t\t$data = array('workstream'=>$this,'from' => NOTIFICATION_EMAIL,'from_name' => NOTIFICATION_NAME,'to' =>$this->buyer->email,'fname' =>$this->buyer->fname,'sender_name'=> $this->seller->fname,'subject' => $this->buyer->fname.' your service purchase order is successful.');\n\t\tMail::send('emails.workstream/buyer_service_purchase', $data, function($message) use ($data)\n\t\t{\n\t\t $message->to($data['to'], $data['fname'])->subject($data['subject']);\n\t\t\t$message->from($data['from'],$data['from_name']);\n\t\t});\n\t\treturn TRUE;\n\t\t\n\t}", "title": "" }, { "docid": "a59f51932a0cb8893a4f6e9d744baf94", "score": "0.51356554", "text": "function send_recover_email($to_name, $to_email, $link) {\r\n\t\tglobal $translate;\r\n\t\t\r\n\t\t$message = $translate->__(\"Hello\").\" <b>$to_name</b>:<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"You have requested a password change on\").\" <b>\".get_setting(1).\"</b>.<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"If you didn't perform this action, just skip this email and the link will expire in 24 hours.\").\"<br /><br />\";\r\n\t\t$message = $message.$translate->__(\"To reset your password, click the following link\").\": <br /><br /><a href='$link' target='_blank'>$link</a>\";\t\r\n\t\t\r\n\t\t$subject = $translate->__(\"Password recover request by\").\" $to_name\";\r\n\t\t$from_email = 'no-reply@'.get_host();\r\n\t\t\r\n\t\t// For development purposes\r\n\t\tif ( !SCRIPT_LIVE ) {\r\n\t\t\t$from_email = $from_email.'.com';\r\n\t\t}\r\n\t\t\r\n\t\tif ( send_email(get_setting(1), $from_email, $to_email, $to_name, $subject, $message) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" } ]
303437d6eb98cfb1656d24dcac78ca41
Reviews post type detail pages. Author: Webbu Design Enqueue Styles
[ { "docid": "c472c021f393c25039b56ac3a76d8e49", "score": "0.62274814", "text": "function pointfinder_reviews_styles(){\n\t$screen = get_current_screen();\n\tif ($screen->post_type == 'pointfinderreviews') {\n\t\twp_register_style('metabox-custom.', get_home_url().\"/wp-content/themes/pointfinder\" . '/admin/core/css/metabox-custom.css', array(), '1.0', 'all');\n\t\twp_enqueue_style('metabox-custom.');\n\t}\n}", "title": "" } ]
[ { "docid": "9bdaf90f9bfbb3313aaf51f85e6dfd02", "score": "0.645649", "text": "function addReviewPostType()\n{\n register_post_type('reviews', [\n 'labels' => [\n 'name' => 'Reviews',\n 'singular_name' => 'Review'\n ],\n 'hierarchical' => false,\n 'public' => false,\n 'has_archive' => false,\n 'show_ui' => true,\n 'menu_icon' => 'dashicons-text-page',\n 'supports' => ['title', 'thumbnail'],\n ]);\n}", "title": "" }, { "docid": "d330474272f56046fb5b383bedccee4b", "score": "0.6453865", "text": "public function render_content() {\n ?>\n\t <div class=\"pro-box\">\n <a href=\"<?php echo esc_url('https://wordpress.org/support/view/theme-reviews/busiprof#postform/');?>\" target=\"_blank\" class=\"review\" id=\"review_pro\"><?php _e( 'ADD YOUR REVIEW','busiprof' ); ?></a>\n\t </div>\n <?php\n }", "title": "" }, { "docid": "830ccf45d253d236d60261b8acead4a1", "score": "0.6243701", "text": "public function book_review_custom_post_type() {\n //Set labels for Custom Post Type\n $labels = array(\n 'name' => __( 'Books', 'br_book_review' ),\n 'singular_name' => __( 'Book', 'br_book_review' ),\n 'add_new' => __( 'Add New', 'br_book_review' ),\n 'add_new_item' => __( 'Add New Book', 'br_book_review' ),\n 'edit_item' => __( 'Edit Book', 'br_book_review' ),\n 'new_item' => __( 'New Book', 'br_book_review' ),\n 'all_items' => __( 'All Book', 'br_book_review' ),\n 'view_item' => __( 'View Book', 'br_book_review' ),\n 'search_items' => __( 'Search Books', 'br_book_review' ),\n 'not_found' => __( 'No books found', 'br_book_review' ),\n 'not_found_in_trash' => __( 'No books found in the Trash', 'br_book_review' ),\n 'parent_item_colon' => '',\n 'menu_name' => 'Books',\n 'menu_icon' => 'dashicons-welcome-write-blog',\n );\n // Set other options for Custom Post Type\n $args = array(\n 'label' => __( 'book', 'br_book_review' ),\n 'labels' => $labels,\n 'description' => __( 'Holds our books and book specific data', 'br_book_review' ),\n 'public' => true,\n 'menu_position' => 5,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n 'has_archive' => true,\n 'taxonomies' => array( 'category' ),\n );\n //creating a custom post type like book\n register_post_type( 'book', $args );\n }", "title": "" }, { "docid": "32ef426c37b052cea02627eee1c07450", "score": "0.61912906", "text": "function my_add_reviews( $query ) {\n if (!is_admin() && $query->is_main_query()) {\n if ($query->is_home() || $query->is_search() ) {\n $query->set( 'post_type', array( 'post', 'portfolio' ) );\n }\n }\n}", "title": "" }, { "docid": "3084c487d0c820231159058f72b5d6a9", "score": "0.61298394", "text": "function pointfinder_reviews_meta_box_details( $post ) {\n\t\techo '<div class=\"pf-single-rev\">'.esc_html__('Review Total','pointfindert2d').' : '.pfcalculate_single_review($post->ID).'</div>';\n\t\techo pfget_reviews_peritem($post->ID);\n\n\t}", "title": "" }, { "docid": "5df6f8612d1f24703cfcbee5858f8a50", "score": "0.6011382", "text": "function pointfinder_reviews_meta_box_revinfo( $post ) {\n\t\t//get_edit_user_link($prderinfo_user)\n\t\t$itemid = esc_attr(get_post_meta( $post->ID, 'webbupointfinder_review_itemid', true ));\n\t\t$email = esc_attr(get_post_meta( $post->ID, 'webbupointfinder_review_email', true ));\n\n\n\t\t$output = '<ul>';\n\t\t\t$output .= '<li><span class=\"rev-cr-title\">'.esc_html__('Item','pointfindert2d').' : </span><a href=\"'.get_edit_post_link($itemid).'\" target=\"_blank\">'.get_the_title($itemid).'('.$itemid.')</a></li>';\n\t\t\t\n\t\t\tif (PFcheck_postmeta_exist('webbupointfinder_review_userid',$post->ID)) {\n\t\t\t\t$userid = esc_attr(get_post_meta( $post->ID, 'webbupointfinder_review_userid', true ));\n\t\t\t\t$output .= '<li><span class=\"rev-cr-title\">'.esc_html__('Reviewer','pointfindert2d').' : </span><a href=\"'.get_edit_user_link($userid).'\" target=\"_blank\">'.get_the_title($post->ID).'</a></li>';\n\t\t\t}else{\n\t\t\t\t$output .= '<li><span class=\"rev-cr-title\">'.esc_html__('Reviewer','pointfindert2d').' : </span>'.get_the_title($post->ID).'</li>';\n\t\t\t}\n\t\t\t\n\t\t\t$output .= '<li><span class=\"rev-cr-title\">'.esc_html__('Email','pointfindert2d').' : </span>'.$email.'</li>';\n\n\t\t\t$flagstatus = (PFcheck_postmeta_exist('webbupointfinder_review_flag',$post->ID))? get_post_meta( $post->ID, 'webbupointfinder_review_flag', true ) : '' ;\n\t\t\t$output .= ($flagstatus == 1)? '<li style=\"background:red;padding:8px 10px;\"><a href=\"'.admin_url('post.php?post='.$post->ID.'&action=edit&flag=0').'\" style=\"color:white; font-weight:bold;\">'.esc_html__('This review flagged for check. Click here for remove flag.','pointfindert2d').'</a></li>' : '';\n\n\t\t$output .= '</ul>';\n\t\techo $output;\n\n\t}", "title": "" }, { "docid": "4c9e4f8d09f4c654586d61384e0976b7", "score": "0.5967268", "text": "function zthemename_init() {\n\n\tregister_post_type(\n\t\t'zthemename_reviews',\n\t\tarray(\n\t\t\t'public' => true,\n\t\t\t'menu_icon' => 'dashicons-edit-page',\n\t\t\t'labels' => array(\n\t\t\t\t'name' => esc_html__( 'Reviews', 'zthemename' ),\n\t\t\t),\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'author',\n\t\t\t\t'thumbnail',\n\t\t\t),\n\t\t)\n\t);\n\n\tregister_meta(\n\t\t'post',\n\t\t'_zthemename_post_meta',\n\t\tarray(\n\t\t\t'show_in_rest' => array(\n\t\t\t\t'schema' => array(\n\t\t\t\t\t'type' => 'object',\n\t\t\t\t\t'properties' => array(\n\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'description' => array(\n\t\t\t\t\t\t\t'type' => 'string',\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'type' => 'object',\n\t\t\t'single' => true,\n\t\t\t'default' => array(\n\t\t\t\t'title' => '',\n\t\t\t\t'description' => '',\n\t\t\t),\n\t\t\t// phpcs:ignore\n\t\t\t'auth_callback' => function() {\n\t\t\t\treturn current_user_can( 'edit_posts' );\n\t\t\t},\n\t\t)\n\t);\n}", "title": "" }, { "docid": "f49affd555bafadfbb05b7d6aef5721b", "score": "0.59419435", "text": "function wd_template_single_review(){\n\tglobal $product;\n\n\tif ( get_option( 'woocommerce_enable_review_rating' ) == 'no' )\n\t\treturn;\t\t\n\t\t\n\tif ( $rating_html = $product->get_rating_html() ) {\n\t\techo \"<div class=\\\"review_wrapper\\\">\";\n\t\techo $rating_html; \n\t\techo '<span class=\"review_count\">'.$product->get_rating_count(),\" \";\n\t\t_e(\"Review(s)\",'wpdance');\n\t\techo \"</span>\";\n\t\techo '<span class=\"add_new_review\"><a href=\"#review_form\" class=\"inline show_review_form\" title=\"Review for '. esc_attr($product->get_title()) .' \">' . __( 'Add Your Review', 'wpdance' ) . '</a></span>';\n\t\techo \"</div>\";\n\t}else{\n\t\techo '<p><span class=\"add_new_review\"><a href=\"#review_form\" class=\"inline show_review_form\" title=\"Review for '. esc_attr($product->get_title()) .' \">' . __( 'Be the first to review this product', 'wpdance' ) . '</a></span></p>';\n\n\t}\n\n\t\n}", "title": "" }, { "docid": "ac00438db30de1e7f39e7bf9b1afe52c", "score": "0.59413064", "text": "function cmstpv_postoverview_head() {\n\n\tif ( isset($_GET[\"mode\"]) && $_GET[\"mode\"] === \"tree\" ) {\n\t\t?>\n\t\t<style>\n\t\t\t/* hide and position WP things */\n\t\t\t/* TODO: move this to wp head so we don't have time to see wps own stuff */\n\t\t\t.subsubsub, .tablenav.bottom, .tablenav .actions, .wp-list-table, .search-box, .tablenav .tablenav-pages { display: none !important; }\n\t\t\t.tablenav.top { float: right; }\n\t\t\t.view-switch { visibility: hidden; }\n\t\t</style>\n\t\t<?php\n\t} else {\n\t\t// post overview is enabled, but not active\n\t\t// make room for our icon directly so page does not look jerky while adding it\n\t\t?>\n\t\t<style>\n\t\t\t.view-switch {\n\t\t\t\tpadding-right: 23px;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}\n\n}", "title": "" }, { "docid": "27574ebbffd971e639c5897c6232bb42", "score": "0.5908109", "text": "function ae_Review( $post_id ) {\n\n require( dirname(__FILE__) . '/class.AliExpress.Review.php' );\n\n\n $obj = new Review();\n\n return $obj->listReviews( $post_id );\n}", "title": "" }, { "docid": "90cdc09b32dbfa2bd32ebb554df8679c", "score": "0.58611137", "text": "function nt_render_reviews_page() {\n\t$nt_list_table = new NT_List_table();\n\t// Fetch, prepare, sort, and filter our data.\n\t$nt_list_table->prepare_items();\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t<!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->\n\t\t<form id=\"nt-reviews-filter\" method=\"get\">\n\t\t\t<!-- For plugins, we also need to ensure that the form posts back to our current page -->\n\t\t\t<input type=\"hidden\" name=\"page\" value=\"<?php echo $_REQUEST['page'] ?>\" />\n\t\t\t<!-- Now we can render the completed list table -->\n\t\t\t<?php $nt_list_table->display() ?>\n\t\t</form>\n\n\t</div>\n\t<?php \n}", "title": "" }, { "docid": "4de503f5ca48d1c1caa9bbd89310534e", "score": "0.585637", "text": "public function action_index(){\n\n\t\t$reviews = Model_Review::find('all');\n\n\t\t$this->template->artist = View::forge('blog/view');\n\t\t\n\t\t$this->template->review = View::forge('blog/index');\n\t}", "title": "" }, { "docid": "c20b2c7bb44b2c0810e5cb1e58d35a58", "score": "0.579362", "text": "public function tools_page() { ?>\n\n\t\t<div class=\"wrap\">\n\n\t\t\t<h1><?php _e( 'Custom Post Type Generator', 'cpt-generator' ); ?></h1>\n\n\t\t\t<div class=\"cptg-form-wrap\"></div>\n\n\t\t\t<div class=\"cptg-output-wrap\"></div>\n\n\t\t</div><!-- .wrap -->\n\n\t<?php }", "title": "" }, { "docid": "4bc76fcbb16b1fc39cc54e33247e9993", "score": "0.57916194", "text": "function pointfinder_reviews_add_meta_box($post_type) {\n\t\tif ($post_type == 'pointfinderreviews') {\n\t\t\tadd_meta_box(\n\t\t\t\t'submitdiv',\n\t\t\t\tesc_html__( 'Status Actions','pointfindert2d'),\n\t\t\t\t'PF_Modified_review_submit_meta_box',\n\t\t\t\t'pointfinderreviews', \n\t\t\t\t'side', \n\t\t\t\t'high'\n\t\t\t);\n\t\t\tadd_meta_box(\n\t\t\t\t'pointfinder_reviews_info',\n\t\t\t\tesc_html__( 'REVIEW INFO', 'pointfindert2d' ),\n\t\t\t\t'pointfinder_reviews_meta_box_revinfo',\n\t\t\t\t'pointfinderreviews',\n\t\t\t\t'side',\n\t\t\t\t'high'\n\t\t\t);\n\n\t\t\tadd_meta_box(\n\t\t\t\t'pointfinder_reviews_details',\n\t\t\t\tesc_html__( 'REVIEW DETAILS', 'pointfindert2d' ),\n\t\t\t\t'pointfinder_reviews_meta_box_details',\n\t\t\t\t'pointfinderreviews',\n\t\t\t\t'side',\n\t\t\t\t'core'\n\t\t\t);\n\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "d249f0960a844dfb4c4249af29cc8df7", "score": "0.57700574", "text": "function tmpl_single_page_custom_field($post_type){\r\n\t\r\n\t$custom_post_type = tevolution_get_post_type();\r\n\t\r\n\tif((is_single() || $_POST['ptype']=='preview') && $post_type !=''){\r\n\t\tglobal $wpdb,$post,$htmlvar_name,$pos_title;\r\n\t\t\r\n\t\t$cus_post_type = $post_type;\r\n\t\t$heading_type = tmpl_fetch_heading_post_type($post_type);\r\n\t\t\r\n\t\tif(count($heading_type) > 0)\r\n\t\t{\r\n\t\t\tforeach($heading_type as $key=>$heading)\r\n\t\t\t{\t\r\n\t\t\t\t/* fetch the custom fields of detail page*/\r\n\t\t\t\t$htmlvar_name[$key] = tmpl_get_single_page_customfields_details($post_type,$heading,$key);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $htmlvar_name;\r\n\t}\r\n}", "title": "" }, { "docid": "b6dd978b60e7185f97953df7f53d10cc", "score": "0.5767316", "text": "public function custom_post_type_callback() \n\t{\n \tregister_post_type( 'podcast',\n \tarray(\n 'labels' => array(\n 'name' => 'Podcast',\n 'singular_name' => 'Podcast Review',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Podcast Review',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit Podcast Review',\n 'new_item' => 'New Podcast Review',\n 'view' => 'View',\n 'view_item' => 'View Podcast Review',\n 'search_items' => 'Search Podcast Reviews',\n 'not_found' => 'No Podcast Reviews found',\n 'not_found_in_trash' => 'No Podcast Reviews found in Trash',\n 'parent' => 'Parent Podcast Review'\n \t\t), \n \t'public' => true,\n \t'menu_position' => 15,\n \t'menu_icon' => 'dashicons-microphone',\n \t'has_archive' => true\n \t));\n\t}", "title": "" }, { "docid": "0060646966b78a51198bbe2e708719a0", "score": "0.57580173", "text": "function get_reviews($args = array(), $reviews = ''){\n\t\tif(!is_array($args) || empty($args)){ $args = array(); }\n\t\tif(!isset($args['slider'])){ $args['slider'] = true; }\n\t\tif(!isset($args['quotes'])){ $args['quotes'] = true; }\n\t\tif(!isset($args['before-author'])){ $args['before-author'] = ''; }\n\t\tif(!isset($args['stars'])){ $args['stars'] = true; }\n if(!isset($args['aggregate'])){ $args['aggregate'] = false; }\n if(!isset($args['review_count'])){ $args['review_count'] = -1; }\n if(!isset($args['review_length'])){ $args['review_length'] = -1; }\n if(!isset($args['random'])){ $args['random'] = true; }\n if(!isset($args['product_types'])){ $args['product_types'] = false; }\n $page_product_type = '';\n if( $args['product_types'] ) {\n $page_product_type = get_field('product_type') ? get_field('product_type') : 'general';\n }\n \n\t\t$reviews_repeater = $reviews;\n\t\tif($reviews_repeater){\n \n if( $args['random'] ) { shuffle($reviews_repeater); }\n $general_reviews = array();\n $review_output = '';\n $rating_total = 0;\n $has_match = false;\n \n\t\t\t// Only show one review if slider option = false\n\t\t\tif($args['review_count'] !== -1){\n\t\t\t\t$reviews_repeater = array_slice($reviews_repeater, 0, $args['review_count']);\n\t\t\t}\n \n\t\t\tforeach($reviews_repeater as $review){\n\t\t\t\t$author = isset($review['author']) ? $review['author'] : \"\";\n\t\t\t\t$rating = isset($review['rating']) ? $review['rating'] : 5;\n\t\t\t\t$review_content = isset($review['review_content']) ? $review['review_content'] : \"\";\n $rating_total = $rating_total + $review['rating'];\n $review_product_type = isset($review['product_type']) ? $review['product_type'] : 'general';\n \n if( $args['product_types'] && $review_product_type == 'general' ) {\n $general_reviews[] = $review;\n }\n \n if( !$args['product_types'] || ( $args['product_types'] && $page_product_type == $review_product_type ) ) {\n $has_match = true;\n\t\t\t\t\n if($args['slider'] == true){ $review_output .= '<div>'; }\n \n ob_start(); ?>\n \n <blockquote class=\"custom-review\">\n <?php if($args['stars'] == true): ?>\n <div class=\"stars\">\n <?php if($review_content){ for($i = 0; $i < $rating; ++$i){ echo '<svg version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 95.2 93\" class=\"custom-star\"><polygon class=\"st0\" points=\"48,70.8 18.4,91.4 28.8,56.9 0.1,35.1 36.2,34.3 48,0.2 59.8,34.3 95.9,35.1 67.2,56.9 77.6,91.4\"/></svg>'; } } ?>\n </div>\n <?php endif; ?>\n <p class=\"review-text\">\n <?php \n if( $args['quotes'] == true ){ echo '“'; }\n if($review_content){ \n if( $args['review_length'] !== -1 ) {\n if(strlen($review_content)<=$args['review_length']) {\n echo $review_content;\n }else {\n $y=substr($review_content,0,$args['review_length']) . '...';\n echo $y;\n }\n }else {\n echo $review_content;\n }\n }\n if( $args['quotes'] == true ){ echo '”'; }\n ?>\n </p>\n <span class=\"h2 review-author\">\n <?php if($author){ echo $args['before-author'] . $author; }else{ echo $args['before-author'] . 'Happy Customer'; } ?>\n </span>\n </blockquote>\n \n <?php \n $review_output .= ob_get_clean();\n \n if($args['slider'] == true){ $review_output .= '</div>'; }\n }\n\t\t\t}\n \n if( $has_match == false && $args['product_types'] ) {\n $args['product_types'] = false;\n get_reviews($args, $general_reviews);\n return;\n }\n \n if( $args['aggregate'] ) {\n // Get real aggregate rating to 1 decimal.\n $aggregate_rating = round(($rating_total / count($reviews_repeater) ), 1);\n // Round any rating value decimal under .3 down and anything above to .5 for star value display.\n $aggregate_floor = floor($aggregate_rating);\n $fraction = $aggregate_rating - $aggregate_floor; \n if( $fraction <= .3 ) {\n $aggregate_stars = $aggregate_floor;\n }else {\n $aggregate_stars = $aggregate_floor + .5;\n }\n \n for($i=0; $i<floor($aggregate_stars); $i++) {\n $aggregate_stars_output .= '<svg version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 95.2 93\" class=\"custom-star\"><g><polygon class=\"st0\" points=\"48,70.8 18.4,91.4 28.8,56.9 0.1,35.1 36.2,34.3 48,0.2 59.8,34.3 95.9,35.1 67.2,56.9 77.6,91.4\"/></g></svg>';\n }\n if(floor($aggregate_stars)!=$aggregate_stars) {\n $aggregate_stars_output .= '<svg version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 95.2 93\" class=\"custom-star\"><g><polygon class=\"st0\" points=\"48,70.8 18.4,91.4 28.8,56.9 0.1,35.1 36.2,34.3 48,0.2 59.8,34.3 95.9,35.1 67.2,56.9 77.6,91.4\"/></g></svg>';\n }\n \n if($args['slider'] == false){ echo '<div class=\"reviews-list\">'; }\n $aggregate = '\n <div class=\"aggregate-rating\">\n <div class=\"rating-number\">' . $aggregate_rating . ' Stars </div>\n <div class=\"out-of\">Out of ' . count($reviews_repeater) . ' Reviews</div>\n <div class=\"stars\">' . $aggregate_stars_output . '</div>\n </div>';\n }\n \n if( ($args['aggregate'] && $args['aggregate'] === 'before') || $args['aggregate'] == true ){ echo $aggregate; }\n \n if($args['slider'] == true){ echo '<div class=\"reviews-slider\">'; }elseif( $args['slider'] == false && !$args['aggregate'] ) { echo '<div class=\"reviews-list\">'; }\n \n echo $review_output;\n \n if($args['slider'] == true){ echo '</div>'; }\n \n if( $args['aggregate'] && $args['aggregate'] === 'after' ){ echo $aggregate; }\n \n if($args['slider'] == false){ echo '</div>'; }\n\t\t}\n\t}", "title": "" }, { "docid": "faf4e3769efb44489e125aa56e620f98", "score": "0.57184416", "text": "function show_meta_box_post() {\n global $THEMEREX_meta_box_post, $post, $THEMEREX_options;\n\t\n // Use nonce for verification\n echo '<input type=\"hidden\" name=\"meta_box_post_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n\t// Nonce for ajax queries\n\t$THEMEREX_ajax_nonce = wp_create_nonce('ajax_nonce');\n\t$THEMEREX_ajax_url = admin_url('admin-ajax.php');\n\t\n\t$maxLevel = max(5, (int) get_theme_option('reviews_max_level'));\n\n\t$custom_options = get_post_meta($post->ID, 'post_custom_options', true);\n\tif (isset($custom_options['reviews_marks'])) \n\t\t$custom_options['reviews_marks'] = marksToDisplay($custom_options['reviews_marks']);\n\n\t$post_options = array_merge($THEMEREX_options, $THEMEREX_meta_box_post['fields']);\n\n\tthemerex_options_load_scripts();\n\tthemerex_options_prepare_js('post');\n\t?>\n \n <script type=\"text/javascript\">\n\t\t// AJAX fields\n\t\tvar THEMEREX_ajax_url = \"<?php echo ($THEMEREX_ajax_url); ?>\";\n\t\tvar THEMEREX_ajax_nonce = \"<?php echo ($THEMEREX_ajax_nonce); ?>\";\n\t\t//var reviews_criterias = \"\";\n\t\tvar reviews_levels = \"<?php echo get_theme_option('reviews_criterias_levels'); ?>\";\n\t\tvar reviews_max_level = <?php echo ($maxLevel); ?>;\n\t\tvar allowUserReviews = true;\n\t\tjQuery(document).ready(function() {\n\t\t\t// Init post specific meta fields\n\t\t\t//initPostReviews();\n\t\t});\n\t</script>\n \n\t<div class=\"reviews_<?php echo esc_attr($maxLevel); ?>\">\n\n <?php\n\n\tthemerex_options_page_start(array(\n\t\t'data' => $post_options,\n\t\t'add_inherit' => true,\n\t\t'show_page_layout' => false,\n\t\t'override' => 'post'\n\t\t));\n\n\tforeach ($post_options as $option) { \n\t\tif (!isset($option['override']) || !in_array('post', explode(',', $option['override']))) continue;\n\n\t\t$id = isset($option['id']) ? $option['id'] : '';\n $meta = isset($custom_options[$id]) ? $custom_options[$id] : '';\n\t\t\n\t\tif ($id == 'reviews_marks') {\n\t\t\t$cat_list = getCategoriesByPostId($post->ID);\n\t\t\tif (count($cat_list) > 0) {\n\t\t\t\tforeach ($cat_list as $cat) {\n\t\t\t\t\t$id = (int) $cat['term_id'];\n\t\t\t\t\t$prop = get_category_inherited_property($id, 'reviews_criterias');\n\t\t\t\t\tif (!empty($prop) && !is_inherit_option($prop)) {\n\t\t\t\t\t\t$option['options'] = $prop;\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\n\t\tthemerex_options_show_field($option, $meta);\n\t}\n\n\tthemerex_options_page_stop();\n\t\n\t?>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "009600dc8448c827630db7b9fa76622b", "score": "0.5703631", "text": "function vtw_post_types() {\n\treturn array('page','post','product');\t\n}", "title": "" }, { "docid": "964769b18fec6189f15956c933d1d06d", "score": "0.5702586", "text": "function elvtn_register_zillow_reviews_widget()\n{ \n register_widget( 'elvtn_Zillow_Reviews' );\n}", "title": "" }, { "docid": "b17b0647feabf142dac2b092e451c62d", "score": "0.56936413", "text": "function genPastReviewsArea($allReviews)\n{\n\n foreach ($allReviews as $row) {\n echo \"<div class='review' itemprop='review' itemscope itemtype='http://schema.org/Review'>\n <div class='stars' itemprop='reviewRating' itemscope itemtype='http://schema.org/Rating'>\n <meta itemprop='worstRating' content = '1'/>\n <meta itemprop='ratingValue' content='{$row['rating']}'/>\n <meta itemprop='bestRating' content='5'/>\n <div class='star-rating__wrap' title='{$row['rating']}' ' out of 5 stars'>\";\n\n // generate html of stars\n genFixedStars($row['rating']);\n\n echo \"</div>\n </div>\n\n <div class='comment'>\n <p itemprop='description' >{$row['commentText']}\n <sub><em itemprop='author' >{$row['username']}</em><span itemprop='datePublished' content='{$row['datePosted']}'></span> added on {$row['datePosted']}</sub>\n </p>\n </div>\n </div>\";\n }\n}", "title": "" }, { "docid": "54cddce6eb20b737ca204d7ea529483b", "score": "0.56933165", "text": "function custom_post_type() {\n\t \n\t// Set UI labels for Custom Post Type\n\t $labels = array(\n\t 'name' => _x( 'Movies', 'Post Type General Name', 'twentythirteen' ),\n\t 'singular_name' => _x( 'Movie', 'Post Type Singular Name', 'twentythirteen' ),\n\t 'menu_name' => __( 'Movies', 'twentythirteen' ),\n\t 'parent_item_colon' => __( 'Parent Movie', 'twentythirteen' ),\n\t 'all_items' => __( 'All Movies', 'twentythirteen' ),\n\t 'view_item' => __( 'View Movie', 'twentythirteen' ),\n\t 'add_new_item' => __( 'Add New Movie', 'twentythirteen' ),\n\t 'add_new' => __( 'Add New', 'twentythirteen' ),\n\t 'edit_item' => __( 'Edit Movie', 'twentythirteen' ),\n\t 'update_item' => __( 'Update Movie', 'twentythirteen' ),\n\t 'search_items' => __( 'Search Movie', 'twentythirteen' ),\n\t 'not_found' => __( 'Not Found', 'twentythirteen' ),\n\t 'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n\t );\n\t \n\t// Set other options for Custom Post Type\n\t \n\t $args = array(\n\t 'label' => __( 'movies', 'twentythirteen' ),\n\t 'description' => __( 'Movie news and reviews', 'twentythirteen' ),\n\t 'labels' => $labels,\n\t // Features this CPT supports in Post Editor\n\t 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n\t // You can associate this CPT with a taxonomy or custom taxonomy. \n\t 'taxonomies' => array( 'genres' ),\n\t /* A hierarchical CPT is like Pages and can have\n\t * Parent and child items. A non-hierarchical CPT\n\t * is like Posts.\n\t */ \n\t 'hierarchical' => false,\n\t 'public' => true,\n\t 'show_ui' => true,\n\t 'show_in_menu' => true,\n\t 'show_in_nav_menus' => true,\n\t 'show_in_admin_bar' => true,\n\t 'menu_position' => 5,\n\t 'can_export' => true,\n\t 'has_archive' => true,\n\t 'exclude_from_search' => false,\n\t 'publicly_queryable' => true,\n\t 'capability_type' => 'page',\n\t );\n\t \n\t // Registering your Custom Post Type\n\t register_post_type( 'movies', $args );\n\t \n\t}", "title": "" }, { "docid": "a3d345cc30c683d6fadf5e5a0d2f0113", "score": "0.56928825", "text": "public function page_title_styles()\n\t\t{\n\t\t\tswitch (get_post_type($this->id)) {\n\t\t\t\tcase 'post':\n\t\t\t\t\t$cpt_type_title = 'post';\n\t\t\t\t\t$cpt_title = is_single() ? 'single' : 'archive';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'team':\n\t\t\t\t\t$cpt_type_title = 'team';\n\t\t\t\t\t$cpt_title = is_single() ? 'single' : 'archive';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'portfolio':\n\t\t\t\t\t$cpt_type_title = 'portfolio';\n\t\t\t\t\t$cpt_title = is_single() ? 'single' : 'archive';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$cpt_title = $cpt_type_title = '';\n\t\t\t}\n\n\t\t\t// Check the Shop page type\n $shop_title = '';\n\t\t\tif (class_exists('WooCommerce')) :\n\t\t\t\tswitch (true) {\n\t\t\t\t\tcase (is_shop()):\n\t\t\t\t\t\t$shop_title = 'catalog';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (is_cart()):\n\t\t\t\t\t\t$shop_title = 'cart';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (is_product()):\n\t\t\t\t\t\t$shop_title = 'single';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (is_checkout()):\n\t\t\t\t\t\t$shop_title = 'checkout';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tendif;\n\n\t\t\tif (is_singular('portfolio') || function_exists('is_product') && is_product() || is_404()) {\n\t\t\t\t// Mentioned post types have individual options for fine customization\n\t\t\t\tswitch (true) {\n\t\t\t\t\tcase (is_404()):\n\t\t\t\t\t\t$post_type = '404';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (is_singular('portfolio')):\n\t\t\t\t\t\t$post_type = 'portfolio_single';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase (function_exists('is_product') && is_product()):\n\t\t\t\t\t\t$post_type = 'shop_single';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$page_title_bg_switch = Carbonick_Theme_Helper::get_option($post_type . '_title_bg_switch');\n\t\t\t\t$page_title_height = Carbonick_Theme_Helper::get_option('page_title_height')['height'];\n\n\t\t\t\t$page_title_bg_color = Carbonick_Theme_Helper::get_option($post_type . '_page_title_bg_image')['background-color'] !== ''\n\t\t\t\t\t? Carbonick_Theme_Helper::get_option($post_type . '_page_title_bg_image')['background-color']\n\t\t\t\t\t: Carbonick_Theme_Helper::get_option('page_title_bg_image')['background-color'];\n\n\t\t\t\t$page_title_padding = Carbonick_Theme_Helper::get_option($post_type . '_page_title_padding') !== ''\n\t\t\t\t\t? Carbonick_Theme_Helper::get_option($post_type . '_page_title_padding')\n\t\t\t\t\t: Carbonick_Theme_Helper::get_option('page_title_padding');\n\n\t\t\t\t$page_title_margin = Carbonick_Theme_Helper::get_option($post_type . '_page_title_margin') !== ''\n\t\t\t\t\t? Carbonick_Theme_Helper::get_option($post_type . '_page_title_margin')\n\t\t\t\t\t: Carbonick_Theme_Helper::get_option('page_title_margin');\n\n\t\t\t\tif (class_exists('RWMB_Loader') && $this->id !== 0 && rwmb_meta('mb_page_title_switch') == 'on') {\n\t\t\t\t\t$page_title_bg_switch = rwmb_meta('mb_page_title_bg_switch');\n\t\t\t\t\t$page_title_bg_color = rwmb_meta('mb_page_title_bg')['color'];\n\t\t\t\t\t$page_title_height = rwmb_meta('mb_page_title_height');\n\t\t\t\t\t$page_title_margin = rwmb_meta('mb_page_title_margin');\n\t\t\t\t\t$page_title_padding = rwmb_meta('mb_page_title_padding');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Default\n\t\t\t\t$page_title_bg_switch = Carbonick_Theme_Helper::options_compare('page_title_bg_switch', 'mb_page_title_switch', 'on');\n\t\t\t\t$page_title_bg_color = Carbonick_Theme_Helper::get_option('page_title_bg_image')['background-color'];\n\t\t\t\t$page_title_height = Carbonick_Theme_Helper::get_option('page_title_height')['height'];\n\t\t\t\tif (class_exists('RWMB_Loader') && $this->mb_page_title_switch == 'on') {\n\t\t\t\t\t$page_title_bg_color = rwmb_meta('mb_page_title_bg')['color'];\n\t\t\t\t\t$page_title_height = rwmb_meta('mb_page_title_height');\n\t\t\t\t}\n\t\t\t\t$page_title_margin = Carbonick_Theme_Helper::options_compare('page_title_margin', 'mb_page_title_switch', 'on');\n\t\t\t\t$page_title_padding = Carbonick_Theme_Helper::options_compare('page_title_padding', 'mb_page_title_switch', 'on');\n\t\t\t}\n\n\t\t\t$style = '';\n\t\t\tif (is_404()) {\n\t\t\t\tswitch ($page_title_bg_switch) {\n\t\t\t\t\tcase true:\n\t\t\t\t\t\t$style .= !empty(Carbonick_Theme_Helper::bg_render('404_page_title'))\n\t\t\t\t\t\t\t? Carbonick_Theme_Helper::bg_render('404_page_title')\n\t\t\t\t\t\t\t: Carbonick_Theme_Helper::bg_render('page_title');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} elseif ($shop_title && !empty(Carbonick_Theme_Helper::bg_render('shop_' . $shop_title . '_page_title'))) {\n\t\t\t\t$style .= function_exists('is_product') && !is_product() ? Carbonick_Theme_Helper::bg_render('shop_' . $shop_title . '_page_title') : ($page_title_bg_switch ? Carbonick_Theme_Helper::bg_render('shop_single_page_title') : '');\n\t\t\t} elseif ($cpt_title && $page_title_bg_switch && !empty(Carbonick_Theme_Helper::bg_render($cpt_type_title . '_' . $cpt_title . '_page_title'))) {\n\t\t\t\t$style .= Carbonick_Theme_Helper::bg_render($cpt_type_title . '_' . $cpt_title . '_page_title');\n\t\t\t} else {\n\t\t\t\t$style .= $page_title_bg_switch ? Carbonick_Theme_Helper::bg_render('page_title', 'mb_page_title_switch', 'on') : '';\n\t\t\t}\n\t\t\t$style .= $page_title_bg_switch && !empty($page_title_bg_color) ? 'background-color: ' . $page_title_bg_color . ';' : '';\n\t\t\t$style .= $page_title_bg_switch && !empty($page_title_height) ? ' height: ' . (int) $page_title_height . 'px;' : '';\n\t\t\t$style .= $page_title_margin['margin-bottom'] != '' ? ' margin-bottom: ' . (int) $page_title_margin['margin-bottom'] . 'px;' : '';\n\t\t\t$style .= $page_title_padding['padding-top'] != '' ? ' padding-top: ' . (int) $page_title_padding['padding-top'] . 'px;' : '';\n\t\t\t$style .= $page_title_padding['padding-bottom'] != '' ? ' padding-bottom: ' . (int) $page_title_padding['padding-bottom'] . 'px;' : '';\n\n\t\t\treturn $style ? ' style=\"' . esc_attr($style) . '\"' : '';\n\t\t}", "title": "" }, { "docid": "2d71289fc63c4bcd1372d976d425bb05", "score": "0.5675131", "text": "function load_reviews_list_page() {\n\tAdminPages\\display_reviews_list_page();\n}", "title": "" }, { "docid": "f9dde28c0bd5d8521f554fc7d9056033", "score": "0.56649643", "text": "public function __construct() {\n $widget_options = array( 'classname' => 'elvtn_Zillow_Reviews', 'description' => 'Zillow Reviews' );\n parent::__construct( 'elvtn_Zillow_Reviews', 'Zillow Reviews', $widget_options );\n }", "title": "" }, { "docid": "7799412b1dbd7e1a3e852bf94adade13", "score": "0.5663387", "text": "function output_review_fields() {\n\t\tif ( ! $this->is_visible_on_this_post() ) {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<div id=\"new_rating_wrapper\">\n\t\t\t<label for=\"new_listing_rating\"><?php echo esc_html__('Your Rating', 'ALSP'); ?></label>\n\n\t\t\t<div id=\"new_listing_rating\" data-dirrater=\"<?php echo esc_attr( $this->get_plugin_option( 'default_rating' ) ); ?>\" data-assets_path=\"<?php echo esc_attr( $this->plugin_baseurl . '/images' ); ?>\"></div>\n\t\t</div>\n\t\t<p class=\"dir--title\">\n\t\t\t<label for=\"dirrater_title\"><?php echo $this->get_plugin_option( 'review_title_label' ); ?></label>\n\t\t\t<input type='text' id='dirrater_title' name='dirrater_title' value=\"\" placeholder=\"<?php echo esc_html__('Review Title', 'ALSP'); ?>\" size='25'/>\n\t\t</p>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "1fa4e22bc79c145b7459c53ffce9ecb2", "score": "0.5661934", "text": "function recensies() {\n\t\n // labels of custom post type ( show on admin page )\n $labels = array(\n 'name' => _x( 'Recensies', 'Recensies Algemene Naam' ),\n 'singular' => _x( 'Recensie', 'tarief enkelvoud' ),\n 'add_new' => _( 'Nieuwe recensie' ),\n 'add_new_item' => _( 'Nieuwe recensie toevoegen' ),\n 'edit_item' => _( 'Recensie wijzigen' ),\n 'new_item' => _( 'Nieuwe recensie' ),\n 'view_item' => _( 'Recensie bekijken' ),\n 'view_items' => _( 'Recensies bekijken' ),\n 'search_items' => _( 'Zoek recensie' ),\n 'not_found' => _( 'Recensie niet gevonden' ),\n 'not_found_in_trash' => _( 'Geen recensie gevonden in de prullenbak.' ),\n 'parent_item_colon' => _( 'Hoofd recensie' ),\n 'all_items' => _( 'Alle recensies' ),\n 'archives' => _( 'Recensies archief' ),\n 'attributes' => _( 'Recensies attributen' ),\n // 'insert_into_item' => '',\n // 'uploaded_to_this_item' => '',\n 'featured_image' => _( 'Recensie afbeelding' ),\n 'set_featured_image' => _( 'Afbeelding toevoegen' ),\n 'remove_featured_image' => _( 'Afbeelding verwijderen' ),\n 'use_featured_image' => _( 'Afbeelding gebruiken' ),\n 'menu_name' => 'Recensies',\n // 'filter_items_list' => '',\n // 'items_list_navigation' => '',\n // 'items_list' => '',\n 'name_admin_bar' => 'Recensies',\n );\n \n // custom post type settings\n $args = array(\n 'labels' => $labels,\n // 'description' => '',\n // 'labels' => '',\n 'public' => true,\n // 'exclude_from_search' => '',\n // 'publicly_queryable' => '',\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'show_in_menu' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-megaphone',\n // 'capability_type' => '',\n // 'capabilities' => '',\n // 'map_meta_cap' => '',\n 'hierarchical' => false,\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n // 'register_meta_box_cb' => '',\n // 'taxonomies' => '',\n 'has_archive' => true,\n 'rewrite' => array( 'slug' => 'recensies', 'with_front' => false ),\n // 'permalink_epmask' => '',\n // 'query_var' => true,\n // 'can_export' => '',\n // 'delete_with_user' => '',\n // 'show_in_rest' => '',\n // 'rest_base' => '',\n // 'rest_controller_class' => '',\n );\n \n register_post_type( 'recensies', $args );\n \n }", "title": "" }, { "docid": "5c32dbe62b69b0b7efcf3e5b175d22e9", "score": "0.5658425", "text": "function c_css()\n{ ?>\n <style>\n .status-draft {\n background: #E6E6E6 !important;\n }\n .status-pending {\n background: #E2F0FF !important;\n }\n /* Change admin post/page color by status – draft, pending, future, private*/\n .status-future {\n background: #C6EBF5 !important;\n }\n .status-private {\n background: #F2D46F;\n }\n #toplevel_page_edit-post_type-acf-field-group {\n border-top: 1px solid #ccc !important;\n }\n .acf-repeater>.acf-table>.ui-sortable>.acf-row:nth-child(even)>.order {\ncolor: #fff !important;\n background-color: #777!important;\n}\n </style>\n<?php\n}", "title": "" }, { "docid": "65f073118b337ee87dbb4a5467f86439", "score": "0.56506443", "text": "public function showReviewPage(){\n return view('admin.review');\n }", "title": "" }, { "docid": "21c3ad247be2835d4ea805936fec2729", "score": "0.56396043", "text": "public function review() {\n\t\t$artwork = $this->ArtworkStack->stackQuery();\n\t\t$this->set('artworks', $artwork);\n\t\t$this->set('elements', $this->Layers->setElements());\n\t\t$this->render('/Artworks/review');\n\t}", "title": "" }, { "docid": "dac2c425785f2bb035c643a7eecbad56", "score": "0.5620918", "text": "function cpvg_post_views()\n{\n if (!current_user_can('manage_options')) {\n wp_die('You do not have sufficient permissions to access this page.');\n }\n\n $post_types = array_diff_assoc(get_post_types(array('_builtin' => false), 'names'), array('content-type' => 'content-type', 'rw_content_type' => 'rw_content_type', 'rw_taxonomy' => 'rw_taxonomy'));\n ?>\n <div id='cpvg-wrap' class='wrap cpvg-post-views'>\n <div id='icon-edit-pages' class='icon32'><br></div>\n <h2>Post Views</h2>\n <?php\n cpvg_fieldtypes_form($post_types, 'post');\n echo \"<div data-bind=\\\"template:'cpvg_fieldtypes_form'\\\"></div>\";\n ?>\n </div>\n<?php\n}", "title": "" }, { "docid": "c47ca3ad2a84550940318fb04ec06fae", "score": "0.56208855", "text": "function mod_sitereviews($title)\n\t\t{\n\t\t\tglobal $ecom_siteid,$db,$position,$Settings_arr;\n\t\t?>\n\t\t\t<div class=\"review_banner\"><a href=\"<?php url_link('sitereview.html');?>\"><img src=\"<?php url_site_image('review-banner.gif')?>\" /></a></div>\n<?php\t\n\t\t}", "title": "" }, { "docid": "ec05bd4fdc9902dad34024ccac94bff9", "score": "0.5603089", "text": "function review_detail($id) {\r\n $this->page_title();\r\n $this->extra_cms();\r\n $this->city_footer();\r\n\r\n $user = $this->Session->read(\"fuser_session\");\r\n\r\n $user_id = $user['0']['User']['id'];\r\n if ($user_id != '') {\r\n $this->set('userid', $user_id);\r\n } else {\r\n $this->set('userid', 0);\r\n }\r\n $this->set('businessid', $id);\r\n $this->set(\"currPage\", \"home_page\");\r\n\r\n\r\n\r\n $featuredlisting = $this->User->read();\r\n\r\n $this->leftpanelcategory();\r\n\r\n\r\n\r\n\r\n $this->BusinessReview->bindModel(\r\n array('hasMany' => array(\r\n 'User' => array(\r\n 'className' => 'User',\r\n 'foreignKey' => 'id',\r\n 'id' => 'user_id'\r\n )\r\n )\r\n )\r\n );\r\n\r\n $listing_arr = array(\r\n 'table' => \"users\",\r\n 'alias' => 'User',\r\n 'type' => 'left',\r\n 'foreignKey' => false,\r\n \"conditions\" => \"User.id = BusinessReview.user_id\"\r\n );\r\n\r\n $this->paginate = array(\r\n \"limit\" => '10',\r\n \"fields\" => array(\"BusinessReview.*\", \"User.*\"),\r\n \"conditions\" => array(\"BusinessReview.id\" => $id),\r\n \"order\" => null,\r\n \"joins\" => array($listing_arr)\r\n );\r\n\r\n\r\n //$this->paginate = array(\"limit\"=>\"10\",\"conditions\" => array(\"BusinessReview.business_id\" => $id), 'order' => array('rand()'));\r\n $businessreview = $this->paginate(\"BusinessReview\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n $this->set('businessreview', $businessreview);\r\n\r\n $this->hotdeal();\r\n $this->head_category();\r\n\r\n\r\n\r\n //pr($this->usertype);\r\n }", "title": "" }, { "docid": "c367cbdd51ac3649662091d7e64077d7", "score": "0.5597907", "text": "public function postTypes(){\n\t\tglobal $wp_post_types;\n\t\t$post_types = array_keys( $wp_post_types );\n\t\t//remove wp cpts\n\t\t$post_types = array_diff($post_types,['attachment','revision','nav_menu_item','custom_css','customize_changeset','oembed_cache','user_request','wp_block','acf-field-group','acf-field']);\n \n\t\tforeach ($post_types as $post_type) {\n\t\t\tadd_filter( \"rest_prepare_{$post_type}\", function($data, $post, $request){\n\t\t\tif ( is_wp_error( $data ) ) return $data;\n\t\t\n\t\t\t$response = $data->get_data();\n\t\t\t\n\t\t\t$acf_fields = get_fields($post->ID);\n\t\t\tif ($acf_fields){\n\t\t\t\tforeach ($acf_fields as $field_key => $field_value){\n\t\t\t\t\t$field_obj = get_field_object($field_key);\n\t\t\t\t\tif($this->getNewKey())\n\t\t\t\t\t\t$response[$this->getKeyName()][$field_key] = $field_obj;\n\t\t\t\t\telse\n\t\t\t\t\t\t$response[$field_key] = $field_obj;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data->set_data( $response );\n\t\t\treturn $data;\n\t\t\t}, 10, 3);\n\t\t}\n\t}", "title": "" }, { "docid": "ff7030ecd21fcd7a8e66f7dbf9ac4b42", "score": "0.5597478", "text": "function add_review_extra_information() {\n\t$review_id = (int) get_the_ID();\n\n\trequire dirname( __DIR__ ) . '/views/review-footer.php';\n}", "title": "" }, { "docid": "0269b2e45a0530ebd82ac53f84aae1fe", "score": "0.55931926", "text": "function detail( $collection_id=null, $path_collection_review_id=null ) {\r\n\t\t$ctrapp_menu[] = $this->Menus->tabs('inv_CAN_00', 'inv_CAN_15', $collection_id );\r\n\t\t$this->set( 'ctrapp_menu', $ctrapp_menu );\r\n\t\t\r\n\t\t// set FORM variable, for HELPER call on VIEW \r\n\t\t$this->set( 'ctrapp_form', $this->Forms->getFormArray('path_collection_reviews') );\r\n\t\t\r\n\t\t// set SUMMARY varible from plugin's COMPONENTS \r\n\t\t$this->set( 'ctrapp_summary', $this->Summaries->build( $collection_id ) );\r\n\t\t\r\n\t\t// set SIDEBAR variable, for HELPER call on VIEW \r\n\t\t// use PLUGIN_CONTROLLER_ACTION by default, but any ALIAS string that matches in the SIDEBARS datatable will do...\r\n\t\t$this->set( 'ctrapp_sidebar', $this->Sidebars->getColsArray( $this->params['plugin'].'_'.$this->params['controller'].'_'.$this->params['action'] ) );\r\n\t\t\r\n\t\t// set FORM variable, for HELPER call on VIEW \r\n\t\t$this->set( 'collection_id', $collection_id );\r\n\t\t$this->set( 'path_collection_review_id', $path_collection_review_id );\r\n\t\t\r\n\t\t$this->PathCollectionReview->id = $path_collection_review_id;\r\n\t\t$data = $this->PathCollectionReview->read();\r\n\t\t$this->set( 'data', $data );\r\n\r\n\t\t//NL 20070921: Modify aliquot barcode instead of Sample\r\n\t\t\r\n\t\t// setup SELECT TAGS OPTION VALUES\r\n\t\t// get all aliquot barcodes for this collection for Sample Master ID \t \r\n\t\t $criteria = 'AliquotMaster.collection_id =\"' .$collection_id.'\"';\r\n\t\t $fields = 'AliquotMaster.id, AliquotMaster.barcode';\t\r\n\t\t $order = 'AliquotMaster.barcode ASC';\r\n\t\t $aliquot_master_id_findall_result = $this->AliquotMaster->findAll( $criteria, $fields, $order, null, null, 0 );\r\n\t\t $aliquot_master_id_findall = array();\r\n\t\t foreach ( $aliquot_master_id_findall_result as $aliquot ) {\r\n\t\t \t$aliquot_master_id_findall[ $aliquot['AliquotMaster']['id'] ] = $aliquot['AliquotMaster']['barcode'];\r\n\t\t }\r\n\t\t $this->set( 'aliquot_master_id_findall', $aliquot_master_id_findall );\r\n\t\t \r\n\t\t // Check if collection review can be deleted\r\n\t\t $this->set( \r\n\t\t\t'allow_review_deletion', \r\n\t\t \t$this->allowSampleDeletion($collection_id, $path_collection_review_id));\r\n\t\t \r\n\t}", "title": "" }, { "docid": "da037a7cd31b13a665b35cc8e0a04a70", "score": "0.55906105", "text": "function tmpl_addto_fav_urls(){\r\n\tglobal $post,$htmlvar_name,$templatic_settings;\t\r\n\t$is_archive = get_query_var('is_ajax_archive');\r\n\t$is_related = get_query_var('is_related');\r\n\t$custom_post_type = apply_filters('directory_post_type_template',tevolution_get_post_type());\r\n\t$address = get_post_meta($post->ID,'address',true);\r\n\tif (function_exists('tmpl_addon_name'))\r\n\t\t\t\t$addons_posttype = tmpl_addon_name(); /* all tevolution addons' post type as key and folter name as a value */\r\n\t$current_post_type = get_post_type(); /* get current post type */\r\n\tif(!array_key_exists($current_post_type,$addons_posttype) && (is_home() || is_front_page())){\r\n\t\techo '<div class=\"rev_pin\">';\r\n\t\techo '<ul>';\r\n\t\t$post_id=get_the_ID();\r\n\t\t$templatic_settings=get_option('templatic_settings');\r\n\t\t$comment_count= count(get_comments(array('post_id' => $post_id,\t'status'=> 'approve')));\r\n\t\t$review=($comment_count <=1 )? __('review','templatic'):__('reviews','templatic');\r\n\t\t$review=apply_filters('tev_review_text',$review);\r\n\r\n\t\tif(current_theme_supports('tevolution_my_favourites') ):?>\r\n\t\t\t<li class=\"favourite\"><?php tevolution_favourite_html();?></li>\r\n\r\n\t\t<?php endif;\r\n\r\n\t\tif(get_option('default_comment_status')=='open' || $post->comment_status =='open'){\r\n\t\t\t?>\r\n\t\t\t<li class=\"review\"> <?php echo '<a href=\"'.get_permalink($post_id).'#comments\">'.$comment_count.' '.$review.'</a>';?></li>\r\n\t\t\t<?php\r\n\t\t}\r\n\t\tif( !empty($address) && isset($templatic_settings['category_googlemap_widget']) && @$templatic_settings['category_googlemap_widget']!='yes' && @$templatic_settings['pippoint_oncategory'] ==1 && !is_author() && !$is_related && !is_home()):?> \r\n \t<li class='pinpoint'><a id=\"pinpoint_<?php echo $post_id;?>\" class=\"ping\" href=\"#map_canvas\"><?php _e('Pinpoint','templatic');?></a></li>\r\n\t\t<?php endif;\r\n\r\n\t\techo '</ul>';\r\n\t\techo '</div>';\r\n\t}\r\n}", "title": "" }, { "docid": "60dbc37c31af72e5f8d07eecc20eb484", "score": "0.5569804", "text": "function contractor_page() {\n\n $labels = array(\n 'name' => 'Contractor pages',\n 'singular_name' => 'Contractor page',\n 'menu_name' => 'Contractor page',\n 'name_admin_bar' => 'Contractor page',\n 'archives' => 'Item Archives',\n 'attributes' => 'Item Attributes',\n 'parent_item_colon' => 'Parent Item:',\n 'all_items' => 'All Items',\n 'add_new_item' => 'Add New Item',\n 'add_new' => 'Add New',\n 'new_item' => 'New Item',\n 'edit_item' => 'Edit Item',\n 'update_item' => 'Update Item',\n 'view_item' => 'View Item',\n 'view_items' => 'View Items',\n 'search_items' => 'Search Item',\n 'not_found' => 'Not found',\n 'not_found_in_trash' => 'Not found in Trash',\n 'featured_image' => 'Featured Image',\n 'set_featured_image' => 'Set featured image',\n 'remove_featured_image' => 'Remove featured image',\n 'use_featured_image' => 'Use as featured image',\n 'insert_into_item' => 'Insert into item',\n 'uploaded_to_this_item' => 'Uploaded to this item',\n 'items_list' => 'Items list',\n 'items_list_navigation' => 'Items list navigation',\n 'filter_items_list' => 'Filter items list',\n );\n $args = array(\n 'label' => 'Contractor page',\n 'description' => 'Post Type Description',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'excerpt', 'thumbnail',),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-portfolio',\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type('contractor_page', $args);\n}", "title": "" }, { "docid": "f8eff35013f6ada256ac7fb5412f0863", "score": "0.55342793", "text": "function woobits_display_product_reviews() {\n global $product;\n \n if ( ! comments_open() )\n return;\n?>\n <div class=\"product-reviews\">\n <h2 class=\"review-title\" itemprop=\"headline\">\n <?php printf( __( 'Reviews (%d)', 'woocommerce' ), $product->get_review_count() ); ?>\n </h2>\n <?php comments_template();; ?>\n </div>\n <div class=\"clearfix clear\"></div>\n<?php\n}", "title": "" }, { "docid": "ea2080740bab3c1e5eeca77ce83f102a", "score": "0.5524282", "text": "function do_dashboard_widget() {\n $posts = get_posts(array(\n 'post_type' => 'any',\n 'post_status' => 'pending',\n 'meta_query' => array(\n array(\n 'key' => '_post_oesepreview_of',\n 'compare' => 'EXISTS',\n )\n )\n ));\n\n if (empty($posts)) {\n _e('No posts need reviewed at this time!', 'oesepreview');\n }\n\n echo '<ul>';\n\n foreach ($posts as $post) {\n printf('<li><a href=\"%s\">%s</a> - %s</li>',\n get_edit_post_link($post->ID),\n get_the_title($post->ID),\n get_the_author_meta('nicename', $post->post_author)\n );\n }\n\n echo '</ul>';\n}", "title": "" }, { "docid": "2936bdee78a59899523e80df1a873b4c", "score": "0.5516387", "text": "public function render_content() {\n ?>\n <div class=\"pro-box\">\n\t <a href=\"<?php echo esc_url('http://webriti.com/help/');?>\" target=\"_blank\" class=\"document\" id=\"review_pro\"><?php _e( 'DOCUMENTATION','busiprof' ); ?></a>\n\t \n\t <div>\n\t <div class=\"pro-vesrion\">\n\t <?php _e('The Pro Version gives you more opportunities to enhance your site and business. In order to create effective online presence one have to showcase their wide range of products, have to use contact us enquiry form, have to make effective about us page, have to introduce team members, etc etc . The pro version will give it all. Buy the pro version and give us a chance to serve you better.','busiprof');?>\n\t </div>\n <?php\n }", "title": "" }, { "docid": "32aef696aae136ae7ab965bdf86e4212", "score": "0.55127966", "text": "public function show(Reviews $reviews)\n {\n //\n }", "title": "" }, { "docid": "06f7e972d12bca930d7e5bdace2d83f2", "score": "0.55124325", "text": "public function ps_custom_post_types_callback() {\r\n\t\t\t$rewrite = array(\r\n\t\t'slug' => 'building',\r\n\t\t'with_front' => true,\r\n\t\t'pages' => true,\r\n\t\t'feeds' => true,\r\n\t);\r\n\t\t\r\n\t\tregister_post_type( 'building', array(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Scope ', 'Post Type General Name', 'psbase' ),\r\n\t\t'singular_name' => _x( 'Scope', 'Post Type Singular Name', 'psbase' ),\r\n\t\t'menu_name' => _x( 'Scope ', 'Admin Menu text', 'psbase' ),\r\n\t\t'name_admin_bar' => _x( 'Scope', 'Add New on Toolbar', 'psbase' ),\r\n\t\t'archives' => __( 'Archivos Scope', 'psbase' ),\r\n\t\t'attributes' => __( 'Atributos Scope', 'psbase' ),\r\n\t\t'parent_item_colon' => __( 'Padres Scope:', 'psbase' ),\r\n\t\t'all_items' => __( 'Todas Scope ', 'psbase' ),\r\n\t\t'add_new_item' => __( 'Añadir nueva Scope', 'psbase' ),\r\n\t\t'add_new' => __( 'Añadir nueva', 'psbase' ),\r\n\t\t'new_item' => __( 'Nueva Scope', 'psbase' ),\r\n\t\t'edit_item' => __( 'Editar Scope', 'psbase' ),\r\n\t\t'update_item' => __( 'Actualizar Scope', 'psbase' ),\r\n\t\t'view_item' => __( 'Ver Scope', 'psbase' ),\r\n\t\t'view_items' => __( 'Ver Scope ', 'psbase' ),\r\n\t\t'search_items' => __( 'Buscar Scope', 'psbase' ),\r\n\t\t'not_found' => __( 'No se encontraron Scope .', 'psbase' ),\r\n\t\t'not_found_in_trash' => __( 'Ningún Scope encontrado en la papelera.', 'psbase' ),\r\n\t\t'featured_image' => __( 'Imagen destacada', 'psbase' ),\r\n\t\t'set_featured_image' => __( 'Establecer imagen destacada', 'psbase' ),\r\n\t\t'remove_featured_image' => __( 'Borrar imagen destacada', 'psbase' ),\r\n\t\t'use_featured_image' => __( 'Usar como imagen destacada', 'psbase' ),\r\n\t\t'insert_into_item' => __( 'Insertar en la Scope', 'psbase' ),\r\n\t\t'uploaded_to_this_item' => __( 'Subido a esta Scope', 'psbase' ),\r\n\t\t'items_list' => __( 'Lista de Scope ', 'psbase' ),\r\n\t\t'items_list_navigation' => __( 'Navegación por el listado de Scope ', 'psbase' ),\r\n\t\t'filter_items_list' => __( 'Lista de Scope filtradas', 'psbase' ),\r\n\t\t\t),\r\n\r\n\t\t'menu_icon' => '',\r\n\t\t'supports' => array('title', 'editor', 'thumbnail', 'author', 'page-attributes', 'post-formats'),\r\n\t \r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'menu_position' => 5,\r\n\t\t'show_in_admin_bar' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'can_export' => true,\r\n\t\t'has_archive' => 'building',\r\n\t\t'hierarchical' => false,\r\n\t\t'exclude_from_search' => false,\r\n\t\t'show_in_rest' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'capability_type' => 'post',\r\n\t\t'rewrite' => $rewrite,\r\n\t 'taxonomies' => array( 'category'), \r\n \r\n\t\t \r\n\t\t));\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4369cbc1301084102f37768c71ce9542", "score": "0.5510449", "text": "function _show_post_preview() {}", "title": "" }, { "docid": "e20233d32d1021c08f243787e771d010", "score": "0.5488792", "text": "function docent() {\n\t\n\t // labels of custom post type ( show on admin page )\n\t $labels = array(\n\t\t'name' => _x( 'Docenten', 'Docenten Algemene Naam' ),\n\t\t'singular' => _x( 'Docent', 'Docent enkelvoud' ),\n\t\t'add_new' => _( 'Nieuwe Docent' ),\n\t\t'add_new_item' => _( 'Nieuwe Docent toevoegen' ),\n\t\t'edit_item' => _( 'Docent wijzigen' ),\n\t\t'new_item' => _( 'Nieuwe Docent' ),\n\t\t'view_item' => _( 'Docent bekijken' ),\n\t\t'view_items' => _( 'Docenten bekijken' ),\n\t\t'search_items' => _( 'Zoek Docent' ),\n\t\t'not_found' => _( 'Docent niet gevonden' ),\n\t\t'not_found_in_trash' => _( 'Geen Docent gevonden in de prullenbak.' ),\n\t\t'parent_item_colon' => _( 'Hoofd Docent' ),\n\t\t'all_items' => _( 'Alle Docenten' ),\n\t\t'archives' => _( 'Docenten archief' ),\n\t\t'attributes' => _( 'Docenten attributen' ),\n\t\t// 'insert_into_item' => '',\n\t\t// 'uploaded_to_this_item' => '',\n\t\t'featured_image' => _( 'Docent afbeelding' ),\n\t\t'set_featured_image' => _( 'Afbeelding toevoegen' ),\n\t\t'remove_featured_image' => _( 'Afbeelding verwijderen' ),\n\t\t'use_featured_image' => _( 'Afbeelding gebruiken' ),\n\t\t'menu_name' => 'Docenten',\n\t\t// 'filter_items_list' => '',\n\t\t// 'items_list_navigation' => '',\n\t\t// 'items_list' => '',\n\t\t'name_admin_bar' => 'Docenten',\n\t );\n\t\n\t // custom post type settings\n\t $args = array(\n\t\t'labels' => $labels,\n\t\t// 'description' => '',\n\t\t// 'labels' => '',\n\t\t'public' => true,\n\t\t// 'exclude_from_search' => '',\n\t\t// 'publicly_queryable' => '',\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-groups',\n\t\t// 'capability_type' => '',\n\t\t// 'capabilities' => '',\n\t\t// 'map_meta_cap' => '',\n\t\t'hierarchical' => false,\n\t\t'supports' => array( 'title', 'editor', 'thumbnail' ),\n\t\t// 'register_meta_box_cb' => '',\n\t\t// 'taxonomies' => '',\n\t\t'has_archive' => true,\n\t\t'rewrite' => array( 'slug' => 'docenten', 'with_front' => false ),\n\t\t// 'permalink_epmask' => '',\n\t\t// 'query_var' => true,\n\t\t// 'can_export' => '',\n\t\t// 'delete_with_user' => '',\n\t\t// 'show_in_rest' => '',\n\t\t// 'rest_base' => '',\n\t\t// 'rest_controller_class' => '',\n\t );\n\t\n\t register_post_type( 'docent', $args );\n\t\n\t}", "title": "" }, { "docid": "231b01be45b0017ce9d49e9811abd6bc", "score": "0.5487983", "text": "function my_custom_posttypes()\n{\n generate_custom_post_type( 'Review', array(\n 'menu_icon' => 'dashicons-star-half',\n 'register_name' => 'reviews',\n )\n );\n\n generate_custom_post_type( 'Testimonial', array(\n 'menu_icon' => 'dashicons-format-status',\n 'supports' => array('tile', 'editor', 'thumbnail', 'author', 'excerpt', 'comments'),\n 'taxonomies' => array('category', 'post_tag'),\n )\n );\n}", "title": "" }, { "docid": "c461b4676a9ead8bcee461f8a102996f", "score": "0.54793125", "text": "function changept() {\r\n\t\tif( is_category() && !is_admin() )\r\n\t\t{\r\n\t\t\tset_query_var( 'post_type', array( 'recipe' ) );\r\n\t\t\tset_query_var('posts_per_page','6');\r\n\t\t}\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "594f86c6b10eb6166f345a601244dc65", "score": "0.5464647", "text": "function view_review($id = '') {\r\n if (isset($this->params['name']) && (!empty($this->params['name']))) {\r\n $this->params['name'] = $this->urlfilter($this->params['name']);\r\n $bId = $this->User->find('first', array('fields' => array('id'), 'conditions' => array('business_name' => $this->params['name'])));\r\n\r\n\r\n $id = $bId['User']['id'];\r\n }\r\n $this->page_title();\r\n $this->extra_cms();\r\n $this->city_footer();\r\n $user = $this->Session->read(\"fuser_session\");\r\n\r\n $user_id = $user['0']['User']['id'];\r\n if ($user_id != '') {\r\n $this->set('userid', $user_id);\r\n } else {\r\n $this->set('userid', 0);\r\n }\r\n $this->set('businessid', $id);\r\n $this->set(\"currPage\", \"home_page\");\r\n\r\n\r\n\r\n $featuredlisting = $this->User->read();\r\n\r\n $this->leftpanelcategory();\r\n\r\n\r\n\r\n\r\n\r\n $listing_arr = array(\r\n 'table' => \"users\",\r\n 'alias' => 'User',\r\n 'type' => 'left',\r\n 'foreignKey' => false,\r\n \"conditions\" => \"User.id = BusinessReview.user_id\"\r\n );\r\n\r\n $this->paginate = array(\r\n \"limit\" => '10',\r\n \"fields\" => array(\"BusinessReview.*\", \"User.*\"),\r\n \"conditions\" => array(\"BusinessReview.business_id\" => $id),\r\n \"order\" => null,\r\n \"joins\" => array($listing_arr)\r\n );\r\n\r\n\r\n //$this->paginate = array(\"limit\"=>\"10\",\"conditions\" => array(\"BusinessReview.business_id\" => $id), 'order' => array('rand()'));\r\n $businessreview = $this->paginate(\"BusinessReview\");\r\n\r\n\r\n $businessinformation = $this->User->findById($id);\r\n\r\n $this->set('businessinformation', $businessinformation);\r\n\r\n\r\n $this->set('businessreview', $businessreview);\r\n\r\n $this->hotdeal();\r\n $this->head_category();\r\n }", "title": "" }, { "docid": "e0f45ddde70404c7b82002be5a00c3be", "score": "0.5463774", "text": "public function review( $atts ){\n\t\t$atts = extract( shortcode_atts( array(\n\t\t\t'bid' => '', // Business ID in DemandforceD3\n\t\t\t'reviewurl' => '',\n\t\t\t'schedulerurl' => '',\n\t\t), $atts ) );\n\n\t\tif ( empty( $bid ) ) {\n\t\t\treturn '<div style=\"color:red;\">Please set Demandforce Business ID in shortcode. For example: <pre>[df-review bid=\"123456789\"]</pre></div>';\n\t\t}\n\n\t\tob_start();\n\t\t?>\n\t\t\t<link type=\"text/css\" rel=\"stylesheet\" href=\"//www.demandforce.com/widget/css/widget.css\" />\n\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\td3cp_bid = '<?php echo $bid ?>';\n\t\t\t\t<?php if( !empty($reviewurl) ): ?>d3cp_link_addreview = '<?php echo $reviewurl ?>';<?php endif; ?>\n\t\t\t\t<?php if( !empty($schedulerurl) ): ?>d3cp_link_scheduler = '<?php echo $schedulerurl ?>';<?php endif; ?>\n\t\t\t</script>\n\t\t\t<script src=\"//www.demandforced3.com/b/fameautomotive/reviews.widget\" type=\"text/javascript\"></script>\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "6d0c97d49768853487990062959389df", "score": "0.54623324", "text": "public function action_view($id){\n\n\t\t$review = Model_Review::find($id, array('related' => array('comments')));\n\n\t\t$this->template->artist = View::forge('blog/view');\n\t\t$this->template->review = View::forge('blog/view', array(\n\t\t\t'review' => $review\n\t\t), false);\n\t}", "title": "" }, { "docid": "fc7a54da6862585200fbee6aefccb6de", "score": "0.54615426", "text": "function post() {\n $postManager = new \\org\\formation\\php\\model\\PostManager();\n $commentManager = new \\org\\formation\\php\\model\\CommentManager();\n \n $post = $postManager -> getBillet($_GET['billet']);\n $comments = $commentManager -> getComments($_GET['billet']);\n \n require('view\\frontend\\postView.php');\n}", "title": "" }, { "docid": "279efb10ed3bf0498fed7ae0605cd4c8", "score": "0.54601675", "text": "public function manageAction() {\n\n //GET NAVIGATION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitereview_admin_main', array(), 'sitereview_admin_main_review');\n\n $this->view->subNavigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_admin_reviewmain', array(), 'sitereview_admin_reviewmain_ratingparams');\n\n //GET LISTINGTYPE ID\n $this->view->listingtype_id = $listingtype_id = $this->_getParam('listingtype_id', 1);\n\n //CHECK REVIEW IS ALLOWED OR NOT\n $this->view->allowReviews = Engine_Api::_()->getDbTable('listingtypes', 'sitereview')->getListingTypeColumn($listingtype_id, 'reviews');\n\n //GET REVIEW PARAMETER TABLE NAME\n $tableRatingParams = Engine_Api::_()->getDbtable('ratingparams', 'sitereview');\n $tableRatingParamsName = $tableRatingParams->info('name');\n\n $tableCategory = Engine_Api::_()->getDbtable('categories', 'sitereview');\n $categories = array();\n $category_info = $tableCategory->getCategories(null, 0, $this->view->listingtype_id, 0, 1, 0, 'cat_order', 0, array('category_id', 'category_name', 'cat_order'));\n foreach ($category_info as $value) {\n\n $sub_cat_array = array();\n $category_info2 = $tableCategory->getSubCategories($value->category_id);\n foreach ($category_info2 as $subresults) {\n $treesubarray = array();\n $subcategory_info2 = $tableCategory->getSubCategories($subresults->category_id);\n $treesubarrays[$subresults->category_id] = array();\n foreach ($subcategory_info2 as $subvalues) {\n $tree_rating_params = array();\n $categoryIdsArray = array();\n $categoryIdsArray[] = $subvalues->category_id;\n $getTreeRatingParams = $tableRatingParams->reviewParams($categoryIdsArray, 'sitereview_listing');\n foreach ($getTreeRatingParams as $ratingParam) {\n $tree_rating_params[$subvalues->category_id][] = array(\n 'tree_ratingparam_id' => $ratingParam->ratingparam_id,\n 'tree_ratingparam_name' => $ratingParam->ratingparam_name,\n );\n }\n\n $treesubarrays[$subresults->category_id][] = $treesubarray = array(\n 'tree_sub_cat_id' => $subvalues->category_id,\n 'tree_sub_cat_name' => $subvalues->category_name,\n 'order' => $subvalues->cat_order,\n 'tree_rating_params' => $tree_rating_params\n );\n }\n\n $subcat_rating_params = array();\n $categoryIdsArray = array();\n $categoryIdsArray[] = $subresults->category_id;\n $getSubcatRatingParams = $tableRatingParams->reviewParams($categoryIdsArray, 'sitereview_listing');\n foreach ($getSubcatRatingParams as $ratingParam) {\n $subcat_rating_params[$subresults->category_id][] = array(\n 'subcat_ratingparam_id' => $ratingParam->ratingparam_id,\n 'subcat_ratingparam_name' => $ratingParam->ratingparam_name,\n );\n }\n\n $tmp_array = array('sub_cat_id' => $subresults->category_id,\n 'sub_cat_name' => $subresults->category_name,\n 'tree_sub_cat' => $treesubarrays[$subresults->category_id],\n 'order' => $subresults->cat_order,\n 'subcat_rating_params' => $subcat_rating_params,\n );\n $sub_cat_array[] = $tmp_array;\n }\n\n $cat_rating_params = array();\n $categoryIdsArray = array();\n $categoryIdsArray[] = $value->category_id;\n $getCatRatingParams = $tableRatingParams->reviewParams($categoryIdsArray, 'sitereview_listing');\n foreach ($getCatRatingParams as $ratingParam) {\n $cat_rating_params[$value->category_id][] = array(\n 'cat_ratingparam_id' => $ratingParam->ratingparam_id,\n 'cat_ratingparam_name' => $ratingParam->ratingparam_name,\n );\n }\n\n $categories[] = $category_array = array(\n 'category_id' => $value->category_id,\n 'category_name' => $value->category_name,\n 'order' => $value->cat_order,\n 'sub_categories' => $sub_cat_array,\n 'cat_rating_params' => $cat_rating_params,\n );\n }\n\n $this->view->categories = $categories;\n }", "title": "" }, { "docid": "8019b300053928a05ed4e576dc3f0f5c", "score": "0.54589957", "text": "function book_review( $echo = true ) {\r\n global $book;\r\n if ( $book->review )\r\n echo apply_filters('book_review', $book->review);\r\n else\r\n echo apply_filters('book_review', '<p>' . __('This book has not yet been reviewed.', NRTD) . '</p>');\r\n}", "title": "" }, { "docid": "5a34fd836c52a0f42faccb2d3fd246a4", "score": "0.54570603", "text": "function blog_index_schema() {\n $blogTitle = get_option('options_mandr_blog_title');\n\n //$blogGenre = get_option('options_mandr_blog_genre');\n //$blogCreationDate = get_option('options_mandr_blog_creation_date');\n $blogLogo = get_option('options_mandr_blog_logo');\n $blogLogo = wp_get_attachment_image_src($blogLogo, 'post-thumbnail');\n $blogLogo = $blogLogo[0];\n $blogDefaultPostThumbnail = get_option('options_mandr_blog_default_image');\n $blogDefaultPostThumbnail = wp_get_attachment_image_src($blogDefaultPostThumbnail, 'post-thumbnail'); \n $blogDefaultPostThumbnail = $blogDefaultPostThumbnail[0];\n\n //Grab the variables we need from anywhere else\n $siteTitle = get_option('blogname');\n $postsPerPage = get_option('posts_per_page');\n $pageForPosts = get_site_url();\n $pageForPosts .= '/';\n $pageForPosts .= get_post_field('post_name' , get_option('page_for_posts')); \n ?>\n <script type='application/ld+json'> \n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"Blog\",\n \"headline\": \"<?= $blogTitle ?>\", \n \"image\": \"<?= $blogDefaultPostThumbnail ?>\",\n \"creator\": { \n \"@type\": \"Organization\",\n \"name\": \"<?= $siteTitle ?>\",\n \"logo\": {\n \"@type\": \"ImageObject\",\n \"url\": \"<?= $blogLogo ?>\"\n }\n },\n \"blogpost\": [\n <?php \n if (have_posts()) : $count = 1; global $wp_query; $postCount = count($wp_query->get_posts());\n while (have_posts()) : the_post(); \n if (get_the_post_thumbnail_url()) { \n $thumbnailURL = get_the_post_thumbnail_url(); \n } else { \n $thumbnailURL = $blogDefaultPostThumbnail;\n }\n ?>\t\t{\n \"@type\": \"BlogPosting\",\n \"mainEntityOfPage\": {\n \"@type\": \"WebPage\",\n \"@id\": \"<?= $pageForPosts ?>\"\n },\n \"headline\": \"<?= get_the_title() ?>\",\n \"image\": {\n \"@type\" : \"ImageObject\",\n \"url\": \"<?= $thumbnailURL ?>\"\n }, \n \"datePublished\": \"<?= get_the_date('c') ?>\",\n \"dateModified\": \"<?= get_the_modified_date('c') ?>\",\n \"author\": {\n \"@type\": \"Organization\",\n \"name\": \"<?= $siteTitle ?>\"\n },\n \"publisher\": {\n \"@type\": \"Organization\",\n \"name\": \"<?= $siteTitle ?>\",\n \"logo\": {\n \"@type\": \"ImageObject\",\n \"url\": \"<?= $blogLogo ?>\"\n }\n },\n \"description\": \"<?= get_the_advanced_acf_excerpt() ?>\"\n } <?php if ($count < $postCount) { echo ','; } ?> \n <?php\n $count++;\n endwhile;\n endif;\n ?>\n ]\n }\n </script>\n\n <script type='application/ld+json'> \n {\n \"@context\": \"https://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n {\n \"@type\": \"ListItem\",\n \"position\": 1,\n \"name\": \"Homepage\",\n \"item\": \"<?= bloginfo('url') ?>\"\n },\n { \n \"@type\": \"ListItem\",\n \"position\": 2,\n \"name\": \"Blog\",\n \"item\": \"<?= $pageForPosts ?>\"\n }\n ]\n }\n </script>\n <?php \n}", "title": "" }, { "docid": "06c47c6f5fd406e28a6f8da2e3d1cbcb", "score": "0.54565215", "text": "function custom_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'Profile Dashboard', 'Post Type General Name', 'twentythirteen' ),\n\t\t'singular_name' => _x( 'Profile Dashboard', 'Post Type Singular Name', 'twentythirteen' ),\n\t\t'menu_name' => __( 'Profile Dashboard', 'twentythirteen' ),\n\t\t'parent_item_colon' => __( 'Parent Profile Dashboard', 'twentythirteen' ),\n\t\t'all_items' => __( 'All Profile Dashboard', 'twentythirteen' ),\n\t\t'view_item' => __( 'View Profile Dashboard', 'twentythirteen' ),\n\t\t'add_new_item' => __( 'Add New Profile Dashboard', 'twentythirteen' ),\n\t\t'add_new' => __( 'Add New', 'twentythirteen' ),\n\t\t'edit_item' => __( 'Edit Profile Dashboard', 'twentythirteen' ),\n\t\t'update_item' => __( 'Update Profile Dashboard', 'twentythirteen' ),\n\t\t'search_items' => __( 'Search Profile Dashboard', 'twentythirteen' ),\n\t\t'not_found' => __( 'Not Found', 'twentythirteen' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'twentythirteen' ),\n\t);\n\t\n// Set other options for Custom Post Type\n\t\n\t$args = array(\n\t\t'label' => __( 'Profile Dashboard', 'twentythirteen' ),\n\t\t'description' => __( 'Profile Dashboard reviews', 'twentythirteen' ),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n\t\t// You can associate this CPT with a taxonomy or custom taxonomy. \n\t\t'taxonomies' => array( 'genres' ),\n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/\t\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\t\n\t// Registering your Custom Post Type\n\tregister_post_type( 'Profile Dashboard', $args );\n\n}", "title": "" }, { "docid": "b917145bd986bbb3f7dcbc3e7335a13c", "score": "0.5444004", "text": "function banner_custom_post_type(){\n $singular = \"Banner\";\n $plural = \"Banners\";\n\n $labels = array(\n 'name' => $plural,\n 'singular_name' => $singular,\n 'add_name' => 'Add New',\n 'add_new_item' => 'Add New ' . $singular,\n 'edit' => 'Edit',\n 'edit_item' => 'Edit ' . $singular,\n 'new_item' => 'New ' . $singular,\n 'view' => 'View ' . $singular,\n 'view_item' => 'View ' . $singular,\n 'search_term' => 'Search ' . $plural,\n 'parent' => 'Parent ' . $singular,\n 'not_found' => 'No ' . $plural . ' found',\n 'not_found_in_trash'=> 'No ' . $plural . ' found in trash'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => true,\n 'publicly_queyable' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'capability_type' => 'post',\n 'hierarchical' => false,\n 'supports' => array (\n 'title',\n 'editor',\n 'page-attributes',\n 'thumbnail'\n ),\n 'menu_position' => 6,\n 'exlude_from_search'=> false\n );\n register_post_type( 'banner', $args );\n}", "title": "" }, { "docid": "545f1432b18b4397d30c4a54a3a12f86", "score": "0.5430063", "text": "public function jsComposerEditPage() {\n $pt_array = $this->composer->getPostTypes();\n foreach ($pt_array as $pt) {\n add_meta_box( 'wpb_visual_composer', __('Visual Composer', \"js_composer\"), Array($this->composer->getLayout(), 'output'), $pt, 'normal', 'high');\n }\n }", "title": "" }, { "docid": "a5bad3b4efd7ec748d6f79918f884c23", "score": "0.54290754", "text": "function cpvg_process_page()\n{\n global $wpdb, $post;\n\n $db_data = cpvg_get_dbfields_names(\"post\");\n $custom_post_type_options = $wpdb->get_var(\"SELECT \" . $db_data['options_field'] . \"\n\t\t\t\t\t\t\t\t\t\t\t FROM \" . $db_data['table_name'] . \"\n\t\t\t\t\t\t\t\t\t\t\t WHERE \" . $db_data['name_field'] . \" = '\" . $post->post_type . \"'\");\n\n if (empty($custom_post_type_options)) {\n $content = get_the_content('Read more');\n return $content;\n } else {\n $data = json_decode($custom_post_type_options, true);\n $data['field_data'] = get_post_custom($post->ID);\n $data['post_data'] = $post;\n $data['labels'] = array();\n\n //Saves a instances of earch datafield class that will be user later\n $df_files = cpvg_get_extensions_files('php', CPVG_DATAFIELDS_DIR);\n $class_instaces = array();\n foreach ($df_files as $df_file => $df_file_name) {\n require_once CPVG_DATAFIELDS_DIR . \"/\" . $df_file . \".php\";\n $class = new $df_file();\n\n foreach ($class->adminProperties() as $supported_section => $supported_fields) {\n $class_instaces[$supported_section] = $class;\n }\n }\n\n //Add the datafields data to the data array\n foreach ($data['fields'] as $index => $value) {\n $section_name = explode(\".\", $value['name']);\n\n\n if (count($section_name) == 2) {\n $data['fields'][$index]['section'] = $section_name[0];\n $data['fields'][$index]['name'] = $section_name[1];\n if (isset($class_instaces[$section_name[0]])) {\n $data['datafield_objects'][$section_name[0]] = $class_instaces[$section_name[0]];\n } else {\n $data['datafield_objects'][$section_name[0]] = null;\n }\n }\n }\n\n //Loads data from custom post type plugins\n $pluginfiles = cpvg_get_pluginscode_files();\n foreach ($pluginfiles as $pluginfile_name) {\n include_once CPVG_PLUGINSCODE_DIR . \"/\" . $pluginfile_name . \".php\";\n\n $pluginfile_object = new $pluginfile_name();\n if ($pluginfile_object->isEnabled()) {\n $data = $pluginfile_object->processPageAdditionalCode($post->post_type, $data);\n $labels = $pluginfile_object->getCustomfields($post->post_type);\n if (!is_null($labels)) {\n $data['labels'] = $labels;\n }\n }\n }\n //Process the values\n return cpvg_process_data($data);\n }\n}", "title": "" }, { "docid": "07cf6e37cf65d9e910106eab4a8b9e44", "score": "0.5428095", "text": "function tenup_register_post_type() {\n $labels = array(\n 'name' => __( 'Books', '10up' ),\n 'singular_name' => __( 'Book', '10up' ),\n 'add_new' => __( 'New Book', '10up' ),\n 'add_new_item' => __( 'Add New Book', '10up' ),\n 'edit_item' => __( 'Edit Book', '10up' ),\n 'new_item' => __( 'New Book', '10up' ),\n 'view_item' => __( 'View Books', '10up' ),\n 'search_items' => __( 'Search Books', '10up' ),\n 'not_found' => __( 'No Books Found', '10up' ),\n 'not_found_in_trash' => __( 'No Books found in Trash', '10up' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'has_archive' => true,\n 'public' => true,\n 'hierarchical' => false,\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'custom-fields',\n 'thumbnail',\n 'page-attributes'\n ),\n 'taxonomies' => 'category',\n 'rewrite' => array( 'slug' => 'book' ),\n 'show_in_rest' => true\n );\n register_post_type( 'tenup_book', $args );\n\n\n}", "title": "" }, { "docid": "aad2d044b832af814eb655139d49f43a", "score": "0.54224396", "text": "function review_slider( $atts ) {\n \n $reviews = file_get_contents('scripts/reviews.php');\n $reviews .= '\n <style>\n .estrella {\n vertical-align: baseline;\n display: inline-block;\n width: 15px;\n height: 14px;\n margin: 0 1px;\n background-size: 15px 14px;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAcCAYAAAB2+A+pAAABkklEQVR4Ac2Wu6oTQRzGf2JlZ+sFBbVRLMQXEJ9B0mgjgiEm+x8QtBC00FR5A5/B0kfQiIKNhcQmRDCSZGfgtOcU4Vw+SCCE3ZO9c37wwTD/y8fMsLNDUUKbSxJN4x0mNW9sDL3jK03y37gajENp2uEKTREiXgbHkaRxc8aOH2tjb3ynCWY9rq9NJW235qib2Hi9aSzFjlfUTTB+bhtrjjqJX3BDRklSrMg3+exEX3YpGH/SjBXL0kNe21v43BsHalKHvLEvD5IIPe57Y1KD6US9OY2/T7kYjM9VmaqXepKRc97xJhjLEoZL9VAv8jJ3PPSORV5T1aiWMvyLuOyNb1lNlauaqu7mQY4VD6r8945zrHhcjWmXe3nPWDVVrLafdiFIKbF+Fec7SvhUfi863JU0TjAfUYZZl9sJph+nLS6wQmPNbefNjTtltvnthuFeHPGIFBRTzsaT6F0Z41+rMxvO2lxjB8rRy1M1qi360ripay92fPjU4jwZUW5svFet73KLvCwiHgfjAQVRbWw84axxDHyajlb+vInhAAAAAElFTkSuQmCC);\n background-repeat: no-repeat;\n }\n \n .item-review-name {\n display: inline-block;\n font-weight: bold;\n font-size: 1.2em;\n }\n .item-review-rating {\n display: inline-block;\n }\n .item-review-text {\n display: block;\n text-align: justify;\n padding-top: 1.1em;\n padding-bottom: 1.1em;\n quotes: \"\\201C\"\"\\201D\";\n margin-bottom: 0;\n border: none;\n }\n .item-review-fuente {\n font-size: 1em;\n font-weight: bold;\n margin-bottom: 100px;\n }\n .reviews {\n opacity: 0;\n position: fixed;\n }\n \n .nomuestra{\n opacity:0;\n transition: opacity 1s; \n }\n \n .muestra {\n opacity: 1;\n transition: opacity 1s;\n }\n @media screen and (max-width: 568px) {\n .item-review-text {\n font-size:1em;\n }\n \n }\n </style>\n <div id=\"reviews\" class=\"muestra\"></div>\n <script>\n //var intervalo = 4000\n window.onload = function() { \n var frases = document.getElementsByClassName(\"item-review\");\n var index = 0;\n \n \n var alturaMax = 0;\n for (i=0;i<frases.length;i++){\n if (frases[i].clientHeight > alturaMax){\n alturaMax=frases[i].clientHeight;\n }\n }\n document.getElementById(\"reviews\").style.height = alturaMax + \"px\";\n document.getElementById(\"reviews\").innerHTML = frases[0].innerHTML;\n setInterval(sliderv2,6000);\n \n function sliderv2(){\n index++;\n if (index == frases.length){ \n index = 0 ;\n }\n document.getElementById(\"reviews\").className = \"nomuestra\";\n setTimeout(function() { \n document.getElementById(\"reviews\").innerHTML = frases[index].innerHTML;\n document.getElementById(\"reviews\").className = \"muestra\";\n }, \n 1000);\n }\n }\n </script>\n ';\n \n return $reviews;\n}", "title": "" }, { "docid": "0aa0edcdc61bcbe3f5280f707b935ca6", "score": "0.54218674", "text": "function rt_admin_review_sorting() {\n\n\t// Get a list of review IDs for user to choose which list to use\n\t$list_ids = rt_fetch_source_data( RT_DATA_API_ENDPOINT, true );\n\n\techo '<div class=\"wrap\"><div id=\"poststuff\"><div id=\"post-body\" class=\"metabox-holder\"><div id=\"post-body-content\"><div class=\"postbox\">';\n\n\techo '<h1>' . esc_attr( 'Reviews Sorting', 'raketech' ) . '</h1>';\n\n\techo '<p class=\"instructions\">' . __( 'Click and drag the arrows to sort the reviews', 'raketech' ) . '</p>';\n\n\techo '<div class=\"btns\" style=\"padding-bottom: 0;\"><input class=\"button-primary btn-save\" type=\"button\" value=\"' . esc_attr( 'Save new positions' ) . '\" /> ';\n\n\techo '<span class=\"save-status\"></span>';\n\t\n\t// if list_ids is not empty load the select input options\n\tif( $list_ids ) {\n\t\t\n\t\techo '<div class=\"select-list\">Review List ID: <select id=\"select-list\">';\n\t\t\n\t\techo '<option value=\"\"> - select - </option>';\n\n\t\tforeach( $list_ids as $list_id ) { \n\t\t\t\n\t\t\t$selected_id = RT_DEFAULT_LIST_ID;\n\t\t\t\n\t\t\tif( ! empty( $_GET['id'] ) ) {\n\n\t\t\t\t$selected_id = (int)$_GET['id'];\n\t\t\t}\n\t\t\t\n\t\t\techo '<option value=\"' . admin_url( 'admin.php?page=rt_reviews&id=' . $list_id ) . '\"' . ( $selected_id == $list_id ? ' selected' : '') . '>' . $list_id . '</option>';\n\t\t}\n\n\t\techo '</select></div>';\n\t}\n\n\techo '</div><div id=\"review-container\">';\n\n\t// load reviews table with the admin template and the selected toplists key\n\t$shortcode = '[rt_reviews cache=\"false\" tpl=\"admin\"' . ( ! empty( $_GET['id'] ) ? ' toplists_key=\"' . (int)$_GET['id'] . '\"' : '' ) . ']';\n\n\techo do_shortcode( $shortcode );\n\n\techo '</div>';\n\n\techo '<div class=\"btns\"><input class=\"button-primary btn-save\" type=\"button\" value=\"' . esc_attr( 'Save new positions' ) . '\" /> ';\n\n\techo '<span class=\"save-status\"></span><div class=\"select-list\"><a href=\"javascript:void(0);\" style=\"color:#cc0000;\" id=\"flush-cache\">&orarr; Flush cache</a></div></div>';\n\n\techo '</div></div></div></div></div>';\n}", "title": "" }, { "docid": "0ac671cd8b595960be7fb33b7ff80970", "score": "0.54203504", "text": "function status( $post_type ) {\n\t\tglobal $current_user, $wpdb;\n\n\t\t$status = $this->page_status();\n\n\t\t$limit = $this->limit;\n\t\t$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 1;\n\t\t$offset = ( $pagenum - 1 ) * $limit;\n\n\n\t\tif ( $status == '1' ) {\n\t\t\t$query = \"c.comment_approved IN ('1','0') AND\";\n\t\t} else {\n\t\t\t$query = \"c.comment_approved='$status' AND\";\n\t\t}\n\n\t\t$comments = $wpdb->get_results(\n\t\t\t\"SELECT c.comment_content, c.comment_ID, c.comment_author,\n\t\t\t\tc.comment_author_email, c.comment_author_url,\n\t\t\t\tp.post_title, p.guid, c.comment_post_ID, c.comment_approved\n\t\t\tFROM $wpdb->comments as c, $wpdb->posts as p\n\t\t\tWHERE p.post_author='$current_user->ID' AND\n\t\t\t\tp.post_status='publish' AND\n\t\t\t\tc.comment_post_ID=p.ID AND\n\t\t\t\t$query\n\t\t\t\tp.post_type='$post_type'\n\t\t\tORDER BY c.comment_ID DESC\n\t\t\tLIMIT $offset,$limit\"\n\t\t);\n\t\t//echo '<pre>'; print_r($comments); echo'</pre>';\n\t\tif ( count( $comments ) == 0 ) {\n\t\t\treturn '<tr><td colspan=\"4\">' . __( 'No Result Found', 'wpuf-pro' ) . '</td></tr>';\n\t\t}\n\n\t\tforeach ($comments as $comment) {\n\t\t\t$this->render_row( $comment, $post_type );\n\t\t}\n\t}", "title": "" }, { "docid": "93321f7fc3afe7e92d1e4c0b7de70856", "score": "0.54108703", "text": "function rb_custom_loop() {\n\n\techo '<main class=\"content\">';\n\n\t$taxonomies = array(\n\t\t'partnercategories',\n\t);\n\n\t$args = array(\n\t\t'orderby' => 'name',\n\t\t'order' => 'DESC',\n\t\t'hide_empty' => true,\n\t\t'exclude' => array(),\n\t\t'exclude_tree' => array(),\n\t\t'include' => array(),\n\t\t'number' => '',\n\t\t'fields' => 'all',\n\t\t'slug' => '',\n\t\t'parent' => '',\n\t\t'hierarchical' => true,\n\t\t'child_of' => 0,\n\t\t'get' => '',\n\t\t'name__like' => '',\n\t\t'description__like' => '',\n\t\t'pad_counts' => false,\n\t\t'offset' => '',\n\t\t'search' => '',\n\t\t'cache_domain' => 'core'\n\t);\n\n\t$terms = get_terms( $taxonomies, $args );\n\n\t$numberofterms = count( $terms );\n\n\t//* If there's more than one term, then we'll display them by category\n\tif ( $numberofterms > 1 ) {\n\t\trbp_category_output( $terms );\n\n\t/**\n\t * If there's just one term or none, then we'll just display a grid with everything\n\t * No need to pass the term into here; we'll retrieve the archive description instead\n\t */\n\t} else {\n\t\trbp_archive_output();\n\t}\n\n\techo '</main>';\n\n}", "title": "" }, { "docid": "00a5e137b6b8621b69de58f8cbd9a6a3", "score": "0.5396468", "text": "function indonez_delear_list($num=4,$title=\"\") { \n global $post;\n \n echo $title;\n \n query_posts(array( 'post_type' => 'dealer', 'posts_per_page' => $num,'orderby'=>'date'));\n ?>\n <ul>\n \t<?php \n $counter = 0;\n while (have_posts()) : the_post();\n $thumb = get_post_thumbnail_id();\n $img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use \"large\" or \"medium\" if the images too big)\n $image = aq_resize( $img_url, 64,64, true ); //resize & crop the image\n ?>\n <li><a href=\"<?php the_permalink();?>\"><?php the_title();?></a></li>\n \n <?php endwhile;?>\n </ul>\n <?php\n}", "title": "" }, { "docid": "af238edac67e60f5a79e2e04a56de8a8", "score": "0.5392938", "text": "function review()\n\t{\n\t\t$user = $this->session->userdata('user');\n\n\t\t$this->template->load('bootstrap', 'carts/review', array(\n\t\t\t'title' => 'Review Order Details',\n\t\t\t'cart' => $this->Cart->get_all_items(),\n\t\t\t'billing' => $this->Billing_Address->fetch(array('user_id' => $user['id'])),\n\t\t\t'mailing' => $this->Mailing_Address->fetch(array('user_id' => $user['id']))\n\t\t));\n\t}", "title": "" }, { "docid": "05242f1552cd1e75b62b4b83696b5b98", "score": "0.5389459", "text": "function scpta_body_classes($classes) \r\n{\r\n array_push( $classes, 'custom-post-type-archive', 'custom-post-type-' . get_query_var('post_type') . '-archive' );\r\n return $classes;\r\n}", "title": "" }, { "docid": "77b9fca156f493dda117af02ca8202ad", "score": "0.5385983", "text": "public static function review_all() {\n $kayttajat = Kayttaja::all();\n $pelit = Peli::all();\n $arvostelut = Arvostelu::review_all();\n self::render_view('review/index.html', array('arvostelut' => $arvostelut, 'kayttajat' => $kayttajat, 'pelit' => $pelit));\n }", "title": "" }, { "docid": "1dada5af2c1826718c00f94a84240e97", "score": "0.5385872", "text": "function load_review_attributes_page() {\n\tAdminPages\\display_review_attributes_page();\n}", "title": "" }, { "docid": "65b621363c642d9bbf0f06869adbc153", "score": "0.5380688", "text": "public function create_book_post_type()\n {\n $t_d = \\WP_VERONALABS_TEST::text_doamin;\n $labels = array(\n 'name' => __( 'Book', $t_d),\n 'singular_name' => __( 'Book', $t_d ),\n 'add_new' => __( 'New Book', $t_d ),\n 'add_new_item' => __( 'Add New Book', $t_d ),\n 'edit_item' => __( 'Edit Book', $t_d ),\n 'new_item' => __( 'New Book', $t_d ),\n 'all_items' => __( 'All Books', $t_d ),\n 'view_item' => __( 'Show Book', $t_d ),\n 'search_items' => __( 'Search in Books', $t_d ),\n 'not_found' => __( 'Not found Any Book', $t_d ),\n 'not_found_in_trash' => __( 'Not found any Book in Trash', $t_d ),\n 'parent_item_colon' => __( 'Parent Books', $t_d ),\n 'menu_name' => __( 'Books List', $t_d ),\n );\n $args = array(\n 'labels' => $labels,\n 'description' => __( 'Books List', $t_d ),\n 'public' => true,\n 'menu_position' => 5,\n 'has_archive' => true,\n 'show_in_admin_bar' => false,\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'menu_icon' => 'dashicons-book',\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n\n /* support */\n 'supports' => array( 'title', 'editor', 'thumbnail', 'author'),\n\n /* Rewrite */\n 'rewrite' => array( 'slug' => \\WP_VERONALABS_TEST::post_type ),\n\n /* Rest Api */\n 'show_in_rest' => true,\n 'rest_base' => 'books_api',\n 'rest_controller_class' => 'WP_REST_Posts_Controller',\n );\n register_post_type( \\WP_VERONALABS_TEST::post_type, $args );\n\n \n }", "title": "" }, { "docid": "4c0097d59d9ed3e393cdec958adbf3a2", "score": "0.536461", "text": "public function getReview()\n {\n return view::make('testimonials/testimonials',[\n 'testimonialsdata' => testimonials::where('hidden', '=', 0)->paginate(5)\n ]);\n }", "title": "" }, { "docid": "cf3358b7c9a7c7ac32c967c4fb60aa92", "score": "0.53641677", "text": "function custom_post_type() {\r\n\r\n $labels = array(\r\n 'name' => _x( 'Authors', 'Post Type General Name', 'infocongo' ),\r\n 'singular_name' => _x( 'Author', 'Post Type Singular Name', 'infocongo' ),\r\n 'menu_name' => __( 'Authors', 'infocongo' ),\r\n 'name_admin_bar' => __( 'Authors', 'infocongo' ),\r\n 'parent_item_colon' => __( 'Parent author:', 'infocongo' ),\r\n 'all_items' => __( 'All authors', 'infocongo' ),\r\n 'add_new_item' => __( 'Add New author', 'infocongo' ),\r\n 'add_new' => __( 'Add New', 'infocongo' ),\r\n 'new_item' => __( 'New author', 'infocongo' ),\r\n 'edit_item' => __( 'Edit author', 'infocongo' ),\r\n 'update_item' => __( 'Update author', 'infocongo' ),\r\n 'view_item' => __( 'View author', 'infocongo' ),\r\n 'search_items' => __( 'Search author', 'infocongo' ),\r\n 'not_found' => __( 'Not found', 'infocongo' ),\r\n 'not_found_in_trash' => __( 'Not found in Trash', 'infocongo' ),\r\n );\r\n $args = array(\r\n 'label' => __( 'Author', 'infocongo' ),\r\n 'description' => __( 'Authors of the team', 'infocongo' ),\r\n 'labels' => $labels,\r\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),\r\n 'hierarchical' => false,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'menu_position' => 5,\r\n 'menu_icon' => 'dashicons-admin-users',\r\n 'show_in_admin_bar' => true,\r\n 'show_in_nav_menus' => true,\r\n 'can_export' => true,\r\n 'has_archive' => true,\r\n 'exclude_from_search' => true,\r\n 'publicly_queryable' => true,\r\n 'capability_type' => 'page',\r\n );\r\n register_post_type( 'authors', $args );\r\n\r\n $labels = array(\r\n 'name' => _x( 'Publishers', 'Post Type General Name', 'infocongo' ),\r\n 'singular_name' => _x( 'Publisher', 'Post Type Singular Name', 'infocongo' ),\r\n 'menu_name' => __( 'Publishers', 'infocongo' ),\r\n 'name_admin_bar' => __( 'Publishers', 'infocongo' ),\r\n 'parent_item_colon' => __( 'Parent publisher:', 'infocongo' ),\r\n 'all_items' => __( 'All publishers', 'infocongo' ),\r\n 'add_new_item' => __( 'Add New publisher', 'infocongo' ),\r\n 'add_new' => __( 'Add New', 'infocongo' ),\r\n 'new_item' => __( 'New publisher', 'infocongo' ),\r\n 'edit_item' => __( 'Edit publisher', 'infocongo' ),\r\n 'update_item' => __( 'Update publisher', 'infocongo' ),\r\n 'view_item' => __( 'View publisher', 'infocongo' ),\r\n 'search_items' => __( 'Search publisher', 'infocongo' ),\r\n 'not_found' => __( 'Not found', 'infocongo' ),\r\n 'not_found_in_trash' => __( 'Not found in Trash', 'infocongo' ),\r\n );\r\n $args = array(\r\n 'label' => __( 'Publisher', 'infocongo' ),\r\n 'description' => __( 'Publishers of the team', 'infocongo' ),\r\n 'labels' => $labels,\r\n 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),\r\n 'hierarchical' => false,\r\n 'public' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'menu_position' => 5,\r\n 'menu_icon' => 'dashicons-media-document',\r\n 'show_in_admin_bar' => true,\r\n 'show_in_nav_menus' => true,\r\n 'can_export' => true,\r\n 'has_archive' => true,\r\n 'exclude_from_search' => true,\r\n 'publicly_queryable' => true,\r\n 'capability_type' => 'page',\r\n );\r\n register_post_type( 'publishers', $args );\r\n\r\n // Add new type Special Reports.\r\n $labels = array(\r\n\t'name' => _x( 'Special Reports', 'Post Type General Name', 'infocongo' ),\r\n\t'singular_name' => _x( 'Special Report', 'Post Type Singular Name', 'infocongo' ),\r\n\t'menu_name' => __( 'Special Reports', 'infocongo' ),\r\n\t'name_admin_bar' => __( 'Special Reports', 'infocongo' ),\r\n\t'parent_item_colon' => __( 'Parent special report:', 'infocongo' ),\r\n\t'all_items' => __( 'All special reports', 'infocongo' ),\r\n\t'add_new_item' => __( 'Add New special report', 'infocongo' ),\r\n\t'add_new' => __( 'Add New', 'infocongo' ),\r\n\t'new_item' => __( 'New special report', 'infocongo' ),\r\n\t'edit_item' => __( 'Edit special report', 'infocongo' ),\r\n\t'update_item' => __( 'Update special report', 'infocongo' ),\r\n\t'view_item' => __( 'View special report', 'infocongo' ),\r\n\t'search_items' => __( 'Search special report', 'infocongo' ),\r\n\t'not_found' => __( 'Not found', 'infocongo' ),\r\n\t'not_found_in_trash' => __( 'Not found in Trash', 'infocongo' ),\r\n );\r\n $args = array(\r\n\t'label' => __( 'Special Report', 'infocongo' ),\r\n\t'description' => __( 'Special Reports of the team', 'infocongo' ),\r\n\t'labels' => $labels,\r\n\t'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),\r\n\t'hierarchical' => false,\r\n\t'public' => true,\r\n\t'show_ui' => true,\r\n\t'show_in_menu' => true,\r\n\t'menu_position' => 5,\r\n\t'show_in_admin_bar' => true,\r\n\t'show_in_nav_menus' => true,\r\n\t'can_export' => true,\r\n\t'has_archive' => true,\r\n\t'exclude_from_search' => true,\r\n\t'publicly_queryable' => true,\r\n\t'capability_type' => 'page',\r\n );\r\n register_post_type('special-reports', $args);\r\n\r\n}", "title": "" }, { "docid": "a29efb6d0ff25605aad34cbcb150cc41", "score": "0.5345642", "text": "public function showReview(){\n $data['reviews'] = Review::with('user','software','vendor')->paginate(15);\n return view('public.reviews')->with($data);\n }", "title": "" }, { "docid": "6172a0cc3c28a4c219934bbb87ef5aa0", "score": "0.5343095", "text": "function trwtma_movies_post_type() {\r\n\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Movies', 'Post Type General Name', 'wptmdbmoviesapi' ),\r\n\t\t'singular_name' => _x( 'Movie', 'Post Type Singular Name', 'wptmdbmoviesapi' ),\r\n\t\t'menu_name' => __( 'Movies', 'wptmdbmoviesapi' ),\r\n\t\t'name_admin_bar' => __( 'Movies', 'wptmdbmoviesapi' ),\r\n\t\t'archives' => __( 'Movie Archives', 'wptmdbmoviesapi' ),\r\n\t\t'attributes' => __( 'Movie Attributes', 'wptmdbmoviesapi' ),\r\n\t\t'parent_item_colon' => __( 'Parent Movie:', 'wptmdbmoviesapi' ),\r\n\t\t'all_items' => __( 'All Movies', 'wptmdbmoviesapi' ),\r\n\t\t'add_new_item' => __( 'Add New Movie', 'wptmdbmoviesapi' ),\r\n\t\t'add_new' => __( 'Add New Movie', 'wptmdbmoviesapi' ),\r\n\t\t'new_item' => __( 'New Movie', 'wptmdbmoviesapi' ),\r\n\t\t'edit_item' => __( 'Edit Movie', 'wptmdbmoviesapi' ),\r\n\t\t'update_item' => __( 'Update Movie', 'wptmdbmoviesapi' ),\r\n\t\t'view_item' => __( 'View Movie', 'wptmdbmoviesapi' ),\r\n\t\t'view_items' => __( 'View Movies', 'wptmdbmoviesapi' ),\r\n\t\t'search_items' => __( 'Search Movie', 'wptmdbmoviesapi' ),\r\n\t\t'not_found' => __( 'Movie Not found', 'wptmdbmoviesapi' ),\r\n\t\t'not_found_in_trash' => __( 'Movie Not found in Trash', 'wptmdbmoviesapi' ),\r\n\t\t'featured_image' => __( 'Movie Poster', 'wptmdbmoviesapi' ),\r\n\t\t'set_featured_image' => __( 'Set Movie Poster', 'wptmdbmoviesapi' ),\r\n\t\t'remove_featured_image' => __( 'Remove Movie Poster', 'wptmdbmoviesapi' ),\r\n\t\t'use_featured_image' => __( 'Use as Movie Poster', 'wptmdbmoviesapi' ),\r\n\t\t'insert_into_item' => __( 'Insert into Movie', 'wptmdbmoviesapi' ),\r\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'wptmdbmoviesapi' ),\r\n\t\t'items_list' => __( 'Movies list', 'wptmdbmoviesapi' ),\r\n\t\t'items_list_navigation' => __( 'Movies list navigation', 'wptmdbmoviesapi' ),\r\n\t\t'filter_items_list' => __( 'Filter Movies list', 'wptmdbmoviesapi' ),\r\n\t);\r\n\t$args = array(\r\n\t\t'label' => __( 'Movie', 'wptmdbmoviesapi' ),\r\n\t\t'description' => __( 'movies custom post type', 'wptmdbmoviesapi' ),\r\n\t\t'labels' => $labels,\r\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', ),\r\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\r\n\t\t'hierarchical' => false,\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'menu_position' => 5,\r\n\t\t'menu_icon' => 'dashicons-video-alt3',\r\n\t\t'show_in_admin_bar' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'can_export' => true,\r\n\t\t'has_archive' => true,\t\t\r\n\t\t'exclude_from_search' => false,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'capability_type' => 'page',\r\n\t\t'show_in_rest' => true,\r\n\t);\r\n\tregister_post_type( 'movies', $args );\r\n\r\n}", "title": "" }, { "docid": "9a6105b384718ea541ce4e5726e69fff", "score": "0.53372014", "text": "function wxr_post_taxonomy() {}", "title": "" }, { "docid": "56babe0a465e4aed191de8bcb968f980", "score": "0.53296584", "text": "function concerts() {\r\n\r\n \t$labels = array(\r\n \t\t'name' => _x( 'Concerts', 'Post Type General Name', 'concerts' ),\r\n \t\t'singular_name' => _x( 'Concert', 'Post Type Singular Name', 'concerts' ),\r\n \t\t'menu_name' => __( 'Concerts', 'concerts' ),\r\n \t\t'name_admin_bar' => __( 'Concerts', 'concerts' ),\r\n \t\t'archives' => __( 'Concerts Archives', 'concerts' ),\r\n \t\t'attributes' => __( 'Concerts attributs', 'concerts' ),\r\n \t\t'parent_item_colon' => __( 'Parent Item:', 'concerts' ),\r\n \t\t'all_items' => __( 'Tous les Concerts', 'concerts' ),\r\n \t\t'add_new_item' => __( 'Ajouter Nouveau Concert', 'concerts' ),\r\n \t\t'add_new' => __( 'Ajouter Nouveau', 'concerts' ),\r\n \t\t'new_item' => __( 'Nouveau Concert', 'concerts' ),\r\n \t\t'edit_item' => __( 'Modifier Concert', 'concerts' ),\r\n \t\t'update_item' => __( 'Mettre à jour Concert', 'concerts' ),\r\n \t\t'view_item' => __( 'Voir Concert', 'concerts' ),\r\n \t\t'view_items' => __( 'Voir Concerts', 'concerts' ),\r\n \t\t'search_items' => __( 'Chercher Concert', 'concerts' ),\r\n \t\t'not_found' => __( 'Introuvable', 'concerts' ),\r\n \t\t'not_found_in_trash' => __( 'Introuvable dans la Corbeille', 'concerts' ),\r\n \t\t'featured_image' => __( 'Image à la une', 'concerts' ),\r\n \t\t'set_featured_image' => __( 'Ajouter Image à la une', 'concerts' ),\r\n \t\t'remove_featured_image' => __( 'Enlever Image à la une', 'concerts' ),\r\n \t\t'use_featured_image' => __( 'Utiliser en tant que image à la une', 'concerts' ),\r\n \t\t'insert_into_item' => __( 'Insérer dans concert', 'concerts' ),\r\n \t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'concerts' ),\r\n \t\t'items_list' => __( 'Liste de concerts', 'concerts' ),\r\n \t\t'items_list_navigation' => __( 'Items list navigation', 'concerts' ),\r\n \t\t'filter_items_list' => __( 'Filter items list', 'concerts' ),\r\n \t);\r\n \t$args = array(\r\n \t\t'label' => __( 'Concert', 'concerts' ),\r\n \t\t'description' => __( 'Les différents concerts.', 'concerts' ),\r\n \t\t'labels' => $labels,\r\n \t\t'supports' => array( 'title', 'editor', 'thumbnail', 'concerts' ),\r\n \t\t'taxonomies' => array( 'category', 'post_tag' ),\r\n \t\t'hierarchical' => false,\r\n \t\t'public' => true,\r\n \t\t'show_ui' => true,\r\n \t\t'show_in_menu' => true,\r\n \t\t'menu_position' => 5,\r\n \t\t'menu_icon' => 'dashicons-groups',\r\n \t\t'show_in_admin_bar' => true,\r\n \t\t'show_in_nav_menus' => true,\r\n \t\t'can_export' => true,\r\n \t\t'has_archive' => true,\r\n \t\t'exclude_from_search' => false,\r\n \t\t'publicly_queryable' => true,\r\n \t\t'capability_type' => 'page',\r\n \t);\r\n \tregister_post_type( 'concerts', $args );\r\n\r\n }", "title": "" }, { "docid": "bba8f943ff850097af8dd6eacda50a6d", "score": "0.53281814", "text": "protected function get_post_types()\n {\n }", "title": "" }, { "docid": "bba8f943ff850097af8dd6eacda50a6d", "score": "0.53281814", "text": "protected function get_post_types()\n {\n }", "title": "" }, { "docid": "bba8f943ff850097af8dd6eacda50a6d", "score": "0.53281814", "text": "protected function get_post_types()\n {\n }", "title": "" }, { "docid": "ef0dd389363ba152f6b62f62023445b5", "score": "0.5322084", "text": "function foodbakery_meta_restaurants($post) {\n\t ?>\n\t <div class=\"page-wrap page-opts left\" style=\"overflow:hidden; position:relative;\">\n\t <div class=\"option-sec\" style=\"margin-bottom:0;\">\n\t \t<div class=\"opt-conts\">\n\t \t <div class=\"elementhidden\">\n\t \t\t<nav class=\"admin-navigtion\">\n\t \t\t <ul id=\"cs-options-tab\">\n\t \t\t\t<li><a href=\"javascript:void(0);\" name=\"#tab-general-settings\" href=\"javascript:;\"><i class=\"icon-settings\"></i><?php esc_html_e('General Info', 'foodbakery') ?> </a></li>\n\t \t\t\t<li><a href=\"javascript:void(0);\" name=\"#tab-package-settings\" href=\"javascript:;\"><i class=\"icon-list\"></i> <?php esc_html_e('Membership Info', 'foodbakery') ?></a></li>\n\t \t\t\t<li><a href=\"javascript:void(0);\" name=\"#tab-menu-categories\" href=\"javascript:;\"><i class=\"icon-list\"></i> <?php esc_html_e('Menu Categories', 'foodbakery') ?></a></li>\n <?php echo do_action('foodbakery_add_menu_coupon_inrestaurant_backend'); ?>\n\t \t\t </ul>\n\t \t\t</nav>\n\t \t\t<div id=\"tabbed-content\" data-ajax-url=\"<?php echo esc_url(admin_url('admin-ajax.php')); ?>\">\n\t \t\t <div id=\"tab-general-settings\">\n\t\t\t\t <?php $this->foodbakery_restaurant_options(); ?>\n\t \t\t </div>\n\t \t\t <div id=\"tab-package-settings\">\n\t\t\t\t <?php $this->foodbakery_package_info_options(); ?>\n\t \t\t </div>\n\t \t\t <div id=\"tab-menu-categories\">\n\t\t\t\t <?php $this->restaurant_menu_cats(); ?>\n\t \t\t </div>\n <?php do_action('foodbakery_add_menu_coupon_content_inrestaurant_backend'); ?>\n\t \t\t</div>\n\t\t\t <?php $this->foodbakery_submit_meta_box('restaurants', $args = array()); ?>\n\t \t </div>\n\t \t</div>\n\t </div>\n\t </div>\n\t <div class=\"clear\"></div>\n\t <?php\n\t}", "title": "" }, { "docid": "a54c52995af53833c32345635ae32edd", "score": "0.5319699", "text": "function reviewspromotion_add() {\n\tadd_meta_box( 'reviewspromotion_control', 'reviews promotion', 'reviewspromotion_cb', 'review', 'side', 'default' );\n}", "title": "" }, { "docid": "7dbc746469a8a66b20fff0ae86c63ff1", "score": "0.5311829", "text": "function render_tut06( $atts ) {\n // prevent loading in Editor screen\n if( function_exists( 'get_current_screen' ) ) { return; }\n\n $selected_category = $atts['selectedCategory'] ?? null;\n $posts_per_page = $atts['postsPerPage'] ?? 3;\n\n $posts = get_posts([\n 'cat' => $selected_category,\n 'posts_per_page' => $posts_per_page,\n ]);\n\n $content = '';\n\n // Loop all posts\n foreach( $posts as $p ) {\n $title = $p->post_title;\n $excerpt = $p->post_excerpt;\n $permalink = get_permalink( $p );\n $thumbnail = get_the_post_thumbnail( $p, 'thumbnail' );\n\n $content .= \"<div class='wp-block-my-tut-06'>\n <h2> <a href='$permalink'> $title </a></h2>\n $thumbnail\n <p> $excerpt </p>\n </div>\";\n }\n\n return $content;\n}", "title": "" }, { "docid": "90cde794329a14f286f3a26a9b36371f", "score": "0.5311682", "text": "function printPost($index, $num) {\n global $tag;\n global $post;\n global $categoryid;\n ?>\n <div class=\"load-post\">\n <article class=\"post\">\n <div class=\"post-img\">\n <a href=\"comments.php?post=<?php echo $post['id'] ?>#start\"><img src=\"<?php echo $post['image']; ?>\" alt=\"<?php echo $post['alt']; ?>\"></a>\n </div> <!-- /post-img -->\n <div class=\"post-text\">\n <div>\n <p class=\"tags\"><i class=\"fa fa-hashtag\" aria-hidden=\"true\"></i> <?php echo $post[\"tag\"]; ?></p>\n <h1><a href=\"comments.php?post=<?php echo $post['id'] ?>#start\"><?php echo $post[\"title\"]; ?></a></h1>\n <div class=\"blog-content\"><?php echo nl2br($post[\"content\"]); ?></div>\n </div>\n <div>\n <p class=\"post-info\"><?php echo $post[\"fname\"]. \" \" .$post[\"lname\"]. \", \" .$post[\"createDate\"]; ?></p>\n <?php\n if ($index) { ?>\n <a href=\"comments.php?post=<?php echo $post['id'] ?>#start\"><p class=\"comments\"><i class=\"fa fa-comment\" aria-hidden=\"true\"></i> Comments (<?php echo $num; ?>)</p></a><?php\n }\n ?>\n </div>\n </div> <!-- /post-text -->\n </article> <!-- /post -->\n </div> <!-- /load-post -->\n <?php\n}", "title": "" }, { "docid": "a5869ff84caa4926b3950b3c186c9721", "score": "0.53085184", "text": "function wck_cptc_create_box(){\n\t$args = array( \n\t\t\t\t'public' => true \n\t\t\t);\n\t$output = 'objects';\n\t$taxonomies = get_taxonomies($args,$output);\n\t$taxonomie_names = array();\n\n\tforeach ($taxonomies as $taxonomie ) {\n\t\tif ( $taxonomie->name != 'nav_menu' && $taxonomie->name != 'post_format')\n\t\t\t$taxonomie_names[] = $taxonomie->name;\n\t}\n\t\n\t/* set up the fields array */\n\t$cpt_creation_fields = array( \n\t\tarray( 'type' => 'text', 'title' => 'Post type', 'description' => '(max. 20 characters, can not contain capital letters, hyphens, or spaces)', 'required' => true ), \n\t\tarray( 'type' => 'textarea', 'title' => 'Description', 'description' => 'A short descriptive summary of what the post type is.' ),\n\t\tarray( 'type' => 'text', 'title' => 'Singular Label', 'required' => true, 'description' => 'ex. Book' ),\n\t\tarray( 'type' => 'text', 'title' => 'Plural Label', 'required' => true, 'description' => 'ex. Books' ),\n\t\tarray( 'type' => 'select', 'title' => 'Hierarchical', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => 'Whether the post type is hierarchical. Allows Parent to be specified.' ),\n\t\tarray( 'type' => 'select', 'title' => 'Has Archive', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => 'Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.' ),\n\t\tarray( 'type' => 'checkbox', 'title' => 'Supports', 'options' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats' ), 'default' =>'title, editor' ),\n\t\t\n\t\t\n\t\tarray( 'type' => 'text', 'title' => 'Add New', 'description' => 'ex. Add New' ),\n\t\tarray( 'type' => 'text', 'title' => 'Add New Item', 'description' => 'ex. Add New Book'),\n\t\tarray( 'type' => 'text', 'title' => 'Edit Item', 'description' => 'ex. Edit Book' ),\n\t\tarray( 'type' => 'text', 'title' => 'New Item', 'description' => 'ex. New Book' ),\n\t\tarray( 'type' => 'text', 'title' => 'All Items', 'description' => 'ex. All Books' ),\n\t\tarray( 'type' => 'text', 'title' => 'View Items', 'description' => 'ex. View Books' ),\n\t\tarray( 'type' => 'text', 'title' => 'Search Items', 'description' => 'ex. Search Books' ),\n\t\tarray( 'type' => 'text', 'title' => 'Not Found', 'description' => 'ex. No Books Found' ),\n\t\tarray( 'type' => 'text', 'title' => 'Not Found In Trash', 'description' => 'ex. No Books found in Trash' ),\t\n\t\tarray( 'type' => 'text', 'title' => 'Parent Item Colon', 'description' => 'the parent text. This string isn\\'t used on non-hierarchical types. In hierarchical ones the default is Parent Page ' ),\t\n\t\tarray( 'type' => 'text', 'title' => 'Menu Name' ),\t\t\t\n\t\t\n\t\tarray( 'type' => 'select', 'title' => 'Public', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search' ),\n\t\tarray( 'type' => 'select', 'title' => 'Show UI', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => 'Whether to generate a default UI for managing this post type.' ), \n\t\tarray( 'type' => 'text', 'title' => 'Menu Position', 'description' => 'The position in the menu order the post type should appear.' ), \n\t\tarray( 'type' => 'text', 'title' => 'Menu Icon', 'description' => 'The url to the icon to be used for this menu.' ),\n\t\tarray( 'type' => 'text', 'title' => 'Capability Type', 'description' => 'The string to use to build the read, edit, and delete capabilities.', 'default' => 'post' ), \t\t\n\t\tarray( 'type' => 'checkbox', 'title' => 'Taxonomies', 'options' => $taxonomie_names ),\t\t\n\t\tarray( 'type' => 'select', 'title' => 'Rewrite', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => 'Rewrite permalinks.' ),\n\t\tarray( 'type' => 'text', 'title' => 'Rewrite Slug', 'description' => 'Defaults to post type name.' )\n\t);\n\t\n\t/* set up the box arguments */\n\t$args = array(\n\t\t'metabox_id' => 'option_page',\n\t\t'metabox_title' => 'Custom Post Type Creation',\n\t\t'post_type' => 'cptc-page',\n\t\t'meta_name' => 'wck_cptc',\n\t\t'meta_array' => $cpt_creation_fields,\t\n\t\t'context' \t=> 'option',\n\t\t'sortable' => false\n\t);\n\n\t/* create the box */\n\tnew WCK_CPTC_Wordpress_Creation_Kit( $args );\n}", "title": "" }, { "docid": "f1d318923bbea4ec8984ab156a344802", "score": "0.53047746", "text": "function sc_promos($atts = Array())\n{\n\t$css = (isset($atts['css'])) ? $atts['css'] : '';\n\n\t$promos = resolve_posts($atts,\tArray(\t'numberposts' => 3,\n\t\t\t\t\t\t \t\t\t\t\t'meta_query' => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(\t'key' => 'display_type',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'value' => 'promotional'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t));\n\tif(count($promos) > 0) {\n\t\tob_start();\n\t\t?>\n\t\t\t<div class=\"<?=$css?>\" id=\"promos\">\n\t\t\t\t<h2 class=\"indent\">Promos</h2>\n\t\t\t\t<ul class=\"story-list\">\n\t\t<?\n\t\t$count = 0;\n\t\tforeach($promos as $promo) {\n\t\t\t?>\n\t\t\t<li<?=(($count + 1) == count($promos) ? ' class=\"last\"' : '')?>>\n\t\t\t\t<h3><a href=\"<?=get_permalink($promo->ID)?>\"><?=$promo->post_title?></a></h3>\n\t\t\t\t<p class=\"story-blurb\">\n\t\t\t\t\t<?=get_excerpt($promo)?>\n\t\t\t\t</p>\n\t\t\t</li>\n\t\t\t<?\n\t\t\t$count++;\n\t\t}\n\t\t?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t<?\n\t\t$html = ob_get_contents(); ob_end_clean();\n\t\treturn $html;\n\t}\n}", "title": "" }, { "docid": "ac4fd479b617ad6ca9ec96992b53d9bf", "score": "0.53009117", "text": "function discoverprod_preprocess_node_restaurant_display(&$vars) {\n\n}", "title": "" }, { "docid": "00e561d960a88eb33e1e9da2d6a0a3b2", "score": "0.5297599", "text": "public function initContent()\n {\n parent::initContent();\n $reviews = ShopReview::getReviews();\n\n $this->context->smarty->assign(array(\n 'reviews' => $reviews,\n 'email' => $this->context->cookie->email ? $this->context->cookie->email : '',\n 'errors' => $this->errors,\n ));\n\n if ($this->errors) {\n $this->context->smarty->assign(array(\n 'post_name' => Tools::getValue('customer_name', null),\n 'post_email' => Tools::getValue('email', null),\n 'post_text' => Tools::getValue('text', null),\n ));\n }\n\n if (Tools::getIsset('success'))\n $this->context->smarty->assign('confirmation', true);\n\n $this->setTemplate('list.tpl');\n }", "title": "" }, { "docid": "21347935bf353d9c8098247394e1345f", "score": "0.52972066", "text": "public function show($slug)\n {\n Carbon::setLocale(config('app.locale'));\n $post = Post::where('slug',$slug)\n ->with(['items'=>function($query){\n $query->with(['Proposals'=>function($q){\n $q->with(['User'=>function($qq){\n $qq->with(['Profile']);\n }]);\n }]);\n }])\n ->with('assigns')\n ->with('country')\n ->with('category')\n ->with('area')\n ->with(['replies'=>function($query){\n $query->with(['User'=>function($query){\n $query->with(['Profile'=>function($query){\n \n }]);\n }]);\n }])\n ->first();\n \n \n if(Auth::user()->profile()->pluck('type')[0]==\"acheteur\"){\n if (Auth::user()->id != $post->user_id) {\n Session::flash('error', __(\"Vous ne pouvez pas accéder à cette page\"));\n return redirect('/');\n }\n\n }\n \n $getAllUserReplies = Proposal::where(\n 'user_id', Auth::user()->id)\n ->where('post_id',$post->id)\n ->count(); \n \n $postByOwner = Post::Published()\n ->where('slug',$slug)\n ->with('items')\n ->with(['proposals'=>function($query){\n $query->where('user_id',Auth::user()->id);\n }])\n ->with('country')\n ->with(['replies'=>function($query){\n $query->where('user_id',Auth::user()->id);\n }])\n ->first(); \n \n $getAssigns = Assign::where('buyer_id', Auth::user()->id)\n ->where('post_id',$post->id)->count(); \n \n $postKey = 'post_' . $post->id;\n\n $incoterms = Incoterm::pluck('name','id');\n if (!Session::has($postKey)) {\n $post->increment('view_count');\n Session::put($postKey,1);\n }\n // dd($postByOwner);\n $randomposts = Post::Published()->take(3)->inRandomOrder()->get();\n return view('posts.show',compact('post','incoterms','postByOwner','getAllUserReplies','getAssigns'));\n }", "title": "" }, { "docid": "9ae79e1dedaf8f52ce44809cb3289a42", "score": "0.5295987", "text": "function codex_custom_init() {\n\n\t// Default Post Type\n/*\n\tregister_post_type( 'custompost1',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' \t\t=> __( 'CPT 1' ),\n\t\t\t\t'singular_name' => __( 'CPT 1' )\n\t\t\t),\n\t\t\t'public' \t=> true,\n\t\t\t'menu_icon'\t=> 'dashicons-forms',\n\t\t\t'has_archive' \t=> true,\n\t\t\t'supports' \t=> array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'rewrite' \t=> array( 'slug' => 'cpt1-custom-slug' ),\n\t\t)\n\t);\n*/\n\t// Post Type Ready for REST API\n\t// Posts JSON can be access from localhost/wp-json/wp/v2/custompost2\n/*\n\tregister_post_type( 'custompost2',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' \t\t=> __( 'CPT 2' ),\n\t\t\t\t'singular_name' => __( 'CPT 2' )\n\t\t\t),\n\t\t\t'public' \t=> true,\n\t\t\t'menu_icon'\t=> 'dashicons-forms',\n\t\t\t'has_archive' \t=> true,\n\t\t\t'supports' \t=> array( 'title', 'editor', 'thumbnail' ),\n\t\t\t'rewrite' \t=> array( 'slug' => 'cpt2-custom-slug' ),\n\t\t\t'show_in_rest' \t=> true,\n\t\t\t'rest_base' => 'custompost2',\n\t\t)\n\t);\n*/\t\n\n}", "title": "" }, { "docid": "7c8d34cc38f365f4d1b86d83bca0acea", "score": "0.52951914", "text": "function cms_tpv_print_common_tree_stuff($post_type = \"\") {\n\n\tglobal $sitepress, $cms_tpv_view, $wpdb;\n\n\tif ( ! $post_type ) {\n\t\t$post_type = cms_tpv_get_selected_post_type();\n\t}\n\n\t$post_type_object = get_post_type_object($post_type);\n\t$get_pages_args = array(\"post_type\" => $post_type);\n\n\t$pages = cms_tpv_get_pages($get_pages_args);\n\n\t// check if wpml is active and if this post type is one of its enabled ones\n\t$wpml_current_lang = \"\";\n\t$wmpl_active_for_post = FALSE;\n\tif (defined(\"ICL_SITEPRESS_VERSION\")) {\n\n\t\t$wpml_post_types = $sitepress->get_translatable_documents();\n\t\tif (array_key_exists($post_type, $wpml_post_types)) {\n\t\t\t$wmpl_active_for_post = TRUE;\n\t\t\t$wpml_current_lang = $sitepress->get_current_language();\n\t\t}\n\n\t}\n\n\t$status_data_attributes = array(\"all\" => \"\", \"publish\" => \"\", \"trash\" => \"\");\n\n\t// Calculate post counts\n\tif ($wpml_current_lang) {\n\n\t\t// Count code for WPML, mostly taken/inspired from WPML Multilingual CMS, sitepress.class.php\n\t\t$langs = array();\n\n\t\t$wpml_post_counts = cms_tpv_get_wpml_post_counts($post_type);\n\n\t\t$post_count_all = (int) @$wpml_post_counts[\"private\"][$wpml_current_lang] + (int) @$wpml_post_counts[\"future\"][$wpml_current_lang] + (int) @$wpml_post_counts[\"publish\"][$wpml_current_lang] + (int) @$wpml_post_counts[\"draft\"][$wpml_current_lang];\n\t\t$post_count_publish\t= (int) @$wpml_post_counts[\"publish\"][$wpml_current_lang];\n\t\t$post_count_trash\t= (int) @$wpml_post_counts[\"trash\"][$wpml_current_lang];\n\n\t\tforeach ($wpml_post_counts[\"publish\"] as $one_wpml_lang => $one_wpml_lang_count) {\n\t\t\tif (\"all\" === $one_wpml_lang) continue;\n\t\t\t$lang_post_count_all \t\t= (int) @$wpml_post_counts[\"publish\"][$one_wpml_lang] + (int) @$wpml_post_counts[\"draft\"][$one_wpml_lang];\n\t\t\t$lang_post_count_publish\t= (int) @$wpml_post_counts[\"publish\"][$one_wpml_lang];\n\t\t\t$lang_post_count_trash\t\t= (int) @$wpml_post_counts[\"trash\"][$one_wpml_lang];\n\t\t\t$status_data_attributes[\"all\"] \t\t.= \" data-post-count-{$one_wpml_lang}='{$lang_post_count_all}' \";\n\t\t\t$status_data_attributes[\"publish\"] \t.= \" data-post-count-{$one_wpml_lang}='{$lang_post_count_publish}' \";\n\t\t\t$status_data_attributes[\"trash\"] \t.= \" data-post-count-{$one_wpml_lang}='{$lang_post_count_trash}' \";\n\t\t}\n\n\t} else {\n\t\t$post_count = wp_count_posts($post_type);\n\t\t$post_count_all = $post_count->publish + $post_count->future + $post_count->draft + $post_count->pending + $post_count->private;\n\t\t$post_count_publish = $post_count->publish;\n\t\t$post_count_trash = $post_count->trash;\n\t}\n\n\n\t// output js for the root/top level\n\t// function cms_tpv_print_childs($pageID, $view = \"all\", $arrOpenChilds = null, $post_type) {\n\t// @todo: make into function since used at other places\n\t$jstree_open = array();\n\tif ( isset( $_COOKIE[\"jstree_open\"] ) ) {\n\t\t$jstree_open = $_COOKIE[\"jstree_open\"]; // like this: [jstree_open] => cms-tpv-1282,cms-tpv-1284,cms-tpv-3\n\t\t$jstree_open = explode( \",\", $jstree_open );\n\t\tfor( $i=0; $i<sizeof( $jstree_open ); $i++ ) {\n\t\t\t$jstree_open[$i] = (int) str_replace(\"#cms-tpv-\", \"\", $jstree_open[$i]);\n\t\t}\n\t}\n\n\n\tob_start();\n\tcms_tpv_print_childs(0, $cms_tpv_view, $jstree_open, $post_type);\n\t$json_data = ob_get_clean();\n\n\tif (! $json_data) $json_data = '{}';\n\t?>\n\t<script type=\"text/javascript\">\n\t\tcms_tpv_jsondata[\"<?php echo $post_type ?>\"] = <?php echo $json_data ?>;\n\t</script>\n\n\t<?php\n\tdo_action(\"cms_tree_page_view/before_wrapper\");\n\t?>\n\n\t<div class=\"cms_tpv_wrapper\">\n\t\t<input type=\"hidden\" name=\"cms_tpv_meta_post_type\" value=\"<?php echo $post_type ?>\" />\n\t\t<input type=\"hidden\" name=\"cms_tpv_meta_post_type_hierarchical\" value=\"<?php echo (int) cms_tpv_is_post_type_hierarchical($post_type_object) ?>\" />\n\t\t<input type=\"hidden\" name=\"cms_tpv_meta_wpml_language\" value=\"<?php echo $wpml_current_lang ?>\" />\n\t\t<?php\n\n\t\t// check if WPML is activated and show a language-menu\n\t\tif ($wmpl_active_for_post) {\n\n\t\t\t$wpml_langs = icl_get_languages();\n\t\t\t$wpml_active_lang = null;\n\t\t\tif (sizeof($wpml_langs)>=1) {\n\t\t\t\t$lang_out = \"\";\n\t\t\t\t$lang_out .= \"<ul class='cms-tpv-subsubsub cms_tvp_switch_langs'>\";\n\t\t\t\tforeach ($wpml_langs as $one_lang) {\n\t\t\t\t\t$one_lang_details = $sitepress->get_language_details($one_lang[\"language_code\"]); // english_name | display_name\n\t\t\t\t\t$selected = \"\";\n\t\t\t\t\tif ($one_lang[\"active\"]) {\n\t\t\t\t\t\t$wpml_active_lang = $one_lang;\n\t\t\t\t\t\t$selected = \"current\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$lang_count = (int) @$wpml_post_counts[\"publish\"][$one_lang[\"language_code\"]] + (int) @$wpml_post_counts[\"draft\"][$one_lang[\"language_code\"]];\n\n\t\t\t\t\t$lang_out .= \"\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a class='cms_tvp_switch_lang $selected cms_tpv_switch_language_code_{$one_lang[\"language_code\"]}' href='#'>\n\t\t\t\t\t\t\t\t$one_lang_details[display_name]\n\t\t\t\t\t\t\t\t<span class='count'>(\" . $lang_count . \")</span>\n\t\t\t\t\t\t\t</a> |</li>\";\n\t\t\t\t}\n\t\t\t\t$lang_out = preg_replace('/ \\|<\\/li>$/', \"</li>\", $lang_out);\n\t\t\t\t$lang_out .= \"</ul>\";\n\t\t\t\techo $lang_out;\n\t\t\t}\n\n\t\t}\n\n\t\tif (true) {\n\n\t\t\t// start the party!\n\n\t\t\t?>\n\t\t\t<ul class=\"cms-tpv-subsubsub cms-tpv-subsubsub-select-view\">\n\t\t\t\t<li class=\"cms_tvp_view_is_status_view\">\n\t\t\t\t\t<a class=\"cms_tvp_view_all <?php echo ($cms_tpv_view==\"all\") ? \"current\" : \"\" ?>\" href=\"#\" <?php echo $status_data_attributes[\"all\"] ?>>\n\t\t\t\t\t\t<?php _e(\"All\", 'cms-tree-page-view') ?>\n\t\t\t\t\t\t<span class=\"count\">(<?php echo $post_count_all ?>)</span>\n\t\t\t\t\t</a> |</li>\n\t\t\t\t<li class=\"cms_tvp_view_is_status_view\">\n\t\t\t\t\t<a class=\"cms_tvp_view_public <?php echo ($cms_tpv_view==\"public\") ? \"current\" : \"\" ?>\" href=\"#\" <?php echo $status_data_attributes[\"publish\"] ?>>\n\t\t\t\t\t\t<?php _e(\"Public\", 'cms-tree-page-view') ?>\n\t\t\t\t\t\t<span class=\"count\">(<?php echo $post_count_publish ?>)</span>\n\t\t\t\t\t</a> |</li>\n\t\t\t\t<li class=\"cms_tvp_view_is_status_view\">\n\t\t\t\t\t<a class=\"cms_tvp_view_trash <?php echo ($cms_tpv_view==\"trash\") ? \"current\" : \"\" ?>\" href=\"#\" <?php echo $status_data_attributes[\"trash\"] ?>>\n\t\t\t\t\t\t<?php _e(\"Trash\", 'cms-tree-page-view') ?>\n\t\t\t\t\t\t<span class=\"count\">(<?php echo $post_count_trash ?>)</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\n\t\t\t\t<?php\n\t\t\t\tif (cms_tpv_is_post_type_hierarchical($post_type_object)) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li><a href=\"#\" class=\"cms_tpv_open_all\"><?php _e(\"Expand\", 'cms-tree-page-view') ?></a> |</li>\n\t\t\t\t\t<li><a href=\"#\" class=\"cms_tpv_close_all\"><?php _e(\"Collapse\", 'cms-tree-page-view') ?></a></li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\n\t\t\t\t<li>\n\t\t\t\t\t<form class=\"cms_tree_view_search_form\" method=\"get\" action=\"\">\n\t\t\t\t\t\t<input type=\"text\" name=\"search\" class=\"cms_tree_view_search\" />\n\t\t\t\t\t\t<a title=\"<?php _e(\"Clear search\", 'cms-tree-page-view') ?>\" class=\"cms_tree_view_search_form_reset\" href=\"#\">x</a>\n\t\t\t\t\t\t<input type=\"submit\" class=\"cms_tree_view_search_submit button button-small\" value=\"<?php _e(\"Search\", 'cms-tree-page-view') ?>\" />\n\t\t\t\t\t\t<span class=\"cms_tree_view_search_form_working\"><?php _e(\"Searching...\", 'cms-tree-page-view') ?></span>\n\t\t\t\t\t\t<span class=\"cms_tree_view_search_form_no_hits\"><?php _e(\"Nothing found.\", 'cms-tree-page-view') ?></span>\n\t\t\t\t\t</form>\n\t\t\t\t</li>\n\n\t\t\t</ul>\n\n\t\t\t<div class=\"cms_tpv_working\">\n\t\t\t\t<?php _e(\"Loading...\", 'cms-tree-page-view') ?>\n\t\t\t</div>\n\n\t\t\t<div class=\"cms_tpv_message updated below-h2 hidden\"><p>Message goes here.</p></div>\n\n\t\t\t<div class=\"updated below-h2 hidden cms_tpv_search_no_hits\"><p><?php _e(\"Search: no pages found\", 'cms-tree-page-view') ?></p></div>\n\n\t\t\t<div class=\"cms_tpv_container tree-default\">\n\t\t\t\t<?php _e(\"Loading tree\", 'cms-tree-page-view') ?>\n\t\t\t</div>\n\n\t\t\t<div style=\"clear: both;\"></div>\n\n\t\t\t<!-- template forpopup with actions -->\n\t\t\t<div class=\"cms_tpv_page_actions\">\n\n\t\t\t\t<!-- cms_tpv_page_actions_page_id -->\n\t\t\t\t<h4 class=\"cms_tpv_page_actions_headline\"></h4>\n\n\t\t\t\t<p class=\"cms_tpv_action_edit_and_view\">\n\t\t\t\t\t<a href=\"#\" title='<?php _e(\"Edit page\", \"cms-tree-page-view\")?>' class='cms_tpv_action_edit'><?php _e(\"Edit\", \"cms-tree-page-view\")?></a>\n\t\t\t\t\t<a href=\"#\" title='<?php _e(\"View page\", \"cms-tree-page-view\")?>' class='cms_tpv_action_view'><?php _e(\"View\", \"cms-tree-page-view\")?></a>\n\t\t\t\t</p>\n\n\t\t\t\t<!-- links to add page -->\n\t\t\t\t<p class=\"cms_tpv_action_add_and_edit_page\">\n\n\t\t\t\t\t<span class='cms_tpv_action_add_page'><?php echo $post_type_object->labels->add_new_item ?></span>\n\n\t\t\t\t\t<a class='cms_tpv_action_add_page_after' href=\"#\" title='<?php _e(\"Add new page after\", \"cms-tree-page-view\")?>' ><?php _e(\"After\", \"cms-tree-page-view\")?></a>\n\n\t\t\t\t\t<?php\n\t\t\t\t\t// if post type is hierarchical we can add pages inside\n\t\t\t\t\tif (cms_tpv_is_post_type_hierarchical($post_type_object)) {\n\t\t\t\t\t\t?><a class='cms_tpv_action_add_page_inside' href=\"#\" title='<?php _e(\"Add new page inside\", \"cms-tree-page-view\")?>' ><?php _e(\"Inside\", \"cms-tree-page-view\")?></a><?php\n\t\t\t\t\t}\n\t\t\t\t\t// if post status = draft then we can not add pages inside because wordpress currently can not keep its parent if we edit the page\n\t\t\t\t\t?>\n\t\t\t\t\t<!-- <span class=\"cms_tpv_action_add_page_inside_disallowed\"><?php _e(\"Can not create page inside of a page with draft status\", \"cms-tree-page-view\")?></span> -->\n\n\t\t\t\t</p>\n\n\t\t\t\t<div class=\"cms_tpv_action_add_doit\">\n\n\t\t\t\t\t<form method=\"post\" action=\"<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>\">\n\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"cms_tpv_add_pages\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ref_post_id\" value=\"\">\n\t\t\t\t\t\t<?php wp_nonce_field(\"cms-tpv-add-pages\") ?>\n\n\t\t\t\t\t\t<!-- lang for wpml -->\n\t\t\t\t\t\t<input type=\"hidden\" name=\"lang\" value=\"\">\n\n\t\t\t\t\t\t<!-- <fieldset> -->\n\n\t\t\t\t\t\t\t<h4><?php _e(\"Add page(s)\", \"cms-tree-page-view\") ?></h4>\n\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<!-- Pages<br> -->\n\t\t\t\t\t\t\t\t<ul class=\"cms_tpv_action_add_doit_pages\">\n\t\t\t\t\t\t\t\t\t<li><span></span><input placeholder=\"<?php _e(\"Enter title here\") /* translation not missing - exists in wp */ ?>\" type=\"text\" name=\"cms_tpv_add_new_pages_names[]\"></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"cms_tpv_add_position\">\n\t\t\t\t\t\t\t\t<?php _e(\"Position\", \"cms-tree-page-view\") ?><br>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"cms_tpv_add_type\" value=\"after\"> <?php _e(\"After\", \"cms-tree-page-view\") ?></label>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"cms_tpv_add_type\" value=\"inside\"> <?php _e(\"Inside\", \"cms-tree-page-view\") ?></label>\n\t\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<?php _e(\"Status\", \"cms-tree-page-view\") ?><br>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"cms_tpv_add_status\" value=\"draft\" checked> <?php _e(\"Draft\", \"cms-tree-page-view\") ?></label>\n\t\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"cms_tpv_add_status\" value=\"published\"> <?php current_user_can('publish_posts') ? _e(\"Published\", \"cms-tree-page-view\") : _e(\"Submit for Review\", \"cms-tree-page-view\") ?></label>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e(\"Add\", \"cms-tree-page-view\") ?>\" class=\"button-primary\">\n\t\t\t\t\t\t\t\t<?php _e(\"or\", \"cms-tree-page-view\") ?>\n\t\t\t\t\t\t\t\t<a href=\"#\" class=\"cms_tpv_add_cancel\"><?php _e(\"cancel\", \"cms-tree-page-view\") ?></a>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- </fieldset> -->\n\n\t\t\t\t\t</form>\n\n\t\t\t\t</div>\n\n\t\t\t\t<dl>\n\t\t\t\t\t<dt><?php _e(\"Last modified\", 'cms-tree-page-view') ?></dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<span class=\"cms_tpv_page_actions_modified_time\"></span> <?php _e(\"by\", \"cms-tree-page-view\") ?>\n\t\t\t\t\t\t<span class=\"cms_tpv_page_actions_modified_by\"></span>\n\t\t\t\t\t</dd>\n\t\t\t\t\t<dt><?php _e(\"Page ID\", \"cms-tree-page-view\") ?></dt>\n\t\t\t\t\t<dd><span class=\"cms_tpv_page_actions_page_id\"></span></dd>\n\t\t\t\t</dl>\n\n\t\t\t\t<div class=\"cms_tpv_page_actions_columns\"></div>\n\t\t\t\t<span class=\"cms_tpv_page_actions_arrow\"></span>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\n\t\tif (empty($pages)) {\n\n\t\t\techo '<div class=\"updated fade below-h2\"><p>' . __(\"No posts found.\", 'cms-tree-page-view') . '</p></div>';\n\n\t\t}\n\n\t\t?>\n\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "f56822df5d52c6139504458ff97f5491", "score": "0.52934253", "text": "public function postPage()\n {\n require('Views/Backend/addPostView.php');\n }", "title": "" }, { "docid": "11c6d4360d35414fcb3ad395b434bad7", "score": "0.5292856", "text": "function cp_formbuilder_review( $results, $postvals ) {\n\tglobal $cp_options;\n\n\t$category = get_term_by( 'id', $postvals['cat'], APP_TAX_CAT );\n\t?>\n\n\t<tbody>\n\t\t<tr>\n\t\t\t<td><strong><?php _e( 'Category:', APP_TD ); ?></strong></td>\n\t\t\t<td class=\"review\"><?php echo $category->name; ?></td>\n\t\t</tr>\n\n\t\t<?php\n\t\tforeach ( $results as $result ) {\n\n\t\t\t// external plugins can modify or disable field.\n\t\t\t$result = apply_filters( 'cp_formbuilder_review_field', $result );\n\t\t\tif ( ! $result ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Merge currency field with a price field to one row.\n\t\t\tif ( 'cp_currency' === $result->field_name && ! empty( $postvals['cp_price'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td><strong><?php echo esc_html( translate( $result->field_label, APP_TD ) ); ?>:</strong></td>\n\t\t\t\t<td class=\"review\">\n\n\t\t\t\t\t<?php\n\t\t\t\t\t// text areas should display formatting\n\t\t\t\t\t// other fields should be stripped.\n\t\t\t\t\tif ( 'text area' === $result->field_type ) {\n\t\t\t\t\t\t$t = $postvals[ $result->field_name ];\n\t\t\t\t\t\tif ( ! $cp_options->allow_html ) {\n\t\t\t\t\t\t\t$t = strip_tags( $t );\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo wpautop( $t );\n\t\t\t\t\t} elseif ( 'checkbox' === $result->field_type ) {\n\t\t\t\t\t\tif ( isset( $postvals[ $result->field_name ] ) && is_array( $postvals[ $result->field_name ] ) ) {\n\t\t\t\t\t\t\techo strip_tags( implode( ', ', $postvals[ $result->field_name ] ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ( 'cp_price' === $result->field_name ) {\n\t\t\t\t\t\t$price_type = ( ! empty( $postvals['cp_currency'] ) ) ? $postvals['cp_currency'] : 'ad';\n\t\t\t\t\t\tcp_display_price( $postvals[ $result->field_name ], $price_type );\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo strip_tags( $postvals[ $result->field_name ] );\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t</tbody>\n\t<?php\n\n}", "title": "" }, { "docid": "15c0418f6a0f388250e688000f115bac", "score": "0.52927107", "text": "public function review_logs_content( $post ) {\n\t\t\tglobal $wpdb;\n\t\t\t$view_all = learn_press_get_request( 'view_all_review' );\n\t\t\t$table = $wpdb->prefix . 'learnpress_review_logs';\n\t\t\tif ( $wpdb->get_var( \"SHOW TABLES LIKE '{$table}'\" ) === $table ) {\n\t\t\t\t$query = $wpdb->prepare( \"\n SELECT SQL_CALC_FOUND_ROWS *\n FROM {$wpdb->learnpress_review_logs}\n WHERE course_id = %d\n ORDER BY `date` DESC\"\n\t\t\t\t . ( $view_all ? \"\" : \" LIMIT 0, 10\" ) . \"\n \", $post->ID );\n\t\t\t\t$reviews = $wpdb->get_results( $query );\n\t\t\t\t$total_reviews = $wpdb->get_var( \"SELECT FOUND_ROWS()\" );\n\t\t\t\t$count_reviews = sizeof( $reviews );\n\n\t\t\t\t$view = learn_press_get_admin_view( 'meta-boxes/course/review-logs.php' );\n\t\t\t\tinclude $view;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9838534d27432076aeee9a58e947535a", "score": "0.529168", "text": "public function for_posts_page()\n {\n }", "title": "" }, { "docid": "9838534d27432076aeee9a58e947535a", "score": "0.529168", "text": "public function for_posts_page()\n {\n }", "title": "" }, { "docid": "e0b0e9411a032e2baf874528cea2a6ae", "score": "0.52876526", "text": "protected function retrieve_posts()\n {\n }", "title": "" }, { "docid": "f62405e5fad452f35bd807007eaeb4a0", "score": "0.52875304", "text": "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\t\t$category = $settings[\"category\"];\n\t\t$post_column = $settings[\"post_column\"];\n\n\t\t\n\t\t$args = array(\n\t\t\t'numberposts' => 5,\n\t\t\t'orderby' => 'post_date',\n\t\t\t// 'order' => $post_sort_by,\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t'suppress_filters' => true\n\t\t);\n\n\t\tif(is_array($category)){\n\t\t\t$args['category__in'] = $category;\n\t\t }\n\n\n\t\t$posts = get_posts( $args );\n\t\t\n\t\t $template = __DIR__ . '/templates/style-1.php';\n\n\t\tif( file_exists($template)){\n\t\t\tinclude __DIR__ . '/templates/style-1.php';\n\t\t}\n \twp_reset_postdata();\n\n\t}", "title": "" }, { "docid": "bd0a4a1b42894391dad30b3f87abaada", "score": "0.5283453", "text": "function index_grid_function( $atts = array() ) {\n extract(shortcode_atts(array(\n 'kat' => ''\n ), $atts));\n\n $html = '';\n\n $query= new WP_Query(array(\n 'post_type' => 'index',\n /*'tax_query' => array(\n array(\n 'taxonomy' => 'produktkategorie',\n 'field' => 'slug',\n 'terms' => $kat,\n 'include_children' => true,\n ),), */\n 'posts_per_page' => 21,\n 'meta_key' => 'post_views',\n 'orderby' => 'meta_value_num',\n 'order' => 'DESC'\n ));\n\n if($query->have_posts() ) {\n $html .= '<div class=\"row row-cols-1 row-cols-md-3\">';\n while( $query->have_posts() ){\n $query->the_post();\n $html .='\n <div class=\"col\">\n <div class=\"card h-100\">';\n $html .='\n <div class=\"card-body\">\n <a href=\"'. get_the_permalink().'\" class=\"stretched-link\"><h4 class=\"card-title\">'.get_the_title().'</h4></a>\n </div>\n </div>\n </div>';\n }\n $html .= '</div>';\n }\n\n return $html;\n}", "title": "" }, { "docid": "9c942028f4d314372c8de6158bc4bb99", "score": "0.52794695", "text": "function create_posttype5() {\n \n register_post_type( 'designing',\n // CPT Options\n array(\n 'labels' => array(\n 'name' => __( 'designing' ),\n 'singular_name' => __( 'designing' )\n ),\n 'public' => true,\n 'hierarchical' => true,\n 'has_archive' => true,\n 'rewrite' => array('slug' => 'designing'),\n 'supports' => array( 'title', 'editor', 'exerpts', 'author'),\n )\n );\n}", "title": "" }, { "docid": "89741af878c4ea4bd285646af1232cec", "score": "0.52792335", "text": "public function post_index()\n {\n\n // get the current template and swap it out\n\n echo 'post var worked';\n }", "title": "" }, { "docid": "b69012d62b2312d3f4f38c58680ab703", "score": "0.52734923", "text": "public function post() {\r\n\t\t$content = $this->model(\"blogModel\");\r\n\t\t$posts = $content->getPostByURL(library::catalog()->url[1]);\r\n\t\t\r\n\t\t// --- create html array for rendering\r\n\t\t$html = array();\r\n\t\t$html[\"selected\"] = 'blog';\r\n\t\t$html[\"body\"] = '';\r\n\t\t$html[\"script\"] = '\t\tSyntaxHighlighter.defaults.toolbar = false;'.PHP_EOL.'\t\tSyntaxHighlighter.all();'.PHP_EOL;\r\n\t\t$html[\"script\"].= $this->view('initShadowboxJS', array(), true);\r\n\t\t$html['jsfiles'] = '<script type=\"text/javascript\" src=\"'.BASE_URL.'style/js/syntaxHighlighter.js\" charset=\"utf-8\"></script>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"syntax-core-css\" href=\"'.BASE_URL.'style/css/shCoreDefault.css\" media=\"all\"/>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"syntax-default-css\" href=\"'.BASE_URL.'style/css/shThemeDefault.css\" media=\"all\"/>'.PHP_EOL.'\t<script type=\"text/javascript\" src=\"'.BASE_URL.'style/js/shadowbox.js\" charset=\"utf-8\"></script>'.PHP_EOL.'\t<link rel=\"stylesheet\" type=\"text/css\" id=\"shadow-css\" href=\"'.BASE_URL.'style/css/shadowbox.css\" media=\"screen\"/>'.PHP_EOL;\r\n\t\t$html[\"sidebar\"] = '';\r\n\t\t$html[\"title\"] = '';\r\n\t\t$html[\"comments\"] = true;\r\n\t\t$html[\"canonicalBack\"] = '';\r\n\t\t$html[\"canonicalNow\"] = '';\r\n\t\t$html[\"canonicalNext\"] = '';\r\n\t\t\r\n\t\t// --- display page\r\n\t\tif(isset($posts[0])) {\r\n\t\t\t$cats = $content->getPostCats($posts[0][\"post_id\"]);\r\n\t\t\t$tags = $content->getPostTags($posts[0][\"post_id\"]);\r\n\r\n\t\t\t$html[\"title\"] = 'blog/'.strip_tags($posts[0][\"title\"]);\r\n\r\n\t\t\tif(isset($cats[0])) {\r\n\t\t\t\t$id = (int)$cats[0][\"blog_cat_id\"];\r\n\t\t\t\t$cat = $content->getCatByID($id);\r\n\t\t\t\t$mainCat = isset($cat[0]) ? $cat[0][\"url\"] : \"uncategorized\";\r\n\t\t\t\t$mainCatName = isset($cat[0]) ? $cat[0][\"name\"] : \"uncategorized\";\r\n\t\t\t} else {\r\n\t\t\t\t$mainCat = \"uncategorized\";\r\n\t\t\t}\r\n\t\t\t$first = $content->getFirstPost();\r\n\t\t\t$prev = $content->getPrevPost($posts[0][\"date\"]);\r\n\t\t\t$next = $content->getNextPost($posts[0][\"date\"]);\r\n\t\t\t$html[\"canonicalNext\"] = isset($prev[0]) ? '<a href=\"'.QOOB_DOMAIN.'blog/'.$prev[0][\"url\"].'\">previous post &gt; &gt;</a>' : '';\r\n\t\t\t$html[\"canonicalBack\"] = isset($next[0]) ? '<a href=\"'.QOOB_DOMAIN.'blog/'.$next[0][\"url\"].'\">&lt; &lt; next post </a>' : '';\r\n\t\t\t$html[\"canonicalNow\"] = '<a href=\"'.QOOB_DOMAIN.'blog/'.$mainCat.'\">'.$mainCatName.'</a> / <a href=\"'.QOOB_DOMAIN.'blog/'.$posts[0][\"url\"].'\">'.$posts[0][\"title\"].'</a>';\r\n\t\t\t$canonicalStartTitle = isset($first[0]) ? $first[0][\"title\"] : '';\r\n\t\t\t$canonicalStartURL = isset($first[0]) ? QOOB_DOMAIN.'blog/'.$first[0][\"url\"] : '';\r\n\t\t\t$canonicalURL = QOOB_DOMAIN.'blog/'.$posts[0][\"url\"];\r\n\t\t\t$canonicalNextTitle = isset($next[0]) ? $next[0][\"title\"] : '';\t\t\t\r\n\t\t\t$canonicalNextURL = isset($next[0]) ? QOOB_DOMAIN.'blog/'.$next[0][\"url\"] : '';\r\n\t\t\t$canonicalBackTitle = isset($prev[0])? $prev[0][\"title\"] : '';\r\n\t\t\t$canonicalBackURL = isset($prev[0]) ? QOOB_DOMAIN.'blog/'.$prev[0][\"url\"] : '';\r\n\t\t\t\r\n\t\t\t$html[\"meta\"] = \"<link rel='index' title='\".QOOB_DOMAIN.\"blog' href='\".QOOB_DOMAIN.\"blog/' />\".PHP_EOL;\r\n\t\t\t$html[\"meta\"].= \"\t<link rel='canonical' href='$canonicalURL' />\".PHP_EOL;\r\n\t\t\t$html[\"meta\"].= \"\t<link rel='start' title='$canonicalStartTitle' href='$canonicalStartURL' />\".PHP_EOL;\r\n\t\t\tif($canonicalBackURL != '') {\r\n\t\t\t\t$html[\"meta\"].= \"\t<link rel='prev' title='$canonicalBackTitle' href='$canonicalBackURL' />\".PHP_EOL;\r\n\t\t\t}\r\n\t\t\tif($canonicalNextURL != '') {\r\n\t\t\t\t$html[\"meta\"].= \"\t<link rel='next' title='$canonicalNextTitle' href='$canonicalNextURL' />\".PHP_EOL;\r\n\t\t\t}\r\n\r\n\t\t\t$catlist = '';\r\n\t\t\tif(is_array($cats)) {\r\n\t\t\t\tfor ($x = 0; $x < count($cats); $x++) {\r\n\t\t\t\t\t$id = (int)$cats[$x][\"blog_cat_id\"];\r\n\t\t\t\t\tif($id != $cats[$x][\"blog_cat_id\"]) {\r\n\t\t\t\t\t\t$cat = $content->getCatByID($id);\r\n\t\t\t\t\t\t$catlist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.$cat[0][\"url\"].'/\" title=\"view all posts in: '.$cat[0][\"name\"].'\">'.$cat[0][\"name\"].'</a> / <a href=\"'.QOOB_DOMAIN.'blog/'.$cat[0][\"url\"].'/'.$cats[$x][\"url\"].'/\" title=\"view all posts in: '.$cats[$x][\"name\"].'\">'.$cats[$x][\"name\"].'</a>';\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$catlist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.$cats[$x][\"url\"].'/\" title=\"view all posts in: '.$cats[$x][\"name\"].'\">'.$cats[$x][\"name\"].'</a>';\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t\tif($x < count($cats)-1) {\r\n\t\t\t\t\t\t$catlist.= ', ';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$taglist = '';\r\n\t\t\tif(is_array($tags)) {\r\n\t\t\t\tfor ($x = 0; $x < count($tags); $x++) {\r\n\t\t\t\t\t$taglist.= '<a href=\"'.QOOB_DOMAIN.'blog/'.'tag/'.$tags[$x][\"url\"].'\" rel=\"tag\">'.$tags[$x][\"name\"].'</a>';\r\n\t\t\t\t\tif($x < count($tags)-1) {\r\n\t\t\t\t\t\t$taglist.= ', ';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$summary = strip_tags($posts[0][\"title\"].' : '.$posts[0][\"subtitle\"].'. posted in the categories: '.str_replace(' / ', ', ', $catlist).' and tagged: '.$taglist.'.');\r\n\r\n\t\t\t//---post meta\r\n\t\t\t$meta = array(\r\n\t\t\t\t\"day\" => date(\"d\", $posts[0][\"date\"]),\r\n\t\t\t\t\"month\" => date(\"M\", $posts[0][\"date\"]),\r\n\t\t\t\t\"year\" => date(\"Y\", $posts[0][\"date\"]),\r\n\t\t\t\t\"cats\" => ($catlist == '') ? $mainCat : $catlist,\r\n\t\t\t\t\"tags\" => $taglist,\r\n\t\t\t\t\"comments\" => $posts[0][\"comments\"],\r\n\t\t\t\t\"trackbacks\" => \"0\"\r\n\t\t\t);\r\n\t\t\t$metabox = $this->view(\"blog/post_meta\", $meta, true);\r\n\r\n\t\t\t//---post body\r\n\t\t\t$post = array(\r\n\t\t\t\t'mainCat' => $mainCat,\r\n\t\t\t\t'url' => 'blog/'.$posts[0][\"url\"],\r\n\t\t\t\t'title' => $posts[0][\"title\"],\r\n\t\t\t\t'subtitle' => $posts[0][\"subtitle\"],\r\n\t\t\t\t'content' => html_entity_decode($posts[0][\"content\"]).$metabox,\r\n\t\t\t\t'comments' => 0\r\n\t\t\t);\r\n\t\t\t$html[\"body\"] = $this->view(\"post\", $post, true);\r\n\r\n\t\t\t//---sidebar\r\n\t\t\t//meta\r\n\t\t\t$smeta = array(\r\n\t\t\t\t\"title\" => '<a href=\"'.QOOB_DOMAIN.'blog/'.$posts[0][\"url\"].'\">'.$posts[0][\"title\"].'</a>',\r\n\t\t\t\t\"date\" => strtolower(date(\"l F jS o\", $posts[0][\"date\"])).' at '.date(\"g:i a\", $posts[0][\"date\"]),\r\n\t\t\t\t\"cats\" => ($catlist == '') ? $mainCat : $catlist,\r\n\t\t\t\t\"tags\" => $taglist,\r\n\t\t\t\t\"comments\" => $posts[0][\"comments\"]\t\t\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_meta\", $smeta, true);\r\n\t\t\t//tag cloud\r\n\t\t\t$tags = $content->getTags();\r\n\t\t\t$this->library(qoob_types::utility, \"cloud\");\r\n\t\t\t$this->cloud->setMax(175);\r\n\t\t\t$this->cloud->setMin(80);\r\n\t\t\t$cloud = array(\r\n\t\t\t\t\"tags\" => $this->cloud->make($tags, QOOB_DOMAIN.'blog/tag/')\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_tags\", $cloud, true);\r\n\t\t\t//categories\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_categories\", array(), true);\r\n\t\t\t//qr code\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_qr\", array(), true);\r\n\t\t\t//feeds\r\n\t\t\t$feeds = array(\r\n\t\t\t\t\"showNewest\" => true,\r\n\t\t\t\t\"showCat\" => true,\r\n\t\t\t\t\"cat\" => $mainCat,\r\n\t\t\t\t\"showTag\" => false,\r\n\t\t\t\t\"tag\" => '',\r\n\t\t\t\t\"showComments\" => $posts[0][\"comments\"] == 0 ? false : true,\r\n\t\t\t\t\"post\" => $posts[0][\"url\"],\r\n\t\t\t);\r\n\t\t\t$html[\"sidebar\"].= $this->view(\"blog/sidebar_feeds\", $feeds, true);\r\n\r\n\t\t// --- display 404\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"invalid url\", statusCodes::HTTP_NOT_FOUND);\r\n\t\t}\t\t\r\n\t\t$this->view(\"pixelgraff\", $html);\r\n\t}", "title": "" } ]
e0d5714156ff7992d9bcba1a508e2682
Test throwing on function entry
[ { "docid": "4531e408b66aec43da1f44b89ad9d241", "score": "0.6372782", "text": "function main() {\n fb_setprofile('throwing_profiler');\n try { foo('bar'); } catch (Exception $x) { echo \"Caught\\n\"; }\n try { foo('baz'); } catch (Exception $x) { echo \"Caught\\n\"; }\n fb_setprofile(null);\n\n// Test throwing exceptions from surprise flags things (OOM, signals,\n// and req timeout all work this way).\n\n pcntl_signal(SIGUSR1, 'signal_thrower');\n\n try { func_entry(); } catch (Exception $x) { echo \"caught\\n\"; }\n try { func_backward(); } catch (Exception $x) { echo \"caught\\n\"; }\n}", "title": "" } ]
[ { "docid": "c905e910b037b13fd4550bef6060ce6d", "score": "0.72709656", "text": "public function testThrows(){\n trigger_error(\"oops\", E_USER_ERROR);\n }", "title": "" }, { "docid": "9a2fcc2f8eaee76e143cbd93cc7da228", "score": "0.7012286", "text": "function test_error()\n {\n }", "title": "" }, { "docid": "a3f9f1918473b2fe34db4c6011d244ab", "score": "0.69397783", "text": "public function testBrokenFunctionException()\n\t{\n\t\t$this->setExpectedException('RuntimeException');\n\t\t$callback = new OLPBlackbox_Rule_Callback('missing_function_1929847');\n\t\t$callback->__invoke();\n\t}", "title": "" }, { "docid": "a142b2bc4bae2e1e2f4c61547b891f50", "score": "0.68607706", "text": "public function testException()\n {\n }", "title": "" }, { "docid": "7d1ea4c426e4dc62a6809912077eecfa", "score": "0.68047357", "text": "public static function testError()\n {\n self::checkNonProductionEnvironment();\n\n fake_function();\n }", "title": "" }, { "docid": "9d709d4a9c12bb468ade24376e28d5de", "score": "0.6733391", "text": "public function functionWithException() {\r\n\r\n\t\t// Call the private function\r\n\t\t$this->_privateFunction();\r\n\r\n\t\t$this->test;\r\n\r\n\t\t// do something\r\n\t\tthrow new Exception('Exception');\r\n\t}", "title": "" }, { "docid": "8fe8a96340202e3e97b24700a828e7ec", "score": "0.66832656", "text": "public function testDoesntThrow(){\n trigger_error(\"oops\", E_USER_NOTICE);\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "9664ae226cc7d99278f9666ac1962e6f", "score": "0.66579735", "text": "public function throwIfViolated();", "title": "" }, { "docid": "60e5a7ffdb2a9a8f4421c1643ee60ad1", "score": "0.6648172", "text": "public function testOneOrFailThrowsException()\n\t{\n\t\tEntry::oneOrFail(0);\n\t}", "title": "" }, { "docid": "9e6f7a044473cb72e43d9eaf8256b5a3", "score": "0.65904856", "text": "function fnTestC()\n {\n fnThrow($GLOBALS, array ($GLOBALS)); // This is exception location.\n }", "title": "" }, { "docid": "32570f22a253e77b2fe1f8aa50be1fbd", "score": "0.65600145", "text": "public function testErrorHandlerIfNotCallable() {\n $this->setExpectedException('\\Slim\\Exception\\Stop');\n $s = new \\Slim\\Slim();\n $errCallback = 'foo';\n $s->error($errCallback);\n }", "title": "" }, { "docid": "c1e324ba081934fde71208e6d60e6515", "score": "0.6531724", "text": "function failure();", "title": "" }, { "docid": "48e5fa0670622d809c48f18e0b702191", "score": "0.6352941", "text": "function testFail() {\n\t}", "title": "" }, { "docid": "4f1a5025bc62ec3f482cd844ef9d416f", "score": "0.63125736", "text": "public function failed();", "title": "" }, { "docid": "68aa25f7c5e4d57dab423d5c47fb41d2", "score": "0.6271795", "text": "public function try();", "title": "" }, { "docid": "cce888f95235356dacf82994ce298222", "score": "0.62470746", "text": "function throw_error($code){}", "title": "" }, { "docid": "c92df54aeded5a7b4854f85a44db3ad4", "score": "0.62259483", "text": "public function testGetException()\n {\n $indexer = new FileIndexer();\n $exceptionRaised = false;\n\n try {\n $indexer->get('/some_path/is_wrong');\n } catch (Exception $exception) {\n $exceptionRaised = true;\n }\n $this->assertTrue($exceptionRaised);\n }", "title": "" }, { "docid": "60ede5b7418979d67e8dabc37efc4c72", "score": "0.6221451", "text": "function test_flight_throws(callable $callback, string $expectedException = '', string $message = '')\n{\n \\Cundd\\TestFlight\\Assert::throws($callback, $expectedException, $message);\n}", "title": "" }, { "docid": "b695efa58cbbc57db2d162a9c9575b4c", "score": "0.6204905", "text": "public function test_error()\n\t{\n $this->markTestIncomplete('to do');\n\t}", "title": "" }, { "docid": "f3cf479b1c8922f38fd9a1628fc56217", "score": "0.62029004", "text": "public function testException() {\n\n $this->setExpectedException($this->klade->addEntry(''));\n }", "title": "" }, { "docid": "68786c33bacd1c072ef5e79af378d469", "score": "0.6185178", "text": "public function doesNotThrowException()\n {\n try {\n $this->data[0]();\n } catch (Exception $exception) {\n throw new DidNotMatchException(\n \"Expected exception not to be thrown.\"\n );\n }\n }", "title": "" }, { "docid": "fb4ff733b83b4ea6500ecd9e49961d5a", "score": "0.6171559", "text": "public function should_throw_if_trying_to_define_a_function_not_defined_by_the_library() {\n\t\teval('function foobar(){};');\n\n\t\t$this->expectException(RuntimeException::class);\n\n\t\tdefine('foobar', function () {\n\t\t\treturn 2389;\n\t\t});\n\t}", "title": "" }, { "docid": "aa6f18ad549a50c6d85a38e92e6821ec", "score": "0.61483", "text": "public function whenDoFail(\n $param\n ) {\n //IMPLEMENT HERE BY OVERRIDING, YOUR CLOSURE TO RUN WHEN FAIL\n }", "title": "" }, { "docid": "44570424e81ca24badf3a5eeecc9c6db", "score": "0.6105649", "text": "public function testNotFoundHandlerIfNotCallable() {\n $this->setExpectedException('\\Slim\\Exception\\Stop');\n $s = new \\Slim\\Slim();\n $notFoundCallback = 'foo';\n $s->notFound($notFoundCallback);\n }", "title": "" }, { "docid": "8d00cb417283918332f604b75eb3a5c2", "score": "0.6093213", "text": "public function triggerException() {\n define('SIMPLETEST_COLLECT_ERRORS', FALSE);\n throw new \\Exception(\"Drupal & awesome\");\n }", "title": "" }, { "docid": "0cd6404a8de0b937b42eab8cd1c2d767", "score": "0.6068693", "text": "public function testInvokeThrowsExceptionIfXIsNotANumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n (new Calculate(new PiecewiseFx([])))('foo');\n \n return;\n }", "title": "" }, { "docid": "88c656e79a9b22f10cf0a1841736b895", "score": "0.60683835", "text": "public function getExpectedException();", "title": "" }, { "docid": "f81228ece100d2e02c1c837cc8b4a8f2", "score": "0.6041614", "text": "public function test_emergency()\n\t{\n $this->markTestIncomplete('to do');\n\t}", "title": "" }, { "docid": "37b6498015173f9c1472324fec3289d6", "score": "0.6027129", "text": "public function testAddException()\n {\n $indexer = new FileIndexer();\n $exceptionRaised = false;\n\n try {\n $indexer->add(new SplFileInfo('/some_path/is_wrong'));\n } catch (Exception $exception) {\n $exceptionRaised = true;\n }\n $this->assertTrue($exceptionRaised);\n }", "title": "" }, { "docid": "6c9525a3a4f5ec8f03eb568b733fd854", "score": "0.6022845", "text": "public function isThrowException(): bool;", "title": "" }, { "docid": "6fb25e9844a7bd45321d8a762a556a00", "score": "0.5988137", "text": "public function testApiCallException() {\n\t\t$this->expectException(InvalidArgumentException::class);\n\t\t$this->api->ApiCall('invalid_variable');\n\t}", "title": "" }, { "docid": "83e6e8699110a3dd52a4200c7e5a079d", "score": "0.5968514", "text": "public function testTry() {\n\t\t$x = $this->gp->try_foo();\n\n\t\t$this->assertFalse( $x );\n\t\t$this->assertEquals( 'FAILED', $this->gp->getStatus() );\n }", "title": "" }, { "docid": "f41f6a3593a09c6befc904fcd81b6b55", "score": "0.5967081", "text": "public function areExceptionsCaught() : bool;", "title": "" }, { "docid": "719cd850735ce9100f6f22ba381dca5b", "score": "0.5955094", "text": "function DieOnError()\t{ return true; \t}", "title": "" }, { "docid": "984cd5f330e46cd2d70a3f5ac19941ca", "score": "0.594915", "text": "public function getTestException ()\n {\n $throw = function ( $arg1, $arg2 ) {\n return new \\r8\\Exception\\Argument(0, \"test\", \"blah\", 505);\n };\n return $throw(\"arg value\", \"other arg\");\n }", "title": "" }, { "docid": "101b968b4b83e7cf8052bb5b08658a17", "score": "0.5942433", "text": "public function testStep()\n {\n throw new PendingException();\n }", "title": "" }, { "docid": "c81f69b1468a2754ccd6e018c320f9ab", "score": "0.5914824", "text": "function exception_handler($exception = NULL){\n\t$backtrace = debug_backtrace();\n\tuncaught_error_handler(E_ERROR, $exception->getMessage(), $backtrace[0]['args'][2], $backtrace[0]['args'][3]);\n\texit;\n \n}", "title": "" }, { "docid": "86101f6c46ebb4e61d6e8ce8fb351ed5", "score": "0.58961165", "text": "public function testRollbackOnSeriousException()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "2ed16acf636246bae7acb177f44ff780", "score": "0.5879461", "text": "public function testHandleExpectedException()\n\t{\n\t\t$exception = new Test_RPC_Server_XMLRPC_ExcpectedException(\"Couldn't do it\", 100);\n\t\t$this->object->expects($this->any())->method('test')->with()->will($this->throwException($exception));\n\t\t\n\t\ttry {\n\t\t\t$this->RPC_Server_XMLRPC->handle(xmlrpc_encode_request('test', array()));\n\t\t} catch (Exception $e) {\n\t\t\t$this->fail(\"Exception was not caught\");\n\t\t}\n\n\t\t$this->assertEquals(array(\"faultCode\"=>100, \"faultString\"=>\"Couldn't do it\"), xmlrpc_decode($GLOBALS['__output']));\n\t}", "title": "" }, { "docid": "360fdc8aa711ca252a4006e28bce9a25", "score": "0.5876", "text": "public function testGetInvalid()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "c2e10d2cfd7fe9d0ec44b3100b4cc6b9", "score": "0.58653474", "text": "public function testInvalidArgumentException()\n {\n new CallbackWrapper('not a callable function');\n }", "title": "" }, { "docid": "1c123cb57c6253859c3d057deb823db9", "score": "0.58538276", "text": "public function testValidateTriggerThrowsInvalidArgumentException()\n {\n $this->setExpectedException(\"\\\\InvalidArgumentException\");\n $this->getMockCommand(\"this should fail!\");\n }", "title": "" }, { "docid": "c18c6cfef2de0e6a71151bffa032bce3", "score": "0.584739", "text": "public function doesNotThrow()\n {\n try {\n $this->data[0]();\n } catch (Exception $exception) {\n if ($this->isKindOfClass($exception, $this->data[1])) {\n $exceptionClass = get_class($exception);\n throw new DidNotMatchException(\n \"Expected {$this->data[1]} not to be thrown, \" .\n \"but $exceptionClass was thrown.\"\n );\n }\n }\n }", "title": "" }, { "docid": "87bf85422619699225391888303ce102", "score": "0.58470356", "text": "function fail() {\n echo 0;\n exit();\n}", "title": "" }, { "docid": "17681a5dbe87e7d7b34cae83146c9d6d", "score": "0.5846337", "text": "public function testInvalidEntry()\n {\n $this->setExpectedException(\"\\Liip\\RMT\\Config\\Exception\");\n Config::create(array('unknown' => 'key'));\n }", "title": "" }, { "docid": "c1ad161b379d19b5ecb53ffc633c56fa", "score": "0.5843239", "text": "public function testValidationCaseFromOverflowAtInteger()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getInt($randomness->getMinNumber() - 10.0, 0);\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getInt($randomness->getMinNumber() - 10.0, 0);\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "135b1a00028e2534cbffd232f2ee9a42", "score": "0.58427477", "text": "public function testValidationCaseForInvalidInputDataUsedForHashing()\n {\n $hasher = $this->getHashAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $hasher->hashData(['wrong']);\n } else {\n $hasThrown = null;\n\n try {\n $hasher->hashData(['wrong']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "269efda679eeb877b967f92a377627cb", "score": "0.58283937", "text": "public function isFailure(): bool;", "title": "" }, { "docid": "b8e59dce3bb972e03e51f68e98c17d30", "score": "0.58270574", "text": "function test_exception($var = NULL){\r\n if(is_null($var)){\r\n throw new \\Exception('My exception test');\r\n }\r\n}", "title": "" }, { "docid": "fb81ecfca74f0d34919e65b145bb9b23", "score": "0.5822772", "text": "public function testValidationCaseForInvalidSaltingModeUsedForHashing()\n {\n $hasher = $this->getHashAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $hasher->setSaltingMode(100000);\n } else {\n $hasThrown = null;\n\n try {\n $hasher->setSaltingMode(100000);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "c727ca380798ab623e6e7ac5ed792793", "score": "0.5817501", "text": "public function testBrokenMethodException()\n\t{\n\t\t$this->setExpectedException('RuntimeException');\n\t\t$callback = new OLPBlackbox_Rule_Callback('missing_function', array(), new stdClass());\n\t\t$callback->__invoke();\n\t}", "title": "" }, { "docid": "c2f3ed6fe4abca196cb3fc4021361682", "score": "0.5814438", "text": "public function theExitCodeShouldBeNonZero()\n {\n if ($this->getReturnCode() == 0) {\n throw new \\Exception('Return code was 0');\n }\n }", "title": "" }, { "docid": "047101780f57f143e7754bb8308bf3d7", "score": "0.58143973", "text": "public function testErrorOnNonexistentKey(): void\n {\n $key = 'nonexistent_key';\n $this->expectException(PHPUnitException::class);\n $this->expectExceptionCode(E_USER_WARNING);\n $this->expectExceptionMessage(sprintf(\"Nonexistent key '%s'\", $key));\n $this->registry->get($key, null, E_USER_WARNING);\n }", "title": "" }, { "docid": "2530ddc756439da11340380457036e3c", "score": "0.581079", "text": "public function testRunWithoutElse()\n {\n try\n {\n self::$builder->table('authors')\n ->run();\n } catch (QueryBuilderException $exception)\n {\n return;\n }\n\n $this->fail(\n 'An expected exception has not been raised.'\n );\n }", "title": "" }, { "docid": "c45ed2fad629184fdc94f509b00743cd", "score": "0.5802797", "text": "public function testExceptionOnInvalidKey(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage(\"Invalid key passed\");\n $this->registry->get([]);\n }", "title": "" }, { "docid": "73610b4189e4a5964670e2b22e65c1f1", "score": "0.5798464", "text": "public function testExceptionOnNonexistentKey(): void\n {\n $key = 'nonexistent_key';\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage(sprintf(\"Nonexistent key '%s'\", $key));\n $this->registry->get($key);\n }", "title": "" }, { "docid": "39a1f8faf0dcedcd8b9fd59a6ef54bfe", "score": "0.57902706", "text": "function onFail(\\Exception $exception)\n {\n }", "title": "" }, { "docid": "6ea44aba1aeb0af0a636cbe712e4cc84", "score": "0.5780733", "text": "function testNonExistentPostal()\n {\n try{\n Postal::getLatLong('0005SS');\n // No exception was thrown\n $this->assertTrue(false);\n }\n catch (NotFoundException $e)\n {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "257c1a3c2b01eb1b36570ee104869c1a", "score": "0.5779404", "text": "public function shouldFailInTest() {\n return false;\n }", "title": "" }, { "docid": "cacd2e6edc2f3499c7886c34cf306924", "score": "0.5769171", "text": "function pn_assert_callback_function ($file, $line, $assert_trigger)\n {\n return pn_exit (__('Assertion failed'));\n }", "title": "" }, { "docid": "9f1664113e868f5b18da262f1016ae8c", "score": "0.57678795", "text": "public function testEarlyReturn(): void\n {\n $this->assertNoSniffErrorInFile(\n $this->checkFile($this->getFixtureFilePath('NoFollowingStatement.php')),\n );\n }", "title": "" }, { "docid": "7947b2f37672ef59dea0d3cf37302682", "score": "0.5761675", "text": "public function testHookInvalidCallable() {\n Slim::init();\n $callable = 'test'; //NOT callable\n Slim::hook('test.hook.one', $callable);\n $this->assertEquals(array(array()), Slim::getHooks('test.hook.one'));\n }", "title": "" }, { "docid": "d36bbf967d63b2549ca8340b309ede1b", "score": "0.5759802", "text": "public function testValidationCaseFromOverflowAtFloat()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getFloat(-9.23E+18, 0.0, 14);\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getFloat(-9.23E+18, 0.0, 14);\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "9492506c56a51d2c0bccc984b6f58aa8", "score": "0.5758541", "text": "public function testValidationCaseForWrongParametersAtInteger()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getInt('test', 'qko');\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getInt('test', 'qko');\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "e43d5f287c48b9afb3d3be4879199574", "score": "0.57490706", "text": "public function didFail();", "title": "" }, { "docid": "e1929a62fadd8c985d9dbc926ca583e4", "score": "0.57475996", "text": "public function failure() {\n // intended to be run only upon failure.\n return;\n }", "title": "" }, { "docid": "9d6fe4848566b7f32b109b79462e430b", "score": "0.57377785", "text": "public function testValidationCaseForWrongParametersAtFloat()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getFloat('not numeric', 'test me');\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getFloat('not numeric', 'test me');\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "28acce7b963ac7e0a80eda294ff162a5", "score": "0.57296044", "text": "function testInvalidPostal()\n {\n try{\n Postal::getLatLong('DDDD33');\n // No exception was thrown\n $this->assertTrue(false);\n }\n catch (\\InvalidArgumentException $e)\n {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "f5ce0f585c70190364ae2963f7828934", "score": "0.57246906", "text": "public function testIndexException()\n {\n $indexer = new FileIndexer();\n $exceptionRaised = false;\n\n try {\n $indexer->index([\n __DIR__.'/assets'\n ]);\n } catch (Exception $exception) {\n $exceptionRaised = true;\n }\n $this->assertTrue($exceptionRaised);\n }", "title": "" }, { "docid": "bc304a12e30119db41b289ea5cd4d288", "score": "0.5722239", "text": "public function testValidationCaseToOverflowAtFloat()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getFloat(0.0, 9.23E+18, 14);\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getFloat(0.0, 9.23E+18, 14);\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "e373f49f044aeebf295e38562001276b", "score": "0.57195675", "text": "public function testValidationCaseToOverflowAtInteger()\n {\n $randomness = $this->getRandomnessSourceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\DomainException::class);\n\n $randomness->getInt(0, $randomness->getMaxNumber() + 10.0);\n } else {\n $hasThrown = null;\n\n try {\n $randomness->getInt(0, $randomness->getMaxNumber() + 10.0);\n } catch (\\DomainException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "9543d73fbf229184a711ce611a59695d", "score": "0.57124156", "text": "public function testFunctionMockFailsExpectation()\n {\n try {\n $time = $this->getFunctionMock(__NAMESPACE__, \"time\");\n $time->expects($this->once());\n\n $time->__phpunit_verify();\n $this->fail(\"Expectation should fail\");\n \n } catch (\\PHPUnit_Framework_ExpectationFailedException $e) {\n time(); // satisfy the expectation\n\n }\n }", "title": "" }, { "docid": "3662e2d6718a48da0ec3d47f8a275794", "score": "0.5711143", "text": "public function testCallingUndefinedMacrosThrowsException()\n {\n with(new Decorator())->foobar();\n }", "title": "" }, { "docid": "750a58df4aa8951917a50726bb9a4e1a", "score": "0.56958616", "text": "public function testValidationCaseForInvalidDerivationSaltUsedForHashing()\n {\n $hasher = $this->getHashAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $hasher->setDerivationSalt(['none']);\n } else {\n $hasThrown = null;\n\n try {\n $hasher->setDerivationSalt(['none']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "0b78a5e69d2d692a2bc24125a94de208", "score": "0.5695739", "text": "protected function _test_call($func, $args) {\n $this->log();\n try {\n return $this->$func(...$args);\n } catch (\\Exception $exc) {\n return $exc;\n }\n }", "title": "" }, { "docid": "55b16dcc4a9a6a0f2a01d73d31d667d6", "score": "0.56942433", "text": "public function testValidationCaseForInvalidSaltUsedForHashing()\n {\n $hasher = $this->getHashAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectException(\\InvalidArgumentException::class);\n\n $hasher->setSalt(['none']);\n } else {\n $hasThrown = null;\n\n try {\n $hasher->setSalt(['none']);\n } catch (\\InvalidArgumentException $exception) {\n $hasThrown = !empty($exception->getMessage());\n } catch (\\Exception $exception) {\n $hasThrown = $exception->getMessage();\n }\n\n $this->assertTrue($hasThrown);\n\n return;\n }\n }", "title": "" }, { "docid": "ba2ea42becf4ecdb6aa0840a9e89107a", "score": "0.5688479", "text": "public function testException()\n {\n $guess = new Guess();\n\n try {\n $guess->makeGuess(-1);\n $this->assertTrue(false);\n\n } catch (GuessException $e) {\n $this->assertTrue(true);\n }\n\n }", "title": "" }, { "docid": "68666ecdf232e02f9b3a354512f80ab4", "score": "0.56835693", "text": "public function checkAndThrow()\n {\n\n if (!(!is_null($this->load) && $this->load instanceof \\stdClass)){\n die (\"Wrong payload data loaded to the object.\");\n }\n\n }", "title": "" }, { "docid": "d968d47387c91e6a4a2e1f48ec11a80e", "score": "0.568079", "text": "public function throwsException()\n {\n try {\n $this->data[0]();\n } catch (Exception $exception) {\n return true;\n }\n throw new DidNotMatchException(\"Expected exception to be thrown.\");\n }", "title": "" }, { "docid": "6baded1a680dd6cc43e82c4580929cb2", "score": "0.56671417", "text": "public function testThrowException()\n {\n throw new ImageTooBigException();\n }", "title": "" }, { "docid": "d19f0f702059c42d906f5ad4de2f2504", "score": "0.56650114", "text": "private function assertCallable(): void\n\t{\n\t\tif (!is_callable([$this->controller, $this->action])) {\n\t\t\tthrow new HttpException(\n\t\t\t\t404,\n\t\t\t\t\"Action '{$this->action}' cannot be called in the controller {$this->controllerClass}\"\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "f7c80a4c568b2fb2de7287aed4028382", "score": "0.5663654", "text": "function testException($msg, $code)\n{\n global $error_count, $test_count, $failure_messages;\n\n $test_count += 1;\n try {\n eval($code);\n echo \"FAILED Exception Test: $msg\\n\";\n $error_count += 1;\n $failure_messages[] = $msg;\n return FALSE;\n } catch (Exception $e) {\n echo \"PASSED Exception Test: $msg\\n\";\n return TRUE;\n }\n}", "title": "" }, { "docid": "7df18207d71f17b0d9b1255038322760", "score": "0.56614643", "text": "public function testCheckMethodUsingMockOneThrowsException()\n\t{\n\t\t$this->stub->check('guest', 'view foo');\n\t}", "title": "" }, { "docid": "38f5dd608d40442724cdd151b857bcf6", "score": "0.56588864", "text": "public function testUnhandledExceptionalRun()\n {\n $ioController = new DummyController();\n $callable = function () {\n throw new AllureExecutableNotFoundException;\n };\n $process = $this->createPreparedProcessMock($callable);\n $runFactory = new RunFactory(\n $this->createProcessFactoryMock($process),\n new OutputBridgeFactory(new OutputFormatter, $ioController),\n new PhpApi\n );\n $fileLocator = $this->createFileLocatorMock(true, true);\n $configuration = $this->createConfiguration();\n $configuration->setThrowOnMissingExecutable(true);\n $phpFilesystemApi = $this->createPhpFilesystemApiMock(array('allure'));\n $services = array(\n 'php_filesystem_api' => $phpFilesystemApi,\n 'run_factory' => $runFactory,\n 'io_controller' => $ioController,\n 'file_locator' => $fileLocator,\n );\n $container = $this->createContainer($configuration, $services);\n $runner = new Runner($configuration, $ioController, $container);\n $message = 'End of run preparations, starting run, exception in 3... ' .\n '2... 1...';\n $this->debug($message);\n $runner->run();\n $this->debug('End of run. You haven\\'t seen my exception, have you?');\n }", "title": "" }, { "docid": "08e973fbacc61a3ce0c9e4d42ae522c3", "score": "0.56570846", "text": "function error()\n{\n\n}", "title": "" }, { "docid": "07992f56c00c757d088c069ae2a78f40", "score": "0.56551963", "text": "function exceptionCheck (&$token, &$context_name) {\n \tif ('throws' == $token) {\n \t$this->_state = 'throws';\n } elseif ('throws' == $this->_state && $this->_isBase($context_name, -5)) {\n \t$context_name .= '/exception';\n $this->_exceptionNames[] = $token;\n } elseif ('throws' == $this->_state && $token == '{') {\n \t$this->_state = '';\n }\n }", "title": "" }, { "docid": "4adb226a39aac875bd8ff06d2fc44127", "score": "0.56519943", "text": "function test_error_handler($code=0, $message=\"\", $file=\"\", $line=-1) {\n if ( error_reporting() & $code ) {\n die(\"$message in $file at line $line\\n\");\n }\n}", "title": "" }, { "docid": "a047685eb8b62f67736c381c46562bc8", "score": "0.56512463", "text": "public function isExceptionCaught(): bool;", "title": "" }, { "docid": "eeee1c7219ccf5e5cb51a464f4764b4d", "score": "0.5650105", "text": "public function testInvokeWithoutAddExtraInformationIntoRecords(): void\n {\n $records = ['extra' => []];\n\n $processor = new ExceptionProcessor();\n $records = $processor($records);\n\n $this->assertArrayNotHasKey('stacktrace', $records['extra']);\n }", "title": "" }, { "docid": "174c74091189719885436c7d2e63b5dd", "score": "0.5641014", "text": "function errorempty() {\n \n }", "title": "" }, { "docid": "07a3b24cf254511b83569a832d79821e", "score": "0.5640019", "text": "public function should_throw_if_unlink_operation_throws()\n {\n $dest = '/foo' . DIRECTORY_SEPARATOR . basename(codecept_root_dir());\n $this->config = ['mode' => 'plugin', 'destination' => ['foo' => '/foo']];\n $this->event->getSettings()->willReturn([]);\n $this->filesystem->is_dir('/foo')->willReturn(true);\n $this->filesystem->is_writeable('/foo')->willReturn(true);\n $this->filesystem->file_exists($dest)->willReturn(true);\n $this->filesystem->unlink($dest)->will(function () {\n throw new \\Exception('Something happened');\n });\n\n $sut = $this->make_instance();\n $sut->setOutput(new BufferedOutput());\n\n $sut->unlink($this->event->reveal());\n }", "title": "" }, { "docid": "ef778d3bcfbaf7db3166ed5f8301ea2d", "score": "0.5637311", "text": "public function testUnknownFunction()\n {\n $this->smarty->enableSecurity();\n try {\n $this->smarty->fetch('eval:{unknown()}');\n } catch (Exception $e) {\n $this->assertContains(\"PHP function 'unknown' not allowed by security setting\", $e->getMessage());\n\n return;\n }\n $this->fail('Exception for unknown function has not been raised.');\n }", "title": "" }, { "docid": "98ecf89a2a9339995450a44be6c94ce9", "score": "0.563426", "text": "abstract protected function checkForErrors();", "title": "" }, { "docid": "02bd92fa6c6a708fa28281754d18dc9c", "score": "0.5628448", "text": "public function isFailureState(\\Exception $e);", "title": "" }, { "docid": "12c2d48c8f8a4a627ccf9d450ada87be", "score": "0.5622768", "text": "public function fails(): bool;", "title": "" }, { "docid": "12c2d48c8f8a4a627ccf9d450ada87be", "score": "0.5622768", "text": "public function fails(): bool;", "title": "" }, { "docid": "12c2d48c8f8a4a627ccf9d450ada87be", "score": "0.5622768", "text": "public function fails(): bool;", "title": "" }, { "docid": "0f004b79aa945fcc0011235c70379267", "score": "0.56224984", "text": "public function testGetDeadLetterJobStacktrace()\n {\n }", "title": "" }, { "docid": "ea87dc17dcfb903083eb3fe71c942d62", "score": "0.5622088", "text": "function my_assert_handler ($file, $line, $code) {\n echo \"<hr>Assertion Failed:\n File '$file'<br>\n Line '$line'<br>\n Code '$code'<br><hr>\";\n}", "title": "" }, { "docid": "7da375d13e6e314cd5df79ffd5583e52", "score": "0.5619159", "text": "public function testFailEvents()\n {\n $events = new \\Arch\\Registry\\Events();\n $events->addEvent('', function() {});\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f926d67103b49c3b708938347c012581", "score": "0.7038754", "text": "public function updateResource($resourceId, $record);", "title": "" }, { "docid": "de2d52f9def3aad6f8d87d580d39c262", "score": "0.6888798", "text": "public function update() {\n\t\t$this->storage->updateStorage();\n\t}", "title": "" }, { "docid": "24dae383ef96f6cd3c2ae0eb901b0e6e", "score": "0.6533836", "text": "public function update_storage()\n {\n }", "title": "" }, { "docid": "4036e5a75462edf3f0d824f080ae7c19", "score": "0.6514445", "text": "public function update(StorageRequest $request, Storage $storage)\n {\n $campos = $request->validated();\n\n $storage = $this->storageRepository->update($campos, $storage);\n\n return $this->showOne(new StorageResource($storage), 200);\n }", "title": "" }, { "docid": "4a53e7dd3c2aa1884a6b78cfa1931df7", "score": "0.6363001", "text": "public function updateFromResource(\n $resourceResource,\n $exerciseResource\n );", "title": "" }, { "docid": "a37451d53b2edd450cd43846406cd904", "score": "0.6323939", "text": "public function updated(Resource $resource)\n {\n $this->deleteCacheDepartments();\n }", "title": "" }, { "docid": "1d3b0af7b4ec814b473b06c1a2a208fd", "score": "0.613845", "text": "public function update(UpdateRequest $request, Resource $resource)\n {\n $resource->update($request->only('name', 'type','resource_starts','resource_ends','exclude_weekends'));\n\n return redirect(route('resources.show', $resource->id))->withSuccess('Updated successfully!');\n }", "title": "" }, { "docid": "4e3b6ab51e63f6ffae63a329de90b240", "score": "0.6119389", "text": "abstract public function updateResource($resource, ResourceNode $node, Workspace $workspace, User $user, SyncInfo $wsInfo, $path, $syncDate);", "title": "" }, { "docid": "4f4808380f22218aaf7fbea02c9916cb", "score": "0.6091119", "text": "public function update(Request $request, $resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n $this->validate($request, [\n 'title' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'slug' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'model' => 'required|unique:laramanager_resources,title,' . $resourceId . '|max:255',\n 'namespace' => 'required|max:255',\n 'order_column' => 'required|integer',\n 'order_direction' => 'required|in:asc,desc'\n ]);\n\n $resource->update($request->all());\n\n return redirect()->back()->with('success', 'Resource updated');\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "109ed515c823d7a78d782a8290a576d2", "score": "0.5969382", "text": "public function update($resourceId)\n {\n $exception = new Exception(\"CRUD0103\", __METHOD__);\n $exception->setHttpStatus(\"501\", \"Not yet implemented\");\n throw $exception;\n }", "title": "" }, { "docid": "74defa123e70820a991135800b36505a", "score": "0.5949209", "text": "static public function update () {\n\n $METHOD = Request::getMethod();\n $PATH = Request::getPath();\n\n Log::debug('--- Matched / with PUT method ---');\n\n $DATA = new EditableJSON(REST_DATA_FILE);\n\n $DATA->setValue(Request::getInput());\n\n Log::info(\"$METHOD $PATH: Changed resource completely\");\n\n return $DATA;\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "aa3074b4db1abeb89a38b5e15dee9e7c", "score": "0.5897436", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\treturn $this->upload($path, $resource, $config);\r\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac66e1d66c388debefca8f97ea91a2b7", "score": "0.5842868", "text": "public function putUpdate()\n {\n $this->postUpdate();\n }", "title": "" }, { "docid": "f9e2fce00b6006820375e4adc0b03778", "score": "0.5839037", "text": "public function update($id, Request $request)\n {\n //\n $this->validate($request, ['storage_type' => 'required|in:Local HDD,Network HDD,Local SSD,Network SSD']);\n\n $st = StorageType::findOrFail($id);\n $st->storage_type = $request->storage_type;\n\n return redirect()->route('storagetypes.index');\n }", "title": "" }, { "docid": "58d5142b37ce0114e53d3fe56c2f6c03", "score": "0.5809738", "text": "protected function storeVersion(PuliResource $resource)\n {\n if (null !== $this->changeStream) {\n $this->changeStream->append($resource);\n }\n }", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "9515a7f9c7d4d49fd0e91b13594a00d6", "score": "0.5671085", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'question'=>'required',\n 'description'=>'required',\n \n ]);\n $frequently=Frequently::where('id',$id)->first();\n $old_image=$request->old_image;\n $path=$old_image;\n if($request->hasFile('thumbnail')){\n if($path!=null&&file_exists(\"/storage/$path\")){\n unlink('storage/'.$path);\n }\n $path=$request->file('thumbnail')->store('Frequentlys');\n }\n $frequently->question=$request->question;\n $frequently->description=$request->description;\n $frequently->photo=$path;\n $frequently->save();\n return redirect()->route('listFrequently');\n }", "title": "" }, { "docid": "9ddd9520efc51e699e82bfa708a3c5e5", "score": "0.56641686", "text": "public function update($path, $cachedData);", "title": "" }, { "docid": "b3535d5367a1c20a3d356e026d81c210", "score": "0.56451815", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n if($request->hasFile('avatar')){\n $imagen = $request->file('avatar')->store('public');\n $resultado = str_replace(\"public\", \"storage\", $imagen);\n $product->imagen = $resultado;\n }\n $product->nombre = $request->get('nombre');\n $product->codigoBarra = $request->codigoBarra;\n $product->cantidad = $request->cantidad ;\n $product->categoria = $request->categoria ;\n $product->descripcion = $request->descripcion ;\n $product->costo = $request->costo ;\n $product->precio = $request->precio;\n $product->save();\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "3538e1075fd6fc7f2d59249215667663", "score": "0.5642799", "text": "public function update(Request $request, $id)\n {\n $id = $request->input('Id');\n $editPoll = $this->bucket->get(\"poll::\" . $id)->value;\n if (!(is_object($editPoll))) {\n $editPoll = json_decode($editPoll);\n }\n $created_at = $request->input('CreatedAt');\n $question = $request->input('Question');\n $status = $request->input('Status');\n $tags = $request->input('Tags');\n $tags_new = explode(\",\", $tags);\n $options = $editPoll->options;\n\n if ($file = $request->file('ImageName')) {\n unlink(\"imgs/\" . $request->input('PreviousImage'));\n $member_image = $file->getClientOriginalName();\n $file->move('imgs', $member_image);\n } else {\n $member_image = $request->input('PreviousImage');\n }\n\n $this->bucket->replace(\"poll::\" . $id, ['Id' => $id, 'created_at' => $created_at, 'options' => $options,\n 'question' => $question, \"status\" => $status, \"tags\" => $tags_new, 'ImageName' => $member_image]);\n return redirect(\"polls\");\n }", "title": "" }, { "docid": "e5e1cb25ba53fcc2b79ddb3fe3b7304a", "score": "0.56392527", "text": "public function update($object)\n {\n $this->persistenceManager->update($object);\n }", "title": "" }, { "docid": "9d32dd86baa4f1169783965d8d08b640", "score": "0.56374604", "text": "public function testResourcesCanBeUpdated()\n {\n $admin = factory(User::class)->states('admin')->create();\n $resource = factory(Resource::class)->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "e4d9cc7693ad36b031389e0564fbaf8b", "score": "0.5624323", "text": "public function update(StoreEditEngagement $request, $id)\n {\n $engagement = Engagement::find($id);\n\n $engagement->titre = $request->titre;\n $engagement->contenu = $request->contenu;\n \n if ($request->image != null)\n {\n Storage::disk('imgEngagement')->delete($engagement->image);\n \n \n $image = [\n \"name\" => $request->image,\n \"disk\" => \"imgEngagement\",\n \"w\" => 1000,\n \"h\" => 1000\n ];\n \n $engagement->image = $this->imageResize->imageStore($image);\n }\n $engagement->save();\n return redirect()->route('engagements.index',['engagement'=> $engagement->id]);\n }", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.56211615", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "02b2a8f5c6ceb76c08e4a6597e2c8da0", "score": "0.5618807", "text": "public function updateProduct(): void\n {\n $product = $this->fetchProduct($this->product->product_name, $this->product->product_nr);\n if (!$product) {\n $this->product->last_scan = now();\n $this->product->save();\n\n return;\n }\n\n $this->product->product_url = $product['details']['url'];\n $this->product->stock_status = $product['details']['stock'];\n $this->product->last_scan = now();\n\n $inStock = $this->store->productHasStock($product['node']);\n if ($inStock) {\n $this->product->notifyInStock();\n $this->product->found = 1;\n }\n\n $this->product->save();\n }", "title": "" }, { "docid": "1c49f93e51c7bc32222ecde454e3f4ab", "score": "0.56150794", "text": "public function update(Request $request, $id)\n {\n $item = Item::findOrFail($id);\n\n $request->validate([\n 'description' => 'required|string',\n 'name' => 'required|string',\n 'price' => 'required|numeric',\n 'type' => 'required', Rule::in(['drink', 'dish']),\n ]);\n\n if($request->file('file')){\n $request->validate([\n 'file' => 'image'\n ]);\n if($item->photo_url != null){\n Storage::delete('public/items/'.$item->photo_url);\n }\n $item->photo_url = basename($request->file('file')->store('public/items'));\n }\n\n \n $item->description = $request['description'];\n $item->name = $request['name'];\n $item->price = $request['price'];\n $item->type = $request['type'];\n $item->save();\n return new ItemResource($item);\n }", "title": "" }, { "docid": "b6ca8c191b9b71b8ef7393647dcd5cd6", "score": "0.5610084", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if (!$product) return response()->json(['message' => 'Product not found.'], 404);\n\n $validator = Validator::make($request->all(), [\n 'name' => 'min:3|max:100',\n 'description' => 'min:5',\n 'price' => 'integer',\n 'quantity' => 'integer',\n 'image' => 'image|mimes:jpg,jpeg,svg,png'\n ]);\n\n $newPath = \"\";\n if ($request->hasFile('image')) {\n Storage::delete('products/' . $product->image);\n $newPath = $request->file('image')->store('public/products');\n }\n\n if ($validator->fails()) {\n return response()->json($validator->errors(), 422);\n }\n\n $product->name = $request->get('name', $product->name);\n $product->description = $request->get('description', $product->description);\n $product->price = $request->get('price', $product->price);\n $product->quantity = $request->get('quantity', $product->quantity);\n $product->image = $request->get($newPath, $product->image);\n\n $product->save();\n return new ProductResource($product);\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "111aff7dc652d737e04484d721049c98", "score": "0.5595379", "text": "public function setResource($resource) { $this->resource = $resource; }", "title": "" }, { "docid": "751d0245849a838786b28b82bde8a4c7", "score": "0.5594406", "text": "public function updateStream($path, $resource, Config $config) {\n echo \"updateStream\";exit;\n }", "title": "" }, { "docid": "2ce24d19906aa703a63656bcd981224d", "score": "0.5592051", "text": "public function update(Request $request, $id)\n {\n $article=Article::findOrFail($id);\n $article->stock=$request->input('stock');\n if($article->save()) {\n return new ArticleResource($article);\n }\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5582592", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "23b36aabfd1baef1df2a84b64db8a004", "score": "0.5563429", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n\n //validation\n $request->validate($this->Validation());\n\n $product = Product::find($id);\n\n $data['slug'] = Str::slug($data['name'], '-');\n\n if (!empty($data['image'])) {\n // RIMUOVERE VECCHIA IMG\n if (!empty($product->image)) {\n Storage::disk('public')->delete($product->image);\n }\n $data['image'] = Storage::disk('public')->put('images', $data['image']);\n }\n\n $updated = $product->update($data);\n\n if($updated){\n return redirect()->route('products.show', $product->slug);\n } else {\n return redirect()->route('homepage');\n } \n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "04c0feb8d31bb9e3b0c25e72f6a0c700", "score": "0.55594426", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path, $resource, $config);\n }", "title": "" }, { "docid": "29033c29e8cd8e769333ca2adef8fc91", "score": "0.5559027", "text": "public function update(Request $request, $id)\n {\n $single=Slider_image::findorfail($id);\n $image = $single->image;\n\n if ($request->file() != null){\n\n Storage::delete('upload/slider_image/'.$image);\n\n $upload = $request->file('image1');\n\n\n $file_name = time().'_'.$upload->getClientOriginalExtension();\n\n $path = $upload->storeAs('upload/slider_image',$file_name);\n\n $single->update([\n 'image'=>$file_name,\n 'slider_target'=>$request->slider_target\n ]);\n }else{\n\n $single->update([\n 'image'=>$request->img,\n 'slider_target'=>$request->slider_target\n ]);\n }\n\n\n return redirect('admin/SliderItem');\n }", "title": "" }, { "docid": "23b13183e49a64c42b369b76ee72ff0a", "score": "0.5546373", "text": "public function put($resource, $arOptions)\n {\n // TODO: Implement put() method.\n if (false) {\n $this->utilSetHttpStatus(200, \"OK\");\n } else {\n $this->utilSetHttpStatus(404, \"Not found\");\n }\n }", "title": "" }, { "docid": "a08f6b774130b5c3d30282ec86fc268e", "score": "0.55422", "text": "public function update(Request $request)\n {\n DB::table('cruds')->where('id',$request->id)->update([\n 'name'=>$request->name,\n 'price'=>$request->price,\n 'image'=>$request->file('image')->store('media'),\n 'description'=>$request->description,\n ]);\n return redirect('index/show');\n\n\n }", "title": "" }, { "docid": "47dd85ccb548e5327aa6f0cd02b5fef8", "score": "0.5540378", "text": "public function update(Request $request, $id) //Atualizar um dado inteiro, usando o Put\n {\n //\n }", "title": "" }, { "docid": "cd6123bf3edfbe468d12565bcc198dd6", "score": "0.5539982", "text": "public function update($data, $id, $withTrashed = false);", "title": "" }, { "docid": "6f5dfe25ea3a353e2c34d4da9909c65a", "score": "0.553297", "text": "public function update(Request $request, $model, $id)\n {\n $class = 'App\\\\' . ucfirst($model);\n $resource = $class::find($id);\n if(empty($resource)){\n return response([\n \"error\" => \"Resource not found\"\n ], 404);\n }\n $update = [];\n $fillable_attributes = $resource->getFillable();\n foreach($fillable_attributes as $attribute){\n if(strpos($attribute, 's3_url')){\n if(!empty($request->file($attribute))){\n $url = AmazonS3Helper::UploadtoS3(file_get_contents($request->file($attribute)), 'framework/' . $model . '/' . $request->file($attribute)->hashName(),'image/' . $request->file($attribute)->extension());\n $update[$attribute] = $url;\n }\n }else{\n $update[$attribute] = $request->$attribute;\n }\n }\n $resource->update($update);\n return response([\n \"data\" => $resource\n ], 200);\n }", "title": "" }, { "docid": "91fa0e4ea0a8c7896101b28b83ae1ab3", "score": "0.55280733", "text": "public function update(Request $request)\n {\n //\n $producto = Product::findOrFail($request->id_producto);\n $producto->category_id = $request->id;\n $producto->nombre = $request->nombre;\n $producto->precio = $request->precio;\n $producto->descripcion = $request->descripcion;\n $producto->stock = 0;\n $producto->estado = '1';\n $imagen = $request->file('imagen');\n \n $imagenes = 'storage/app/products/'.$producto->imagen;\n \n // Guardar imagen\n if($imagen){\n Storage::delete($imagenes);\n $image_path_name = time().$imagen->getClientOriginalName();\n Storage::disk('products')->put($image_path_name, File::get($imagen));\n $producto->imagen = $image_path_name;\n }\n $producto->save();\n return Redirect::to(\"admin/producto\");\n }", "title": "" }, { "docid": "a89f939420a4ce0f66a76f1e13ccde13", "score": "0.5525219", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n\n $data=$request->only(['title','description','published_at','price','category_id','content']);\n if ($request->hasFile('image')){\n //check if new image\n $image=$request->image->store('products');\n //upload it\n Storage::delete($product->image);\n //delete old one\n\n $data['image']=$image;\n }\n $product->update($data);\n\n\n session()->flash('success','Product updated successfully');\n\n return redirect(route('products.index'));\n }", "title": "" }, { "docid": "d8af827654eda9b47beb831dca58018e", "score": "0.5523829", "text": "public function put($resource, $id, $data = array())\n {\n $token = $this->getToken();\n if (empty($token)) {\n $token = $this->requestToken();\n }\n $data['token'] = $token;\n $ret = $this->getClient()->put(\"{$resource}/{$id}\", $data);\n //$ret = $this->getClient()->put(\"{$resource}/{$id}?token=\" . $token, $data);\n if (empty($ret)) {\n throw new Exception('Quartic Api returned empty result.');\n }\n if (!isset($ret['body']['status']) || strtolower($ret['body']['status']) != 'ok') {\n $this->getHelper()->log(var_export(\"{$resource}/{$id}\", true));\n $this->getHelper()->log(var_export($data, true));\n $this->getHelper()->log(var_export($ret, true));\n if (isset($ret['body']['data']['error_code'])) {\n throw new Exception('Quartic Api returned error: ' . $ret['body']['data']['error_message']);\n } else {\n throw new Exception('Quartic Api returned error: ' . print_r($ret['body'], true));\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "c49ab96374b0772bd28cd7ae8c2d6bfe", "score": "0.55207497", "text": "public function update(Request $request, $id)\n {\n //Actualizamos Datos en la DB\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $product->image = $request->file('image')->store('public/img/product/body');\n }\n $product->update($request->all());\n //Redireccionar al index\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "429de32ce0a6f737ded9b4f0b77dc398", "score": "0.55156404", "text": "public function update(ProductEditRequest $request, $id)\n {\n //\n $url = $request->input('url');\n try {\n $product = Product::findOrFail($id);\n\n // if ($file = $request->file('image')) { // since its a one to many relationship\n // foreach ($product->images as $image) {\n // if (file_exists($old_file = public_path().'/images/product/'.$image->name)) { // no need to unlink since product can have many images\n // unlink($old_file); // unlink the old image\n // }\n // }\n\n // $name = 'product_'.$id.'_'.time().'.'.$file->getClientOriginalExtension();\n // $file->move('images/product', $name);\n // $product->images()->create(['product_id' => $product->id, 'name' => $name]);\n // }\n\n $product->name = $request->input('name');\n $product->category_id = $request->input('category_id');\n $product->stock = $request->input('stock');\n $product->price = $request->input('price');\n $product->status = $request->input('status');\n $product->description = $request->input('description');\n $result = $product->push();\n\n if ($result) {\n Session::flash('message', 'Update Success');\n } else {\n Session::flash('message', 'Update Failed');\n }\n } catch (\\Exception $e) {\n // do task when error\n Session::flash('error', 'Failed '.$e->getMessage());\n }\n return redirect($url);\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "ca50926bc80f12da80aa1ee555d0ab40", "score": "0.55123925", "text": "public function update(){\n Lore::app()->getPersistence()->getRepository($this->metadata()->getRepositoryName())->update($this);\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "a6dd9080de61feef7df50e26b70511c5", "score": "0.5509228", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [ \n 'name' => 'required|string|max:255',\n 'logo' => 'sometimes|mimes:jpeg,bmp,png,jpg'\n ]);\n\n if ($validator->fails()) {\n $message = 'Validation Error.';\n $status = 400;\n\n $response = [\n 'status' => $status,\n 'success' => false,\n 'message' => $message,\n 'data' => $validator->errors(),\n ];\n\n return response()->json($response, 400);\n }\n else\n {\n $brand = Brand::find($id);\n\n if (is_null($brand)) {\n\n $status = 400;\n $message = 'Brand not found.';\n\n $response = [\n 'status' => $status,\n 'success' => false,\n 'message' => $message,\n ];\n\n return response()->json($response, 404);\n\n }\n else{\n\n $name = $request->name;\n $photo = $request->logo;\n\n // File Upoload\n if ($request->hasFile('photo')) {\n $imageName = time().'.'.$photo->extension(); \n \n $photo->move(public_path('images/brand'), $imageName);\n\n $filepath = 'images/brand/'.$imageName;\n\n $oldphoto = $brand->logo;\n\n if(\\File::exists(public_path($oldphoto))){\n \\File::delete(public_path($oldphoto));\n }\n }\n else{\n $filepath = $brand->logo;\n\n }\n\n // Data insert\n $brand->name = $name;\n $brand->logo = $filepath;\n $brand->save();\n \n\n $status = 200;\n $result = new BrandResource($brand);\n $message = 'Brand updated successfully.';\n\n $response = [\n 'status' => $status,\n 'success' => true,\n 'message' => $message,\n 'data' => $result,\n ];\n\n return response()->json($response, 200);\n }\n }\n }", "title": "" }, { "docid": "fd275acf4c99e35a1942adcba55b5168", "score": "0.5507853", "text": "public function update(Request $request, $id)\n {\n $data = Slider::find($id);\n $data->short_title = $request->short_title;\n $data->long_title = $request->long_title;\n $data->updated_by = Auth::user()->id;\n if ($request->file('image')) {\n $file = $request->file('image');\n @unlink(public_path('/upload/slider_image/'.$data->image));\n $filename =date('YmdHi').$file->getClientOriginalName();\n $file->move(public_path('/upload/slider_image'),$filename);\n $data['image']= $filename;\n }\n $data->save();\n return redirect()->route('view-slider')->with('success','Data updated successfully!');\n }", "title": "" }, { "docid": "5764299e1bb6a4a7925c46ed1072ca62", "score": "0.5499601", "text": "public function put($uri = null, $data = array(), $request = array());", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "048d9fb1be8f80b9c6a16e67a98faaff", "score": "0.5493909", "text": "public function update(StoreInventory $request, $id)\n {\n // Grab the inventory item so we can update it\n $inventory = Inventory::findOrFail($id);\n\n $inventory->fill($request->validated());\n \n return (new InventoryResource($inventory))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "09d3177310ace6bf104fcfebfdca9181", "score": "0.54922557", "text": "public function update($data)\n {\n return $this->client->put($this->fullPath(), null, $data);\n }", "title": "" }, { "docid": "85e1d4766b8ee562913fc2a3fc7a60db", "score": "0.54890925", "text": "public function update(Request $request, $id)\n {\n //\n $this->validate(request(),[\n 'photo' => 'required|image|max:2048'\n ]);\n\n $photo = request()->file('photo')->store('public');\n \n\n Photo::update([\n 'url' => Storage::url($photo),\n 'activity_id'=> $activity->id,\n ]);\n\n }", "title": "" }, { "docid": "dea8abf6fe11ceeaef21c557a4920a01", "score": "0.5488609", "text": "public function update(Request $request, $id)\n {$product = Product::FindOrFail($id);\n $product->name = $request->name;\n $product->price = $request->price;\n $product->old_price= $request->old_price;\n $product->description = $request->description;\n $product->sub_category_id = $request->sub_category;\n if ($request->hasFile('picture')) {\n $picName = \"GRO\".uniqid().time().'.'.$request->picture->getClientOriginalExtension();\n $request->picture->move(public_path().'/uploads/', $picName);\n $product->picture='uploads/'.$picName;\n }\n $product->save();\n flash('Product updated successfully');\n return redirect('/');\n }", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "2aeec2d1db1eb88cf92a885873ec7eed", "score": "0.54836845", "text": "public function update(Request $request, Executive $executive)\n {\n $this->validateRequestUpdate();\n $this->checkAndDeleteOldImage($executive);\n $executive->update($this->validateRequestUpdate());\n $this->storeImage($executive);\n return redirect(route('executive.index'));\n }", "title": "" }, { "docid": "4dd2aec8bd2e4b5b1bffb4aec68a91da", "score": "0.54823583", "text": "public function update(Request $request, Role_resource $role_resource)\n {\n //\n }", "title": "" }, { "docid": "4ba6c1fe9ed4a5352f8497193c138598", "score": "0.5481853", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->update($request->except('files'));\n\n if ($request->hasFile('files')) {\n $resource->addMultipleMediaFromRequest(['files'])\n ->each(function ($file) {\n $file->toMediaCollection();\n });\n }\n\n $response = [\n 'resource' => $resource->load('media'),\n 'msg' => 'Resource updated successfully.'\n ];\n\n return response($response, 200);\n }", "title": "" }, { "docid": "70932022b6ff9363043b59bcdecbdea9", "score": "0.5480141", "text": "public function update(Request $request, $id)\n {\n //$idTag=Tag::findOrFail($id);\n $this->authorize('update'/* ,$idTag */);\n $tag = new TagResource(Tag::findOrFail($id));\n $tag->update($request->all());\n return response($tag, 200);\n }", "title": "" }, { "docid": "61dacb3f91f0a855850458a18f5e4183", "score": "0.5479231", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n if($this->repo->update($input, $id)){\n return $this->respondOK(\"resource updated\");\n }else{\n return $this->errorNotFound('resource not updated');\n }\n }", "title": "" }, { "docid": "154f3dfd07c1b3de458996ea6d67633a", "score": "0.5475994", "text": "protected function httpPut() {\n\n // First we'll do a check to see if the resource already exists\n try {\n $info = $this->tree->getNodeInfo($this->getRequestUri(),0); \n \n // Checking potential locks\n if (!$this->validateLock()) throw new Sabre_DAV_LockedException('The resource you tried to edit is locked');\n\n // We got this far, this means the node already exists.\n // This also means we should check for the If-None-Match header\n if ($this->httpRequest->getHeader('If-None-Match')) {\n\n throw new Sabre_DAV_PreconditionFailedException('The resource already exists, and an If-None-Match header was supplied');\n\n }\n \n // If the node is a collection, we'll deny it\n if ($info[0]['type'] == self::NODE_DIRECTORY) throw new Sabre_DAV_ConflictException('PUTs on directories are not allowed'); \n\n $this->tree->put($this->getRequestUri(),$this->httpRequest->getBody());\n $this->httpResponse->sendStatus(200);\n\n } catch (Sabre_DAV_FileNotFoundException $e) {\n\n // If we got here, the resource didn't exist yet.\n\n // Validating the lock on the parent collection\n $parent = dirname($this->getRequestUri());\n if (!$this->validateLock($parent)) throw new Sabre_DAV_LockedException('You\\'re creating a new file, but the parent collection is currently locked');\n\n // This means the resource doesn't exist yet, and we're creating a new one\n $this->tree->createFile($this->getRequestUri(),$this->httpRequest->getBody());\n $this->httpResponse->sendStatus(201);\n\n }\n\n }", "title": "" }, { "docid": "3a87aca1ec17bb66ec8a99811ab99ab3", "score": "0.5472414", "text": "public function updateProduct(Request $request, $id)\n {\n \n // Update Product\n //return(Product::where('product_id','=',$id)->first());\n\n $Product =Product::where('product_id','=',$id)->first();\n $Product->product_name = $request->product_name; \n $Product->product_description = $request->product_description;\n $Product->product_qty = $request->product_qty;\n $Product->product_status = $request->product_status;\n $Product->save();\n\n $url=\"http://127.0.0.1:8000/storage/\";\n $file=$request->file('product_img');\n $extension=$file->extension();\n $path=$request->file('product_img')->storeAs('Product', $Product->product_id.'.'.$extension);\n \n Product::where('product_id','=',$Product->product_id)->update([\n 'product_img' => $url.$path\n ]);\n \n // return($Product);\n \n if($Product){\n return response()->json($data=[\n 'status'=>'success',\n 'message'=>'Upadte product Successfull',\n 'product' => $Product\n \n ], 200);\n }\n else{\n return response()->json($data=[\n 'status'=>'failed',\n 'message'=>'something went wrong'\n ],203);\n } \n }", "title": "" }, { "docid": "333db29e9caf217f39a61608ae6c94ca", "score": "0.54632384", "text": "public function update(Request $request, $id)\n {\n // Validation des données du formulaire\n $this->validate($request, [\n 'name' => 'required|min:5|max:100',\n 'description' => 'required',\n 'price' => 'required|numeric',\n 'picture' => 'image:max:3000',\n 'status' => 'required|in:published,unpublished',\n 'sales' => 'required|in:onSales,standard',\n 'reference' => 'required|alpha_num|min:16|max:16',\n 'category_id' => 'required|integer',\n 'sizes' => 'required'\n ]);\n\n $product = Product::find($id);\n \n $datas = $request->all();\n\n $file = $request->file('picture');\n if(!empty($file)){ // si l'utilisateur ne change pas son image\n $imageName = $request->picture->hashName(); //hashage du nom de l'image à enregistrer\n $datas['picture'] = $imageName;\n\n $categoryId = $datas['category_id'];\n $img = $request->file('picture');\n $img->move(public_path('/img/'.$categoryId),$datas['picture']);// insertion de l'image dans le dossier de catégorie choisie\n }else{\n if($product->category_id != $datas['category_id']){ // si l'utilisateur change de catégorie\n $newCategoryId = $datas['category_id'];\n $oldPath = public_path('/img/'.$product->category_id.'/'.$product->picture);\n $newPath = public_path('/img/'.$newCategoryId.'/'.$product->picture);\n File::move($oldPath,$newPath);// insertion de l'image dans le dossier de catégorie choisie\n }\n \n }\n\n \n $product->update($datas);\n $product->size()->sync($request->sizes);\n\n //Redirection vers la page admin des produits\n return redirect()->route('product.index')->with('message', 'Le produit a bien été mise à jour');\n }", "title": "" }, { "docid": "0e4d84200a41553d02c2dd28fc577124", "score": "0.54631126", "text": "public function updateObject($objectPath,$content) { }", "title": "" }, { "docid": "5dfe400f13e0d453a75d37d2c1296a55", "score": "0.545993", "text": "public function update(Request $request, $id)\n {\n try{\n DB::beginTransaction();\n $data = [\n 'name' => $request->slide_name,\n 'description' => $request->desc_slide\n ];\n\n if($request->hasFile('image_slide')){\n $imageSlide = $this->storageTraitUpload($request,'image_slide','slide');\n $data['image'] = $imageSlide['file_path'];\n }\n $this->slide->find($id)->update($data);\n DB::commit();\n return redirect()->route('admin.slide.index');\n }catch(Exception $exception){\n DB::rollBack();\n Log::error('message'.$exception->getMessage().'line'.$exception->getLine());\n }\n }", "title": "" }, { "docid": "a6b372ff8f044bee76bd1ac8500ec932", "score": "0.5457891", "text": "public function testUpdate()\n {\n Document::exists() || Document::factory()->create();\n $document = Document::latest('id')->first();\n\n $documentType = DocumentType::factory()->create();\n $student = Student::factory()->create();\n $debrief = Debrief::factory()->create();\n\n $data = [\n 'filename' => $document->filename,\n 'relative_path' => $document->relative_path,\n 'disk' => $document->disk,\n 'extension' => $document->extension,\n 'document_type' => $documentType->getKey(),\n 'student' => $student->getKey(),\n 'debrief' => $debrief->getKey()\n ];\n\n $response = $this->actingAs($this->adminUser)->putJson('/api/documents/' . $document->getKey(), $data);\n if ($response->exception) {\n dd($response->exception);\n }\n\n $document = $document->fresh();\n\n $expectedResponseContent = (new DocumentResource($document))->toArray(request());\n\n $response->assertOk()\n ->assertJson([\n 'data' => $expectedResponseContent\n ]);\n\n // $this->actingAs($this->unauthorizedUser)->putJson('/api/documents/' . $tutor->getKey(), $data)\n // ->assertForbidden();\n }", "title": "" }, { "docid": "ed8de68c7d88f1904a744dc02701808c", "score": "0.54521495", "text": "public function update(Request $request, $id)\n {\n //\n //highlight sidebar\n $this->setActiveParent();\n\n $validator = $this->custom_validation($request, 'update');\n\n $products = Product::findOrFail($id);\n\n //check if $validator is true && record is found\n if( $validator === true && $products ){\n\n \n //begin transaction\n $transaction = DB::transaction(function() use($request, $products) {\n\n $request['fk_updatedby'] = Auth::id();\n\n //to be remove from storage\n $oldfilename = $products->pictx; \n\n //dd($request->all());\n\n $products->update($request->all());\n\n //check if user removed the logo\n if( $request->removepictx && $request->removepictx == 'on' ){\n \n AppStorage::remove($oldfilename);\n\n //update DB for correct filename @pictx\n $products->update([\n 'pictx'=> null\n ]);\n\n }//END check if user removed the logo\n\n\n //if request uploaded picture\n if( $request->pictx ){\n\n AppStorage::remove($oldfilename);\n \n //update DB for correct filename @pictx\n $products->update([\n 'pictx'=> AppStorage::store('products', $request->pictx)\n ]);\n\n }//END check if request uploaded picture\n\n\n\n session()->flash('success', \"$request->name has been updated!\");\n\n //return redirect(\"/products/edit/$products->pk_products\");\n return redirect()->back();\n\n\n\n });//END transaction\n\n return $transaction;\n \n\n\n \n }else{\n\n //null = current request\n $form_fields = DynamicForm::form_fields('update', $products, null, Product::form_fields() );\n\n $this->setPrerequisites();\n $categories = $this->categories;\n $supplier = $this->supplier;\n\n return view('products.edit', compact('form_fields', 'products', 'categories', 'supplier'))->withErrors($validator); \n //return redirect()->back()->withInput()->withErrors($validator);\n\n\n\n\n }\n\n\n\n\n\n }", "title": "" }, { "docid": "88a70023be7208ea677c3d6e556c61fb", "score": "0.5448917", "text": "public function update(Request $request, $id)\n {\n //\n \n \n $requestData = $request->all();\n \n $file = $request->file('foto');\n if($request->hasFile('foto')){\n \n $requestData['foto']=$file->openFile()->fread($file->getSize());\n /*\n \n $requestData = $request->all();\n \n if ($request->hasFile('foto')) {\n $requestData['foto'] = $request->file('foto')\n ->store('uploads', 'public');\n \n*/\n }\n\n $perfilestudiante = PerfilEstudiante::findOrFail($id);\n $perfilestudiante->update($requestData);\n\n $redireccion='perfil-estudiante/'.$id.'/edit';\n return redirect($redireccion)->with('flash_message', 'PerfilEstudiante updated!')->with('menu','usuario_docente');\n }", "title": "" }, { "docid": "6c0c4f37dc5881fde1e7b8d7f270ec97", "score": "0.544714", "text": "public function update($id) {\n\n }", "title": "" }, { "docid": "d9c8b0075dcc91c0089aaf5fd99a7f55", "score": "0.54461193", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'service_name'=>'required',\n 'description'=>'required'\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n if($request->old_image!=null){\n unlink('storage/'.$request->old_image);\n }\n $path=$request->file('thumbnail')->store('Thumbnials');\n }\n // $attachment=$request->old_attachment;\n // if($request->hasFile('attachment')){\n // if($attachment!=null){\n // // unlink('storage/'.$request->old_attachment);\n // }\n // $attachment=$request->file('attachment')->store('Attachment');\n // }\n $data=[\n 'service_name'=>$request->service_name,\n // 'attachment'=>$attachment,\n 'description'=>$request->description,\n 'thumbnail'=>$path\n ];\n Service::where('id',$id)->update($data);\n return redirect()->route('listService');\n }", "title": "" }, { "docid": "33f614d65ce49db36128bb80e0048cd2", "score": "0.54417664", "text": "public function update() { if (is_null($this->id))\n trigger_error(\"Reference::update(): Attempt to update a Reference object that does not have its ID property set.\", E_USER_ERROR);\n\n // Update the Article\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE reference SET RefFile=:refFile UploaderID=:uploaderID Source=:source WHERE ReferenceID = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":refFile\", $this->refFile, PDO::PARAM_STR);\n $st->bindValue(\":uploaderID\", $this->uploaderID, PDO::PARAM_INT);\n $st->bindValue(\":source\", $this->source, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "181ee26d73bd3c1143b1d276e6b7bb91", "score": "0.54384834", "text": "public function update(Request $request, $id)\n {\n $store = Store::where('id',$id)->first();\n $store->name = $request->name;\n $store->address = $request->address;\n $store->phone = $request->Phone;\n $store->opening = $request->opening;\n if($request->has('image')){\n unlink(public_path('back/images/store/'.$store->image));\n $imageName = time().'.'.$request->image->getClientOriginalExtension();\n $request->image->move(public_path('back/images/store'), $imageName);\n $store->image = $imageName;\n }\n $store->save();\n return redirect()->back()->with('success','Store has been updated successfully!');\n }", "title": "" }, { "docid": "70c454fe61b8abc6777a08b358712c67", "score": "0.54292583", "text": "public function update($id){\n \n }", "title": "" }, { "docid": "0ae71e0ed59055b44c4c0b240eb670ae", "score": "0.5427381", "text": "public function update($id)\n\t{\n\t\t$manager = App::make(\\BackupManager\\Manager::class);\n\t\t$manager->makeRestore()->run('local', 'storage_path('.$id.')');\n\t}", "title": "" }, { "docid": "ee62ec950231813104ded30d5cdda483", "score": "0.5426956", "text": "public function update(StoreParameter $request, $id)\n {\n $data = $request->all();\n $parameter = Parameter::find($id);\n $this->checkAndUploadImage($request, 'image', 'posters', $parameter);\n $parameter->update($data);\n Session::flash('message', 'Успешно изменено');\n return redirect()->route('parameters.index');\n }", "title": "" }, { "docid": "e7a9ed5515a2a2ec06d6aca33efe6caf", "score": "0.5416989", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::query()->findOrFail($id);\n if($product->photo !== null){\n File::delete($product->photo->file);\n }\n\n\n if ($file = $request->file('photo_id')) {\n $name = Time() . $file->getClientOriginalName();\n $file->move('images', $name);\n $photo = Photo::create(['file' => $name]);\n $input['photo_id'] = $photo->id;\n }\n $product->update($request->all());\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "b50ec68239e495a6eac6681b6be2bd10", "score": "0.54154384", "text": "public function put($resource, $data, array $parameters = array())\n {\n // Pass the request on\n return $this->sendData($resource, $data, $parameters, \"PUT\");\n }", "title": "" }, { "docid": "55601806ef2a9d7e3f71d62851e418fc", "score": "0.54153293", "text": "public function updateById($data, $id);", "title": "" }, { "docid": "bc24b326261d7a5dcbc2c4576e30536b", "score": "0.5414857", "text": "public function update(Request $request, $id)\n {\n $single=Brand::findorfail($id);\n $image = $single->image;\n\n\n if ($request->file() != null){\n\n Storage::delete('upload/brands/'.$image);\n\n $upload = $request->file('image');\n\n\n $upload = $request->file('image');\n\n\n $file_name = 'brand_image_'.time().'.'.$upload->getClientOriginalExtension();\n\n $path = $upload->storeAs('upload/brands/',$file_name);\n $single->update([\n 'name'=>$request->name,\n 'image'=>$file_name\n ]);\n }else{\n\n $single->update([\n 'name'=>$request->name,\n 'image'=>$request->img_name\n ]);\n }\n\n\n return redirect('admin/brands');\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.54146737", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "10ffb6f2bcc02987225b2f72d4364775", "score": "0.5405863", "text": "function update($id, $data);", "title": "" } ]
ee9b4879cb2027da96619b754ddef8b5
create new API key
[ { "docid": "21c051ab57d11494746681995d55f21b", "score": "0.0", "text": "public function create(ApiKey $key): bool {\n try {\n // query to insert record\n $query = \"INSERT INTO\n \" . $this->tableName . \"\n SET\n email=:email, api_key=:key\";\n\n // prepare query\n $stmt = Base::getInstance()->conn->prepare($query);\n Base::getInstance()->conn->beginTransaction();\n\n // cast to avoid errors\n $email = (string)$key->getEmail();\n $key = (string)$key->getApiKey();\n\n // bind values\n $stmt->bindParam(\":email\", $email);\n $stmt->bindParam(\":key\", $key);\n\n // execute query\n $stmt->execute();\n\n // If we get tot this point there are no errors so we can commit\n Base::getInstance()->conn->commit();\n\n return true;\n } catch (Exception $e) {\n return $this->handleFalseError($e, true);\n }\n }", "title": "" } ]
[ { "docid": "c7b94c1a87b05600d2b9b9960aa3df55", "score": "0.91804534", "text": "public function createApikey();", "title": "" }, { "docid": "391817be0a54894d95f403d050d61606", "score": "0.78051007", "text": "public function newAPIKey() {\r\n\r\n $len = 32;\r\n\r\n if (@is_readable('/dev/urandom')) {\r\n $file = fopen('/dev/urandom', 'r');\r\n $urandom = fread($file, $len);\r\n fclose($file);\r\n }\r\n\r\n $return = '';\r\n\r\n for ($i = 0; $i < $len; ++$i) {\r\n if (!isset( $urandom )) {\r\n if ($i % 2 == 0)\r\n mt_srand(time() % 2147 * 1000000 + (double)microtime() * 1000000);\r\n $rand = 48 + mt_rand() % 64;\r\n } else {\r\n $rand = 48 + ord($urandom[$i]) % 64;\r\n }\r\n\r\n if ($rand > 57) {\r\n $rand += 7;\r\n }\r\n\r\n if ($rand > 90) {\r\n $rand += 6;\r\n }\r\n\r\n if ($rand == 123) {\r\n $rand = 45;\r\n }\r\n\r\n if ($rand == 124) {\r\n $rand = 46;\r\n }\r\n\r\n $return .= chr($rand);\r\n }\r\n\r\n $this->api_key = $return;\r\n }", "title": "" }, { "docid": "65602bb015d5384ab35a8e194e232810", "score": "0.76420915", "text": "public function generateApiKey() {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $apikey = '';\n for ($i = 0; $i < 64; $i++) {\n $apikey .= $characters[rand(0, strlen($characters) - 1)];\n }\n $apikey = base64_encode(sha1(uniqid('ue' . rand(rand(), rand())) . $apikey));\n $apikey = rtrim(strtr($apikey, '+/', '-_'), '=');\n $this->apiKey = $apikey;\n }", "title": "" }, { "docid": "79d4b3497efdc06ae02975a84c2d0bbb", "score": "0.7455833", "text": "public function updateApikey();", "title": "" }, { "docid": "9e05b1a198a539d5d0da2ee02d07ce4f", "score": "0.73873353", "text": "private function generateAPIKey() {\n return md5(uniqid(mt_rand(), true)); // generate random api key\n }", "title": "" }, { "docid": "b4c8da3fd91cfa706e93320593d96b5c", "score": "0.7188803", "text": "private function generateApiKey(){\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "b4c8da3fd91cfa706e93320593d96b5c", "score": "0.7188803", "text": "private function generateApiKey(){\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "d8f25f3e7e7776069c80d227b97b7008", "score": "0.71720254", "text": "private function generateAPIKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.7163972", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "a26728a16ecbdb00dbec958f2b2bbc21", "score": "0.71577704", "text": "private function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "9c8d9946b9d1fff2b15f8913ed710dd7", "score": "0.7133457", "text": "function generateAPIKey(){\n\treturn uniqid('apikey_');\n}", "title": "" }, { "docid": "e0e9c05c9f4a5b28a5003cbb49e6b86b", "score": "0.7110064", "text": "private function generateKey(): void\n {\n if (!empty(config('app.key'))) {\n return;\n }\n\n $this->call('key:generate');\n }", "title": "" }, { "docid": "023874572c35432384edca0344a03265", "score": "0.70690686", "text": "public function gen_key() {\n\t\t$user = CurrentlyLoggedInUser::Instance()->getModel();\n\t\t$action = $this->_data['submit_key'];\n\t\tswitch ($action) {\n\t\t\tcase 'New Dropbox Address':\n\t\t\t\t$user->dropboxkey = Omelette_User::generateDropBoxKey();\n\t\t\t\tif($user->save()!==false) {\n\t\t\t\t\tFlash::Instance()->addMessage('Dropbox Address changed successfully');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'New Subscription Key':\n\t\t\t\t$user->webkey = Omelette_User::generateWebKey();\n\t\t\t\tif($user->save()!==false) {\n\t\t\t\t\tFlash::Instance()->addMessage('Calendar URL changed successfully');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'New API Token':\n\t\t\t\t$user->api_token = Omelette_User::generateApiToken();\n\t\t\t\tif (FALSE !== $user->save()) {\n\t\t\t\t\tFlash::Instance()->addMessage('New API Token generated successfully');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tsendTo('preferences', 'keys');\n\t}", "title": "" }, { "docid": "40d7f6b11799947b9400d0942f2b18f4", "score": "0.7052096", "text": "public function generateNewToken(): string \n {\n return ApiKey::generateKey();\n }", "title": "" }, { "docid": "869101b9782f9cb3eae1d829483981e0", "score": "0.7031822", "text": "public function createUserApiKey()\n {\n /** Created user api key */\n $api_key = $this->_encryptApiKey($this->_prepareKey());\n \n $this->requestService('fos_user.user_manager')->updateUser(\n $this->requestService('security.context')\n ->getToken()\n ->getUser()\n ->setApiKey($api_key), true);\n return $api_key;\n }", "title": "" }, { "docid": "20e77fc1c76183f85a34e3f353e9074d", "score": "0.6969131", "text": "abstract public function generate_key();", "title": "" }, { "docid": "00cd98dad8a4986029eb3f79f3b933e7", "score": "0.6880607", "text": "public function generate_api_key($data)\n {\n return $this->getService()->generateNewApiKey($this->getIdentity());\n }", "title": "" }, { "docid": "a0cce0ca4fc9cb3dc90c3b8cf9ad641f", "score": "0.6878509", "text": "function set_api_key()\n\t\t{\n\t\t\tStripe::setApiKey($this->private_key);\n\t\t}", "title": "" }, { "docid": "a0cce0ca4fc9cb3dc90c3b8cf9ad641f", "score": "0.6878509", "text": "function set_api_key()\n\t\t{\n\t\t\tStripe::setApiKey($this->private_key);\n\t\t}", "title": "" }, { "docid": "959b1c4b2426f06721958b43b6004ac5", "score": "0.6826487", "text": "private function set_api_key() {\n\t\t$secret_key = edd_get_option( ( edd_is_test_mode() ? 'test' : 'live' ) . '_secret_key' );\n\n\t\tStripe::setApiKey( trim( $secret_key ) );\n\t}", "title": "" }, { "docid": "b336dad7b063c2471c6ffc2cd0bc5bc7", "score": "0.6773043", "text": "public function createApiKey(Request\\CreateApiKey $request): Response\n\t{\n\t\treturn new Response($this->transport->sendRequest($request->getRequest()));\n\t}", "title": "" }, { "docid": "329903873d7b6363665b258f2b3734ee", "score": "0.6747142", "text": "public function create(ApiKey $apiKey, $lifetime = self::DEFAULT_LIFETIME): string;", "title": "" }, { "docid": "42cf5cec03d83ef9a0343bca92e96def", "score": "0.67384744", "text": "function generateApiKey($id)\n {\n $apiToken = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n $apiToken = substr(str_shuffle($apiToken), 0, 25);\n $apiToken = $id . $apiToken . $id;\n $apiToken = strtoupper(md5($apiToken));\n return $apiToken;\n }", "title": "" }, { "docid": "42cf5cec03d83ef9a0343bca92e96def", "score": "0.67384744", "text": "function generateApiKey($id)\n {\n $apiToken = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n $apiToken = substr(str_shuffle($apiToken), 0, 25);\n $apiToken = $id . $apiToken . $id;\n $apiToken = strtoupper(md5($apiToken));\n return $apiToken;\n }", "title": "" }, { "docid": "0e36c491faa2947e7b983d4c71b43429", "score": "0.6691584", "text": "public static function createApiKey($appName)\n {\n global $config;\n\n return md5($appName . $config['auth_salt'] . time());\n }", "title": "" }, { "docid": "7acf8e4052d4213778089d16c0c0b9ef", "score": "0.6681432", "text": "abstract protected function generateKey();", "title": "" }, { "docid": "f9412b6c1b16d001e3dbfa06d36ea4ec", "score": "0.664732", "text": "function GetApiKey()\n{\n return \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\";\n}", "title": "" }, { "docid": "f81d0fb6af53f133921908316e879767", "score": "0.6629102", "text": "public function regenerateApiKey() {\n $this->apiKey = false;\n return $this->save(false, ['apiKey']);\n }", "title": "" }, { "docid": "b1633b6cdf15ea77ce38eb27ee4ca897", "score": "0.6607355", "text": "protected function _generateApiKey()\n {\n $apiKey = Mage::getStoreConfig('remarkety/mgconnector/api_key');\n if (!empty($apiKey))\n return $apiKey;\n if(!empty($this->_data['email'])) {\n return md5($this->_data['email'] . time());\n }\n\n throw new Mage_Core_Exception('Can not generate api key');\n }", "title": "" }, { "docid": "ad768d4492bafb1cfa607b87b5d11f80", "score": "0.65936947", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomKey(10);\n }", "title": "" }, { "docid": "53feeada24e3032bcfe408835b9124df", "score": "0.6592861", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\n }", "title": "" }, { "docid": "53feeada24e3032bcfe408835b9124df", "score": "0.6592861", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\n }", "title": "" }, { "docid": "53feeada24e3032bcfe408835b9124df", "score": "0.6592861", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\n }", "title": "" }, { "docid": "bc6dea7eb57245030a03c9e3253ba489", "score": "0.65893644", "text": "public function createApikey(): ApplicationSetter\n\t{\n\t\t$this->applicationSetter = new ApplicationSetter($this->client, 'createApikey');\n\t\treturn $this->applicationSetter;\n\t}", "title": "" }, { "docid": "bc3dcaa6af0275f300b4e6fa29c0db96", "score": "0.65568906", "text": "public function createKeyInfo(): void\n {\n $content = implode(\n PHP_EOL,\n [\n $this->url,\n $this->path,\n bin2hex(openssl_random_pseudo_bytes($this->length))\n ]\n );\n File::put($this->key_info_path, $content);\n }", "title": "" }, { "docid": "9d8707dabd6e42fcdce60a3499f3da91", "score": "0.65398127", "text": "public function generateKeys(Request $request)\r\n {\r\n\t\t$input = $request->all();\r\n\t\t$input['user_id'] = 4;\r\n\t\t$apiuser = Apiuser::select('appid')->max('appid');\r\n\t\t$input['appid'] = $apiuser+1;\r\n\t\t$input['appsecret'] = substr( md5(rand()), 0, 15);\r\n\t\t$apiuser = new Apiuser;\r\n\t\t$apiuser->user_id = $input['user_id'];\r\n\t\t$apiuser->appname = $input['appname'];\r\n\t\t$apiuser->appid \t = $input['appid'];\r\n\t\t$apiuser->appsecret = $input['appsecret'];\r\n\t\t$apiuser->save();\r\n /*return response(array(\r\n 'error' => false,\r\n 'message' =>'Successfully Created APP',\r\n ),200);*/\r\n\t\treturn redirect('/api/view'); \r\n }", "title": "" }, { "docid": "ec5d9fbe2544297a254859877a801bd4", "score": "0.6533917", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomKey();\n }", "title": "" }, { "docid": "d3a155209d467e8fd53d8ff5eb5a1dd3", "score": "0.65298456", "text": "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "d3a155209d467e8fd53d8ff5eb5a1dd3", "score": "0.65298456", "text": "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "cbc53b9f672ee01e7215c2784a8eebd9", "score": "0.6527369", "text": "public function generateAuthKey()\n {\n $this->access_token = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "e90b3f4570ddae2c0d8056552f39284f", "score": "0.6524223", "text": "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "ff833200c5f49112f9d438c4529e18c0", "score": "0.65024513", "text": "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "title": "" }, { "docid": "ff833200c5f49112f9d438c4529e18c0", "score": "0.65024513", "text": "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "title": "" }, { "docid": "43ddac237ea40b1a6b10bb77107f9640", "score": "0.64998746", "text": "public function generateAuthKey()\n {\n \t$this->auth_key = Security::generateRandomKey();\n }", "title": "" }, { "docid": "388ef6d3e0bbc0a8afb6b91693b46db8", "score": "0.6498595", "text": "public function generateApiToken();", "title": "" }, { "docid": "cf52083260e58111eb02dcdc679d5b9d", "score": "0.6497922", "text": "public function generateAuthKey()\n {\n $this->auth_key = \\Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "1df84c283f1f5b0665a33653c85faee2", "score": "0.64750063", "text": "protected function get_api_key() {\n\t\treturn $this->generate_api_key( $this->merchant, $this->accesstoken, $this->secrettoken );\n\t}", "title": "" }, { "docid": "f200dc0def09b2f38424f87bb1138ca4", "score": "0.6473038", "text": "private function requestApiKey() {\n if (!isset($this->apiKeys['Token']) ||\n ($this->requestedApiKeyTimestamp && (time() > $this->requestedApiKeyTimestamp + $this->getRequestApiKeyInterval() * 60))) {\n\n $headers = [];\n $client = new Client();\n $headers['Authorization'] = 'Basic ' . base64_encode($this->getUsername() . \":\" . $this->getPassword());\n\n $content = $client->request('GET',\n $this->getHost() . '/api/v1/SDK_INITIALIZE', [\n 'debug' => $this->debug,\n 'headers' => $headers,\n ])->getBody()->getContents();\n\n $this->requestedApiKeyTimestamp = time();\n $this->setApiKey('Token', str_replace('\"', \"\", $content));\n }\n }", "title": "" }, { "docid": "5452363680f14c2718a75519d8caafb7", "score": "0.64654714", "text": "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "title": "" }, { "docid": "5452363680f14c2718a75519d8caafb7", "score": "0.64654714", "text": "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "title": "" }, { "docid": "f1af4b292078bb41982a866c73492f0f", "score": "0.6455977", "text": "public function createKey($username)\n {\n $configObj = Config::getInstance()->object();\n foreach ($configObj->system->children() as $key => $value) {\n if ($key == 'user' && (string)$username == (string)$value->name) {\n if (!isset($value->apikeys)) {\n $apikeys = $value->addChild('apikeys');\n } else {\n $apikeys = $value->apikeys;\n }\n $item = $apikeys->addChild('item');\n\n $newKey = base64_encode(random_bytes(60));\n $newSecret = base64_encode(random_bytes(60));\n\n $item->addChild('key', $newKey);\n $item->addChild('secret', crypt($newSecret, '$6$'));\n Config::getInstance()->save();\n $response = array('key' => $newKey, 'secret' => $newSecret);\n return $response;\n }\n }\n return null;\n }", "title": "" } ]
72d00800bd6c347561a154a068adf82c
get a mock object with id and handle
[ { "docid": "47d9b2947706139ff6092a7058c9042a", "score": "0.8201123", "text": "private function getMockObject($id, $handle)\n {\n $mockObject = new stdClass();\n $mockObject->id = $id;\n $mockObject->handle = $handle;\n\n return $mockObject;\n }", "title": "" } ]
[ { "docid": "45bd1f5b3541509f7d6ecf95bcd97724", "score": "0.6243879", "text": "abstract public function mock();", "title": "" }, { "docid": "38596fa521d8a87f65c65808e2c23608", "score": "0.62029576", "text": "public function getObjectMockupById($objectId) {\n return $this->getObjectById($objectId);\n }", "title": "" }, { "docid": "74ee777499b39389e413eb2610b66ab3", "score": "0.61480886", "text": "public function getMock(): \\PHPUnit\\Framework\\MockObject\\MockObject {}", "title": "" }, { "docid": "cf92b5e5b896ebf1cdd26ba1b5489db4", "score": "0.6010331", "text": "public function getHandler(): MockHandler\n {\n return $this->handler;\n }", "title": "" }, { "docid": "97b4e5ed7d5d5064d5cb0cfc0d128772", "score": "0.5920547", "text": "public function getMock()\n {\n return $this->mock;\n }", "title": "" }, { "docid": "52ab834aff1a173c35c2c5e6c9bf663a", "score": "0.5914167", "text": "public function testHandleAccessors() {\n\n\t\t$resource = new XMLResource($this->fileInfo);\n\t\t$this->assertInstanceOf('com\\mohiva\\common\\xml\\XMLDocument', $resource->getHandle());\n\n\t\t$stub = $this->getMock('com\\mohiva\\common\\xml\\XMLDocument');\n\t\t/* @var \\com\\mohiva\\common\\xml\\XMLDocument $stub */\n\t\t$resource->setHandle($stub);\n\t\t$this->assertSame($stub, $resource->getHandle());\n\t}", "title": "" }, { "docid": "c9ebbc63b4f6400f6e2b0e8e522147db", "score": "0.58474267", "text": "private function getMediaObjectInstance($a_file_id = NULL) {\r\n\t\t$mediaObj = NULL;\r\n\t\tif (is_null($a_file_id)) {\r\n\t\t\tif ($this->mobjMock) {\r\n\t\t\t\t$mediaObj = $this->mobjMock;\r\n\t\t\t} else {\r\n\t\t\t\t$mediaObj = new ilObjMediaObject();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($this->mobjMock) {\r\n\t\t\t\t$mediaObj = $this->mobjMock;\r\n\t\t\t\t$mediaObj->setId($a_file_id);\r\n\t\t\t} else {\r\n\t\t\t\t$mediaObj = new ilObjMediaObject($a_file_id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $mediaObj;\r\n\t}", "title": "" }, { "docid": "e03eafe1e7754af04f974adac3f1bbac", "score": "0.5833735", "text": "public function get(string $class, string $id): object;", "title": "" }, { "docid": "2527dce76b812e79ae2103123bc6f480", "score": "0.5767472", "text": "public function getObjectFromID($id);", "title": "" }, { "docid": "d6ede48b74dd76b10b0ae5efeb7dbdb5", "score": "0.5753848", "text": "protected function getQueryMock()\n {\n return Mockery::mock('stdClass')->makePartial();\n }", "title": "" }, { "docid": "ec24c6d15690c54ba7ce28a7234ea9de", "score": "0.57381654", "text": "function getInstance($id, &$handler)\n {\n $classname = __CLASS__;\n $inst = new $classname($id, $handler);\n $result = $inst->_load();\n\n if (PayPal::isError($result)) {\n return $result;\n }\n\n return $inst;\n }", "title": "" }, { "docid": "18bff351e03657caa80c34a76645f18d", "score": "0.5713226", "text": "public function handleFind(int $id) : object\n\t{\n\t\treturn $this->repository->fetchById($id);\n\t}", "title": "" }, { "docid": "5dcf9a95d8e26d51de4066fb2bd58a3c", "score": "0.56958693", "text": "function mock();", "title": "" }, { "docid": "1b8e389c592f9051ce349a7033a6d897", "score": "0.5661007", "text": "private function createReferenceMock()\n {\n return $this->getMockBuilder(Reference::class)->disableOriginalConstructor()->getMock();\n }", "title": "" }, { "docid": "86f2efce14daf128fbcb594d39c02cd8", "score": "0.5599555", "text": "public function __invoke($id)\n {\n return self::get($id);\n }", "title": "" }, { "docid": "d01fdb349cca2d3a272d7a2f386113b4", "score": "0.5586955", "text": "abstract function getHandle();", "title": "" }, { "docid": "7f7f3f24497a7b57c125e8950fcbe298", "score": "0.5570304", "text": "public function test_getObjectById_objectExists_returnObjectInstance()\r\n\t{\r\n\t\t$id = \"aDummyObjectId\";\r\n\t\t$this->dbObjectMock->expects($this->once())\r\n\t\t\t\t\t\t->method(\"find\")\r\n\t\t\t\t\t\t->with($this->equalTo(true))\r\n\t\t\t\t\t\t->will($this->returnValue(true));\r\n\t\t\r\n\t\t$actual = $this->service->getObjectById($id);\r\n\t\t$this->assertEquals($id, $actual->id);\r\n\t}", "title": "" }, { "docid": "53f594fc15887da97307a101918a16f7", "score": "0.553963", "text": "private function createContentMock() {\n\t\t$mock = $this->getMock('tslib_cObj', array('getTypoLink_URL'));\n\t\t$mock->expects($this->any())->method('getTypoLink_URL')\n\t\t\t->will($this->returnCallback(array($this, 'getTypoLinkUrl')));\n\n\t\treturn $mock;\n\t}", "title": "" }, { "docid": "7f4bfd95e538060cf7c0d1a41fc1c961", "score": "0.55025965", "text": "public function getObjectFromID($id) { return get_entity($id); }", "title": "" }, { "docid": "ecdbf3a30ccfc9bcd854d00235896fa1", "score": "0.54984874", "text": "public function createInstance()\n {\n $mock = $this->mock('Dhii\\\\SimpleTest\\\\Test\\\\ResultSetInterface')\n ->getResults()\n ->getResultsByStatus()\n ->new();\n\n return $mock;\n }", "title": "" }, { "docid": "db06eefcae6991bdc00664073c0fdc90", "score": "0.5482866", "text": "private function getHandle()\r\n {\r\n return $this->cacheGet('handle');\r\n }", "title": "" }, { "docid": "376ee4df7f076e953638f42b1b090216", "score": "0.547711", "text": "public function testGetById()\n {\n /**\n * create an id by post a new item\n */\n $responseText = $this->makeRequestWithSampleDataResponse('POST', $this->_bundle);\n\n $responseAsObject = \\GuzzleHttp\\json_decode($responseText);\n\n $id = $responseAsObject->content->return->id;\n\n /**\n * Test the get by id now\n */\n $response = $this->_client->request('GET', $this->_base_uri . '/' . $this->_bundle . '/' . $id);\n\n $responseText = (string)$response->getBody();\n\n $responseAsObject = \\GuzzleHttp\\json_decode($responseText);\n\n $this->assertEquals(200,$responseAsObject->status);\n }", "title": "" }, { "docid": "1734b09827859f21407fee12dc186a3a", "score": "0.54713696", "text": "public function lookupMatcher(string $id): ?\\PHPUnit\\Framework\\MockObject\\Matcher {}", "title": "" }, { "docid": "6ccf540a02d1d239eac4cfb97c941624", "score": "0.54707813", "text": "public function getByID($id)\n {\n }", "title": "" }, { "docid": "de4c57a93c3d973384de31dd8fbe3175", "score": "0.54508233", "text": "private function createContentMock() {\n\t\t$mock = $this->getMock('tslib_cObj', array('typoLink_URL'));\n\t\t$mock->expects($this->any())->method('typoLink_URL')\n\t\t\t->will($this->returnCallback(array($this, 'getTypoLinkUrl')));\n\n\t\treturn $mock;\n\t}", "title": "" }, { "docid": "7c667484a6f64ee3cc9458f6195b04e5", "score": "0.5447847", "text": "protected function getMockDriver()\n {\n $mock = $this->getMock('\\System\\Session\\Drivers\\Driver', ['id', 'load', 'save', 'delete']);\n\n $mock->expects($this->any())\n ->method('id')\n ->will($this->returnValue(Str::random(40)));\n\n return $mock;\n }", "title": "" }, { "docid": "a6043c25acdc162555a4817356df469e", "score": "0.54415184", "text": "public function find(int $id): object;", "title": "" }, { "docid": "e12d6f4f83aed9c3644161b9cd0d4064", "score": "0.54246473", "text": "public function getHelper( $handle ){\n $helper = '_helper_' . preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", $handle);\n if( $this->{$helper} === null ){\n $this->{$helper} = \\Core::make($handle);\n }\n return $this->{$helper};\n }", "title": "" }, { "docid": "1b68c5ced5eddb433337301c896d3717", "score": "0.54195905", "text": "public function getTraitMock(): MockObject\n {\n return $this->mock;\n }", "title": "" }, { "docid": "b3643732c1ddd394732c83d6d854f131", "score": "0.5414208", "text": "public function fetchMock($reference) {\n\t\tif (isset ( $this->_mocks [$reference] )) {\n\t\t\treturn $this->_mocks [$reference];\n\t\t}\n\t}", "title": "" }, { "docid": "a0bafe7aed7dbcc0ce64f0dac402250d", "score": "0.5392847", "text": "public function test_getById_called_executesCorrectly()\r\n\t{\r\n\t\t\r\n\t\t$object = $this->getObjectToInsert();\r\n\t\t$this->service->insert($object);\r\n\t\t\r\n\t\t$dao = $this->getNameDAOClass();\r\n\t\t$object2 = new $dao();\r\n\t\t\r\n\t\t$actual = $object2->getById(1);\r\n\t\t$this->assertEquals(1, $actual->id);\r\n\t}", "title": "" }, { "docid": "078a9695669f910430af934692a9efed", "score": "0.5370902", "text": "public function getHandle();", "title": "" }, { "docid": "3e5aaeeadb888be852e3d45ea625b856", "score": "0.5369104", "text": "public static function getObj($id) {\n\t\t$dataModel = new self ( );\n\t\t$select = $dataModel->select ();\n\t\t$select->where ('id = ?',$id);\n\t\treturn $dataModel->fetchRow($select);\n\t}", "title": "" }, { "docid": "3fde711827ee45dd71b79454dff8d845", "score": "0.53550977", "text": "private function getPaymentDataObjectMock()\n {\n $this->payment = $this->getMockBuilder(Payment::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $mock = $this->getMockBuilder(PaymentDataObject::class)\n ->setMethods(['getPayment', 'getOrder'])\n ->disableOriginalConstructor()\n ->getMock();\n\n $mock->method('getPayment')\n ->willReturn($this->payment);\n\n $order = $this->getMockBuilder(OrderAdapterInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $mock->method('getOrder')\n ->willReturn($order);\n\n return $mock;\n }", "title": "" }, { "docid": "b921c1017e32f1e0d921f8e4e09c5f2b", "score": "0.53544337", "text": "public function get_by_id($id);", "title": "" }, { "docid": "587e0ffc852910acd4bb6563b60374aa", "score": "0.53519255", "text": "function getById($id)\n {\n }", "title": "" }, { "docid": "b86bfc8cf9729e88c680cfa2a8296e09", "score": "0.53488296", "text": "public function test_it_returns_a_message_by_id(){\n $message = factory(Message::class)->create();\n\n //cuando ejecuta el metodo findByID\n $result = $this->repo->findById($message->id);\n\n //Entonces debo obtener el mensaje corecto\n $this->assertEquals($result->id, $message->id);\n\n }", "title": "" }, { "docid": "86876e61268d7d6dfeaf76df20a1edf0", "score": "0.53469557", "text": "abstract static public function getInstance($id);", "title": "" }, { "docid": "7bb029f991e09b958a59c8bfb1534199", "score": "0.5346639", "text": "public static function get_instance($id)\n {\n }", "title": "" }, { "docid": "3a816eb70a26edabec161824636fe2c2", "score": "0.5333239", "text": "public function getByID($id);", "title": "" }, { "docid": "3710182ce41b422feb6590f22333097a", "score": "0.531454", "text": "public function getOne($id);", "title": "" }, { "docid": "3710182ce41b422feb6590f22333097a", "score": "0.531454", "text": "public function getOne($id);", "title": "" }, { "docid": "061947923a9cfda0ed0f1f2321208860", "score": "0.53120935", "text": "public function getById ($id) {}", "title": "" }, { "docid": "e5fd8454832c29718397dcb5ea9b7a3a", "score": "0.5302372", "text": "protected function mock(array $parameters = [], ?string $literal = null): object\n {\n return $this->createMock($literal ?: $this->target,\n $parameters\n );\n }", "title": "" }, { "docid": "baf1471264e4de7e2fc304a745918daa", "score": "0.5293919", "text": "public function findById(int $id): object {\n return $this->getClient()->request('GET', $this->generateCiviCompatibleQueryString($this->getEntity($this),'get',[\n id => $id\n ]))->getBody();\n }", "title": "" }, { "docid": "688c587cac7b21b8caa73a21c70a71e0", "score": "0.52892727", "text": "public function mock($class, $params = [])\n {\n $mock = empty($params) ? Mockery::mock($class) : Mockery::mock($class, $params);\n\n $this->app->instance($class, $mock);\n\n return $mock;\n }", "title": "" }, { "docid": "acb2cee4aeccee48d35623b4d8f5d4ad", "score": "0.5283325", "text": "private function getResponseMock() {\n return $this->getMock('ImboClient\\Http\\Response\\ResponseInterface');\n }", "title": "" }, { "docid": "32f1f855ea61afc569cecb03fd4ac8e6", "score": "0.52809614", "text": "public function testIdCanBePassedInPlaceOfModel()\n {\n $task = factory(Task::class)->make();\n\n $this->repository->shouldReceive('find')->with($task->id)->once()->andReturn($task);\n $this->repository->shouldReceive('update')->with($task->id, ['is_queued' => true])->once()->andReturnNull();\n\n $this->service->handle($task->id);\n\n Bus::assertDispatched(RunTaskJob::class, function ($job) use ($task) {\n $this->assertEquals($task->id, $job->task, 'Assert job task matches parent task model.');\n $this->assertEquals($task->schedule_id, $job->schedule, 'Assert job is linked to correct schedule.');\n $this->assertEquals($task->time_offset, $job->delay, 'Assert job delay is set correctly to match task.');\n\n return true;\n });\n }", "title": "" }, { "docid": "85175f6d0e85481f1b666bef11f6a620", "score": "0.5278168", "text": "public function getById($id)\n {\n }", "title": "" }, { "docid": "28c25941b915ad75dfde392ed2821538", "score": "0.5266782", "text": "public function getReceiptById($handle, $id){\n $sql = \"SELECT * from recettes WHERE id=\" . $id . \";\";\n $stmt = $handle->query($sql);\n foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $r) {\n $res = new myRecette($r['id'], $r['mail'], $r['name']);\n }\n return $res;\n }", "title": "" }, { "docid": "6621b857d0a153392cdbaa644ecd0121", "score": "0.5259161", "text": "private function createApiMock()\n {\n $mock = $this\n ->getMockFactory(self::GITHUB_API_CLASS)\n ->getConstructorlessMock();\n return $mock;\n }", "title": "" }, { "docid": "e07aac0b545ddc7b94ad7aac8148aaeb", "score": "0.5252633", "text": "public function getById(): GetById\n {\n return new GetById($this->_provider);\n }", "title": "" }, { "docid": "6247211c6bca222b19c79896cad4dcf1", "score": "0.5248528", "text": "public function getObjectReturnsObject() {\n\t\t$realtyObject = new tx_realty_Model_RealtyObject();\n\t\t$this->fixture->setData(array('object' => $realtyObject));\n\n\t\t$this->assertSame(\n\t\t\t$realtyObject,\n\t\t\t$this->fixture->getObject()\n\t\t);\n\t}", "title": "" }, { "docid": "54b1d437c2a49a04a98610e5f9fd6f63", "score": "0.52390015", "text": "#[@test]\n public function newExpectationCreatedOnHandleInvocation() {\r\n $this->sut->handleInvocation('foo', null);\r\n $this->assertEquals(1, $this->expectationMap->size());\r\n $expectationList= $this->expectationMap->get('foo');\r\n $this->assertInstanceOf('unittest.mock.ExpectationList', $expectationList);\r\n $this->assertInstanceOf('unittest.mock.Expectation', $expectationList->getNext(array()));\r\n }", "title": "" }, { "docid": "ea8004ac1213d9832db42e144b58917e", "score": "0.5237175", "text": "public function getById(string $id)\n {\n }", "title": "" }, { "docid": "7fc5fc202fe872398254f3350810cc0c", "score": "0.5233875", "text": "public function mock($class)\n {\n $mock = Mockery::mock($class);\n\n $this->app->instance($class, $mock);\n\n return $mock;\n }", "title": "" }, { "docid": "23e2fafd5b20c3f064c9334d65d96a46", "score": "0.52059865", "text": "public function detach()\n {\n return $this->mockHandle();\n }", "title": "" }, { "docid": "1a016ece68c91610e14ee308c6679347", "score": "0.5203253", "text": "public function testGetHandle()\n {\n $request = new Request(new Client(), 'GET', '/test');\n\n $this->assertTrue(\n is_resource($request->getHandle()),\n \"Expecting the handle to be returned\"\n );\n }", "title": "" }, { "docid": "da3733370294f83f2959c86205a187e7", "score": "0.52009916", "text": "protected function createHttpMock() {\n\t\t$mock = new HttpMock();\n\t\t$this->httpMocks[] = $mock;\n\n\t\treturn $mock;\n\t}", "title": "" }, { "docid": "fdce1e70cb7c7f7840215119ecb1fc6b", "score": "0.51986974", "text": "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 }", "title": "" }, { "docid": "605492c979575b31405afb9228f40397", "score": "0.5198245", "text": "public static function get($id)\n {\n }", "title": "" }, { "docid": "19888cb5e9fd7dd9dab7f935e3785ae1", "score": "0.51889527", "text": "function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.5186556", "text": "public function getById($id);", "title": "" }, { "docid": "3d0f0b5dd5d4959ff54fc24ba01f46c9", "score": "0.51777446", "text": "public function testStubsAndMock()\n {\n $mock = \\Mockery::mock('foo'); // foo should be Class name\n\n $mock = \\Mockery::mock(); // it's acceptable but not good practice\n\n $mock = \\Mockery::mock('MyClass'); // recommended way\n\n $mock = \\Mockery::mock('MyInterface'); // also good practice\n\n $mock = \\Mockery::mock('MyClass, MyInterface, OtherInterface'); // it's also good practice\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "6bd7ff4f65a452ee3148e17df8361e0d", "score": "0.516614", "text": "private function getMockSM() {\n\n\t\t$I_mockLumber = \\Mockery::mock('MvlabsLumber\\Service\\Logger');\n\n\t\t// Working configuration\n\t\t$I_mockLumber->shouldReceive('isValidSeverityLevel')->with('alert')->andReturn(true);\n\t\t$I_mockLumber->shouldReceive('isValidSeverityLevel')->with('notice')->andReturn(true);\n\t\t$I_mockLumber->shouldReceive('isValidSeverityLevel')->with('SOMETHING_NOT_EXISTING')->andReturn(false);\n\n\t\t$I_mockLumber->shouldReceive('log')->andReturn(true);\n\n\t\t$I_mockSM = \\Mockery::mock('Zend\\ServiceManager\\ServiceManager');\n\t\t$I_mockSM->shouldReceive('get')->with('MvlabsLumber\\Service\\Logger')->andReturn($I_mockLumber);\n\n\t\t$I_mockSM->shouldReceive('get')->with('MvlabsLumber\\Service\\Logger')->andReturn($I_mockLumber);\n\n\t\t$I_response = new Response();\n\t\t$I_mockSM->shouldReceive('get')->with('Response')->andReturn($I_response);\n\n\t\t$I_request = new Request();\n\t\t$I_mockSM->shouldReceive('get')->with('Request')->andReturn($I_request);\n\n\t\treturn $I_mockSM;\n\n\t}", "title": "" }, { "docid": "506a49f1083e2194668935e8a0e55116", "score": "0.5151804", "text": "public static function getById($id);", "title": "" }, { "docid": "506a49f1083e2194668935e8a0e55116", "score": "0.5151804", "text": "public static function getById($id);", "title": "" }, { "docid": "5b43cc7f016d71fc23f18abdb3966a73", "score": "0.51377547", "text": "public function item()\n {\n return $this->getMock('Blesta\\Items\\Item\\Item');\n }", "title": "" }, { "docid": "adc7d832ef4b98c1bcd0a1d0fc098e41", "score": "0.5137572", "text": "private function getClientMock()\n {\n return $this->getMock('Helthe\\Monitor\\Client\\ClientInterface');\n }", "title": "" }, { "docid": "fe0faeab9f25ba1db8e0140cd52eed9f", "score": "0.51342636", "text": "private function createReferenceFactoryInterfaceMock()\n {\n return $this->getMockBuilder(ReferenceFactoryInterface::class)->getMock();\n }", "title": "" }, { "docid": "fe0faeab9f25ba1db8e0140cd52eed9f", "score": "0.51342636", "text": "private function createReferenceFactoryInterfaceMock()\n {\n return $this->getMockBuilder(ReferenceFactoryInterface::class)->getMock();\n }", "title": "" }, { "docid": "5ea1b8254c0508765721888bf1f50099", "score": "0.5123877", "text": "public function getModelByHandle($handle = null)\n {\n return null;\n }", "title": "" }, { "docid": "763db27c1e8cfafecc62189b4a064979", "score": "0.5117273", "text": "protected function mockery(string $literal = null): MockInterface\n {\n return Mockery::mock($literal ?: $this->target);\n }", "title": "" }, { "docid": "c246a22e69b00c60380d4aa054302122", "score": "0.51165986", "text": "public function mock()\n {\n $mock_data = new NF_Database_MockData();\n\n $mock_data->form_contact_form_1();\n $mock_data->form_contact_form_2();\n $mock_data->form_email_submission();\n $mock_data->form_long_form();\n }", "title": "" }, { "docid": "da48f35c9900ef49130f27ffcd5f0839", "score": "0.51162404", "text": "public function mock($key)\n\t{\n\t\t// more laravel retardation\n\t\tif ($key === 'swift.mailer') {\n\t\t\t$this->app->make('mailer')->setSwiftMailer($mock = m::mock('Swift_Mailer'));\n\t\t} else {\n\t\t\t$mock = m::mock(get_class($this->app->make($key)));\n\t\t\t$this->app->instance($key, $mock);\n\t\t}\n\n\t\treturn $mock;\n\t}", "title": "" }, { "docid": "c80dbb3c9cf9a83779fda2773afe40a4", "score": "0.5115215", "text": "function get_record($id)\n\t{\n\t\treturn $this->get_bare($id);\n\t}", "title": "" }, { "docid": "b78e4fdaaa6ae61e7d59e85364ae2140", "score": "0.5100804", "text": "private function mockPlayer(){\n $mock_player = $this->createMock(Player::class);\n $mock_player->method('obtainCard')->will($this->returnArgument(0));\n return $mock_player;\n }", "title": "" }, { "docid": "ef089a7191f9f29faffbe544958918c6", "score": "0.5094443", "text": "static function find($id)\n {\n $dbo = DB::get_dbo();\n\n $dbh = $dbo->prepare(\"SELECT * FROM \" . static::get_table_name() . \" WHERE id = ?\");\n $dbh->execute(array($id)) or (print_pdo_errors(\"insert\",$dbh) || die('Failed to run find query for model ' . get_class($this)));\n $result = $dbh->fetchObject();\n $class = get_called_class();\n\n if($result != null)\n return new $class($result);\n else\n return null;\n }", "title": "" }, { "docid": "dd206460c7b49a68b80a5f3a9bcef7fe", "score": "0.5093409", "text": "public static function find($id = null) {\n $object = static::create();\n if ($id == null) {\n return $object;\n } elseif (is_int($id)) {\n $this->load($id);\n return $object;\n } else {\n static::setId($id);\n return $object;\n }\n }", "title": "" }, { "docid": "96fbe53f8e8583a54119f269081e8a24", "score": "0.5090245", "text": "public function testSingle()\n {\n // Test query\n $sql = \"SELECT * FROM products WHERE id = :id\";\n // Preprare stmt\n $this->db->query($sql);\n // Bind params\n $this->db->bind(':id', 2);\n // Execute & fetch single row\n $record = $this->db->single();\n $this->assertIsObject($record);\n }", "title": "" }, { "docid": "4065017df41d25054f4057e400e51277", "score": "0.50895816", "text": "public function getMockForTrait(): \\PHPUnit\\Framework\\MockObject\\MockObject {}", "title": "" }, { "docid": "cf93e1a658c2015f0d642999d9ce2585", "score": "0.5065517", "text": "public function getOneById($id){\n $instance = $this->pi_repository->getOneById($id);\n $instance->makeHidden(['matching']);\n $instance->makeVisible(['definitionId']);\n $instance->definitionId = $instance->instanciator->id;\n return $instance;\n }", "title": "" }, { "docid": "c8451ab0616675d62ec740ca8382f027", "score": "0.5064994", "text": "public function getById($objectId);", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "51a83d3428546bf62ed3d1b8445fdc45", "score": "0.0", "text": "public function destroy(Order $order)\n {\n if($order->order_status != 'cart'){\n abort(403);\n }\n $order->delete();\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "6f5cb91b0423a11c78f100fc165554df", "score": "0.6959094", "text": "public function delete(ResourceInterface $resource);", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "55490a425cec5f2c2efea8b737497612", "score": "0.6737496", "text": "public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }", "title": "" }, { "docid": "ef862fedfa2a9a53bdc0c931abd5b9ef", "score": "0.6707853", "text": "public function destroy()\n {\n $this->resource->delete();\n }", "title": "" }, { "docid": "033a3fd474fdaf2c9dbcf9853f451cd2", "score": "0.664397", "text": "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 }", "title": "" }, { "docid": "4f49f964d082c69a3fe92671d08d3bc7", "score": "0.66371554", "text": "public function delete($cacheResource, $ignoreLifetime = false);", "title": "" }, { "docid": "47236fb1482f779e9251fd6998158877", "score": "0.65373594", "text": "public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }", "title": "" }, { "docid": "73af02f86d4e877d5ec7756885285cd4", "score": "0.6409313", "text": "function delete($resourceName);", "title": "" }, { "docid": "fd5668b2d59626254ea2b308c3b7b195", "score": "0.63944584", "text": "public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}", "title": "" }, { "docid": "66cab78c708362190959631c44dd73a1", "score": "0.6300312", "text": "public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }", "title": "" }, { "docid": "2a10b35926876411b2e80108cfe22fca", "score": "0.6298291", "text": "public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }", "title": "" }, { "docid": "89ce35850dffc0e6605778465129a8fa", "score": "0.62484", "text": "public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }", "title": "" }, { "docid": "2367dd4337c36bfe160c73cbfe965a9c", "score": "0.6222181", "text": "public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}", "title": "" }, { "docid": "07b2c5af4c184e58bf2887516d95f2ee", "score": "0.6152366", "text": "public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e83a85a6ecaba18a97b363f757bfe88", "score": "0.61334383", "text": "public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}", "title": "" }, { "docid": "0fd71148a5c7f18c479bf79390410ee6", "score": "0.6105545", "text": "public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }", "title": "" }, { "docid": "eaf52922cf2f9f3851b5dee384bd6ceb", "score": "0.60544735", "text": "public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}", "title": "" }, { "docid": "5d67ccf5357bc568ae73bc2554b4fcb3", "score": "0.60279834", "text": "function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "98d22295493f0020f84c312075af1ad7", "score": "0.60123336", "text": "function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a7e206f667720084df5493157a69cfb1", "score": "0.59848213", "text": "static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }", "title": "" }, { "docid": "896e95e8d1abd4f6c5eecd1940391bef", "score": "0.5978198", "text": "public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "46e2a3c32c6b5a596ae0cf2bf703c970", "score": "0.5958219", "text": "public function destroy($id)\n {\n $get=Document::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listDocument');\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "970f51bb911499288a1748bfe0157efa", "score": "0.5912158", "text": "public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }", "title": "" }, { "docid": "f1553c7757cc3676299373a5d3a835f9", "score": "0.5907517", "text": "public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "47945b59946db62fc806604498e46323", "score": "0.58641815", "text": "public function remove(FileInterface $file): FileInterface;", "title": "" }, { "docid": "d3158d405d4b489191764d14126b6336", "score": "0.5857253", "text": "public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }", "title": "" }, { "docid": "ce513fb382cd88ef0817a244ce395271", "score": "0.5824645", "text": "public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }", "title": "" }, { "docid": "b6078f9d34f26c367a9797120d6006ab", "score": "0.5818996", "text": "public function resourceHasBeenDeleted();", "title": "" }, { "docid": "c8394dead7326b95b49dd4f6c575a34a", "score": "0.58155316", "text": "public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "915ec80e489f9eed2bde0417b2f10a19", "score": "0.580295", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "b4ee6dc4b9942eba341457d6bf4d5638", "score": "0.5796796", "text": "public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }", "title": "" }, { "docid": "b48e565472dafa6e553cf8aee6f42a6a", "score": "0.578793", "text": "public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }", "title": "" }, { "docid": "532f8d58b20e101c1f5035990ba18e7e", "score": "0.57871205", "text": "public function cleanStorage();", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "0009889a5268b3415309c6899e972909", "score": "0.57663226", "text": "public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c6b6bfe5aeaa08992c1c1ff2c5e9ec", "score": "0.5732295", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "b6294af388de3ae8b010bbdd0e147a65", "score": "0.57102996", "text": "function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a1d82443b72d201e5ede999d05bf59f5", "score": "0.57096094", "text": "public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}", "title": "" }, { "docid": "9591ec5177ac179477cbd3c3ccaa275a", "score": "0.5706215", "text": "public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }", "title": "" }, { "docid": "cf195d4a522e74edc7019e572a06923c", "score": "0.5694188", "text": "public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "fe53bca8d325675dd4f80c6d519ce470", "score": "0.5679682", "text": "public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "c1ecca5c35e22313e1c38b1ddca48883", "score": "0.56521606", "text": "public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "ac44db6cd2e11be0502437646b98bec0", "score": "0.56515306", "text": "public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }", "title": "" }, { "docid": "3c36d7803d6dcac2a74d7850bf05b529", "score": "0.56461364", "text": "function deleteResource($model)\n {\n }", "title": "" }, { "docid": "198fe5623de140ddb980a64f1228ee9c", "score": "0.5643258", "text": "public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "ddb7a7e1bd529da0193a6825c4588bde", "score": "0.5632143", "text": "function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "cfb60ffcc989888bf5132bd8f18d28f3", "score": "0.563189", "text": "public function destroy(string $storageKey): bool;", "title": "" }, { "docid": "227d7db0fe495cc1b0734cf71cbc6374", "score": "0.5627202", "text": "public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }", "title": "" }, { "docid": "b2deedc135e4e9a6d691a34bc62901e4", "score": "0.5602831", "text": "public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "2551dae05d41b0f050dbd034df4e2093", "score": "0.5595374", "text": "public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }", "title": "" }, { "docid": "2dfd4b7a5b42f50b0f3186c2425fc4a3", "score": "0.55950236", "text": "public abstract function deleteAsset(Asset $asset);", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "eb676b82c99dc848aabda71793e9f00a", "score": "0.55856013", "text": "public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "0f5a2d5d4ccb6690f2c9b7c1ad81379c", "score": "0.55815697", "text": "public function delete() {\n\t\treturn unlink($this->path);\n\t}", "title": "" }, { "docid": "abcaf8d103f03089c84f7aa510afb02a", "score": "0.5578945", "text": "public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }", "title": "" }, { "docid": "6955ff701e4315c5cfa7e2767eafdbcf", "score": "0.55788815", "text": "public function clear($in_storage_too = true);", "title": "" }, { "docid": "f576b22c84d78e83b91d5036361a095c", "score": "0.55780953", "text": "public function delete($filename = null);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "930240c93dd67bc31042064adb044402", "score": "0.55683106", "text": "public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }", "title": "" }, { "docid": "f7e801c4eebb9a1d03e7feec4ecd5f21", "score": "0.5567041", "text": "public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }", "title": "" }, { "docid": "f392b1ed7db16f604f843adb672ef950", "score": "0.55653834", "text": "public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}", "title": "" }, { "docid": "0a10bad03f5df8b55f39176b0c613baa", "score": "0.55647546", "text": "public function remove(string $path)\n {\n $this->set($path, null);\n }", "title": "" }, { "docid": "adc4e9de22fd8f0d6314e35dcee0b8e0", "score": "0.5563022", "text": "public function remove(string $object): void;", "title": "" }, { "docid": "37d5927bb51b78bdcea795a632988120", "score": "0.55617017", "text": "public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}", "title": "" }, { "docid": "61d679086bf634ff55d0bc8a41a70710", "score": "0.5561249", "text": "public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }", "title": "" }, { "docid": "40424bbe7e79c788acc8e40fa96c2e17", "score": "0.5556214", "text": "public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "b877c987e8cb3298dc4c9f11662792f9", "score": "0.55559146", "text": "public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }", "title": "" }, { "docid": "09d16b97894d6829ff484d20cf378f8f", "score": "0.555526", "text": "public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }", "title": "" }, { "docid": "19530e0d90a5511cefec030646832ac7", "score": "0.55509293", "text": "function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}", "title": "" }, { "docid": "3fa04699fe14eb03c48cfde3470db201", "score": "0.55502915", "text": "public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }", "title": "" }, { "docid": "94b6f2ef01c97218c0ea77ca980a8947", "score": "0.55452746", "text": "public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "51ecf73cbf0ed20291ef32754f32287e", "score": "0.55377126", "text": "public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }", "title": "" }, { "docid": "30d0b23b0b35054a9dcfaf9fdc529aa5", "score": "0.5532588", "text": "public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
e7eac160764ef0010f990db1b4cae76c
Get current widget id
[ { "docid": "b32c173db8111e48503731336d83fa09", "score": "0.8261512", "text": "public function getWidgetId()\n\t{\n\t\treturn $this->widgetId;\n\t}", "title": "" } ]
[ { "docid": "971270f57ca91ffd327b57bd7d48660f", "score": "0.8404996", "text": "public function getWidgetID()\n {\n return $this->widget_id ?: '';\n }", "title": "" }, { "docid": "63c2cc2f71e898129f502a1ab3587935", "score": "0.719008", "text": "function ct_support_get_widget_id($widget_instance) {\n if ($widget_instance->number==\"__i__\"){\n echo \"<p><strong>Widget ID is</strong>: Pls save the widget first!</p>\";\n } else {\n echo \"<p><strong>Widget ID is: </strong>\" .$widget_instance->id. \"</p>\";\n }\n}", "title": "" }, { "docid": "556dee2227ffe621736d4b66a039501d", "score": "0.68919617", "text": "function spice_get_widget_id($widget_instance) { \n if ($widget_instance->number==\"__i__\"){\n echo \"<p><strong>Widget ID is</strong>: Pls save the widget first!</p>\";\n } else {\n echo \"<p><strong>Widget ID is: </strong>\" .$widget_instance->id. \"</p>\";\n }\n}", "title": "" }, { "docid": "484c99e8848ae958a8820884dd2f3906", "score": "0.6739373", "text": "public function getWidgetId($autoGenerate = true) {\n if ($this->_widgetId !== null) {\n return $this->_widgetId;\n } elseif ($autoGenerate) {\n return $this->_widgetId = 'ycw' . self::$_counter++;\n }\n }", "title": "" }, { "docid": "b4b189657915d9ac5fa71a8c59425026", "score": "0.6719626", "text": "protected function get_current_id()\n {\n }", "title": "" }, { "docid": "27a206334a7f06f26dd4e1a412bcd067", "score": "0.66490895", "text": "public function getCurrentId()\n {\n $product = $this->registry->registry('current_product');\n return $product->getId();\n }", "title": "" }, { "docid": "1328b1677564c7b41ee2e656a8f5f231", "score": "0.65999156", "text": "public static function currentID(){\n return self::$ID;\n }", "title": "" }, { "docid": "465d200a0e6576954e5979761474c40e", "score": "0.65876293", "text": "function widget_id_callback() {\n\t?>\n\n\t\t<input type=\"input\" id=\"chatlio_options[widget_id]\" name=\"chatlio_options[widget_id]\" value=\"<?php esc_attr_e( $this->options['widget_id'] ); ?>\" >\n\t\t<label for=\"chatlio_options[widget_id]\"><?php _e('Add your Widget ID to enable Chatlio', 'chatlio'); ?></label>\n\n\t<?php\n\t}", "title": "" }, { "docid": "7d9604698d2c7c2ff631d56a4a6091c0", "score": "0.6516051", "text": "public static function get_widget_instance_key( $widget_id ) {\n\t\t// Grab all numbers from the end of the id.\n\t\tpreg_match('/(\\d+)$/', $widget_id, $matches );\n\n\t\treturn intval( $matches[0] );\n\t}", "title": "" }, { "docid": "1ae34c5dc41e3d985a630edf73c1b4f1", "score": "0.6476195", "text": "private function get_current_post_ID() {\n\t\t$id = '';\n\n\t\tif ( $this->doing_ajax ) {\n\t\t\t$id = url_to_postid( wp_get_referer() );\n\t\t}\n\n\t\treturn $id ?: vcex_get_the_ID();\n\t}", "title": "" }, { "docid": "f43d9afe3f23700a5ae3fe66fb859ac3", "score": "0.6459265", "text": "protected function get_current_object_id() {\n\t\treturn get_the_ID();\n\t}", "title": "" }, { "docid": "e6952dddf64e8b1ab0de14f04f1639cf", "score": "0.6440931", "text": "public function get_widget_key($id_base)\n {\n }", "title": "" }, { "docid": "af4f06fafa825b9dd8490b7aa695c351", "score": "0.6354282", "text": "public function getWidgetByID( $id );", "title": "" }, { "docid": "fa475dee2dcfabcf84957a43bf61269b", "score": "0.63063425", "text": "public function getButtonId()\n {\n if (isset(self::getButtonIds()[$this->name])) {\n return self::getButtonIds()[$this->name];\n }\n return null;\n }", "title": "" }, { "docid": "59bdfa3372a77ab4e1bbf85b296ad4dc", "score": "0.6293043", "text": "public function get_widget_slug() {\n return $this->widget_slug;\n }", "title": "" }, { "docid": "a1b43cd99561120f28673f156ef6c3c3", "score": "0.6291239", "text": "public function getCurrentId() {\n\t\treturn $this->current_user;\n\t}", "title": "" }, { "docid": "f6ad43c419deadd70e1ae2d7aa70a909", "score": "0.6271452", "text": "public final function get_instance_id() {\n\t\treturn $this->instance;\n\t}", "title": "" }, { "docid": "c35d2ece50c58755ed86ff82743ccf7d", "score": "0.6257697", "text": "public function setWidgetId($value) {\n $this->_widgetId = $value;\n }", "title": "" }, { "docid": "421b6d75af76c4ed491de584621fc897", "score": "0.62515503", "text": "protected function get_current_screen_id() {\n\n\t\t$screen = get_current_screen();\n\t\treturn $screen->id;\n\n\t}", "title": "" }, { "docid": "c3c722f153aa2fbaf488f0d58d70e2e6", "score": "0.6238151", "text": "public function GetCurrentId(){\n return ($this->rid != '') ? $this->rid : '';\n }", "title": "" }, { "docid": "b15f862f18ef91336e1f64d2b4804402", "score": "0.62349814", "text": "public function getId()\n {\n $slot = $this->registry->registry('slot_id');\n return $slot ? $slot : null;\n }", "title": "" }, { "docid": "5eb190f8811d40c231578f66cf34bbe2", "score": "0.6228929", "text": "public function get_widget_slug() {\n\n\t\t\treturn $this->widget_slug;\n\n\t\t}", "title": "" }, { "docid": "86cc8126a12db9b0fa65f4e1fad34ae2", "score": "0.62159437", "text": "public function getId()\n {\n\n // wenn keine id existiert fällt das objekt automatisch auf einen generiert\n // unique id zurück\n if (!is_null($this->id ) )\n return $this->id;\n else\n return 'wgt-tab-'.uniqid();\n\n }", "title": "" }, { "docid": "222018900fe1c351eeeb12379eac7867", "score": "0.62078875", "text": "public function get_setting_id($widget_id)\n {\n }", "title": "" }, { "docid": "bed87eca4a8cfe31ca84ad4cf8a7ad76", "score": "0.62059355", "text": "public static function id()\n {\n if (! array_key_exists('id', static::current() ?? [])) {\n Helpers::abort(sprintf('Invalid project ID. Please verify your Vapor manifest at [%s].', Path::manifest()));\n }\n\n return static::current()['id'];\n }", "title": "" }, { "docid": "4062616fe5d59ef48d1ce60cad4c26f8", "score": "0.61866295", "text": "function get_current_blog_id() {}", "title": "" }, { "docid": "6c630be6d163fbac738d09a1960dded3", "score": "0.6179973", "text": "public static function get_widget_id_base( $widget_id ) {\n\t\t// Grab what's before the hyphen.\n\t\treturn substr( $widget_id, 0, strrpos( $widget_id, '-' ) );\n\t}", "title": "" }, { "docid": "e74e1415824e904904b6334ce2e40163", "score": "0.6173603", "text": "protected function get_id() {\n\t\treturn 'bbpress';\n\t}", "title": "" }, { "docid": "6ea2648c8a83ae7f5e0cbbe2ff397c20", "score": "0.61563206", "text": "public function get_id() {\n\t\treturn $this->jsid;\n\t}", "title": "" }, { "docid": "ca59afc482aa0bd5513d8201c6683b4f", "score": "0.61516106", "text": "static function currentId() {\n $userId = 0;\n if (Auth::user()) {\n $userId = Auth::user()->id;\n }\n return $userId;\n }", "title": "" }, { "docid": "e3619a6b6cec6b84be5c7a1d175bc5fb", "score": "0.6141794", "text": "public function getWidget();", "title": "" }, { "docid": "e3619a6b6cec6b84be5c7a1d175bc5fb", "score": "0.6141794", "text": "public function getWidget();", "title": "" }, { "docid": "9ed44ba61226df348220f224fae807bc", "score": "0.61273557", "text": "public function getElementId()\n {\n return $this->_elementId ? $this->_elementId : $this->_defaultElementId;\n }", "title": "" }, { "docid": "d6e62dfefe6239ddb9540d7479abaccc", "score": "0.61181515", "text": "protected static function getCurrentPageId() {\n return (int)\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::_GP('id');\n }", "title": "" }, { "docid": "9d19f2989e025d6088fdf4bcf4c41cae", "score": "0.6115186", "text": "public function getWidget() {\n return $this->widget;\n }", "title": "" }, { "docid": "c422b6a7ff3d3beb94dc37710eb74bf9", "score": "0.6106493", "text": "function get_id() {\n\t\treturn static::ID;\n\t}", "title": "" }, { "docid": "411edc9823de2bf473075e306a8040bb", "score": "0.60907876", "text": "public function get_current_form_id() {\n\n\t\t// Get the current form.\n\t\t$form = $this->get_current_form();\n\n\t\treturn $form ? rgar( $form, 'id' ) : false;\n\n\t}", "title": "" }, { "docid": "8abced358f16d2f272f50a4c34075cb7", "score": "0.60806453", "text": "public function getWrapperId()\n {\n if ($this->blnUseWrapper) {\n return $this->ControlId . '_ctl';\n } else {\n return $this->ControlId;\n }\n }", "title": "" }, { "docid": "b3431eb34d1cbd13da25972ef8f156ab", "score": "0.60803735", "text": "function sp_current_page_id() {\n\tglobal $wp_query;\n\t\n\tif ( is_object( $wp_query ) && isset( $wp_query->queried_object_id ) )\n\t\t$post_id = $wp_query->queried_object_id;\n\telse {\n\t\t$post_id = null;\n\t}\n\n\treturn $post_id;\n}", "title": "" }, { "docid": "005f5c8b105dc9af51c6324b611c1f05", "score": "0.6077464", "text": "function get_id() {\n\t\t\treturn $this->get_name();\n\t\t}", "title": "" }, { "docid": "80d8686bd00768a31f9fe9f0a9360f32", "score": "0.60492", "text": "public static function getCurrentArticleId() {\n\t\treturn self::getContainer()->getCurrentArticleID();\n\t}", "title": "" }, { "docid": "bfd44a8cc6eea57694f8fd14430c21d6", "score": "0.60379833", "text": "public function getCurrentId()\n {\n if ($this->storage->has(self::LANGUAGE_CONTENT_STORAGE_KEY)) {\n return $this->storage->get(self::LANGUAGE_CONTENT_STORAGE_KEY);\n }\n\n if ($this->hasDefault()) {\n return $this->getDefaultId();\n }\n\n return '1';\n }", "title": "" }, { "docid": "16b6cf05738e3631c5492ebf2c116ea9", "score": "0.6034689", "text": "public function getId()\n {\n return $this->decorated->getId();\n }", "title": "" }, { "docid": "449a8db9dbfa50873fbccc664e7ed756", "score": "0.60230917", "text": "protected function get_api_id() {\n\n\t\treturn $this->get_gateway()->get_id();\n\t}", "title": "" }, { "docid": "25a8abe4bbeafef43bbddf3be4b2daa4", "score": "0.6015177", "text": "public static function id() {\n\t\treturn self::$_id;\n\t}", "title": "" }, { "docid": "53df881a0ad6dd2a734e278d43be419c", "score": "0.59999937", "text": "public function id()\n {\n return $this->attr('id');\n }", "title": "" }, { "docid": "8b4e6285cbdae554462b4937449af713", "score": "0.59984356", "text": "public function getCurrentId() {\n return empty($this->domainData['domain_id']) ? 0 : $this->domainData['domain_id'];\n }", "title": "" }, { "docid": "7ce723d8e31010f8d3257580d97332e7", "score": "0.5985369", "text": "protected function _get_id_cur()\n\t{\n\t\treturn ($this->uri->rsegment(2) == 'add')\n\t\t\t? fake_id_get('slider_item') \n\t\t\t: $this->uri->rsegment(3);\n\t}", "title": "" }, { "docid": "89535c3e7f7fa936af1cd0511f7b0669", "score": "0.5981697", "text": "public function wpId() {\n return $this->id;\n }", "title": "" }, { "docid": "3bc863db9db640209e0ec4d2a3233d4c", "score": "0.5968643", "text": "public function getWpId() {\n return $this->wpid;\n }", "title": "" }, { "docid": "0fb6c68bb012a8db1f7c208eb25c7577", "score": "0.59686226", "text": "public function getId()\n {\n return $this->config->getId();\n }", "title": "" }, { "docid": "1ee5b3dbb8356b60bd0e8639b827caee", "score": "0.5964461", "text": "function getReviewFormId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->getId();\n\t}", "title": "" }, { "docid": "3adbe187a24df9e1e8f8a241f391009f", "score": "0.59583026", "text": "public function theID() {\n\t\t\t$id = $this->getID();\n\t\t\techo empty($id) ? '' : sprintf(' id=\"%s\"', esc_attr($id));\n\t\t}", "title": "" }, { "docid": "83d2b050788555ce8f320bf26fea94c0", "score": "0.5940907", "text": "public function getId() \n {\n return $this->isLogged() ? $this->id : 0;\n }", "title": "" }, { "docid": "1bbcd35452d677c1ae6f85a0d8d3b1ed", "score": "0.593499", "text": "public static function get_app_id ()\n {\n $ops = self::get_options();\n return ( ! empty( $ops['client_id'] ) ? esc_attr( $ops['client_id'] ) : '' );\n }", "title": "" }, { "docid": "024614b4853367c6603244d6d331fdfb", "score": "0.5934654", "text": "public function getId()\n {\n return trim($this->getModuleHelper()->getId());\n }", "title": "" }, { "docid": "f7511d5962e2b6744a61b52b26c67168", "score": "0.592778", "text": "public static function currentIDC()\n {\n return defined('CURRENT_TAG') ? CURRENT_TAG : 'default';\n }", "title": "" }, { "docid": "c61820887a53d2efa4f74540239937a2", "score": "0.5916637", "text": "protected function get_id() {\n\t\treturn self::ID;\n\t}", "title": "" }, { "docid": "6174adfb6afb1dd48f87cde09f724a42", "score": "0.59116554", "text": "public static function GetCurrentLoginId()\n\t{\n\t\t$current_user = Page::GetCurrentLogin();\n\t\tif(!empty($current_user))\n\t\t{\n\t\t\treturn $current_user[\"id\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "c9f782ddd5902346fe7dcc277a109314", "score": "0.5907911", "text": "function publisher_get_theme_panel_id() {\n\n\t\treturn 'bs_' . 'publisher_theme_options';\n\t}", "title": "" }, { "docid": "83b286d177e8deed13b0fa479863650f", "score": "0.5906193", "text": "public function getId()\n {\n $id = parent::getId();\n if ($id !== null && $id !== static::DEFAULT_CHANGE) {\n $id = intval($id);\n }\n return $id;\n }", "title": "" }, { "docid": "c47be5473ee822c62625a1ee01d708e0", "score": "0.59040636", "text": "public function getCurrentViewerId()\n {\n if (null == $this -> _viewerId)\n {\n $this -> _viewerId = Engine_Api::_() -> user() -> getViewer() -> getIdentity();\n }\n return $this -> _viewerId;\n }", "title": "" }, { "docid": "e6509fd64e9b658e82570527c599ed68", "score": "0.5903524", "text": "public function getId() {\r\n return $this->form->getId() . Form_Object::SEPARATOR . $this->name;\r\n }", "title": "" }, { "docid": "4b166719cc35f6aef2a106a20e81b206", "score": "0.5902318", "text": "protected function getCurrentParamId() {\n global $start;\n $id = null;\n if($start->isParam('id')){\n $id = $start->getParam('id');\n }\n return $id;\n }", "title": "" }, { "docid": "2f4e56ea8ba81d4e4fa1e005488c4fe6", "score": "0.5901773", "text": "function exodus_sidebar_id() {\n\n\t// Based on current content type (sermon, event, etc.)\n\t$id = 'ctcom-' . ctfw_current_content_type();\n\n\treturn apply_filters( 'exodus_sidebar_id', $id );\n\n}", "title": "" }, { "docid": "539e5fcaca4a4eea103f756a810d0f09", "score": "0.5901767", "text": "public static function id()\n\t\t{\n\t\t\treturn self::$_id;\n\t\t}", "title": "" }, { "docid": "27b079565fad240019f797e46d2c6ebe", "score": "0.5900845", "text": "public function getWidgetDefinitionName()\n {\n return $this->widgetDefinitionName;\n }", "title": "" }, { "docid": "b604f016d3a1417c849b224288b7eb9c", "score": "0.58959985", "text": "protected function _getFormAccessorId()\n {\n if ($this->getFieldForId() === null)\n {\n // guess at form field id\n $this->getForm()->rewind();\n\n $field = $this->getForm()->current();\n }\n else\n {\n $field = $this->getForm()->offSetGet($this->getFieldForId());\n }\n\n // field might be field holding more fields\n $field = $this->_getFirstFormField($field);\n\n // we need to set the id format otherwise it might be wrong\n $widget = clone $field->getWidget();\n $widget->setIdFormat($this->getForm()->getWidgetSchema()->getIdFormat());\n\n return $widget->generateId($field->renderName());\n }", "title": "" }, { "docid": "db203310d222f535f7d0215a4a30c64a", "score": "0.5891706", "text": "private function _getId()\n {\n $id = $this->_id;\n\n if (!$id && $this->_name) {\n $id = $this->_name;\n if ($this->_type == 'radio') {\n $id .= '-' . str_slug($this->_meta['value']);\n }\n }\n\n if(!$id) {\n return null;\n }\n\n return $this->_FidPrefix . $id;\n }", "title": "" }, { "docid": "40f682374083d51e8204dc798196e704", "score": "0.5884185", "text": "function get_the_ID() {}", "title": "" }, { "docid": "b19f8de8181768dee10cce0d8c41ac84", "score": "0.58811575", "text": "public function getSliderId() {\n\t\t$id = get_theme_mod( 'slider_setting', '' );\n\n\t\t$slider = do_shortcode( '[smartslider3 slider=' . $id . ']' );\n\n\t\treturn $slider;\n\t}", "title": "" }, { "docid": "e06d2f704ccf4ec5f3dc939df3c01572", "score": "0.5875678", "text": "protected function getFrameId()\n {\n return $this->id . '-frame';\n }", "title": "" }, { "docid": "9384faabaa59dced93104ee41a28d1b8", "score": "0.58686393", "text": "public function get_widget_object($id_base)\n {\n }", "title": "" }, { "docid": "ea409a47e4fbb2aa14460631be7f736d", "score": "0.5868502", "text": "public function getMyId()\n {\n if (null === self::$myId) {\n self::$myId = Ar::get($this->slackApi->rtmStart(), 'self.id');\n }\n return self::$myId;\n }", "title": "" }, { "docid": "92c92b95f6e8bbe6937d9dd8a7fb65c0", "score": "0.5865153", "text": "function getCurrentResourceID(){\r\n\t\tif(isset($this->modx->resource)){\r\n\t\t\treturn $this->modx->resource->get('id');\r\n\t\t};\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "bc47714c0ae185b922b6ed4b90e63ef0", "score": "0.58607656", "text": "function my_epl_wet_widget_instance_id( $query ) {\n\n\tif ( $query->get( 'is_epl_recent_property_widget' ) ) { \n\t\tvar_dump( $query->get('epl_widget_instance') );\n\t}\n\n}", "title": "" }, { "docid": "7dcf1f3fa9caa5101b4db833e83de53d", "score": "0.5858452", "text": "public function getPluginId();", "title": "" }, { "docid": "7dcf1f3fa9caa5101b4db833e83de53d", "score": "0.5858452", "text": "public function getPluginId();", "title": "" }, { "docid": "7dcf1f3fa9caa5101b4db833e83de53d", "score": "0.5858452", "text": "public function getPluginId();", "title": "" }, { "docid": "0666d15ebe2de5e5c66827efb0e41df1", "score": "0.5844636", "text": "public function getCurrentId()\n {\n // We have programmatically bootstrapped Drupal core, so able to use such functionality.\n $args = arg();\n\n return count($args) > 1 && $this->entityType() === $args[0] && $args[1] > 0 ? (int) $args[1] : 0;\n }", "title": "" }, { "docid": "24ced9c531f91b420c902a53cdc0252b", "score": "0.58435774", "text": "public function getId()\n {\n return $this->__get(\"id\");\n }", "title": "" }, { "docid": "ddb07759f1d088129f122e52f84957b7", "score": "0.58374584", "text": "public function getFormId();", "title": "" }, { "docid": "d120641a46b6828c9e7157a284161bdb", "score": "0.5834939", "text": "public function get_wc_id() {\n\t\treturn $this->externalId;\n\t}", "title": "" }, { "docid": "7982af36b481d17aaba4f2f96d80f5b9", "score": "0.58337", "text": "protected function getWorkspaceID() {\n $workspace_id = $this->input->getOption('workspace');\n\n if (!$workspace_id) {\n $workspaces = $this->togglClient->getWorkspaces();\n $options = array();\n foreach ($workspaces as $i => $workspace) {\n $options[$i] = sprintf('%s [ID:%d]', $workspace['name'], $workspace['id']);\n }\n\n $workspace_name = $this->question->ask($this->input, $this->output, new ChoiceQuestion('Select your workspace:', $options));\n\n $index = array_search($workspace_name, $options);\n $workspace_id = $workspaces[$index]['id'];\n }\n\n return $workspace_id;\n }", "title": "" }, { "docid": "77e3c0d876f02b86c684b268bf8c5807", "score": "0.5832495", "text": "private function getStyleId() {\n \treturn $this->properties->getWidgetProperty(self::PROPERTY_STYLE_ID);\n }", "title": "" }, { "docid": "8e8b8e29103e83b3f80a36f80f5f07f4", "score": "0.58317155", "text": "public function getId(): string\n {\n return $this->element_id;\n }", "title": "" }, { "docid": "2d9dc52a8d69a8532aa72054cc90f376", "score": "0.5821105", "text": "public function getCurrentSystemId() {\n\t\treturn (string) get_current_blog_id();\n\t}", "title": "" }, { "docid": "e03e0e9e159ee73e01db5ec2dbdb0e23", "score": "0.58173186", "text": "protected function get_form_identifier() {\n $formid = $this->_customdata->id.'_'.get_class($this);\n return $formid;\n }", "title": "" }, { "docid": "e03e0e9e159ee73e01db5ec2dbdb0e23", "score": "0.58173186", "text": "protected function get_form_identifier() {\n $formid = $this->_customdata->id.'_'.get_class($this);\n return $formid;\n }", "title": "" }, { "docid": "71edcee36c3da8bbae91f6ea37a74a9e", "score": "0.5815088", "text": "public function getID() {\n if (isset($this->_template) === false) {\n $this->set();\n }\n\n return $this->_template_id;\n }", "title": "" }, { "docid": "8c178487407933201b250f8a38dad307", "score": "0.58108073", "text": "function githuber_get_current_post_id() {\n\n\tglobal $post;\n\n\t$post_id = null;\n\n\tif ( ! empty( $post ) ) {\n\t\t$post_id = $post->ID;\n\t} elseif ( ! empty( $_REQUEST['post'] ) ) {\n\t\t$post_id = $_REQUEST['post'];\n\t} elseif ( ! empty( $_REQUEST['post_ID'] ) ) {\n\t\t$post_id = $_REQUEST['post_ID'];\n\t}\n\t\n\treturn $post_id;\n}", "title": "" }, { "docid": "113bdf18a69695b19426c93c77ca97a8", "score": "0.5806082", "text": "public function getID()\n {\n return sprintf('[Browser:%s]', basename(get_class($this)));\n }", "title": "" }, { "docid": "41055841ac3c75b03d6934aff2a09469", "score": "0.5804067", "text": "abstract public function getWidgetName();", "title": "" }, { "docid": "95b9367e3e0dd2a1d916fa3a4fa366b5", "score": "0.5800736", "text": "public function getJqControlId()\n {\n return $this->ControlId . '_ctl';\n }", "title": "" }, { "docid": "d4b763816fa09441ea97046d85760a6e", "score": "0.57993454", "text": "public function getID()\n {\n return $this->auto_playlist_id;\n }", "title": "" }, { "docid": "942de5d5a54714b2925ce892511fb284", "score": "0.57975215", "text": "public function get_id() {\r\r\n\t\treturn apply_filters( 'bookyourtravel_entity_id', $this->post ? $this->id : null, $this );\r\r\n\t}", "title": "" }, { "docid": "6bd20099f375c9a49cc485b4a8fb52c6", "score": "0.57974476", "text": "public function uniqueId()\n {\n return $this->outbox->id;\n }", "title": "" }, { "docid": "592bf5f5ea9b78239c86afdd357eadbb", "score": "0.5786099", "text": "public function get_id() {\n\t\treturn $this->post->ID;\n\t}", "title": "" }, { "docid": "bf13524b78745da3d116d9a92c2fbec8", "score": "0.57779825", "text": "private function getDisplayedThemeId(){\n\t\treturn $this->getDisplayedThemeYear() . \"-\" . $this->getDisplayedThemeMonth();\n\t}", "title": "" }, { "docid": "791e3b62d86e14f39dc6f4b67adeae0b", "score": "0.5768739", "text": "function bp_get_current_component_page_id() {\n\n\t$id = 0;\n\t\n\tif ( function_exists('bp_current_component') ) {\n\t\tif ( bp_is_directory() ) {\n\n\t\t\t$component = bp_current_component();\n\t\t\n\t\t\tif ( ! empty( $component ) ) {\n\t\t\t\t$bp_pages = get_option( 'bp-pages' );\n\t\t\t\tif ( isset( $bp_pages[$component]) ) {\n\t\t\t\t\t$id = $bp_pages[$component];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $id;\n\n}", "title": "" } ]
c1309b6cf7b1eb9530656d994b516f7f
check if coming directly from a session
[ { "docid": "6d15138cd04c5a6623a48e6702a87341", "score": "0.0", "text": "function createSelectStackForm($extra=false, $title='Appion: Select Maskiton Stack', $heading='Select Maskiton Stack') \n{\n $expId = $_GET['expId'];\n\tif ($expId) {\n\t\t$sessionId=$expId;\n\t\t$formAction=$_SERVER['PHP_SELF'].\"?expId=$expId\";\n\t}\n\telse {\n\t\t$sessionId=$_POST['sessionId'];\n\t\t$formAction=$_SERVER['PHP_SELF'];\t\n\t}\n\t\t\n\t$particle = new particledata();\n\t\n\t// find each stack entry in database\n\t$stackIds = $particle->getStackIds($expId);\n\t\n\t// remove stacks with no particles\n\t$filteredStackIds = array();\n\tforeach ($stackIds as $stackId) {\n\t\t$numpart = $particle->getNumStackParticles($stackId['stackid']);\n\t\tif ($numpart != 0) { \n\t\t\t$filteredStackIds[] = $stackId['stackid'];\n\t\t}\n\t}\n\n\tprocessing_header($title,$heading,$javafunc);\n\n\techo \"<form name='maskiton' method='POST' ACTION='$formAction'>\";\n\techo \"<b>Select a stack:</b><br>\";\n\techo \"<P><input type='SUBMIT' NAME='submitstack' VALUE='Use selected stack'>\";\n\n\techo \"<br /><br />\";\n \n\techo \"<table class='tableborder' border='1'>\\n\";\n\tforeach ($filteredStackIds as $stackId) {\n\t\techo \"<tr><td>\\n\";\n\t\techo \"<input type='radio' NAME='stackval' value='$stackId' \";\t\t\n\t\techo \">\\n\";\n\t\techo \"Use<br/>Stack\\n\";\n\n\t\techo \"</td><td>\\n\";\t\n\t\techo stacksummarytable( $stackId, True, False, False );\n\t\techo \"</td></tr>\\n\";\n\t}\n\techo \"</table>\\n\\n\";\t\n\n\techo \"<P><input type='SUBMIT' NAME='submitstack' VALUE='Use selected stack'>\";\n\techo \"</form>\";\n\n\techo showReference( \"appion\" );\n\tprocessing_footer();\n}", "title": "" } ]
[ { "docid": "189427605707ee0edd8a28bed04c97c4", "score": "0.7836479", "text": "public function isSession(): bool;", "title": "" }, { "docid": "92e1ba34d011d38925c58ca7af3f3255", "score": "0.76795393", "text": "function CheckSession()\r\n{\r\n\treturn(GetLoggedInUserId() != null);\r\n}", "title": "" }, { "docid": "eac052ad399c057fd14456edbd73adfb", "score": "0.75263965", "text": "public function checkSession(){\n return empty($_SESSION['authUser'])? false : true;\n }", "title": "" }, { "docid": "0c802ac92ab936b593c02e11e7ebf1f2", "score": "0.7511182", "text": "public function isSessionStarting();", "title": "" }, { "docid": "28c7fdae7045583200b58da7b92f3d78", "score": "0.748014", "text": "protected function _checkSession()\r\n {\r\n if ($this->ion_auth->logged_in())\r\n {\r\n \r\n }\r\n }", "title": "" }, { "docid": "62cefe2a23004699070ef04b7e8b03c2", "score": "0.74661696", "text": "function isLogged() { return (bool) getSessionId();\t}", "title": "" }, { "docid": "3587f044a4e3045fee4f60b26447bc27", "score": "0.74594146", "text": "public function checkSession(){\n session_start();\n if(isset($_SESSION['user_id'])){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5d6adf5f1cf548a40a0692c9bb160ad8", "score": "0.7377864", "text": "public function isSession() {\n\n\t \t\t return $this->isSession === true ? true : false;\n\t }", "title": "" }, { "docid": "cefc85cdbb7d3e654c91bd4718a9a889", "score": "0.7343007", "text": "static function hasAccess() {\r\n\t\t\tsession_start();\r\n\t\t\treturn (isset($_SESSION[\"user\"]));\t\r\n\t\t}", "title": "" }, { "docid": "7a6735e37cd1778ba54c6fa6e75c35e6", "score": "0.73259586", "text": "private function isGotSessionKey(){\r\n\t\treturn empty($this->_session_key) ? false : true;\r\n\t}", "title": "" }, { "docid": "32c574f8faf41a8011e442a36e843b97", "score": "0.7316645", "text": "public function isAuthentified()\n {\n return isset($_SESSION['id']);\n }", "title": "" }, { "docid": "92062135c652177c67e50439a31abd53", "score": "0.7309568", "text": "private function _checkSession() {\n Session::set('USERAGENT', $_SERVER['HTTP_USER_AGENT']);\n Session::set('REMOTEADDR', $_SERVER['REMOTE_ADDR']);\n\n if ($_SERVER['REMOTE_ADDR'] !== Session::get('REMOTEADDR') ||\n $_SERVER['HTTP_USER_AGENT'] !== Session::get('USERAGENT')) {\n session_destroy();\n }\n }", "title": "" }, { "docid": "e8e550a2602a013d66329e550ede33aa", "score": "0.72673595", "text": "public static function isLoggedIn(){\n\n return isset($_SESSION['user_id']);\n\n }", "title": "" }, { "docid": "a55e6bc2b1a14936a360de22b1e9b863", "score": "0.72518593", "text": "private function hasSession()\n {\n return Session::has('flare.maildebug.sent');\n }", "title": "" }, { "docid": "fac33694ca23345dccc7fa114ec8076f", "score": "0.72477967", "text": "protected function CheckSession() {\n\t\tif(!isset($_SESSION['id']))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "781e608f8d9210496589cc67c61766f7", "score": "0.7247787", "text": "function isLogged() {\r\n return isset($_SESSION['user']);\r\n }", "title": "" }, { "docid": "5ae4801007677b8218e049ef5446cdcb", "score": "0.72365755", "text": "protected function isSession()\n {\n return $this->getDic()->isSession();\n }", "title": "" }, { "docid": "54fd8668e2734b95a0c98200e2c79e02", "score": "0.72041875", "text": "public function isSessionActive() : bool\n\t{\n \n }", "title": "" }, { "docid": "2b1a45fc7070d4e2a8495fd4db5653a8", "score": "0.7204115", "text": "public function hasSession() {\n return $this->session != NULL;\n }", "title": "" }, { "docid": "e4e27cbd6bee0f8656542785389c2df7", "score": "0.71680045", "text": "public function has_session() {\n \treturn isset( $_COOKIE[ $this->_cookie ] ) || $this->_has_cookie || is_user_logged_in();\n }", "title": "" }, { "docid": "cb4530c270b8ac4481e46d0b9a4d0673", "score": "0.71633637", "text": "static public function checkSessionAuth() {\n\t\tif(\n\t\t\t!isset($_SESSION[self::$strProjectName]['remoteAddrAuth']) \t\t\t\t\t\t\t\t\t\t|| \n\t\t\t!isset($_SESSION[self::$strProjectName]['fingerprintAuth']) \t\t\t\t\t\t\t\t\t|| \n\t\t\t!isset($_SESSION[self::$strProjectName]['serverNameAuth']) \t\t\t\t\t\t\t\t\t\t|| \n\t\t\t$_SESSION[self::$strProjectName]['serverNameAuth'] !== $_SERVER['SERVER_NAME'] \t\t\t\t\t|| \n\t\t\t/*md5((string) $_SERVER['REMOTE_ADDR']) !== $_SESSION[self::$strProjectName]['remoteAddrAuth'] \t||*/ \n\t\t\tmd5(self::$strProjectName.'_AUTHSYS_'.$_SESSION[self::$strProjectName]['user']) !== $_SESSION[self::$strProjectName]['fingerprintAuth']\n\t\t) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "1c4874539502f789696efda8544a6b9d", "score": "0.71526897", "text": "private function isSessionSet(){\n\t\t\tif (!isset($_SESSION['sid']) || !isset($_SESSION['password']) || !isset($_SESSION['username']) )\n\t\t\t\treturn false;\n\t\t\t\n\t\t\treturn $_SESSION['sid'] == session_id() \n\t\t\t\t&& $_SESSION['username'] === $this->config['username'] \n\t\t\t\t&& $_SESSION['password'] === $this->config['password'];\n\t\t}", "title": "" }, { "docid": "acd5a10489b6b3be056f7aa2beffb502", "score": "0.71485746", "text": "public function logged(){\n return isset($_SESSION['auth']);\n }", "title": "" }, { "docid": "b0af994633416a70546e44c9ed87ef9e", "score": "0.71389955", "text": "function isLogged()\n {\n return isset($_SESSION['user']) && $_SESSION['user'] != null;\n }", "title": "" }, { "docid": "d0520356ba3f58fb74ff76c84ee8469b", "score": "0.71377134", "text": "public function isLoggedInFromSession() {\n $isLoggedIn = false;\n // user is logged in if there is a 'user' entry in the SESSION superglobal\n if(isset($_SESSION['user'])){\n $isLoggedIn = true;\n\n }\n return $isLoggedIn;\n }", "title": "" }, { "docid": "4920b581717b125d31f2b428f6fe7d09", "score": "0.71171325", "text": "public static function isLoggedIn() {\n return isset($_SESSION['user_object']);\n }", "title": "" }, { "docid": "ea4664ec50b31e358f5ffbfe490c0919", "score": "0.71039563", "text": "public function canStartSession();", "title": "" }, { "docid": "a7f5e78e04863ae5e2e9a981911d0b33", "score": "0.7099266", "text": "protected function _isLoggedIn()\n {\n return !empty($this->_session()->user);\n }", "title": "" }, { "docid": "97a53ab077ff116dfc3a74fe30160b96", "score": "0.70921177", "text": "private function isLogged()\n {\n return !is_null($this->sessionId);\n }", "title": "" }, { "docid": "83936dbf1e1f1c351a6dc71d3e9ff060", "score": "0.70919925", "text": "public function validateSession()\r\n\t{\r\n\t\t$graphModule = new Graph();\r\n\r\n $api = $graphModule->matchNode('User', 'sessionid', $_SESSION['sid']);\r\n\t\tif (isset($api['data'][0][0]['data']))\r\n\t\t{\r\n\t\t\t$userInfo = $api['data'][0][0]['data'];\r\n\t\t\tif ($userInfo['ipaddress'] !== $_SERVER['REMOTE_ADDR'])\r\n\t\t\t{\r\n\t\t\t\t//IP Does not match session, Kick this fool out!\r\n\t\t\t\t$_SESSION['sid'] = \"\";\r\n\t\t\t\t$_SESSION['uid'] = \"\";\r\n\t\t\t\tsession_destroy();\r\n\t\t\t\treturn false;\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t//This guys for true, let em' stay.\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "467c1c434cecb966a991108124783392", "score": "0.7091956", "text": "function isSessionStarted()\n {\n return session_id() !== '' or session_status() === PHP_SESSION_ACTIVE;\n }", "title": "" }, { "docid": "2da1a37252c841f59515f4a3ce30e617", "score": "0.70868", "text": "function isUserLoggedIn(){\n return isset($_SESSION['uid']);\n }", "title": "" }, { "docid": "52af1418a43233207bdafc05d17702a9", "score": "0.7085694", "text": "public function isLoggedIn() {\n return $this->request->session()->check(\"Auth.User.id\");\n }", "title": "" }, { "docid": "e4677f116c7fa82900cbd5b3f2f42b9f", "score": "0.70816624", "text": "private static function isSessionStarted()\n {\n #if (version_compare(phpversion(), '5.4.0', '>=')) {\n # return (session_status() === PHP_SESSION_ACTIVE) ? true : false;\n #} else {\n return session_id() === '' ? false : true;\n #}\n }", "title": "" }, { "docid": "43a7260d49577451eb140703dc012f7b", "score": "0.7071652", "text": "function sessionActive()\r\n\t{\r\n\t\treturn (isset($_SESSION['userId']) && isset($_SESSION['accType']));\r\n\t}", "title": "" }, { "docid": "d131fa3c66061cf42ef3f96b8b0c1f94", "score": "0.7058823", "text": "private function isSessionStarted(){\n if ( php_sapi_name() !== 'cli' ) {\n if ( version_compare(phpversion(), '5.4.0', '>=') ) {\n return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;\n } else {\n return session_id() === '' ? FALSE : TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "49d32f8606cf4f1ca6ece603f4e91b67", "score": "0.7054766", "text": "public function isLoggedIn()\n\t{\n\t\treturn isset($_SESSION['access_token']);\n\t}", "title": "" }, { "docid": "c2c85127d3cba6c4ec20b6630d45bfa8", "score": "0.7053288", "text": "function isLogged() {\n $db = Database::instance()->db();\n\n if (!array_key_exists('user', $_SESSION) || empty($_SESSION['user'])) {\n return FALSE;\n }\n else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "9b505aa3677310612740172c35160f36", "score": "0.7042397", "text": "function isLoggedIn() {\n\t\t//start/continue the session\t\t\n\t\t@session_start();\n\n\t\treturn !empty($_SESSION['accessLevel']) && !empty($_SESSION['loggedInUser']) && !empty($_SESSION['contextUser']);\n\t}", "title": "" }, { "docid": "1b2cee4b9bf8f87b916ffdde7de6e7f4", "score": "0.70423186", "text": "public function isLoggedIn(){\n if(isset($_SESSION['id'])){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "faf3acd9fc538fb9bacc240e0d2b4352", "score": "0.70418847", "text": "public function logged_in()\n {\n if ( isset( $_SESSION[\"user\"] ) )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "ba8bc1a4b313862f575fc7004c7546c7", "score": "0.7034416", "text": "protected function check_session_start() {\n\t\tini_set('session.cookie_httponly', 1); //helps prevents cookie modification (browser dependent)\n\t\t$theName = session_name();\n\t\tif (!empty($_COOKIE[$theName])) {\n\t\t\t$theId = $_COOKIE[$theName];\n\t\t} else if (!empty($_GET[$theName])) {\n\t\t\t$theId = $_GET[$theName];\n\t\t} else {\n\t\t\t$theId = session_id();\n\t\t}\n\t\tif (!empty($theId) && preg_match('/^[a-zA-Z0-9,\\-]{1,128}$/',$theId)) {\n\t\t\treturn session_start();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "47fea94c876a5318d71727182832815a", "score": "0.7012182", "text": "public static function hasSession(){\n return \\Session::has('access_token');\n }", "title": "" }, { "docid": "7e7a1be9d2eeb08c63fa65c199c39750", "score": "0.7009786", "text": "public static function estConnecte() : bool {\n return isset($_SESSION['user']);\n }", "title": "" }, { "docid": "cdc7c93f4209fbc937868ce51d53d350", "score": "0.70097405", "text": "public function loggedin() {\n\t\treturn (isset($_SESSION['User']) && Cookie::exists('mmcookie'));\n\t}", "title": "" }, { "docid": "568a72295a55b4ae6e4fa8a7e70d6850", "score": "0.70026004", "text": "function check_login(){\n /* Check if a session already been started */\n if (!isset($_SESSION)) {\n session_start();\n }\n \n if (isset($_SESSION['user_id'])) {\n return True;\n } else {\n return False;\n }\n}", "title": "" }, { "docid": "4822bdaac845dd6a64160dbb13033dc7", "score": "0.6981659", "text": "public function check_session_login(){ \n\t\tif(count($this->Session->read('USER')) || $this->Cookie->read('ESUSER') != ''){\n\t\t\t$this->redirect('/home/');\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "e63c5dd1f5cb61cd0902585ec7dd0f9c", "score": "0.69771206", "text": "public function loggedIn() {\n return isset($_SESSION[\"User\"]) && $_SESSION[\"User\"] === $this->username;\n }", "title": "" }, { "docid": "f17c2de637c63ab563ce821db492451a", "score": "0.6967076", "text": "public function isSessionMessage() {\n\t\treturn $this->storeInSession;\n\t}", "title": "" }, { "docid": "51582c15f74b42103fea5582391604e3", "score": "0.69661665", "text": "public function isLoggedin()\n {\n return $this->session->has('user');\n }", "title": "" }, { "docid": "a976451a6335c3bab13f5d4d083326ac", "score": "0.69625956", "text": "private function userConnected(){\r\n return $this->session()->exist('user');\r\n }", "title": "" }, { "docid": "0805205dd51eda2c802c30a9cf7fc21a", "score": "0.6959998", "text": "function isloggedin()\r\n\t{\r\n\t\t\r\n\t\treturn isset($_SESSION['name'])&&isset($_SESSION['id']);\r\n\t}", "title": "" }, { "docid": "e6953fb5a4c0dab8d0fda10fbf1fd759", "score": "0.6955599", "text": "function isLoggedIn() {\n\t\treturn( $this->getID() != 0 );\n\t}", "title": "" }, { "docid": "b2058b471d27853071ec9ea62cc20c59", "score": "0.6938539", "text": "public static function isLogged(): bool{\n if(session_status() == PHP_SESSION_NONE) session_start();\n return isset($_SESSION[static::$user]) && is_int($_SESSION[static::$user]);\n }", "title": "" }, { "docid": "eb712ec21f716192769cde0e3a74be0b", "score": "0.6936466", "text": "public function isLoggedIn()\n {\n return app('session')->has(\\App\\User::USER_ACCESS_TOKEN_SESSION_NAME);\n }", "title": "" }, { "docid": "67df25dbfadbc53ae497412b6cd26fc5", "score": "0.69360334", "text": "function loggedIn(): bool\n{\n return isset($_SESSION['user']);\n}", "title": "" }, { "docid": "aac89d43dc4b097c4fc9f19116e94192", "score": "0.69341856", "text": "function isLogged(){\n\t\tif(isset($_SESSION['user']))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "5a037a72d3ec1b31aaa834c5925c64b9", "score": "0.6931479", "text": "public function isLogged(){\n\t\tif(isset($_COOKIE['PHPSESSID']) && $_COOKIE['PHPSESSID'].'' != ''){\n\t\t\t$sess_id_cook = $this->reg->get('sess')->get('sess_id');\n\t\t\t$user_id = $this->reg->get('sess')->get('user_id');\n\t\t\tif(!$sess_id_cook || !$user_id){\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tif($sess_id_cook != $this->reg->get('sess')->getSessionID() || $user_id == ''){\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t\t}\n\t\treturn true;\t\n\t\t}", "title": "" }, { "docid": "74009c5b83b0b0ff1d2a739665f18424", "score": "0.69295627", "text": "private static function check_access() {\n $access = self::$HttpRequest->get_arg('user');\n if ($access) {\n $_SESSION['LOGGED_USER'] = $access;\n return true;\n }\n \n if (isset($_SESSION['LOGGED_USER']) ){\n return true;\n }\n \n return false; \n }", "title": "" }, { "docid": "ef1da0a6d165afd61b835ffb688eecab", "score": "0.6925112", "text": "public function isExistingSession(): bool\n {\n return $this->request->session()->has($this->sessionName);\n }", "title": "" }, { "docid": "b80232c3ec9d7d62a4bdd0cfb9a3857e", "score": "0.69247913", "text": "function alreadyLoggedIn() {\n\treturn ( isset($_SESSION[\"user\"]) && $_SESSION[\"user\"] && $_SESSION[\"user\"] = User::getUser( $_SESSION[\"user\"]->getValue( \"username\" ) ) ) ;\n}", "title": "" }, { "docid": "93ca6abe1e92d45963ff4b1ae9bc175d", "score": "0.6924205", "text": "public static function check() {\n return \\Session::get('authUser') && \\Session::get('authIp') == $_SERVER['REMOTE_ADDR'];\n }", "title": "" }, { "docid": "bbc28b613b78d3b4afc09e68ad1c4b6e", "score": "0.6916931", "text": "public static function isLoggedIn() {\n return isset($_SESSION['userinfo']);\n }", "title": "" }, { "docid": "7507e42710478b97d198ad9c47937195", "score": "0.69159126", "text": "public function _Isloggedin() {\r\n\t\t//Ruaj Sessionin\r\n\t\t$perdSession = new Zend_Session_Namespace ( 'PerdoruesSess' );\r\n\t\tif (isset ( $perdSession->username )) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if (isset ( $_COOKIE [\"opendatauser\"] )) {\r\n\t\t\t$cookiecrypt = new App_Crypt ();\r\n\t\t\t$perdSession->username = $cookiecrypt->decrypt ( $_COOKIE [\"opendatauser\"] );\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "214bd0e3c4f27574fe5b930f851976a6", "score": "0.691249", "text": "protected function checkSession()\n {\n if(!isset($_SESSION))\n {\n session_start();\n }\n\t}", "title": "" }, { "docid": "0b5a74c5b06aa8e5ae5bff3a19d9632e", "score": "0.6902378", "text": "public function isLoggedIn()\n {\n if (isset($_SESSION['user'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "2a2871b938c4c85dbb0d0cc500acb619", "score": "0.690141", "text": "public function check()\r\n {\r\n return isset($_SESSION['user']);\r\n }", "title": "" }, { "docid": "1ec9054d9df5b4303bd71eb92e15a261", "score": "0.68931025", "text": "function checkSession() {\n if (!isset($_SESSION['id'])) {\n $this->storeSession();\n } else {\n\n $this->verifySessionID = $_SESSION['id'];\n // echo \"session set\";\n $query = DB::prepare('SELECT * FROM sessions\n WHERE session_id=\"' . $this->sessionID . '\" AND session_ip=\"' . $_SERVER['REMOTE_ADDR'] . '\"');\n $query->execute();\n $rows = $query->fetchAll();\n if (isset($rows)) {\n if (count($rows) > 0) {\n $_SESSION['is_valid'] = 1;\n }\n }\n\n $this->storeSession();\n }\n }", "title": "" }, { "docid": "3b3b38bd72af36851d68abb3d16a14cb", "score": "0.6893067", "text": "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "title": "" }, { "docid": "0d99397ae4b9f40de6713bae09cfe9d0", "score": "0.68922323", "text": "private static function checkSession()\n {\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n }", "title": "" }, { "docid": "b43a4db04fadd36bc7596fc261f41711", "score": "0.68765044", "text": "function checkAdminSession()\n\t{\n\t\t$session = $this->request->session();\n\t\t$AdminData = $session->read('Admin');\n\t\t\n\t\tif(isset($AdminData['id']) && isset($AdminData['username']))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\n\t}", "title": "" }, { "docid": "8da7a145a9498826a224e803d0df280f", "score": "0.6863636", "text": "public function isUserLogined()\n\t\t\t{\n\t\t\t\treturn(isset($_SESSION['sn_logged']));\n\t\t\t}", "title": "" }, { "docid": "040f44f18ea80f7b7c34b91c250f4103", "score": "0.6859167", "text": "static function check()\n {\n return isset ($_SESSION['-AUTH']['user']);\n }", "title": "" }, { "docid": "9d9c906123bbaae04c62647645b6c9c2", "score": "0.685893", "text": "function isLoggedIn()\n\t{\n\t\tif (isset($_SESSION['user'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1fd231a55d160b6e5cbc230db04fba72", "score": "0.6858173", "text": "public function hasSession(): bool\n {\n return !empty($this->session);\n }", "title": "" }, { "docid": "34d8584d6cd92da485266ba38fd6d32d", "score": "0.68574584", "text": "public function isLogged()\n {\n $session = $this->getSession();\n if(!empty($session) && isset($session[\"user\"]) && !empty($session[\"user\"])) {\n\n return true;\n }\n }", "title": "" }, { "docid": "763c30a42afdd586cdb3abcf80662adb", "score": "0.68524384", "text": "function session_isValid(){\n\t$return = false;\n\n\t// verifica se a sessao é m_validateidentifier(conn, tf)\n\tif(isset($_SESSION['valid']) && $_SESSION['valid']){\n\t\t$return = true;\n\t}\n\n\t// verifica se a ultima atividade ocorreu nos ultimos 30 minutos\n\tif(isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] < 1800)){\n\t\t$return = true;\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "d0579b11a1a823d60c8443ddc2eaf706", "score": "0.6851791", "text": "public static function isLoggedIn()\n\t{\n\t\t$objSession = Session::instance();\n\t\t$arrUser = $objSession->get('USR');\n\t\tif (empty($arrUser))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "ebe921aba19d169c2c6736fe5d30ccf7", "score": "0.68510044", "text": "public static function isSessionValid()\r\n {\r\n return isset($_SESSION) && isset($_SESSION['uaccess']);\r\n }", "title": "" }, { "docid": "0a9287f373e72f81ab2ed099a24c99ad", "score": "0.68448263", "text": "public function hasSession()\n {\n /** @var Symfony\\Component\\HttpFoundation\\Request $instance */\n return $instance->hasSession();\n }", "title": "" }, { "docid": "db16f01832b86d769f1aa002c2793d4f", "score": "0.6843761", "text": "function loggedIn() {\n return isset($_SESSION[\"name\"]);\n }", "title": "" }, { "docid": "2b3c4f0992c21a9a917b949c074b3b72", "score": "0.68279713", "text": "public function hasSessionKey()\n {\n return $this->get(self::SESSIONKEY) !== null;\n }", "title": "" }, { "docid": "67eacc602b619e1753a48d76013b0331", "score": "0.6814153", "text": "public static function checkSession(){\n if(self::$session != null){\n return self::$session->user;\n }\n //store session for one request\n self::$session = R::findOne(self::$config[\"sessionTable\"], \"val = ?\", array(session_id()));\n if(self::$session != null && self::$session->user != null){\n return self::$session->user;\n }\n\t\tself::$session = null;\n self::redirectFromString(self::$config[\"redirectAfter_failure\"]);\n }", "title": "" }, { "docid": "f4ea4820e750f7569691712906f6bee6", "score": "0.6812854", "text": "public function is_loggedin()\n {\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "title": "" }, { "docid": "8707dee0ca35ece4e64678f4b55249dd", "score": "0.68115014", "text": "public function is_loggedin()\r\n {\r\n if(isset($_SESSION['user_session']))\r\n {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "ba29e4bf8bd3e50c1abbb36c31b29f20", "score": "0.68033254", "text": "function is_session_started() {\n\t\tif ( php_sapi_name() !== 'cli' ) {\n\t\t\tif ( version_compare(phpversion(), '5.4.0', '>=') ) {\n\t\t\t\treturn session_status() === PHP_SESSION_ACTIVE ? true : false;\n\t\t\t} else {\n\t\t\t\treturn session_id() === '' ? false : true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f3148a34f2f05e8716b0500e54bf90c0", "score": "0.6797683", "text": "function isConnected() {\n return isset($_SESSION['login']);\n}", "title": "" }, { "docid": "4d7f77a0f1d6d4415b349e8361ccd521", "score": "0.6792199", "text": "public static function LoggedIn() {\r\n return isset($_SESSION[\"login\"]);\r\n }", "title": "" }, { "docid": "885309ed840c004d343fe7a9de4a4270", "score": "0.6790085", "text": "public static function checkSession()\n {\n return extension_loaded(\"session\");\n }", "title": "" }, { "docid": "19acb8b8091b516b1f659e9567b26035", "score": "0.6790028", "text": "function isLoggedIn()\r\n{\r\n\t//Should call session_start(); before calling this function\r\n\treturn (isset($_SESSION['SESS_ID']) &&\r\n\t \t(trim($_SESSION['SESS_ID']) != ''));\r\n}", "title": "" }, { "docid": "be7c176d041dae71f97299d7d48278a6", "score": "0.67867506", "text": "public function logged_in() {\n\t\treturn ( ( $tmp = $this->current_identity()) != null && $tmp->id() != Identity_User::GUEST );\n\t}", "title": "" }, { "docid": "fc4ccd3b3345d03ed905ad65025d6c35", "score": "0.67823464", "text": "function is_session_started()\n\t{\n if ( php_sapi_name() !== 'cli' ) {\n if ( version_compare(phpversion(), '5.4.0', '>=') ) {\n return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;\n } else {\n return session_id() === '' ? FALSE : TRUE;\n }\n }\n return FALSE;\n\t}", "title": "" }, { "docid": "62ef8b8a049971b3a9056ade6b1eed3c", "score": "0.6778607", "text": "public function isLoggedIn() {\n @session_start();\n if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1149f3eeef1f2d50eaea1e7dacdbee62", "score": "0.6774659", "text": "function isLoggedIn(){\n\t\t//Verifying if both conditions becomes true then return true:\n\t\tif(isset($_SESSION['DBUser']) && $_SESSION['DBUser']>0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e19583eba8facd10c969923cdd41927c", "score": "0.6773463", "text": "function is_session_started() {\r\n if ( php_sapi_name() !== 'cli' ) {\r\n if ( version_compare(phpversion(), '5.4.0', '>=') ) {\r\n return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;\r\n } else {\r\n return session_id() === '' ? FALSE : TRUE;\r\n }\r\n }\r\n return FALSE;\r\n }", "title": "" }, { "docid": "0bc9788afc4eee332443715259a8f923", "score": "0.67706823", "text": "public function isAuthenticated()\n {\n return isset($_SESSION['user']);\n }", "title": "" }, { "docid": "c7c1ff322d96de6abbd0783375566ef8", "score": "0.6769649", "text": "protected function hasSessionKey()\n {\n return isset($_SESSION[$this->sessionKeyName]) && $_SESSION[$this->sessionKeyName];\n }", "title": "" }, { "docid": "d28dcd566d1604f18a1f8cbe53b90adb", "score": "0.67694265", "text": "private function check_the_login() {\n \n if(isset($_SESSION['user_id'])) { // check if session user_id is set\n $this->user_id = $_SESSION['user_id']; // assign the session user_id to the object property user_id\n $this->signed_in = true;\n } else {\n unset($this->user_id);\n $this->signed_in = false;\n }\n }", "title": "" }, { "docid": "decb338df68b9acc7513857d8a5afb2e", "score": "0.6769092", "text": "public static function check(){\n print_r($_SESSION);\n }", "title": "" }, { "docid": "538becb5be23ab2af7439e3e8acf2638", "score": "0.6768624", "text": "public static function isLoggedIn()\n\t{\n\t\tif(isset($_SESSION[S_STATUS]) && $_SESSION[S_STATUS]==S_STATUS_ACTIVE) return true;\n\t\telse return false;\n\t}", "title": "" }, { "docid": "90c3d18b920607d9f8bcbd0ba9eab81d", "score": "0.6768617", "text": "function checkSession() {\n if (isset($_SESSION['admHash']) && ($_SESSION['admHash'] == substr('6bc8fc6fd0d3e11b5c3361b6b9a1365b85adf6d3515ae3b020237001cc036c15',2))) {\n return true;\n }\n return false;\n}", "title": "" } ]
012005115aa67a7e13df5f0aa1085f17
Gets the value of codpermission.
[ { "docid": "85837772d03b1a3fb7d17bc821103233", "score": "0.8730839", "text": "public function getCodpermission()\r\n {\r\n return $this->codpermission;\r\n }", "title": "" } ]
[ { "docid": "f260b5b9865a54fb60196b80f82ff27e", "score": "0.66492426", "text": "public function getPermission($permission) {\n\t\t$this->loadGroupData();\n\t\t\n\t\tif (!isset($this->groupData[$permission])) return false;\n\t\treturn $this->groupData[$permission];\n\t}", "title": "" }, { "docid": "8f09372e31c15df5df1d2529e4432979", "score": "0.6617139", "text": "public function getPermission($permission) {\n\t\tif ($this->groupData === null) $this->loadGroupData();\n\t\t\n\t\tif (!isset($this->groupData[$permission])) return false;\n\t\treturn $this->groupData[$permission];\n\t}", "title": "" }, { "docid": "c2d5be6c9692b33f7682ebe60c3d944a", "score": "0.65524733", "text": "public function getPermission() {\n $this->group();\n\n if ($this->_editPermission) {\n return CRM_Core_Permission::EDIT;\n }\n elseif ($this->_viewPermission) {\n return CRM_Core_Permission::VIEW;\n }\n return NULL;\n }", "title": "" }, { "docid": "751e3c4f58f7a3be28240ddeeb79439f", "score": "0.6360206", "text": "public function GetPermission ($permissionName);", "title": "" }, { "docid": "9a0e8137969b32a00acf6ba6f93ac2c4", "score": "0.63309056", "text": "public function setCodpermission($codpermission)\r\n {\r\n $this->codpermission = $codpermission;\r\n\r\n }", "title": "" }, { "docid": "dc878e7a41715a92d21d0db456a56e07", "score": "0.63255477", "text": "function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e001ec62921cfef5f11280d4ddaaffae", "score": "0.6305665", "text": "public function getCountryPermission()\n {\n return $this->countryPermission;\n }", "title": "" }, { "docid": "5bbb4468864f02cd3faf75c44480e8fe", "score": "0.62354857", "text": "public function getPermission($permissiontype) {\n\t\treturn $this->permissions[$permissiontype];\n\t}", "title": "" }, { "docid": "091bb82b46e4a756dd59e57a339e4ac6", "score": "0.6220542", "text": "public function getPermission():? Permission\n {\n return $this->permission;\n }", "title": "" }, { "docid": "d0573667f9713e0a735a4288cad7a171", "score": "0.6200933", "text": "public function getPerm()\n {\n return $this->perm;\n }", "title": "" }, { "docid": "c344f96c10a5e169abd58fae7c7740b4", "score": "0.61786705", "text": "function getPermissionFileId() {\n\t\treturn $this->getData('permissionFileId');\n\t}", "title": "" }, { "docid": "6cbda429e34928247f15158c41ade8ac", "score": "0.61722773", "text": "public function getPermission($permission = 'canViewLibrary') {\n\t\treturn (boolean) WCF::getUser()->getLibraryPermission($permission, $this->libraryID);\n\t}", "title": "" }, { "docid": "de4d24589e720748cc15375a629c912b", "score": "0.6118724", "text": "public function permission($permission);", "title": "" }, { "docid": "f7f4ca25ba3d7af5de5e2a61f33f15c2", "score": "0.61090314", "text": "public function getBit(string $permission) : int\n {\n if (isset($this->map[$permission])) {\n return $this->map[$permission];\n }\n\n return 0;\n }", "title": "" }, { "docid": "917fc29fab4f0b8734f543df04f8d5a4", "score": "0.60920286", "text": "public function __toString()\r\n {\r\n return \"\" . $this->getCodpermission() . \"\";\r\n }", "title": "" }, { "docid": "ee38cb60bdee7639d3797c865047d017", "score": "0.60754", "text": "public function get_permissionMethod() {\n \n return $this->permissionMethod;\n \n }", "title": "" }, { "docid": "157525445e104dfdbcd8b11b8b03b0c0", "score": "0.6074098", "text": "public function getPermissionCallback()\n {\n return $this->permissionCallback;\n }", "title": "" }, { "docid": "5b5af3d0dfdff2dd6f476303964e2e2b", "score": "0.60270244", "text": "public function getPermission($permission) {\n return Permission::with('roles')->where('name', $permission)->first();\n }", "title": "" }, { "docid": "54a1f1f92ab9271397d83935fc59e1e9", "score": "0.58997303", "text": "public function permissionCodes()\r\n {\r\n return array(\r\n 'membership' => 0x008,\r\n 're' => 0x0400,\r\n 'neighborhood' => 0x080,\r\n 'ministry' => 0x020,\r\n 'change' => 0x040,\r\n 'admin' => 0x0200,\r\n );\r\n\r\n }", "title": "" }, { "docid": "18b2a4737a12f2176ddc209b75a4fcd5", "score": "0.58717346", "text": "public function getTotalPermissionValue(): int;", "title": "" }, { "docid": "ed84c3be79b07019e89a5de3756796d7", "score": "0.58408165", "text": "public function getDataPermission() {\n\t\tif (! is_array ( $this->content_data_permission ) || count ( $this->content_data_permission ) < 1) {\n\t\t\t\n\t\t\t$PermissionParameter = new Parameter ( array (\n\t\t\t\t\t'key' => 'content_data_permission_visitor',\n\t\t\t\t\t'servicelocator' => $this->getServiceLocator () \n\t\t\t) );\n\t\t\t\n\t\t\t$UserManagement = $this->getUserManagement ();\n\t\t\t$Rank = $this->getUserRank ();\n\t\t\t\n\t\t\t$data_id = $this->getContentDataID ();\n\t\t\t$type_id = $this->getContentTypeID ();\n\t\t\t$rawdata = array ();\n\t\t\t$QDataPermission = $this->getDatabase ();\n\t\t\t$QDataPermission->select ();\n\t\t\t$QDataPermission->columns ( array (\n\t\t\t\t\t'content_data_permission_id',\n\t\t\t\t\t'user_access_id',\n\t\t\t\t\t'user_rank_id',\n\t\t\t\t\t'content_data_permission_visitor',\n\t\t\t\t\t'content_data_permission_created_date',\n\t\t\t\t\t'content_data_permission_created_by',\n\t\t\t\t\t'content_data_permission_modified_date',\n\t\t\t\t\t'content_data_permission_modified_by' \n\t\t\t) );\n\t\t\t$QDataPermission->from ( array (\n\t\t\t\t\t'cdp' => 'content_data_permission' \n\t\t\t) );\n\t\t\t$QDataPermission->where ( array (\n\t\t\t\t\t'cdp.content_data_id' => $data_id,\n\t\t\t\t\t'cdp.content_data_permission_delete_status' => '0' \n\t\t\t) );\n\t\t\t$QDataPermission->order ( array (\n\t\t\t\t\t'cdp.content_data_permission_visitor desc',\n\t\t\t\t\t'cdp.user_rank_id asc',\n\t\t\t\t\t'cdp.user_access_id asc' \n\t\t\t) );\n\t\t\t$QDataPermission->execute ();\n\t\t\tif ($QDataPermission->hasResult ()) {\n\t\t\t\twhile ( $QDataPermission->valid () ) {\n\t\t\t\t\t$rawdata = $QDataPermission->current ();\n\t\t\t\t\t\n\t\t\t\t\t$rawdata ['content_data_permission_visitor_text'] = \"\";\n\t\t\t\t\tif ($PermissionParameter->hasResult ()) {\n\t\t\t\t\t\t$rawdata ['content_data_permission_visitor_text'] = $PermissionParameter->getMessageByValue ( $rawdata ['content_data_permission_visitor'] );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$rawdata ['content_data_permission_rank_options'] = ($rawdata ['user_rank_id'] > 0 ? $this->Encrypt ( $rawdata ['user_rank_id'] ) : null);\n\t\t\t\t\t$rawdata ['content_data_permission_user_options'] = ($rawdata ['user_access_id'] > 0 ? $this->Encrypt ( $rawdata ['user_access_id'] ) : null);\n\t\t\t\t\t\n\t\t\t\t\t$rawdata ['content_data_permission_rank'] = ($rawdata ['user_rank_id'] > 0 ? $Rank->getMessage ( $rawdata ['user_rank_id'] ) : null);\n\t\t\t\t\t$rawdata ['content_data_permission_user'] = ($rawdata ['user_access_id'] > 0 ? $Rank->getMessage ( $UserManagement->getRankID ( $rawdata ['user_access_id'] ) ) . \" - \" . $UserManagement->getUsername ( $rawdata ['user_access_id'] ) : null);\n\t\t\t\t\t\n\t\t\t\t\t$rawdata ['content_data_permission_created_date_format'] = \"\";\n\t\t\t\t\tif ($rawdata ['content_data_permission_created_date'] !== \"0000-00-00 00:00:00\") {\n\t\t\t\t\t\t$datetime = new \\DateTime ( $rawdata ['content_data_permission_created_date'] );\n\t\t\t\t\t\t$rawdata ['content_data_permission_created_date_format'] = $datetime->format ( 'H:i:s d-F-Y' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$rawdata ['content_data_permission_modified_date_format'] = \"\";\n\t\t\t\t\tif ($rawdata ['content_data_permission_modified_date'] !== \"0000-00-00 00:00:00\") {\n\t\t\t\t\t\t$datetime = new \\DateTime ( $rawdata ['content_data_permission_modified_date'] );\n\t\t\t\t\t\t$rawdata ['content_data_permission_modified_date_format'] = $datetime->format ( 'H:i:s d-F-Y' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$cryptID = $this->Encrypt ( $rawdata ['content_data_permission_id'] );\n\t\t\t\t\t$rawdata ['content_data_permission_id_modify'] = $cryptID;\n\t\t\t\t\t\n\t\t\t\t\t$this->content_data_permission [$rawdata ['content_data_permission_id']] = $rawdata;\n\t\t\t\t\t$QDataPermission->next ();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->content_data_permission;\n\t}", "title": "" }, { "docid": "dc6cd8a6edc0e8c12a5ba0ce501b0001", "score": "0.5833923", "text": "public function getAuthorizationCode()\n {\n return $this->authorizationCode;\n }", "title": "" }, { "docid": "99db075ef2ddb7593c898d0e50daa511", "score": "0.58176374", "text": "public static function get_permission($permission_slug) {\n $p = \\R::findOne('permission', ' slug=? ', array($permission_slug));\n if ($p->id) {\n return $p;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "179eed9e1c6da390300fa70e345ce833", "score": "0.5796523", "text": "public function getCod(){\n\t\t\treturn $this->cod;\n\t\t}", "title": "" }, { "docid": "b1a9786adf179ef5ed2fc1f12afc5c7a", "score": "0.57952344", "text": "public function getPermission($permissioncontrol = 0) {\n\t\t$permissioncontrol = (int)$permissioncontrol;\n\n\t\t$sql = \"SELECT * FROM \n\t\t\t\t\t{$this->cTableName}\n\t\t\t WHERE\n\t\t\t \tcontrol = {$permissioncontrol}\";\n\n $statement = $this->prepare($sql);\n\t\t$statement->execute();\n\n $result = $this->fetchObject($statement);\n\n return $result;\n\n\t}", "title": "" }, { "docid": "66f393b0ec45aeac4487d58f8895130a", "score": "0.57815987", "text": "public function getMask($permission)\n {\n return constant('Symfony\\Component\\Security\\Acl\\Permission\\MaskBuilder::'.$permission);\n }", "title": "" }, { "docid": "3a0ecd8386f586232959f7c303715697", "score": "0.576967", "text": "public function getPermtype()\n {\n return $this->permtype;\n }", "title": "" }, { "docid": "b5e6f1f2dbd0e0d50d1f139814aa8b68", "score": "0.57599854", "text": "public static function getRequiredPermissions()\n {\n $class = get_called_class();\n // If the user is accessing LeftAndMain directly, only generic permissions are required.\n if ($class === self::class) {\n return 'CMS_ACCESS';\n }\n $code = Config::inst()->get($class, 'required_permission_codes');\n if ($code === false) {\n return false;\n }\n if ($code) {\n return $code;\n }\n return 'CMS_ACCESS_' . $class;\n }", "title": "" }, { "docid": "47ef3f412c5e27d028ce52ef9c4b644c", "score": "0.57409006", "text": "public function getPermissions(): int;", "title": "" }, { "docid": "2753e74ea138e9016fd40ab459d4041a", "score": "0.57321376", "text": "public function getPermission(){\n // Call to get session value\n $userId = $this->getSession('adminid');\n $currentController = strtolower(Yii::$app->controller->id);\n // Get user permission of class\n $methods = Permission::find()->where(['userid' => $userId,'class_name' => $currentController])->one();\n return explode(\",\", $methods->action_name);\n }", "title": "" }, { "docid": "6d997ed21fb740be8647a9c3906f1b22", "score": "0.57274026", "text": "public static function getStr($permission)\n {\n switch ($permission) {\n case 0:\n return 'Editor';\n break;\n case 1:\n return 'Administrator';\n break;\n case 2:\n return 'Super-Administrator';\n break;\n default:\n return null;\n }\n }", "title": "" }, { "docid": "56610ede897a33c034cf79d89e0cc4a9", "score": "0.5719709", "text": "public function getPermissions() : string\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "a233c9f2f652b1b4d9e5825b5500b751", "score": "0.5713225", "text": "public function getAuthorizationCode()\n {\n return $this->getParameter('authorizationCode');\n }", "title": "" }, { "docid": "36009e2786f1bab4d8c1727d8beeddb7", "score": "0.56993544", "text": "public static function GetPermission($accountid){\n\n $permission = DB::table('accountmanager')->where('accountid', $accountid)->value('permission');\n return $permission;\n }", "title": "" }, { "docid": "f436af702432169099585e45f5efd823", "score": "0.5698608", "text": "public function & GetPermissions();", "title": "" }, { "docid": "9b20180b4525f887874470bad02e820e", "score": "0.56854707", "text": "public function getModeratorPermission($permission) {\n\t\treturn (boolean) WCF::getUser()->getLibraryModeratorPermission($permission, $this->libraryID);\n\t}", "title": "" }, { "docid": "56093b90221428e307a5f7dae896a53e", "score": "0.56725794", "text": "function permissions()\n {\n return $this->Permissions;\n }", "title": "" }, { "docid": "8a71a9b393213f455988769680960bda", "score": "0.5664381", "text": "protected function _translate_permission($perm)\n {\n $x = null;\n\n switch ($perm) {\n case 'f_read':\n $x = 'read';\n break;\n\n case 'f_post':\n $x = 'submit_midrange_content';\n break;\n\n case 'f_reply':\n $x = 'submit_lowrange_content';\n break;\n\n case 'f_edit':\n $x = 'edit_own_lowrange_content';\n break;\n\n case 'f_delete':\n $x = 'delete_own_lowrange_content';\n break;\n\n case 'm_edit':\n $x = 'edit_lowrange_content';\n break;\n\n case 'm_delete':\n $x = 'delete_lowrange_content';\n break;\n }\n\n return $x;\n }", "title": "" }, { "docid": "ad9b4f40827c945788fd571dd64f7b4c", "score": "0.5655456", "text": "static function permissionKey($permissionID) {\n\t\t\t\n\t\t\t$key = null;\n\t\t\t\n\t\t\t//check permission ID\n\t\t\tif ($permissionID>=0 && $permissionID<count(CMSAccess::$PERMISSIONS)) {\n\t\t\t\t$key = CMSAccess::$PERMISSIONS[$permissionID];\n\t\t\t}\n\t\t\t\n\t\t\treturn $key;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "706046a69f6670e638dfa1e6d60b7457", "score": "0.562732", "text": "public function permissionList(): array {\n return $this->info()['Permission'];\n }", "title": "" }, { "docid": "a78995b9468eb933e800243f3edfe99d", "score": "0.5590195", "text": "public function getPermission(): string {\n\t\treturn \"blocksniper.type.\" . str_replace(\"hollow\", \"\", str_replace(\" \", \"_\", strtolower($this->getName())));\n\t}", "title": "" }, { "docid": "734879217de4aebc09c9b70baa194224", "score": "0.558096", "text": "public function getCode(){\n\t\treturn $this->_code;\n\t}", "title": "" }, { "docid": "41e06ed6a8a2590f14f4002deb700c2e", "score": "0.555682", "text": "public function get($permission)\n {\n if ($this->permissions[$permission] == 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "b68886eaa8ee9da73135577597a910ac", "score": "0.5548525", "text": "public function getCodaction()\r\n {\r\n return $this->codaction;\r\n }", "title": "" }, { "docid": "8e6c900831d520e62b633a6fbf1d6784", "score": "0.5543715", "text": "public function getCode()\n\t{\n\t\treturn $this->data[self::KEY_CODE];\n\t}", "title": "" }, { "docid": "6d3490808fd865dd2ea481a9742c49e8", "score": "0.5534815", "text": "function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "8f90ea3d33a1c7e81cff4a5df11d2522", "score": "0.55296504", "text": "public function getCode(){\n return $this->getParameter('code');\n }", "title": "" }, { "docid": "8f90ea3d33a1c7e81cff4a5df11d2522", "score": "0.55296504", "text": "public function getCode(){\n return $this->getParameter('code');\n }", "title": "" }, { "docid": "a9d6b21974045a5595a927c05f5ab174", "score": "0.5514916", "text": "function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "275c54b7cbdedda5e98e385895bd9794", "score": "0.5496489", "text": "public function getCodeMission() {\n return $this->codeMission;\n }", "title": "" }, { "docid": "d3066800afd0cd0674e2f167068906b7", "score": "0.5476985", "text": "function GetCode() { return $this->code; }", "title": "" }, { "docid": "7aad6b067a8b9a1cc37c054d33f7fa44", "score": "0.54633355", "text": "function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "ce0056b3ed50daf9e22274d5844521a0", "score": "0.54574275", "text": "public function getCode() {\n return @$this->attributes['code'];\n }", "title": "" }, { "docid": "b998516c579fc7ce2156f85ab9c02d4e", "score": "0.54549354", "text": "public function permissions()\n {\n return $this->permissions;\n }", "title": "" }, { "docid": "3f9f809810264ba5126f2a717681df5d", "score": "0.5445629", "text": "public function getPermission()\n {\n $this->request->allowMethod(['ajax']);\n\n $group_or_user = isset($this->request->data['group_or_user']) ? $this->request->data['group_or_user'] : null;\n $group_or_user_id = isset($this->request->data['group_or_user_id']) ? $this->request->data['group_or_user_id'] : null;\n\n $ugp = $this->UserGroupPermission->find()\n ->select(['permission_id','allow'])\n ->where(\n [\n 'group_or_user_id' => $group_or_user_id,\n 'group_or_user' => $group_or_user\n ])->toArray();\n\n $response = (!empty($ugp) && !is_null($ugp)) ? $ugp : 'fail';\n\n $this->set(compact('response'));\n $this->set('_serialize', ['response']);\n $this->render('Acl.Ajax/ajax_response', false);\n }", "title": "" }, { "docid": "ce9b1fced7992d6b8a3bf026fac4cc9f", "score": "0.5445576", "text": "public function show(Permission $permission) {\n return response()->json($permission, 200);\n }", "title": "" }, { "docid": "2ab64c846e86b0c8d15fbad72ab36963", "score": "0.544543", "text": "public function get_moderator_permission()\r\n\t{\r\n\t $result=$this->db->query(\"select * from \".$this->prefix.\"members_permission where id=4\");\r\n\t return $result;\r\n\t}", "title": "" }, { "docid": "d18863614b020bf7b440bc4eba0ddf24", "score": "0.5444582", "text": "public function permission(): string\n {\n return Permission::ACTION_CONTROL_CONSOLE;\n }", "title": "" }, { "docid": "3803dd05f4db6de4d17516204b075e90", "score": "0.54433167", "text": "function getCode() {\n return $this->_code;\n }", "title": "" }, { "docid": "f9d14a43ea5b510cc4f74aa2bf5f873e", "score": "0.54432714", "text": "public function getCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "f9d14a43ea5b510cc4f74aa2bf5f873e", "score": "0.54432714", "text": "public function getCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "3f930ca680d93da8341475cc6aa7eb44", "score": "0.5434422", "text": "public function get_Code_commande(): int { return $this->Code_commande; }", "title": "" }, { "docid": "21214abf885fe8d00eb031431541fd7d", "score": "0.5427015", "text": "public function get_code() {\n return $this->code;\n }", "title": "" }, { "docid": "dca321413718243c4200cef523c46406", "score": "0.54209936", "text": "protected function get_permission_strings() {\n static $strpermissions;\n if (!$strpermissions) {\n $strpermissions = array(\n CAP_INHERIT => new lang_string('inherit', 'role'),\n CAP_ALLOW => new lang_string('allow', 'role'),\n CAP_PREVENT => new lang_string('prevent', 'role'),\n CAP_PROHIBIT => new lang_string('prohibit', 'role')\n );\n }\n return $strpermissions;\n }", "title": "" }, { "docid": "80442c7f1fafe974138e0d13513fc04d", "score": "0.54094225", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "1dc5a2828276a9f2faf40367cb6c6c60", "score": "0.54061645", "text": "public function getCode() {\n return $this->_code;\n }", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.5404125", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.5403374", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.5403374", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.5403374", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.5403374", "text": "public function getPermissions();", "title": "" }, { "docid": "4929666aec7c85ef781396c92146aded", "score": "0.5403374", "text": "public function getPermissions();", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.53997856", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.53997856", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.53997856", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "29c36f704e98a88dbcb81217a34aa625", "score": "0.5398495", "text": "protected function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "5cafa3b404a12bd14e03f23de5422616", "score": "0.5393204", "text": "protected function getPermission()\n {\n // Get the display name. This will go in the 'label' field.\n $label = ucwords($this->ask('Specify the display name for a new permission'));\n\n $name = null;\n\n // Make sure we get a valid key name for the permission.\n while (is_null($name)) {\n $name = $this->ask('What should the key name be set to?', Str::slug($label));\n\n // Make sure they approve the details for the new permission.\n if ($this->confirm(\"Your permission will be added as: \\n\\tLabel: $label \\n\\tName: $name\\nSave this permission?\", true)) {\n $data = [\n 'name' => $name,\n 'label' => $label,\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n\n // Add it to the database or detail an error has occurred and a new name needs to be supplied.\n try {\n $this->db->table('rbac_permissions')->insert($data);\n } catch (QueryException $exception) {\n $this->error('That name is already taken. Please choose another.');\n\n $name = null;\n continue;\n }\n\n // Add the permission to our list.\n $this->permissions[] = (object)$data;\n\n $this->comment('Added!');\n } else {\n return true;\n }\n }\n\n // Allow them the chance to add another one.\n return $this->confirm('Add another permission?', true);\n }", "title": "" }, { "docid": "03492f777d66aaadc5479bf61b1cc263", "score": "0.5391112", "text": "public function getPermissionMap() {\n return $this->permissionMap;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.53873646", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.53873646", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "534fd951cad5ba98c0ab0ed7adea7dbd", "score": "0.53864276", "text": "public function can($permission){ return ($this->isAdmin() || ($this->permissions && in_array($permission, $this->permissions))); }", "title": "" }, { "docid": "3f91952c286677104c4d60542559e495", "score": "0.5384861", "text": "public function getCode()\n {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "3f91952c286677104c4d60542559e495", "score": "0.5384861", "text": "public function getCode()\n {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "3f91952c286677104c4d60542559e495", "score": "0.5384861", "text": "public function getCode()\n {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "3f91952c286677104c4d60542559e495", "score": "0.5384861", "text": "public function getCode()\n {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.53807676", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "9a88874fb0c17792be280e110dbdbb1d", "score": "0.0", "text": "public function edit(Entity $entity, Location $location): View\n {\n $locationTypes = ['' => ''] + LocationType::orderBy('name', 'ASC')->pluck('name', 'id')->all();\n $visibilities = ['' => ''] + Visibility::orderBy('name', 'ASC')->pluck('name', 'id')->all();\n\n return view('locations.edit', compact('entity', 'location'))->with($this->getFormOptions());\n }", "title": "" } ]
[ { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.7659522", "text": "public function edit(Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $pages = Page::all();\n return view('resource.edit', compact('resources','pages'));\n }", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.7592425", "text": "public function edit(Resource $resource)\n {\n $tags = convert_tags_to_string($resource);\n\n return view('resource.edit', ['resource' => $resource, 'tags' => $tags]);\n }", "title": "" }, { "docid": "ca645ebeda02bf966ffbaad2c71250d4", "score": "0.7430944", "text": "public function edit($id) {\n return view('acl::resource.edit', [\n 'id' => $id,\n 'resource' => Resource::find($id)\n ]\n );\n }", "title": "" }, { "docid": "f8bd9e82b8ee3d8f3f2608a73be27803", "score": "0.7401251", "text": "public function edit($id){\n $resource = Resources::find($id);\n\n return view('members.resources.resourceEdit', compact('resource'));\n }", "title": "" }, { "docid": "bc0bd96680ee02ddbc9334c953e42dda", "score": "0.73825437", "text": "public function page_productEdit($resource)\n {\n\n $this->_pageContent['productInfo'] = $resource;\n\n $this->_myPage = \"page_productForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "16f9d8e3ea1972347bf2f38afa73ab77", "score": "0.7338274", "text": "public function edit($id)\n {\n $resource = $this->prepResource('update', $id);\n $this->showBreadcrumb($resource, [$resource->routeExist('show') ? $resource->routeShow($id) : $resource->routeEdit($id) => $resource->getCaption(), null => 'Edit']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "462e1860fc17aa64cba32eedec85d271", "score": "0.7112882", "text": "function edit($resource_id=NULL)\n\t{\n\t\t# Although the Edit item only appears in the menu for contributors and admins, \n\t\t# user could reach it from URL editing\n\t\t// echo $this -> uri -> segment(2);\n\t\tif (! ( ($this->ion_auth->is_admin() || $this->ion_auth->in_group('contributor') ) ) ) \n\t\t{\n \t\t# redirect them to the home page \n\t\t\t# TO DO: redirect to a page with a message saying that they're not a contributor\n\t\t\tredirect('home', 'refresh');\n \t}\n\t\t\n\t\t// define some vars to pass to the nav and page views\n\t\t$data['title'] = \"Global Health: edit resource\";\n\t\t$data['heading'] = \"Edit resource\"; \t\t\n\t\t// for <meta> tags and DC\n\t\t$data['description'] = \"\";\n\t\t$data['keywords'] = \"\";\n\t\t$data['active_topnav'] = \"\"; \n\t\t$data['active_leftnav'] = \"Edit resource\"; // active menu item\n\t\t$data['active_submenu'] = \"Edit\"; \n\t\t$data['message'] = \"\";\n\t\t$data['error'] = \"\";\n\t\t\n\t\t# If a resource has been chosen in the editchooseview view, the ID will\n\t\t# be passed in POST, so get it then re-call this controller, invoking \n\t\t# the resource method with the ID\n\t\tif (isset($_POST['resource_id']))\n\t\t{\n\t\t\t$resource_id = $_POST['resource_id'];\n\t\t\tredirect(\"resource/edit/$resource_id\", 'refresh');\n\t\t}\n\t\t# ...else if there's a resource_id in the URL, display the edit form\n\t\t# for that resource. If the segment doesn't exist FALSE is returned.\n\t\telseif (is_null($resource_id))\n\t\t{\n\t\t\tredirect(\"resource/choose/\", 'refresh');\n\t\t}\n\t\t# If nowt in POST, just display the choose resource to edit view\n\t\telse\n\t\t{\n\n\t\t}\n\t\t\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t$resource_title = $q -> row() -> title;\n\t\t$data['resource__id'] = $resource_id; \n\t\t# Get the user ID to save as record editor\n\t\t$user_id = $this->ion_auth->user()->row()-> id;\t\t\n\t\t# Populate form elements.\n\t\t# Get full resource record first \n\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t\n\t\t# Populate form elements. \n\t\t# Call function in ResourceDB_model to get subject areas\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get key areas (aka top level categories) and shove into an array\n\t\t# Query returns * in key_areas table (id, title, description)\n\t\t$data['keyarea_query'] = $this -> ResourceDB_model -> get_key_areas();\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t# Note parameter in function call - this will return all types, not just those 'in use', \n\t\t# which is important for an insert form.\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(FALSE);\n\t\t\n/* \t\t# -- SUBJECTS ---\n\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t\n*/\n\t\t\n\t\t# -- RESOURCE TYPES ---\n\t\t# False param returns all resource types, not just those 'in use'\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(false);\n\t\t\n\t\t# -- TAGS --\n\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t$old_tags_ary = array();\n\t\tforeach ($tags_query -> result() as $row)\n\t\t{\n\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t}\n\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\n\t\t# ==== FORM VALIDATION ======\n\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t# validation rules, hence a rule for all elements below. See CI Forum thread at:\n\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t# sqare brackets, as just checking for the title existing would always \n\t\t# return true - we need to check that the edited title exists or not. \n\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean\");\n\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('subjects', 'Categories', 'required');\t\t\n\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\n\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t# (re)populate with user data\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t# Load page data into template - the view will be called at function end\n\t\t\t$template['content'] = $this -> load -> view('resource/edit_view', $data, TRUE);\n\t\t}\t\n\n\t\t# If form validates, update record\n\t\telse\n\t\t{\n\t\t\t# Get form values for fields in gh_resource table\n\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t# DATETIME data type\n\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\n\t\t\t$record_data = array (\n\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t'author' => $_POST['author'], \n\t\t\t\t\t\t\t//'source' => $_POST['source'], \n\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t# Run update query in model\n\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\n\t\t\t# TAGS\n\t\t\t# First, get tag(s) user's inserted. \n\t\t\tif (!empty($_POST['tags']))\n\t\t\t{\n\t\t\t\t$tags = $this -> input -> post('tags');\n\n\t\t\t\t# ...then split string by the comma delimiter...\n\t\t\t\t$tags_ary = explode(',', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from resource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> id;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t}\n\t\t\t\n\t\t\t# SUBJECTS\n\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t# empty array so as not to generate a runtime error\n\t\t\tif (isset($_POST['subjects']))\n\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\telse\n\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t{\n\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t{\n\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\t\n\t\t\t# Set messages etc for the result page\n\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t# Load results page with data array\n\t\t\t$template['content'] = $this->load->view('resource/edit_result_view', $data, TRUE);\t\t\n\t\t} // end if validates\t\n\t\t\n\t\t# Display form or update results\n\t\t$this -> load -> view ('template2_view', $template);\n\t\t# Load TinyMCE editor\n\t\t$this -> load -> view('tinymce_script_view');\t\n\t\t# Load tag plugin script\n\t\t$this -> load -> view('resource/tag_plugin_view');\n\t\t# Load confirmation script for 'are you sure?' dialogue on delete\n\t\t$script_data['text'] = \"\\\"Do you really want to delete this resource record? You cannot undo this action.\\\"\";\n\t\t$this -> load -> view('confirm_script_view', $script_data);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "00ef184427d07695b1e8fc0c22e82b41", "score": "0.7082578", "text": "public function edit()\n {\n return view('manager::edit');\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.70465523", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "436839a6b183921cefd8e08a9530aab9", "score": "0.70347303", "text": "function edit( $resource ){\n\n $customer = get( 'customers', $resource );\n\n return view( '', compact( 'customer' ));\n}", "title": "" }, { "docid": "687719d7fbd10fee5075a252fb8ed0a2", "score": "0.703277", "text": "public function edit(Resource $resource)\n {\n $icons = Icon::all();\n $logo = Logo::first();\n return view('pages.bo.services.serviceEdit',compact('resource', 'icons', 'logo'));\n }", "title": "" }, { "docid": "c1333e15861ffed0d228237f46dc6774", "score": "0.6991501", "text": "function edit()\n\t{\n\t\t$this->get($this->id(),2);\n\t\t$this->editing(true);\n\t}", "title": "" }, { "docid": "c0d211d253e2cdb5e3aa0b701a09d8fe", "score": "0.6972677", "text": "public function page_userEdit($resource)\n {\n\n $this->_pageContent['userInfo'] = $resource;\n\n $this->_myPage = \"page_userForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "7bfd0448802c70ea9c26b14afbc29a51", "score": "0.69672465", "text": "public function edit() {\n\t\t\tif(isset($this->id)) {\n\t\t\t\t$this->returnView($this->model->edit($this->id));\n\t\t\t} \n\t\t\telse {\n\t\t\t\terror404();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.6961317", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "541b62a47416bd843be17728e23bc59c", "score": "0.6953332", "text": "public function edit($id)\n\t{\n\t\t$filter = array(\n\t\t\t'name' \t\t\t=> Input::get('name'),\n\t\t\t);\n\n\t\t$resourceById = Resource::find($id);\n\t\t$resources = Resource::where(function($query){\n\t\t\tif(Input::get('name', null))\n\t\t\t\t$query->where('name', 'LIKE', '%' . Input::get('name') . '%');\n\t\t})\n\t\t->orderBy('name', 'asc')\n\t\t->paginate();\n\t\t$index = $resources->getPerPage() * ($resources->getCurrentPage()-1) + 1;\n\t\treturn View::make('resource.edit')\n\t\t\t->with(array(\n\t\t\t\t'resources'=> $resources,\n\t\t\t\t 'resourceById' => $resourceById,\n\t\t\t\t 'index'\t\t=> $index,\n\t\t\t\t 'filter'\t\t=> $filter\n\t\t\t\t ));\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69454193", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "480e68fe244baf956aaee5a92b28179a", "score": "0.69229954", "text": "public function edit($id)\n {\n /** Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /** Check if logged in user is authorized to make this request */\n $this->authorize('update', [\n $resource\n ]);\n\n /** Set the message headers */\n $message = [\n 'to' => $resource->recipients->pluck('id'),\n 'subject' => $resource->subject,\n 'body' => $resource->body,\n ];\n\n /** Displays the edit resource page */\n return view('admin.' . $this->name . '.edit')\n ->with('resource', $resource)\n ->with('name', $this->name)\n ->with('message', $message);\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.692124", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "ae53e150e2ac4fae5c0e64d490dc364b", "score": "0.6906711", "text": "public function edit($id)\n {\n $ModelName = $this->getModelName();\n $entity_name = $this->getEntityName();\n\n $record = $ModelName::findOrFail($id);\n\n return View::make('admin.' . str_plural($entity_name) . '.edit')\n ->with($entity_name, $record)\n ->with($this->getRelationshipFields());\n }", "title": "" }, { "docid": "692e66486df9d8bf243ddc6ad57df6db", "score": "0.6902502", "text": "public function edit($id)\n {\n $this->authorize('update', [$this->entity_repository, $id]);\n $entity = $this->entity_workflow->edit($id);\n return view('entity_edit', compact('entity')); //ayto DEN tha to exw sto restful_crud code generation\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.6897402", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.6897402", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "5c928fff942d0cfe3b2191927392941a", "score": "0.68704814", "text": "public function editForm()\n\t{\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey . 'form' : $layout . 'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_' . $layout; \n\t\t$view = $this->getView($this->default_view, JFactory::getDocument()->getType(), '', array(\n\t\t\t'layout' => $layout\n\t\t));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "0203676e2eea2cba44d07a5b31307075", "score": "0.6842776", "text": "public function edit()\n {\n return view('dev::edit');\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.6834265", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "5abb2c0d314013941d44e2af19a6e1b2", "score": "0.68331885", "text": "public function edit($id) {\n $form = $this->formCRUD->find_form($id);\n $this->load->view('theme/header');\n $this->load->view('formCRUD/edit',array('form'=>$form));\n $this->load->view('theme/footer');\n }", "title": "" }, { "docid": "d99e4eb994fac5d81b537cf4065d860a", "score": "0.6818653", "text": "public function editAction()\n {\n $id = (int) $this->getRequest()->getParam('id');\n Mage::register('current_questions', Mage::getModel('oggetto_faq/questions')->load($id));\n $this->loadLayout()->_setActiveMenu('oggetto_faq');\n $this->_addContent($this->getLayout()->createBlock('oggetto_faq/adminhtml_faq_edit'));\n $this->renderLayout();\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68023956", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.6795193", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "3dc27b29583d035b599fe54604b6daf2", "score": "0.67934847", "text": "public function edit($id)\n\t{\n\t\t$resourcetype = Resourcetype::find($id);\n\n\t\treturn View::make('resourcetypes.edit', compact('resourcetype'));\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791359", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791359", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "18af0570d7d5565bf33c445b2a110d76", "score": "0.6784433", "text": "public function edit($id)\n\t{\n\t\treturn \"Edit a form\";\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6762488", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754142", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "112f460c8f2a4cf9f1c4aa73d88299c0", "score": "0.67530453", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $form = form_accessor($form);\n $data = [\n 'title' => 'Edit',\n 'method' => 'put',\n 'action' => url('account/forms/' . $id),\n 'form' => $form,\n 'component_name_map' => array_merge(Form::$componentNameMap['left'], Form::$componentNameMap['right'])\n ];\n return view('content.account.forms.create-edit', $data);\n }", "title": "" }, { "docid": "d4c5c17930926329b1e22e3611608cee", "score": "0.6750559", "text": "public function edit()\n {\n $volunteerJobId = Helper::getIdFromUrl('volunteerjob');\n $volunteerJob = VolunteerJobModel::load()->get($volunteerJobId);\n\n Helper::checkIdsFromSessionAndUrl($volunteerJob->user_id);\n\n View::render('volunteerjobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/volunteerjob/' . $volunteerJobId . '/update',\n 'volunteerjob' => $volunteerJob\n ]);\n }", "title": "" }, { "docid": "9a10b30017d016b9d98477af86b62da9", "score": "0.67302245", "text": "public function edit(Form $form)\n {\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.67294425", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "03ac97aa9bc02aa1c7056da56a66fc93", "score": "0.6728406", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Record')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Record entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Record:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c392a7017c2b6cc02ed9b4c0630f20ed", "score": "0.6726734", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "26bb68bb8f5ec9cc8e61b7a5e6902d51", "score": "0.67265815", "text": "public function editAction()\n {\n return $this->addOrEdit('edit');\n }", "title": "" }, { "docid": "2fa25e04d9730c28170ec243a44454d6", "score": "0.67253745", "text": "public function edit($id)\n {\n $admin = $this->administador;\n $title = 'Editar administrador';\n $form_data = ['route' => ['admin.administrador.update',$this->administador->id],'method' => 'PUT'];\n return view('admin.administrador.form')->with(compact('admin','form_data','title'));\n }", "title": "" }, { "docid": "6029dd897b1c8f37a564dd8d339a6700", "score": "0.67141134", "text": "public function edit($id)\n {\n $subjects = Subject::all();\n $collections = Collection::all();\n $resource = Resource::find($id);\n return view('admin.resources.edit', compact('resource','subjects','collections'));\n }", "title": "" }, { "docid": "e5e830d61bdd5b24a06755b5955b9294", "score": "0.66946894", "text": "public function edit($id)\n {\n $pooja = Poojaas::find($id);\n return view('admin.poojas.editForm',['menu'=>'4','pooja'=>$pooja]);\n }", "title": "" }, { "docid": "664d31fb91ae9ed1c67f8f8130c44637", "score": "0.6694106", "text": "public function edit($id)\n {\n $employee = $this->employeeRepository->findOrFail($id);\n\n return view('panel.employee.form', [\n 'employee' => $employee,\n 'documents' => $this->getDocuments(),\n 'selectedDocuments' => $this->employeeRepository->listIdDocuments($id),\n 'companies' => $this->getCompanies(),\n 'selectedCompanies' => $this->employeeRepository->listIdCompanies($id),\n 'states' => $this->states,\n 'route' => 'employee.update',\n 'method' => 'PUT',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Atualizar')\n ]);\n }", "title": "" }, { "docid": "72520d735eee1df0929570294fe6727a", "score": "0.6691756", "text": "public function edit($id)\n {\n if(Gate::denies($this->resource.'-update'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n $item = $this->model::find($id);\n\n if(!isset($item))\n return $this->backOrJson(request(), 'item_not_found', 'crud.item-not-found');\n \n if($this->onlyMine && Gate::denies('mine', $item))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $this->addToView($this->options($item));\n \n return request()->wantsJson() \n ? $item\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('item', 'label', 'title', 'icon')));\n }", "title": "" }, { "docid": "f6e0eeed266da7c21e16df553b4abe30", "score": "0.6691352", "text": "public function edit($id){\n $model = new $this->model;\n $model = $model->find($id);\n return View::make('form.edit', compact('model'));\n }", "title": "" }, { "docid": "04940e3eb1b0bdb3eba0fb05f8254b27", "score": "0.66802275", "text": "function edit() {\r\n $this -> display();\r\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680029", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "ff9d0f1f39dddbbfb9b90aaa18217f06", "score": "0.66768473", "text": "public function showEdit()\n {\n $task = new TaskModel();\n $taskId = filter_input(INPUT_POST, 'id');\n $view = new View();\n $view->render('task_edit_view.php', 'default_view.php');\n $task->getTaskById($taskId);\n }", "title": "" }, { "docid": "6a173642cfc904aa993c4c5ec090a9c1", "score": "0.6671944", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormationFrontBundle:Formation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Formation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormationAdminBundle:Formation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "e93e5a7b2d3281b57823696586572b44", "score": "0.6663296", "text": "public function edit()\n {\n return view('insurance::edit');\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66590333", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "3c0a48f35d98dc8d1b03a7edd73c99aa", "score": "0.6655534", "text": "public function edit($id)\n {\n return view('softether::edit');\n }", "title": "" }, { "docid": "fb9fada09a2381e81983f10ccc266fe8", "score": "0.66533095", "text": "public function edit($id)\n {\n $items = $this->model->where('id','!=',$id)->get();\n $item = $this->model->find($id);\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'item' => $item,\n 'essence' => $this->essence,\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66509485", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "5ee97cd51477ad520224ac2a1fab98d9", "score": "0.6650335", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CumtsMainBundle:Show')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Show entity.');\n }\n\n $editForm = $this->createForm(new ShowType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CumtsAdminBundle:Show:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "7696ddc01688530a06b8f6b1b1e2b7cb", "score": "0.664605", "text": "public function edit($id)\n {\n //\n $id = $this->route->getParameter('id');\n $model = $this->hospitalesRepo->find($id);\n \n return view('hospitales.form',compact('model'));\n }", "title": "" }, { "docid": "503c64be303ecd03ee2b721a741f8efc", "score": "0.6644081", "text": "public function edit()\n\t{\n\t\t$this->auth->restrict('DM_Preparedness.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n\t\t\t// New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n\t\t\t// Existing record\n\t\t\tTemplate::set('formView', $this->showEditor($id));\n\t\t}\n\n\t\tTemplate::set('toolbar_title', lang('dm_preparedness_edit') .' DM Preparedness');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "a35bc99f8c25aa274b588a4b001efbac", "score": "0.6640958", "text": "public function edit($id)\n {\n $fom = Formm::find($id);\n return View::make('form.edit',compact('fom'));\n }", "title": "" }, { "docid": "e8cae06a05d236b8611e5b194566db50", "score": "0.6633651", "text": "public function edit($id)\n {\n //\n\n\n $persons = Person::findOrFail($id);\n\n //highlight sidebar\n $this->setActiveParent();\n\n //null = current request\n $form_fields = DynamicForm::form_fields('edit', $persons, null, Person::form_fields() );\n\n return view('persons.edit', compact('form_fields', 'persons') );\n\n }", "title": "" }, { "docid": "7ebc3ae9eb2995b615edac942a9302ef", "score": "0.66311157", "text": "public function edit($id) {\n $prefectures = Prefecture::pluck('display_name','id');\n $prefectures[''] = '';\n $company = Company::where('id',$id)->first();\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n $company->prefectures = $prefectures;\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "a58284e14c88a606668feb06103d3539", "score": "0.6630939", "text": "public function edit($id)\n\t{\n\t\t// get the Administrador\n\t\t$administradores = Administrador::find($id);\n\n\t\t\n\t\t// show the edit form and pass the Administrador\n\t\t$this->layout->content = View::make('Administrador.edit')\n->with('administradores', $administradores);\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275823", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.6626525", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "7b25948b2cb4ca65ae5501eab2bf6b75", "score": "0.66263753", "text": "public function edit($id)\r\n {\r\n $user = User::find($id); \r\n \r\n // show the edit form and pass the shark\r\n return View('frontend.form_users')\r\n->with('user', $user)\r\n ->with('update',true)\r\n ;\r\n }", "title": "" }, { "docid": "2fb5c281d7d88e78e7e77d412ec633cc", "score": "0.66261256", "text": "public function edit($id)\n {\n $project = Project::findOrFail($id);\n return view('admin.forms.form_project', [\"project\" => $project]);\n }", "title": "" }, { "docid": "2f00a5b5f71f61a4c34f37c428ae3061", "score": "0.6625414", "text": "public function edit($id)\n {\n $entity = $this->crud->getRepository()->findOrFail($id);\n\n $form = $this->crud->getEditFormClass();\n\n if ($form) {\n $form = FormBuilder::create($form, [\n 'method' => 'patch',\n 'model' => $entity,\n 'route' => [$this->crud->getRouteByMethod('update'), $id],\n ]);\n }\n\n return view($this->crud->getViewByMethod('edit'))\n ->with('entity', $entity)\n ->with('form', $form)\n ->with('crud', $this->crud);\n }", "title": "" }, { "docid": "7d175ca825cbe048b738bd7976f8de67", "score": "0.66233", "text": "public function edit(Form $form)\n {\n return view('admin.form.edit', compact('form'));\n }", "title": "" }, { "docid": "2e857827ad8b86ed049c66e1b290cf8f", "score": "0.6622529", "text": "public function edit($id) {\n\t\t$contact = Contact::find($id);\n\t\t$form_fields = $this->getFormFields('Contact');\n\t\t$this -> layout -> content = View::make('admin.contacts.edit', compact('contact','form_fields'));\n\t}", "title": "" }, { "docid": "2a65944b9a357cefcd45e5edab8ccbd3", "score": "0.66183263", "text": "public function edit($id)\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos')) return $this->accessFail();\n\t\t\n $objeto = $this->objetoRepo->find($id);\n\n $this->notFoundUnless($objeto);\n\t\t\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => array('objetos.update', $objeto->Obj_Id), 'method' => 'PATCH');\n $action = '';\n\t\tif ( \\Util::getAccess('Objetos', 'Update')) $action = 'Actualizar';\t\n\t\tif ( \\Util::getAccess('Objetos', 'Delete')) $action = 'Eliminar';\t\n\t\t$action_label = \\Lang::get('utils.Actualizar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "5d979456b1516a2847c2d079fb4641a2", "score": "0.6616827", "text": "public function edit($id)\n {\n $company = $this->company_model->findOrFail($id);\n $data = [\n 'title' => \"Company Form\",\n 'company' => $company,\n 'method' => \"PUT\",\n ];\n return view('company.company_form', $data);\n }", "title": "" }, { "docid": "76648b4106d5f9fb3fccadf6ba8ad7e1", "score": "0.66166955", "text": "public function edit()\n {\n return view('counterrace::edit');\n }", "title": "" }, { "docid": "d82133b3b27967ec923f49fef0687720", "score": "0.66150504", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('manage.update',compact('product'));\n }", "title": "" }, { "docid": "05d425274b6655a0bc8a6a2e30c40a2a", "score": "0.66150475", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->history->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['history' => $this->history, 'history_types' => $this->history_types]);\n\t}", "title": "" }, { "docid": "d615d8d8a4d8f4cf935c141dac481476", "score": "0.6613076", "text": "public function edit($id)\n {\n\n $this->init();\n\n $this->pre_edit($id);\n\n $model = \"App\\\\\" . $this->model;\n $data = $model::find($id);\n $action = $this->action;\n $view = $this->model;\n\n\n $form = $model::edit_form($data);\n\n $form['data']['action'] = $action . \"/\" . $id;\n $form['data']['heading'] = \"Edit \" . str_singular($this->model) . \": \" . $id;\n $form['data']['type'] = \"edit\";\n $form['data']['submit'] = \"Update\";\n\n\n return view('tm::forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "362c7ddf2a5fb0999d07dbd6072a97d0", "score": "0.66124034", "text": "public function edit(int $id)\n {\n if (auth()->user()->user_type_id == 0){\n return redirect('/admin/resources')->with(['error' => 'Unauthorized!']);\n }\n $subjects = $this->Subject->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $courses = $this->Course->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"admin.cresources.edit\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model, 'subjects'=>$subjects, 'courses'=>$courses]);\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6608313", "text": "public function edit($id);", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66080546", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "e85fde44c8e1c9ec2d404615e7636756", "score": "0.6600185", "text": "public function editAction()\n {\n $projectCatalog = ProjectCatalog::getInstance();\n $idProject = $this->getRequest()->getParam('idProject');\n $project = $projectCatalog->getById($idProject);\n $post = array(\n 'id_project' => $project->getIdProject(),\n 'type' => $project->getType(),\n 'status' => $project->getStatus(),\n );\n $this->view->post = $post;\n $this->setTitle('Edit Project');\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.6599271", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "4447b0652f435f99829824829c7ac505", "score": "0.6596993", "text": "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Theme_Service_Rom::getRom(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t}", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6589647", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "5804dcb2b9a17ff737a0b3c87eb000a8", "score": "0.6586619", "text": "public function edit($id)\n {\n if (Auth::user()->role == 'member') {\n dd('Member are not allowed to do this, how did you get here?');\n }\n else {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }\n }", "title": "" }, { "docid": "b223a48c110d536d3f8537b6f881e5fe", "score": "0.6586607", "text": "public function editAction()\n {\n $this->_edit();\n $this->view->form = $this->_getFormUserProfile();\n }", "title": "" }, { "docid": "1cb6fa968962bdd3b01e45725d7d5362", "score": "0.6583918", "text": "public function edit($id)\n {\n $data['title'] = 'Why Epic Update'; \n $data['menu'] = 'why_epic';\n $data['sub_menu'] = 'why_epic_list';\n $data['why_epic'] = WhyEpic::find($id);\n return view('backend.why_epic.why_epic_edit', $data);\n }", "title": "" }, { "docid": "f5e69f73a0fbafc4fb91b2ce43c99bfa", "score": "0.65802175", "text": "public function edit($id){\n $student = Student::find($id);\n return view('admin.student.formEditStudent',compact('student'));\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.65762484", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "10b974335aefccd5bc654e311f5a26c9", "score": "0.657594", "text": "public function edit($id) {\n $nerd = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('product.edit')\n ->with('product_detail', $nerd);\n }", "title": "" }, { "docid": "9b8d2c73bfa22d48146bec75330e17c2", "score": "0.6569881", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.6568481", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "e94d3986cbe8d66a1574a1189feed48a", "score": "0.65666986", "text": "public function edit($id)\n\t{\n\t\t//find farm\n\t\t$farm =\t$this->farmRepository->findById($id);\n\t\treturn View::make('farm.edit',compact('farm'));\n\t}", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6564937", "text": "public function actionEdit() { }", "title": "" }, { "docid": "366b0ea03383346dfc3f2d2ae42b6888", "score": "0.65628576", "text": "public function edit($id)\n {\n $company = Companies::find($id);\n\n // show the edit form and pass the shark\n return view('admin.company.edit')\n ->with('company', $company);\n }", "title": "" }, { "docid": "03ca41bdd92d6efaae461cb601c3cb8a", "score": "0.6562411", "text": "public function edit($id)\n {\n $format = Format::findOrFail($id);\n $controls = [\n [\n 'type' => 'text',\n 'name' => 'title',\n 'title' => 'Название',\n 'placeholder' => 'Введите название'\n ],\n ];\n\n return view('control-form.edit', [\n 'title' => 'Редактировать формат',\n 'controls' => $controls,\n 'route_update' => 'format.update',\n 'item' => $format,\n ]);\n }", "title": "" }, { "docid": "a415921fd3d313f235be8f9067dc927c", "score": "0.65606123", "text": "public function edit($id)\n\t{\n\t\t$job = Job::find($id);\n\t \n\t \n\t\treturn view('admin.job.edit', compact('job'));\n\t}", "title": "" }, { "docid": "6142999594166128c9323deb1a39a478", "score": "0.65585214", "text": "public function editAction()\n {\n // action body\n\t\t$contact = $this->createContact(isset($_POST['submit']) ? $_POST : array('id' => $this->_getParam('id')));\n\n\t\t$form = $this->createForm($contact);\n\n\t\t$this->view->form = $form;\n\n\t\tif(isset($_POST['submit']))\n\t\t{\n\t\t\tif($form->isValid($_POST))\n\t\t\t{\n\t\t\t\t$contact = $this->createContact($_POST);\n\n\t\t\t\t$contact->save();\n\t\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage('Contact Updated.');\n\t\t\t\t$this->_redirect('/contacts');\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "4fa0e28ffbd3c3cea5f69cf7391f91f7", "score": "0.6553524", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t\treturn view('employees.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "7c50e3dedd440fee2b41e80896671eb9", "score": "0.65531045", "text": "public function edit()\n {\n return view('document::edit');\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.0", "text": "public function create() {\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "f8bba5517a2cb6f46311a24713a6bef2", "score": "0.8125342", "text": "public function create()\n {\n return view('admin.resource.new');\n }", "title": "" }, { "docid": "20ef26ca996d9360798f2ecc07198092", "score": "0.7804094", "text": "public function create()\n\t{\n\t\treturn View::make('backoffice.resource.create');\n\t}", "title": "" }, { "docid": "681d20882e97df51906ce75b97ef1784", "score": "0.7775189", "text": "public function create()\n {\n return view('actions.resource.create');\n }", "title": "" }, { "docid": "0efde82a25b6100f0c21eb97e2121fd0", "score": "0.77337104", "text": "public function create()\n {\n $this->page_title = trans('resource_type.new');\n\n return view('resource_type.new', $this->vdata);\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "260e3a6550329e832d8155a1a557745f", "score": "0.771192", "text": "public function create()\n {\n /*show create form maybe not nessesary*/\n }", "title": "" }, { "docid": "0a28fa28b4fcdf44c0bd490fe751d763", "score": "0.7673694", "text": "public function create()\n\t{\n\t\t$this->layout->subtitle = _('Add');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getFillableLabels());\n\t}", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "60b8c2dc2f8ff4dabd04bc7f6dca0779", "score": "0.75383", "text": "public function newAction()\n {\n $entity = new Resource();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BWBlogBundle:Resource:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "5d140c321df7acb8c739eadcc5bc3d54", "score": "0.746548", "text": "public function create()\n {\n return view('laramanager::resources.create');\n }", "title": "" }, { "docid": "ad59d20f2872a6e73a13ec203ef2f8bc", "score": "0.72848165", "text": "public function create()\n {\n //display form\n return view(\n 'ps.create');\n }", "title": "" }, { "docid": "b232948171ce8236d12a5ecd5627119c", "score": "0.7282519", "text": "public function create()\n {\n return view(\"pages.req.form\");\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "3347c41a19ab6c1a35b881f99ddefe9e", "score": "0.72624177", "text": "public function createAction()\n {\n $this->view->flds = '[{\"cssClass\":\"input_text\",\"required\":\"undefined\",\"values\":\"First Name\"},{\"cssClass\":\"textarea\",\"required\":\"undefined\",\"values\":\"Bio\"},{\"cssClass\":\"checkbox\",\"required\":\"undefined\",\"title\":\"Whats on your pizza?\",\"values\":{\"2\":{\"value\":\"Extra Cheese\",\"baseline\":\"undefined\"},\"3\":{\"value\":\"Beef\",\"baseline\":\"undefined\"}}}]';\n $this->view->form = new NpfWebformsForm(null);\n }", "title": "" }, { "docid": "a5d2c0c3777cd260cd88c88f37ec70a6", "score": "0.72577995", "text": "public function create_form()\n {\n return View::make(\"app.create\");\n }", "title": "" }, { "docid": "6a94e5e8f7512f93eda3c0b1ea5d5607", "score": "0.7257189", "text": "function showCreateForm(){\n return view('admin.Ebuletin.create');\n }", "title": "" }, { "docid": "64b0e85604fc330e4cbfc6f09f397b27", "score": "0.72493047", "text": "public function showCreateForm ()\n {\n $myNewspaper = App::user()->getNewspaper();\n\n if (!empty($myNewspaper)) {\n App::redirect(\"/newspaper/\" . $myNewspaper->id);\n }\n\n return $this->render('news/createNewspaper.html.twig', [\n \"creationCost\" => NewspaperModel::CREATION_COST\n ]);\n }", "title": "" }, { "docid": "d3ebdfcf36f62f0f42113a8b11f4895a", "score": "0.7240409", "text": "public function create()\n {\n return view('resources.create_resources');\n }", "title": "" }, { "docid": "b1c3c9219f8100b85c24750c6f92cd4a", "score": "0.72274303", "text": "public function create()\n {\n return view('crud.form');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "5c37508d09b68f9ab4123a0772960c76", "score": "0.7212462", "text": "public function create()\n {\n return view('admin.catalog.form');\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "65a80f896bface8ccfc0be19571775ba", "score": "0.71928936", "text": "public function create()\n {\n //\n return \"Provide a form to add a car\";\n }", "title": "" }, { "docid": "1d0710555ccb7cd822584d16dcfe0336", "score": "0.7182808", "text": "public function showCreateForm()\n\t{\n\t\treturn view('admin.post.add');\n\t}", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "9afc6acf07243beac05422dfa57f968f", "score": "0.7173864", "text": "public function showCreateForm()\n {\n return view(\"admin.user.create\");\n }", "title": "" }, { "docid": "3bafea32fa451a3439e6d308764b7e96", "score": "0.71605355", "text": "public function create()\n\t{\n\t\treturn view(\"barang.form\");\n\n\t}", "title": "" }, { "docid": "cfe9ceeda6c7d1649d3f15d33b16a627", "score": "0.7154192", "text": "public function newAction()\n\t{\n\t\techo $this->getForm();\n\t}", "title": "" }, { "docid": "540a53a248ba67bdca77e9032bbb635f", "score": "0.7150356", "text": "public function create()\n {\n return view('client.form');\n }", "title": "" }, { "docid": "8d4cc40a42b81724eb4460472353bc0a", "score": "0.714293", "text": "public function create()\n\t{\n // load the create form\n return View::make('residents.create');\n\t}", "title": "" }, { "docid": "a8d9b3e6c0f69a9c90642861d5e343c1", "score": "0.7141869", "text": "public function create()\n {\n return view('submit.create');\n }", "title": "" }, { "docid": "3b15559bc4c862a29339bfd433c32526", "score": "0.71411765", "text": "public function create()\n {\n return view('students.addStudentForm');\n }", "title": "" }, { "docid": "3f6a1acba05e915724250680142e88c7", "score": "0.71384877", "text": "public function create()\n {\n return view('formcreate');\n }", "title": "" }, { "docid": "8c1752e2ab024985c584b2f42d891525", "score": "0.7138087", "text": "public function create()\n {\n return view(\"piutang.form\");\n }", "title": "" }, { "docid": "d77bcfd7ac022954dfbdbaec633e0b32", "score": "0.7131701", "text": "public function create()\n {\n $resources = Resource::all();\n $categories = ResourceCategory::all();\n\n $data = [\n 'resources' => $resources,\n 'categories' => $categories,\n ];\n\n return view('resources.create-resource')->with($data);\n }", "title": "" }, { "docid": "aa71810ebd2853f92e8db655776237e2", "score": "0.712946", "text": "public function create()\n {\n return view ('siswa.form');\n }", "title": "" }, { "docid": "311b4437f4b6d54e594b3899d29f4f11", "score": "0.7121037", "text": "public function create()\n {\n return view('admin.student.addnew');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "751653051dae87138c242368dc3786de", "score": "0.71069485", "text": "public function create()\n {\n $title = \"Registrar negocio\";\n $model = new Business();\n\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "8b6604f525238bef52951de0b16d7f1f", "score": "0.7096012", "text": "public function create()\n {\n return view('formbuilder::form.create');\n }", "title": "" }, { "docid": "990414ce4876a4b2a4f29dd9d7d3abf5", "score": "0.709237", "text": "public function create()\n\t{\n\t\treturn view('admin.question.form');\n\t}", "title": "" }, { "docid": "16732db43c5e7a7dd04a193ce5b2ae23", "score": "0.70919156", "text": "public function create()\n {\n return view('resep.form');\n }", "title": "" }, { "docid": "33b0a71ac72fac345ac76b2a9dbd3cb8", "score": "0.70887756", "text": "public function newAction()\n {\n $entity = $this->get('fibe_security.acl_entity_helper')->getEntityACL('CREATE', 'Person');\n $form = $this->createForm(new PersonType($this->getUser()), $entity);\n\n return $this->render(\n 'fibeCommunityBundle:Person:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "67cdf2645142d9b0d8b752e0719f92db", "score": "0.70883906", "text": "public function create()\n\t{\n\t\t//\n return view('ThemeNight.Admin.form');\n\t}", "title": "" }, { "docid": "c080ca2e31508a9332469f2e1bfc7d19", "score": "0.7087787", "text": "public function create()\n\t{\n\t\treturn view('atributos.create');\n\t}", "title": "" }, { "docid": "76bfcc35dc8ea95b43ab193fce26154f", "score": "0.7084712", "text": "public function create()\n {\n return view('supplier.form', [\n 'edit' => false\n ]);\n }", "title": "" }, { "docid": "bf72fb3fe8d0bc917f56d924e8ccf3ba", "score": "0.70816255", "text": "public function create()\n {\n //\n return view('create_form');\n }", "title": "" }, { "docid": "367e31aa42d6f06e1f2fb2e09709f1e0", "score": "0.7070958", "text": "public function create()\n {\n return view('admin.project.create_form');\n }", "title": "" }, { "docid": "43e34c710975c60c5305ac25fb3d7504", "score": "0.7067303", "text": "public function newAction()\r\n {\r\n $entity = new $this->model();\r\n $form = $this->createCreateForm($entity)->createView();\r\n\r\n $result = array(\r\n 'action' => $this->generateUrl($this->route['create']),\r\n 'fields' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "6145954c4b35a97e4abac9949da2a7dc", "score": "0.70663726", "text": "public function create()\n {\n $data = [];\n return view('resources.create', $data);\n }", "title": "" }, { "docid": "3b0f73abe7973dfd183dc9c20405c6b4", "score": "0.7066244", "text": "public function create()\n {\n return view('tool::create.create');\n }", "title": "" }, { "docid": "557c84d597fc8e00e9314d677e08dfe5", "score": "0.7061945", "text": "public function newAction()\n {\n $entity = new Receta();\n $form = $this->createForm(new RecetaType(), $entity);\n\n return $this->render('TodoCerdoTodoCerdoBundle:Receta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "8c4b58d9c7ebe29aed261de1fc923c07", "score": "0.7061731", "text": "public function create()\n {\n return view('controllers.resource-controllers.create');\n }", "title": "" }, { "docid": "4b128041dfdda282b6af96d3ef403c25", "score": "0.70599586", "text": "public function create()\n {\n return view('harvests.form');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "08e0ba475352b37fabdca852bcbdb90e", "score": "0.7054689", "text": "public function create()\n {\n return view('mesas.forms.create');\n }", "title": "" }, { "docid": "2623500cf3f41f19394467ad3cc9656b", "score": "0.7049269", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/Regions/create');\n\n\t}", "title": "" }, { "docid": "d348d95689ce20ca0e7da9c16fd55e2d", "score": "0.70483965", "text": "public function create()\n {\n return view('pengeluaran.form');\n }", "title": "" }, { "docid": "d8233d687b36de8ea5e1f179a497dba1", "score": "0.7037681", "text": "public function newAction()\n {\n $entity = new Persona();\n $form = $this->createForm(new PersonaType(), $entity);\n\n return $this->render('LyricaEirinBundle:Persona:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cfc08ab3b0be81fb6acf7f6316f4b875", "score": "0.7036466", "text": "public function create()\n {\n return view('backend.thadin.create');\n }", "title": "" }, { "docid": "5aa70413db221403054caef7bedac770", "score": "0.7030609", "text": "public function newAction()\n\t{\n\t\t$this->page\n\t\t\t->set('section_title','New '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'new')\n\t\t\t->set('record',(object) array('activated'=>1,'id'=>-1))\n\t\t\t->set('group_options',$this->_get_groups())\n\t\t\t->set('password_format_copy',$this->user_model->password_format_copy())\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "a9a5b6b3c656a709a1bbbab40d24c43f", "score": "0.70302194", "text": "public function create()\n {\n $is_edit = false;\n $product = new Product();\n\n return view('products.form', compact('product', 'is_edit'));\n }", "title": "" }, { "docid": "cfaeeb3c8bd4c70a19c542419f5ad0ee", "score": "0.70269614", "text": "public function create()\n {\n //显示创建资源表单页\n return view('admin/users/create',['title'=>'用户添加']);\n }", "title": "" }, { "docid": "0b984040060f01951eb2375bb849110c", "score": "0.7026164", "text": "public function create()\n\t{\n\t\treturn view('forms.project');\t\n\t}", "title": "" }, { "docid": "0c1db80c69466b1bbd9b8df7bea85585", "score": "0.70254475", "text": "public function newAction()\n {\n $recipe = $this->getRecipeManager()->createRecipe();\n $form = $this->createForm(new RecipeType(), $recipe, array(\n 'action' => $this->generateUrl('backend_recipe_create')\n ));\n\n return $this->render('AppBundle:Backend\\Recipe:new.html.twig', array(\n 'entity' => $recipe,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "9926d30e5b0046e49a6decdaa42f3859", "score": "0.70248765", "text": "public function create()\n {\n return view('platform.people.form');\n }", "title": "" }, { "docid": "33af005bef3111b2a76f2f441180b514", "score": "0.702485", "text": "public function create()\n {\n return view('concepto.create');\n }", "title": "" }, { "docid": "c959c491c6e5b588c802c9967ef706a4", "score": "0.70230263", "text": "public function create()\n {\n //\n // echo 'Here we will show the form and then submit the details in the database';\n }", "title": "" }, { "docid": "abbbd09a7646783cf210f98d7c703c30", "score": "0.70194376", "text": "public function create()\n {\n return view('menu::form');\n }", "title": "" }, { "docid": "6316a85e6cf9ca8aa64b9f706098ae25", "score": "0.7017854", "text": "public function create()\n {\n return view('partner.form');\n }", "title": "" }, { "docid": "d001d3a1995094ca265df985f6398e01", "score": "0.70149684", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createForm(new ClientType(), $entity);\n\n return $this->render('BackendAdminBundle:Client:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "5c8d80287891d65eee128c6ca7878e1c", "score": "0.7013804", "text": "public function create()\n\t{\n\t\t$data = array('type' => 'stone');\n\t\t$this->layout->content = \\View::make('forms.new-stone', $data);\n\t\n\t}", "title": "" }, { "docid": "6f9af144eba20ea97bd9c8a741627e1b", "score": "0.7012243", "text": "public function create()\n {\n return view('crud::crud.add');\n }", "title": "" }, { "docid": "a36d8135bd4414e4abd4868fb56a7177", "score": "0.6996758", "text": "public function create()\n {\n return view('layouts.submitproperty');\n }", "title": "" }, { "docid": "ddb99a4f31eb90825bf6b5da7fa52ca3", "score": "0.6994577", "text": "public function create()\n {\n return view('master.form.athlete-form');\n }", "title": "" }, { "docid": "b1c0d0b9bd1b6ed833c3d3d624e5b031", "score": "0.69930637", "text": "public function create()\n {\n $title = \"Registrar producto\";\n $model = new Product();\n return view($this-> prefixView.'form',compact('title','model'));\n }", "title": "" }, { "docid": "db5850464a16ce05c16a0c42606ccb2c", "score": "0.699252", "text": "public function create()\n {\n $data['typeForm'] = \"create\";\n $data['title'] = \"Property Marketplace\";\n return view(\"admin/marketplace/form\",compact('data'));\n }", "title": "" }, { "docid": "1d37883b0775931ddf17c75e4bbd9d90", "score": "0.6989433", "text": "public function create()\n\t{\n\t\treturn View::make('famoso.create');\n\t}", "title": "" }, { "docid": "9829c4939f7030aeb42447c704de1f3e", "score": "0.69889855", "text": "public function create()\n\t{\n\t\t$this->form->setModel($this->repo->getNew());\n\n\t\treturn View::make('thing.form', ['form' => $this->form]);\n\t}", "title": "" }, { "docid": "8a982b58b2eae6f233b1dcd18de452a0", "score": "0.6987187", "text": "public function create()\n\t{\n\t\treturn view('areadetails.form');\n\t}", "title": "" }, { "docid": "5dcc6a089e3a6d063fa3cab475e28855", "score": "0.6986054", "text": "public function create()\n {\n return view(\"Backend.Pages.add-new\");\n }", "title": "" }, { "docid": "1e96f853503e9af917b9a2a64cde033f", "score": "0.6985649", "text": "public function create()\n {\n return view(\"major.create\");\n }", "title": "" }, { "docid": "610f56b2c95018c60ad6a8374c2d250e", "score": "0.69853884", "text": "public function create()\n {\n return view ('tahun.form');\n }", "title": "" }, { "docid": "eeee917bcfaf007d8d07ea2e40388b06", "score": "0.69850516", "text": "public function create()\n {\n return view('clients.form')->with([\n 'action' => 'create'\n ]);\n }", "title": "" }, { "docid": "1d1ce9ff2645b7b3f0753d499204d44f", "score": "0.6980153", "text": "public function create()\n {\n //\n\n return view::make('form.create');\n }", "title": "" }, { "docid": "d0bdcbece4be35278c63f8feea57b955", "score": "0.6978014", "text": "public function new_form(){\n $this->vars['breadcrumbs'][] = array('label' => __('Create New Customer', 'latepoint'), 'link' => false );\n\n $this->vars['customer'] = new OsCustomerModel();\n $this->vars['wp_users_for_select'] = OsWpUserHelper::get_wp_users_for_select();\n\n\n $this->format_render(__FUNCTION__);\n }", "title": "" }, { "docid": "fa1baaa9f5aebb07e6bb696f0001364c", "score": "0.6976698", "text": "public function create()\n\t\t{\n\t\t\treturn view('coa.create');\n\t\t}", "title": "" }, { "docid": "54ece91bb98da047753baa658573a9de", "score": "0.697606", "text": "public function create()\n {\n //\n return view('admin.actuForm');\n }", "title": "" }, { "docid": "df3bf96fa2e72c254a6b2d268a5f6402", "score": "0.69758654", "text": "public function create()\r\n {\r\n return view('backend/category_management/create_form');\r\n }", "title": "" }, { "docid": "c754c692adc63ca29e993ebbf09ee995", "score": "0.6974421", "text": "public function create()\n {\n return view('product::admin.form');\n }", "title": "" }, { "docid": "74a010aa8faacd0448738b50f14d4758", "score": "0.6965735", "text": "public function create()\n {\n $title = self::TITLE;\n $route = self::ROUTE;\n $action = \"Add\";\n return view(self::FOLDER . '.create', compact('title', 'route', 'action'));\n }", "title": "" }, { "docid": "de91e46735fd97173b2f990f6ecc7d8c", "score": "0.6962055", "text": "public function showCreateFormAction() {\n $this->theme->setTitle(\"Add user\");\n $this->di->session();\n $form = new \\Anax\\Users\\CFormAddUser();\n $form->setDI($this->di);\n $form->check();\n \n // view of the comment form\n $this->di->views->add('comment/form', [\n 'title' => \"Add a new user\",\n 'content' => \"<h1>Add a new user</h1>\" . $form->getHTML()\n ]);\n }", "title": "" }, { "docid": "e2ad160b52213ea876d7e50dbf6fd2cd", "score": "0.6959711", "text": "public function create()\n {\n return view('wisata.form');\n }", "title": "" }, { "docid": "93847c98ccd0e3b2c387d82adc10a23e", "score": "0.69590706", "text": "public function create()\n\t{\n\t\treturn View::make('compromissos.create');\n\t}", "title": "" } ]
5dd974b797c345e123d445b3c0aec777
Get the code transporteur5.
[ { "docid": "d0b5afb101d428d0ba3780f1246f759b", "score": "0.9140346", "text": "public function getCodeTransporteur5() {\n return $this->codeTransporteur5;\n }", "title": "" } ]
[ { "docid": "ae735b0f1e19fdf17fbe5b99466ec2f6", "score": "0.849313", "text": "public function getCodeTransporteur5(): ?string {\n return $this->codeTransporteur5;\n }", "title": "" }, { "docid": "eb01a10b24208ff7db3d9dedc909a6de", "score": "0.77963704", "text": "public function getCodeTransporteur4() {\n return $this->codeTransporteur4;\n }", "title": "" }, { "docid": "27f78c52d7f41c0aa8ffac6b483f796c", "score": "0.766766", "text": "public function getCodeTransporteur1() {\n return $this->codeTransporteur1;\n }", "title": "" }, { "docid": "6146afe67dc922b4dd6c2a3fd5f9d5d5", "score": "0.7630643", "text": "public function getTrsCodeTarif5() {\n return $this->trsCodeTarif5;\n }", "title": "" }, { "docid": "f439ad91a4e5a88ee56cece147105074", "score": "0.7555186", "text": "public function getCodeTransporteur3() {\n return $this->codeTransporteur3;\n }", "title": "" }, { "docid": "2af2108bb3a51a0f4a3fcfcd24537f30", "score": "0.7322154", "text": "public function getCodeTransporteur4(): ?string {\n return $this->codeTransporteur4;\n }", "title": "" }, { "docid": "24cc7ee9cf2c25c834378b0abddf65a1", "score": "0.72387326", "text": "public function getTrsCodeTarif5(): ?string {\n return $this->trsCodeTarif5;\n }", "title": "" }, { "docid": "3fe83da18b6714bb41726d1a9af46773", "score": "0.72175723", "text": "public function setCodeTransporteur5($codeTransporteur5) {\n $this->codeTransporteur5 = $codeTransporteur5;\n return $this;\n }", "title": "" }, { "docid": "24a6e0a7875e8affbaf737b8e7719a45", "score": "0.7208491", "text": "public function getTypeTransport5() {\n return $this->typeTransport5;\n }", "title": "" }, { "docid": "1f0440ea9ec99ac5d0ff1b2d5cb6504c", "score": "0.71900123", "text": "public function getCodeTransporteur1(): ?string {\n return $this->codeTransporteur1;\n }", "title": "" }, { "docid": "cf0e6fbc406947aa7bd8fa28e4dc3782", "score": "0.71160847", "text": "public function getCodeTransporteur2() {\n return $this->codeTransporteur2;\n }", "title": "" }, { "docid": "3e7bba0aa3afd51783fae0bce31e275d", "score": "0.70781755", "text": "public function getCodeTransporteur3(): ?string {\n return $this->codeTransporteur3;\n }", "title": "" }, { "docid": "bcee786178099d1d9f93dff3e73b49fb", "score": "0.6921597", "text": "public function getMtTransport5() {\n return $this->mtTransport5;\n }", "title": "" }, { "docid": "77223760cfa1df4a665ce7ed46aa0e1b", "score": "0.6875274", "text": "public function setCodeTransporteur5(?string $codeTransporteur5): Clients2 {\n $this->codeTransporteur5 = $codeTransporteur5;\n return $this;\n }", "title": "" }, { "docid": "90de38c23737fee7f7607c7ae2b20cfc", "score": "0.6838638", "text": "public function getTrsCodeTarif5Sens() {\n return $this->trsCodeTarif5Sens;\n }", "title": "" }, { "docid": "2c31e2d5f9c2309768099839962af1b3", "score": "0.68364847", "text": "public function getTypeTransport5(): ?string {\n return $this->typeTransport5;\n }", "title": "" }, { "docid": "25c9fc5a83c9edd8b4c838d40a7a6970", "score": "0.6663501", "text": "public function getCodeTransporteur2(): ?string {\n return $this->codeTransporteur2;\n }", "title": "" }, { "docid": "692cdb1ecc778a32f01cd25bab69282a", "score": "0.6583023", "text": "public function getTrsCodeTarif5Sens(): ?string {\n return $this->trsCodeTarif5Sens;\n }", "title": "" }, { "docid": "282b352b9ad840a1255472d4b7d5adc1", "score": "0.6528921", "text": "public function getCodeTravail() {\n return $this->codeTravail;\n }", "title": "" }, { "docid": "bcca5d295e9c42ca6079f2620e4be3cf", "score": "0.64424604", "text": "public function getCodeCommune() {\n return $this->codeCommune;\n }", "title": "" }, { "docid": "95bf1cc96d5a6e5d46de3435eabedbd2", "score": "0.64283323", "text": "public function getCode()\n {\n return $this->meta->iso_3611[0];\n }", "title": "" }, { "docid": "d592945da2b0d53dbc1c313950d667ef", "score": "0.6337166", "text": "public function getCode() {\n return $this->stationInfo['code'];\n }", "title": "" }, { "docid": "971010f0fbc7a9b8ba6d45b55a353da5", "score": "0.6245494", "text": "public function getAr5()\n {\n return $this->get('extra.ar5');\n }", "title": "" }, { "docid": "f863517b4abd61dc69e9e7778850fb22", "score": "0.6208549", "text": "public function getTrsCodeTarif4() {\n return $this->trsCodeTarif4;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.61720544", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.61616457", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.61616457", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.61616457", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.61616457", "text": "public function getCode(): string;", "title": "" }, { "docid": "c85e5f63b2474d82983471ff5694a236", "score": "0.61573225", "text": "public function getCodedem()\n {\n return $this->codedem;\n }", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.61475354", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.61475354", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.61475354", "text": "public function getCode();", "title": "" }, { "docid": "d9bcc02247f00e91679efab1562648b8", "score": "0.61471266", "text": "public function getRequiredEuro5()\n {\n return $this->requiredEuro5;\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.61424667", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.61424667", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "21214abf885fe8d00eb031431541fd7d", "score": "0.6141745", "text": "public function get_code() {\n return $this->code;\n }", "title": "" }, { "docid": "e3c7ac0d3194a8326a7f78dd1b2a943e", "score": "0.613021", "text": "public function getCode() : string\n {\n return $this->code;\n }", "title": "" }, { "docid": "fe06d5862bf9c83dea614d22b87bcfb6", "score": "0.61054057", "text": "public function getTrsCodeTarif6() {\n return $this->trsCodeTarif6;\n }", "title": "" }, { "docid": "281a88b7217df15537800474ec092492", "score": "0.6103204", "text": "public function getCode():string\n {\n return $this->code;\n }", "title": "" }, { "docid": "f0c8324ec207abc55e21be970724f5e3", "score": "0.6082411", "text": "public function getcode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "670c45c94f054a113218da6d1b29447e", "score": "0.60752153", "text": "public function getCode(): string\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "cca484c6510f64afbbabdfff245ccc89", "score": "0.60737276", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "95ec00ac60aadde47fa6dbc3622ba12a", "score": "0.607131", "text": "public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}", "title": "" }, { "docid": "35b361c377e1bac647ace35390ca49b6", "score": "0.60593426", "text": "public function getCode() \n {\n return $this->code;\n }", "title": "" }, { "docid": "47a718f031e7a41f75f1ea041d37e150", "score": "0.60580575", "text": "public function getCode() : string;", "title": "" }, { "docid": "60dd57ee37b1049840895b78006d7f4c", "score": "0.60507804", "text": "public function setTypeTransport5($typeTransport5) {\n $this->typeTransport5 = $typeTransport5;\n return $this;\n }", "title": "" }, { "docid": "82f6560cccf7030c92a95a282370a2bf", "score": "0.604376", "text": "public function getTrsCodeTarif4(): ?string {\n return $this->trsCodeTarif4;\n }", "title": "" }, { "docid": "1ec84a14c9e55fd1be15967819316765", "score": "0.6041488", "text": "public function getMtTransport5(): ?float {\n return $this->mtTransport5;\n }", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.60395813", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.60395813", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.60311586", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "b0d1476c16f087b9c29effb47ac7e475", "score": "0.6017792", "text": "function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.6007246", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "ca67d9e9cc3aeb20545f2650ff19e2cc", "score": "0.6007246", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "139deac1ca6f2ce346f794c4569ec8bb", "score": "0.6002524", "text": "function getCode();", "title": "" }, { "docid": "139deac1ca6f2ce346f794c4569ec8bb", "score": "0.6002524", "text": "function getCode();", "title": "" }, { "docid": "c4443e6e5afc544ec30f97bc72c86f36", "score": "0.59981376", "text": "public function getCode() {\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "c4443e6e5afc544ec30f97bc72c86f36", "score": "0.59981376", "text": "public function getCode() {\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "91ff8a12da7fc7f49ec3a7a759f7baf1", "score": "0.5998", "text": "public function getCode() {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "64af39fc4284a05046489a527d3a0856", "score": "0.598315", "text": "public function getTentamenCode(){\n return $this->_tentamenCode; \n }", "title": "" }, { "docid": "76867f3f488e3cca706df6503e77dcf4", "score": "0.5975879", "text": "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "76867f3f488e3cca706df6503e77dcf4", "score": "0.5975879", "text": "public function getCode()\n\t{\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "624cb61e71f226e321dbd974a5e7dae4", "score": "0.5964284", "text": "public function getCode()\r\n\t{\r\n\t\treturn $this->code;\r\n\t}", "title": "" }, { "docid": "4eedcb75382b5e4f0f6ee46fca0e5cc8", "score": "0.59629107", "text": "public function getFaitGeneric5(): ?string {\n return $this->faitGeneric5;\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "3a35eed50d4bb723ee58680e691072ba", "score": "0.0", "text": "public function rules()\n {\n return [\n 'pregunta1' => 'required',\n 'pregunta2' => 'nullable',\n 'pregunta3' => 'nullable',\n 'pregunta4' => 'nullable',\n 'pregunta5' => 'nullable',\n 'pregunta6' => 'required',\n 'pregunta7' => 'required',\n 'pregunta8' => 'nullable',\n 'pregunta9' => 'required',\n 'created_by' => 'required',\n ];\n }", "title": "" } ]
[ { "docid": "6a728d07d2855b119752337cf27dee41", "score": "0.8343254", "text": "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "title": "" }, { "docid": "5c5546d6ad190ce5c7ec85b96ea733d9", "score": "0.80743825", "text": "public static function getValidationRules()\n {\n return self::$validationRules;\n }", "title": "" }, { "docid": "18c36eaf26480ae97537e30df90d11d8", "score": "0.80699736", "text": "public function getValidationRules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "ed13728d1c4b0e3b8d70c0217634ba83", "score": "0.80673224", "text": "public function getValidationRules()\n\t{\n\t\treturn $this->validationRules;\n\t}", "title": "" }, { "docid": "1bb49819d65ec9580f96b7cd4cd319d9", "score": "0.8023254", "text": "public static function getValidationRules()\n {\n $rules = [];\n\n return $rules;\n }", "title": "" }, { "docid": "db4406532a448bd983545309a5545daf", "score": "0.7936097", "text": "public function getValidatorRules()\n {\n return $this->validator->getRules();\n }", "title": "" }, { "docid": "2a577a367af8ced3be53ca327309d9cf", "score": "0.78658414", "text": "public function rules()\n {\n $mapping = $this->resolveCheckMapping();\n return [$this->route('check') => $mapping->getValidationRules()];\n }", "title": "" }, { "docid": "9aa7ee0ed68918043dc74065f52d7122", "score": "0.7865345", "text": "public function getValidationRules()\n {\n return [\n 'PRODID' => 1,\n 'VERSION' => 1,\n\n 'CALSCALE' => '?',\n 'METHOD' => '?',\n ];\n }", "title": "" }, { "docid": "b8ea391c905c494ccce1eb971a808bbb", "score": "0.7815663", "text": "public function rules()\n {\n $rules = [\n 'question' => 'required|string',\n 'points' => 'required',\n 'status' => 'required|in:active,draft',\n 'correct' => 'required'\n ];\n\n if ($this->getMethod() == 'POST') {\n $rules += ['choices' => 'required'];\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "854c69cf8856838ecaf268dbc5670f33", "score": "0.7777891", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n {\n return [\n 'title' => 'required',\n 'description' => 'required',\n 'status' => 'required',\n 'deadline' => 'required',\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => 'required',\n 'description' => 'required',\n 'status' => 'required',\n 'deadline' => 'required',\n ];\n }\n case 'PATCH':\n {\n return [\n 'manager' => 'required',\n 'client' => 'required',\n ];\n }\n default: break;\n }\n \n }", "title": "" }, { "docid": "51cf4e1a9ba0ece66192e122e295163f", "score": "0.77571046", "text": "protected function getRules()\n {\n return $rules = [\n 'name' => 'required|min:5',\n 'descriptin' => 'min:15',\n 'price' => 'required| min:1',\n 'image' => 'required',\n // 'category_id' => 'required'\n ];\n }", "title": "" }, { "docid": "3ade580eccb6ec29a303248764613af5", "score": "0.7746457", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.member-manage.check-in.store\":\n $rule = [\n \"member_name\" => \"required\",\n \"care_level\" => \"required|integer\",\n \"check-in_time\" => \"required|integer\",\n \"bed_cost\" => \"required\",\n \"meal_cost\" => \"required\",\n \"one-time_cost\" => \"required\"\n ];\n break;\n case \"\":\n $rule = [];\n break;\n default:\n $rule = [];\n };\n\n return $rule;\n }", "title": "" }, { "docid": "4e55f97b3ad5812330ab3db0129da3f7", "score": "0.7740529", "text": "public function rules()\n {\n $rules = [\n \"name\" => \"required|max:200\",\n \"activity_id\" => \"required|max:45\",\n \"activity_group\" => \"required|max:45\",\n \"duration\" => \"required\",\n \"language\" => \"nullable\",\n \"capacity\" => \"nullable|integer\",\n \"capacity_left\" => \"nullable|integer\",\n \"location\" => \"nullable|max:100\",\n \"small_group\" => \"nullable\",\n ];\n\n if ($this->getMethod() == 'POST') {\n $rules += [\"subject_id\" => \"required\"];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "13da8d1717b09c92f208bc10bba80e30", "score": "0.7734885", "text": "public function rules()\n {\n return $this->getAproperRules();\n }", "title": "" }, { "docid": "13da8d1717b09c92f208bc10bba80e30", "score": "0.7734885", "text": "public function rules()\n {\n return $this->getAproperRules();\n }", "title": "" }, { "docid": "8889e2cb9308561b66ff2aaa6be77deb", "score": "0.7729767", "text": "public function getValidationRules()\n {\n return [\n 'parent_id' => 'required|integer',\n 'parent_is_group' => 'required|boolean',\n 'name' => [\n 'required',\n 'string',\n 'max:255',\n ],\n 'label' => 'nullable|string',\n 'description' => 'nullable|string',\n 'render' => 'nullable|string',\n 'position' => 'nullable|integer',\n ];\n }", "title": "" }, { "docid": "44947e37f14754c29e29de3c3efa33ac", "score": "0.77266014", "text": "public function rules()\n {\n $rules = array();\n if ($this->getMethod() == 'POST') {\n $rules = [\n 'account_id' => 'required|integer|min:1',\n 'trans_category_id' => 'required|integer|min:1',\n 'debit' => 'required',\n 'credit' => 'required',\n 'method' => 'required',\n 'payment_date' => 'required',\n ];\n }\n return $rules;\n }", "title": "" }, { "docid": "2da3b37fe2c514f3708324cebbd4d662", "score": "0.7710244", "text": "private function getValidationRules()\n {\n return [\n 'firstname' => 'required|min:2|max:40',\n 'lastname' => 'required|min:2|max:40',\n 'address1' => 'required|max:60',\n 'address2' => 'nullable|max:60',\n 'city' => 'required|max:30',\n 'state' => 'required|size:2|alpha',\n 'zip' => 'required|size:5',\n 'phone' => 'required|size:10',\n 'email' => 'required|email|max:50|unique:customer,email',\n 'comments' => 'nullable'\n ];\n }", "title": "" }, { "docid": "d9f65fef9d64b3f33a1f2c1923982ee4", "score": "0.76932245", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'POST':\n {\n $rules= [\n 'name' => 'required|string|max:191',\n 'local' => 'required|max:255',\n 'date_time' => 'required'\n ];\n return $rules;\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'name' => 'required|string|max:191',\n 'local' => 'required|max:255',\n 'date_time' => 'required'\n ];\n }\n default:break;\n \n }\n return [\n \n ];\n }", "title": "" }, { "docid": "8b0ec405b05d06b4eb540b07baa774dc", "score": "0.7691692", "text": "public function rules()\n {\n return $this->getRules();\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.76813835", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "c12391a9802741de1b8f63f6a546d6f3", "score": "0.76812905", "text": "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 'real_name' => ['required','max:20'],\n 'address' => ['required','max:100'],\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "71898638a902cf7e7072d9266e47f3df", "score": "0.7681017", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "9876c1af710498f4c4aec9c64b7f339f", "score": "0.7666651", "text": "public function validateRules()\n {\n\n /* Aplicando validación al Request */\n\n // Reglas de validación\n $rules = [\n 'cod_doc_tip' => 'required',\n 'num_doc' => 'required',\n 'nombre' => 'required',\n 'ape_pat' => 'required',\n 'ape_mat' => 'required',\n 'direccion' => 'required',\n //'telefono' => 'required',\n 'fe_nacimiento' => 'required',\n 'cod_sexo' => 'required',\n 'activo' => 'required'\n ];\n\n return $rules;\n\n }", "title": "" }, { "docid": "19ad735fd7ac8c7317c65efe88f2bc8b", "score": "0.765363", "text": "public function rules()\n {\n\n switch($this->method())\n {\n case 'POST':\n {\n return [\n 'application_id' => 'required|string|max:255|exists:client_requests,id',\n 'agent_id' => 'required|string|max:255|exists:agents,id',\n ];\n }\n case 'PUT':\n case 'PATCH':\n {\n return [\n 'status' => 'required|string|in:Accepted,Rejected,Open',\n 'action' => 'required|string|max:4000'\n ];\n }\n default:break;\n }\n }", "title": "" }, { "docid": "ea75c312d282095b049b96570d5adbf6", "score": "0.76420575", "text": "public function rules()\n {\n if (strtolower($this->getMethod()) == 'get') {\n return $this->getRules;\n } else if (strtolower($this->getMethod()) == 'put') {\n return $this->putRules;\n } else {\n return $this->postRules;\n }\n }", "title": "" }, { "docid": "0755d5037140249b95cdfd1cf7b17516", "score": "0.7638215", "text": "public function rules()\n {\n\n if ($this->method()==\"POST\")\n {\n $rules = [\n 'name'=>'required',\n 'password'=>'required|confirmed',\n 'email'=>'required|email|unique:users,email',\n 'role'=>'required',\n ];\n }\n elseif($this->method()==\"PUT\")\n {\n $rules = [\n 'name'=>'required',\n 'password'=>'confirmed',\n 'email'=>'required|email',\n 'role'=>'required',\n ];\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "94d0a80b3d880184b7fe944484862145", "score": "0.76354283", "text": "public function rules()\n {\n\n return $this->rules;\n\n }", "title": "" }, { "docid": "609b9c00575f1a3be05c6e9ce55ebf7f", "score": "0.76220834", "text": "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n }\n\n if ($this->isMethod('patch')) {\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "e692b15e54fa6b186c97769483f10184", "score": "0.7615785", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'title' => 'required',\n 'description' => 'required',\n 'categories' => 'required',\n 'status' => 'required',\n 'timestamp' => 'required',\n 'permalink' => 'required|regex:/^[\\w\\-]+[a-zA-Z\\d]$/|unique:reviews,permalink'\n ];\n case 'PUT':\n // Get Current Review requesting\n $review = $this->route()->parameter('review');\n return [\n 'title' => 'required',\n 'description' => 'required',\n 'categories' => 'required',\n 'status' => 'required',\n 'timestamp' => 'required',\n 'permalink' => 'required|regex:/^[\\w\\-]+[a-zA-Z\\d]$/'\n ];\n }\n }", "title": "" }, { "docid": "78245fcaae8c27601c74f60643330721", "score": "0.7598707", "text": "public function getValidationRules(): array\n {\n return [$this->validationPath => $this->rules];\n }", "title": "" }, { "docid": "ab017691b08e18fd9fe1326d4ebb0097", "score": "0.759771", "text": "public function rules()\n {\n if ($this->method() === 'PUT') {\n return $this->model->getRulesUpdate();\n }\n\n return $this->model->getRules();\n }", "title": "" }, { "docid": "ba8732082e01d98196853c7d5e146089", "score": "0.7593077", "text": "public function rules()\n {\n $roleName = getRole('name');\n if($roleName == \"admin\"){}\n\n $validation = [];\n switch ($roleName){\n case 'admin':\n switch ($this->method()){\n case 'POST':\n $validation = [\n 'status' => 'sometimes|required',\n ];\n break;\n case 'PUT':\n default: break; \n }\n break;\n case 'user':\n switch ($this->method()){\n case 'POST':\n $validation = [\n 'title' => 'required|max:255',\n 'description' => 'required',\n ];\n break;\n case 'PUT':\n $validation = [\n \t'description' => 'required',\n \t];\n \tbreak;\n }\n break;\n }\n \t\n \t\n \treturn $validation;\n }", "title": "" }, { "docid": "0f9e9c09b91850e0478d53380685bdc7", "score": "0.7589009", "text": "public function rules()\n {\n $named = $this->route()->getName();\n switch ($named) {\n case 'admin.user.index':\n return [\n 'start' => 'date_format:Y-m-d',\n 'end' => 'date_format:Y-m-d',\n 'page' => 'required|integer|between:1,' . PHP_INT_MAX,\n 'rows' => 'integer|between:1,1000'\n ];\n case 'admin.user.logon':\n return [\n 'account' => 'required|email'\n ];\n case 'admin.user.resend.auth':\n return [\n 'reset' => 'required|boolean'\n ];\n default:\n return [];\n }\n }", "title": "" }, { "docid": "476e8aa09b53bbff50c120b6a3e055aa", "score": "0.75823283", "text": "public function rules()\n {\n $extraRules = $this->get('type') === 'individual' ? self::individualRules() : self::companyRules();\n\n return array_merge($extraRules,\n [\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:8'],\n 'name' => ['required', 'string', 'min:2'],\n 'surname' => ['required', 'string', 'min:2'],\n 'patronymic' => ['required', 'string', 'min:5'],\n 'post_address' => ['required', 'string', 'min:5'],\n 'phone' => ['required', 'string', 'min:10'],\n 'inn' => ['required', 'string', 'min:10'],\n 'kpp' => ['required', 'string', 'min:10'],\n 'bik' => ['required', 'string', 'min:10'],\n 'personal_account' => ['required', 'string', 'min:10'],\n 'from_user' => ['string'],\n ]\n );\n }", "title": "" }, { "docid": "35d66e7ff92bd1bc4ba6bf09d1694f9b", "score": "0.7574784", "text": "public function rules()\n {\n switch(Route::currentRouteName()){ //当前路由别名\n case 'skapplyReceiptReturn' :\n return [\n 'token' => 'required',\n 'sk_applyid' => 'required|integer',\n 'status' => 'required|integer',\n 'received_at' => 'required_if:status,3',\n 'amount' => 'required_if:status,3',\n 'payer' => 'required_if:status,3',\n ];\n case 'receiptExchange' :\n return [\n 'token' => 'required',\n 'sk_applyid' => 'required|integer',\n 'rate' => 'required',\n ];\n default :\n return [];\n }\n }", "title": "" }, { "docid": "7ee4ec71711c87a8dc475ac1b566679c", "score": "0.75695", "text": "public function rules()\n\t{\n\t\treturn $this->rules;\n\t}", "title": "" }, { "docid": "43b85539b9893fdc5901e5851d553da0", "score": "0.75509185", "text": "public function getValidationRules(): array\n {\n return []; // no extra validation rules\n }", "title": "" }, { "docid": "489fbf044b61abcea11befef7469b8d4", "score": "0.7541382", "text": "public function rules()\n {\n $rules = array();\n\n $rules['tipo'] = $this->validarTipo();\n $rules['username'] = $this->validarUsername();\n $rules['name'] = $this->validarName();\n $rules['apellido'] = $this->validarApellido();\n $rules['email'] = $this->validarEmail();\n $rules['password'] = $this->validarPassword();\n\n return $rules;\n }", "title": "" }, { "docid": "5ff8a5ae9055f4d230639730c86e26af", "score": "0.7537507", "text": "public function rules()\n {\n $rules = [];\n\n if (FormRequest::get(\"operationBtn\") == \"create\") {\n $rules = [\n \"name\" => \"required\",\n \"email\" => \"required|unique:users\",\n \"role\" => \"required\",\n \"gender\" => \"required\",\n \"birthday\" => \"required\"\n ];\n }\n elseif (FormRequest::get(\"operationBtn\") == \"update\") {\n $rules = [\n \"name\" => \"required\",\n \"email\" => \"required|unique:users,email,\".FormRequest::get(\"userId\"),\n \"gender\" => \"required\",\n \"birthday\" => \"required\"\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "884e0fee8f4ca207ffbe5e0841a29461", "score": "0.7536439", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.medicine-manage.medicine-deposit.store\":\n $rule = [\n \"member_name\" => \"required\",\n \"bed_number\" => \"required\",\n \"drug_name\" => \"required\",\n \"unit\" => \"required|integer\",\n \"surplus_medicine\" => \"required|integer\",\n \"warning_number\" => \"required|integer\",\n ];\n break;\n case \"api.medicine-manage.medicine-deposit.correct\":\n $rule = [\n \"id\" => \"required\",\n \"surplus_medicine\" => \"required\",\n ];\n break;\n case \"api.medicine-manage.medicine-deposit.warn\":\n $rule = [\n \"id\" => \"required\",\n \"warning_number\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n default:\n $rule = [];\n };\n\n return $rule;\n }", "title": "" }, { "docid": "59d25543571a7f6bec1ebecd36bab054", "score": "0.75360966", "text": "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "e72646f41729e8e58303427d324dd25a", "score": "0.75270903", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n return [\n //\n ];\n break;\n\n case 'POST':\n return [\n 'email' => 'required|email|exists:users',\n 'password' => 'required',\n ];\n break;\n\n case 'PUT':\n return [\n //\n ];\n break;\n\n case 'PATCH':\n return [\n //\n ];\n break;\n\n case 'DELETE':\n return [\n //\n ];\n break;\n\n default:\n return [\n //\n ];\n break;\n }\n }", "title": "" }, { "docid": "eb4626a60a035f3b1013f53c32e3f283", "score": "0.75193995", "text": "public function get_validation_rules(): array\n {\n $validator = new Validations($this);\n\n return $validator->rules();\n }", "title": "" }, { "docid": "e3c13cbf7fd36d270dbcdb59463e44c9", "score": "0.7518977", "text": "public function rules() {\n \n switch ($this->method()) {\n case 'POST':\n case 'post':\n $rules = $this->RulesStore();\n break;\n case 'PUT':\n case 'put':\n $rules = $this->RulesUpdate();\n break;\n default:\n $rules = [];\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "2ebf994ae0a1fedb3820d91cdfde3ca5", "score": "0.751843", "text": "private function getFormValidationRules() {\n\t\treturn array(\n\t\t\t'title' => 'required|max:99',\n\t\t\t'price' => 'required',\n\t\t\t'discount' => 'required',\n\t\t\t'content' => 'required|max:2048',\n\t\t\t'img' => 'image|max:3000',\n\t\t);\n\t}", "title": "" }, { "docid": "d707bb0769e974c2f417a897389d069a", "score": "0.75140786", "text": "public function rules()\n {\n return static::$rules;\n }", "title": "" }, { "docid": "b0a32914c65b0933d87dd4c6a126342c", "score": "0.75064164", "text": "public function rules()\n {\n return Hook::filter( 'dashboard.crud.validation', [], $this->route( 'namespace' ), $this );\n }", "title": "" }, { "docid": "9679cf48718e3eab7f47bb6b4f41effc", "score": "0.74956036", "text": "public function rules()\n {\n $rules = [\n 'google_app_code' => 'required|numeric',\n ];\n\n if($this->isMethod('PUT')) {\n $rules['password'] = 'required|hash_check:' . Auth::user()->password;\n $rules['back_up'] = 'required|in:1';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "4f5382b741c14e80f9d185ad7a16d57e", "score": "0.7490988", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|string|confirmed',\n // 'user_group_id' => 'required|int',\n // 'active' => 'required|string|max:1',\n ];\n\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $rules = [\n 'name' => 'string',\n 'email' => 'email',\n 'password' => 'string',\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "d2090c2fda8d56f41dc6e6fbb8320c52", "score": "0.74891686", "text": "public function getValidationRules()\n {\n return [\n 'name' => 'required|string|max:255',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n ];\n }", "title": "" }, { "docid": "cc1e515290084112b91e119c8ff38c55", "score": "0.7478221", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "title": "" }, { "docid": "314dd1e8c8a169dd217cdaca9cfaff59", "score": "0.747752", "text": "public function rules(): array\n {\n # create\n if ($this->isMethod('post')) {\n return $this->validationRules + [\n 'password' => 'required|min:6',\n 'email' => 'required|email|unique:users'\n ];\n }\n\n # update\n ## get_route_id() is a helper method\n\n $userId = get_route_id($this->route());\n\n return $this->validationRules + [\n 'password' => 'sometimes|min:6',\n 'email' => 'required|email|unique:users,email,'.$userId,\n ];\n }", "title": "" }, { "docid": "b2596b487592ab1c7a44a331a67b3294", "score": "0.7468408", "text": "public function rules()\n {\n // dd(request());\n return $this->apiRules();\n }", "title": "" }, { "docid": "38e215a447c4f8b4c0458c6dc813759b", "score": "0.74674165", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return self::$rules;\n }\n case 'PUT': {\n return self::updateRules($this->permission->id);\n }\n default:break;\n }\n }", "title": "" }, { "docid": "841d673fa3930e5f3aac687467814bf6", "score": "0.7464894", "text": "public function rules()\n {\n if (Str::lower($this->method()) == 'post') {\n return array_merge([\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|alpha_num|min:6|max:20',\n 'remember_token' => 'nullable',\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'user_name' => 'required|unique:users,user_name'\n ], parent::rules());\n } elseif (Str::lower($this->method()) == 'put' || Str::lower($this->method()) == 'patch') {\n return array_merge([\n 'name' => 'required|alpha',\n 'email' => 'required|email',\n ], parent::rules());\n }\n }", "title": "" }, { "docid": "160ee282719eaf74fe55e6c837629c95", "score": "0.7462417", "text": "public function rules()\n {\n $rules = [];\n $user = $this->get('id');\n\n switch ($this->method()) {\n case \"POST\" :\n $rules = [\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:20|unique:users',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n ];\n break;\n case \"PUT\" :\n case \"PATCH\" :\n $rules = [\n 'email' => \"required|email|max:255|unique:users,email,$user\",\n 'username' => \"required|max:255|unique:users,username,$user\",\n 'name' => 'required|max:255',\n 'password' => 'min:6|confirmed|nullable|same:password_confirmation',\n ];\n break;\n case \"DELETE\" :\n default :\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "fe15cf6d3805a54a23b222b156f6ed3f", "score": "0.745924", "text": "public function rules()\n {\n $request = Request::all();\n switch ($this->method()) {\n case 'POST': //create\n return [\n 'name' => 'required|string|max:30',\n 'cost' => 'required|integer',\n 'type' => 'required|integer',\n 'amount' => 'nullable|integer',\n 'sill' => 'nullable|integer',\n ];\n case 'GET':\n default:\n {\n return [];\n }\n }\n }", "title": "" }, { "docid": "3ae748da92cbb406162ff7993ac66ad0", "score": "0.74536455", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n return [];\n break;\n case 'POST':\n return [\n 'order_id' => 'required|max:255',\n 'order_name' => 'required|max:255',\n // 'specification_id' => 'required|max:255',\n 'map_order_id' => 'required|max:255',\n 'map_order_name' => 'required|max:255',\n // 'map_specification_id' => 'required|max:255',\n ];\n break;\n case 'PATCH':\n return [\n 'order_id' => 'required|max:255',\n 'order_name' => 'required|max:255',\n // 'specification_id' => 'required|max:255',\n 'map_order_id' => 'required|max:255',\n 'map_order_name' => 'required|max:255',\n // 'map_specification_id' => 'required|max:255',\n ];\n break;\n }\n }", "title": "" }, { "docid": "7b6a47ab5e27c5ec7f1898e1dcf684b6", "score": "0.74496114", "text": "public function rules()\n {\n\n $rules = [];\n\n if ($this->has('google_recaptcha_status')) {\n $rules = [\n 'version' => 'required_if:google_recaptcha_status,active',\n 'google_recaptcha_v2_site_key' => 'required_if:version,v2',\n 'google_recaptcha_v2_secret_key' => 'required_if:version,v2',\n 'google_recaptcha_v3_site_key' => 'required_if:version,v3',\n 'google_recaptcha_v3_secret_key' => 'required_if:version,v3',\n ];\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "bbe840801d68277f834aa070ebc2f6dc", "score": "0.74470186", "text": "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "title": "" }, { "docid": "f80c138eb94688db14603d17e8820c02", "score": "0.74343526", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|max:60',\n 'email' => 'required|email|max:60',\n 'subject' => 'required|max:60',\n 'message' => 'required|max:350',\n ];\n\n if (has_settings('recaptcha_site_key', 'recaptcha_secret_key')) {\n $rules['g-recaptcha-response'] = 'required|captcha';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "5352f3f2c44850ae49e4fdc31154826b", "score": "0.7431885", "text": "public function rules()\n {\n return config('hotcoffee.settings.validation_rules');\n }", "title": "" }, { "docid": "86e3175c44747a1c59f022c752143398", "score": "0.7420241", "text": "public function rules()\n {\n $this->buildRules();\n\n return $this->rules;\n }", "title": "" }, { "docid": "ed4e32f42a89bf16c3439a6b563c544d", "score": "0.7418511", "text": "public function rules()\n {\n $rules = [\n 'g-recaptcha-response' => 'required|recaptcha',\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'key' => 'required|string',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "7a96f22f9440ed8548595dc41852a6e1", "score": "0.7417808", "text": "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'name' => 'alpha_dash|required',\n\t\t\t\t\t\t'display_name' => 'string|required',\n\t\t\t\t\t\t'home' => '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'name' => 'alpha_dash|required',\n\t\t\t\t\t\t'display_name' => 'string|required',\n\t\t\t\t\t\t'home' => '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 }", "title": "" }, { "docid": "7fad4b775000679114860a5e612a56c5", "score": "0.7412785", "text": "public function rules()\n {\n return Captcha::getValidations($this->rules);\n }", "title": "" }, { "docid": "ef6a64ac716a3ae3af0e75396a8d53d9", "score": "0.7405259", "text": "public function rules()\n {\n $this->validatePerHtmlMethod();\n return $this->rules;\n }", "title": "" }, { "docid": "fa5934780388b68ebe8d88f7502d4139", "score": "0.7402538", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['nullable','required_without:wx_oauth','max:11','min:11','exists:users'],\n 'password' => ['nullable','required_without:wx_oauth'],\n 'wx_oauth' => ['required_without:mobile,password']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "dcab7afa53fd7e9f06691cbe0bc31832", "score": "0.7399682", "text": "private function getRules()\n {\n $class = address_type_map()[$this->request->get('address_type')['value']['hash']];\n if ($class == Address::class)\n return array_merge($class::$rules, [\n 'owner_type.id' => 'required',\n 'owner.id' => 'required',\n ]);\n return $class::$rules;\n }", "title": "" }, { "docid": "91f3565b0dad7d4b7896552e3f1eaee3", "score": "0.73944163", "text": "public function rules() {\n //dd($this->request->all());\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return array();\n }\n case 'POST': {\n //dd($this->id);\n $rules = array(\n 'category' => 'required',\n 'bank' => 'required',\n 'currency' => 'required',\n 'amount' => 'required',\n );\n return $rules;\n }\n case 'PUT': {\n return array(\n );\n }\n\n case 'PATCH': {\n //dd($this->id);\n return array(\n );\n }\n }\n }", "title": "" }, { "docid": "0a3ccd0d4643ed7a98b4aa5d140f0232", "score": "0.7384013", "text": "public function rules()\n {\n switch ($this->route()->getActionMethod()){\n case 'history':\n return [\n 'room_id' => ['required','gt:0'],\n 'current' => ['required','gt:0'],\n //'total' => ['required','gt:-1'],\n ];\n break;\n }\n }", "title": "" }, { "docid": "86c44c872f7b9454401c71dd19db7c4a", "score": "0.7383498", "text": "public function getRules()\n {\n $rules = [\n 'genre_id'=> 'required',\n 'genre_id'=> 'required'\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "122c3a90e56fe230ac7fd7c5107985b4", "score": "0.7375762", "text": "public function getValidationRules()\n {\n $rules = $this->getOption('rules', []);\n $name = $this->getNameKey();\n $messages = $this->getOption('error_messages', []);\n $formName = $this->parent->getName();\n\n if ($messages && $formName) {\n $newMessages = [];\n foreach ($messages as $messageKey => $message) {\n $messageKey = sprintf('%s.%s', $formName, $messageKey);\n $newMessages[$messageKey] = $message;\n }\n $messages = $newMessages;\n }\n\n if (!$rules) {\n return [];\n }\n\n return [\n 'rules' => [$name => $rules],\n 'attributes' => [$name => $this->getOption('label')],\n 'error_messages' => $messages\n ];\n }", "title": "" }, { "docid": "64e21786196bb46c147eceb71adddd5d", "score": "0.7371992", "text": "public function rules()\n {\n \t$rules = [];\n\t\tif ($this->isMethod('POST')) {\n\t\t\t$rules = [\n\t\t\t\t'amount' => 'required|integer|gt:0'\n\t\t\t];\n\t\t}\n return $rules;\n }", "title": "" }, { "docid": "7c1ea6b94060e3ea52a43d2b85598885", "score": "0.7368741", "text": "public function rules()\n {\n $rules = Roll::$rules;\n \n return $rules;\n }", "title": "" }, { "docid": "86550ddcbabb3214b89eaa68f475cf5e", "score": "0.7366735", "text": "public function rules()\n {\n $setting = \\App\\Company::findOrFail($this->company_id);\n $global = \\App\\GlobalSetting::first();\n\n $rules = [\n 'email' => 'required|email',\n 'name' => 'required',\n 'ticket_subject' => 'required',\n 'message' => 'required',\n ];\n\n if($global->google_captcha_version == 'v2' && $setting->ticket_form_google_captcha){\n $rules['g-recaptcha-response'] = 'required';\n }\n\n if($global->google_captcha_version == 'v3' && $setting->ticket_form_google_captcha){\n $rules['recaptcha_token'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "9addafe7df6d272e7dffb9e439b53554", "score": "0.73654944", "text": "public function rules()\n {\n $named = $this->route()->getName();\n switch ($named) {\n /* Admin */\n case 'member.admin.setting.user.list':\n return [\n 'search' => 'string',\n 'orderBy' => 'in:id,win_rate,status',\n 'sortedBy' => 'in:asc,desc',\n 'page' => 'integer|between:1,2147483647',\n 'rows' => 'integer|between:1,100',\n // Request Criteria not allowed query conditions.\n 'searchFields' => '!required',\n 'filter' => '!required',\n 'with' => '!required',\n 'withCount' => '!required',\n 'searchJoin' => '!required',\n ];\n /* User */\n case 'member.auth.login':\n return [\n // 'source' => 'required|integer',\n 'account' => 'required|integer',\n 'oauth_token' => 'required',\n 'uid' => 'between:7,32',\n ];\n /* Docking */\n case 'docking.user.signature.login':\n return [\n 'signature' => 'required|string',\n 'uid' => 'between:7,32',\n 'debug' => 'integer',\n ];\n case 'docking.receipt.point.add':\n return [\n 'signature' => 'required|string',\n 'amount' => 'required|integer',\n 'receipt' => 'required|string',\n 'debug' => 'integer',\n ];\n case 'docking.receipt.point.del':\n return [\n 'amount' => 'required|integer',\n 'debug' => 'integer',\n ];\n default:\n return [\n //\n ];\n }\n }", "title": "" }, { "docid": "58e0bd5bd6ac8ec4ae462c1a221a25dd", "score": "0.7359314", "text": "public function rules()\n {\n // $this->service->merge('reque');\n\n\n $rules = $this->service->extends('request::store', [\n 'username' => ['required', 'string', 'max:255'],\n // 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n // 'password' => ['required', 'string', 'min:6', 'confirmed'],\n ]);\n\n // dd($rules);\n\n return $rules;\n }", "title": "" }, { "docid": "ca75d0a79bb601943a4c86e00a9246e8", "score": "0.7356387", "text": "public function rules()\n {\n $rules = [];\n switch ($this->method()) {\n case 'POST':\n $actionMethod = $this->route()->getActionMethod();\n if ($actionMethod == 'signUp') {\n $rules = [\n 'mobile' => 'required|digits_between:5,20|unique:user,mobile',\n 'login_pass' => 'required|min:6|max:32',\n ];\n }\n if ($actionMethod == 'signIn') {\n $rules = [\n 'mobile' => 'required|digits_between:5,20',\n 'login_pass' => 'required|min:6|max:32',\n ];\n }\n if ($actionMethod == 'passwordReset') {\n $rules = [\n 'login_pass_old' => 'required|min:6|max:32',\n 'login_pass_new' => ['required','min:6','max:32'],\n ];\n }\n if ($actionMethod == 'forgetPassword') {\n $rules = [\n 'mobile' => 'required|digits_between:5,20',\n 'login_pass'=>'required|min:6|max:32',\n 'code'=>'required'\n ];\n }\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "3c9c0989749cb9ac37b7f889f43e0ec1", "score": "0.73560756", "text": "public function rules()\n\t{\n\t\t/** @var ParameterBag $requestParams */\n\t\t$requestParams = $this->request;\n\n\t\t/** @noinspection PhpUndefinedFieldInspection */\n\t\treturn array_map(\n\t\t\tfunction ($v) use ($requestParams)\n\t\t\t{\n\t\t\t\t$v_params = explode(',', $v);\n\t\t\t\tforeach ($v_params as &$v_param)\n\t\t\t\t{\n\t\t\t\t\tif (substr($v_param, 0, 1) === '@')\n\t\t\t\t\t{\n\t\t\t\t\t\t$fld = substr($v_param, 1);\n\t\t\t\t\t\tif ($requestParams->has($fld))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$v_param = $requestParams->get($fld);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn implode(',', $v_params);\n\t\t\t},\n\t\t\tstatic::$rules\n\t\t);\n\t}", "title": "" }, { "docid": "9355bac9bd7f7214a9fd28584d6ca828", "score": "0.7351424", "text": "public function rules()\n {\n $method = $this->method();\n\n switch ($method) {\n case 'GET':\n case 'PUT':\n case 'DELETE':\n case 'PATCH':\n return [];\n\n case 'POST':\n return [\n 'first-name' => 'required',\n 'last-name' => 'required',\n 'email' => 'required|email',\n 'mobile' => 'required|numeric',\n 'template' => 'required',\n 'designation' => 'required',\n 'skill_level' => 'required',\n 'section_data' => 'required|json',\n 'image_hashes' => 'nullable|array|min:1',\n ];\n\n default:\n return abort(405);\n }\n }", "title": "" }, { "docid": "d04a249d08672e78eefcbf2b5d3dda78", "score": "0.7344705", "text": "public function defineValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "3356aed83ec681ff2d8d5ac5d988c428", "score": "0.7344472", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n // 'title' => 'required|max:100',\n 'quantity' => 'required',\n 'hours' => 'required',\n 'destine' => 'required',\n // 'description' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n // 'title' => 'required|max:100',\n 'quantity' => 'required',\n 'hours' => 'required',\n 'destine' => 'required',\n // 'description' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "title": "" }, { "docid": "997c5e4db92f0c1d799626e87901d928", "score": "0.73419297", "text": "public function rules()\n {\n $rules['title'] = 'required';\n $rules['category_id'] = 'numeric|required';\n $rules['editor-markdown-doc'] = 'required';\n // 添加权限\n if (request()->isMethod('PUT') || request()->isMethod('PATH')) {\n // 修改时 request()->method() 方法返回的是 PUT或PATCH\n $rules['id'] = 'numeric|required';\n }\n return $rules;\n }", "title": "" }, { "docid": "39d1ad9dd11675f917d9d9988b947be6", "score": "0.7339567", "text": "public function rules()\n {\n if($this->isMethod('post')){\n return [\n 'name' =>'required|string',\n 'email' =>'required|email|unique:users,email',\n 'password' =>'required|confirmed',\n 'phone' =>'celular_com_ddd|nullable',\n 'moderator' =>'required|boolean',\n 'biography' =>'nullable',\n ];\n }\n if($this->isMethod('put')){\n return [\n 'name' =>'string|nullable',\n 'phone' =>'celular_com_ddd|nullable',\n 'biography' =>'nullable',\n 'moderator' =>'boolean',\n ];\n }\n }", "title": "" }, { "docid": "a03bc295cc00f9885a4463014f871ddb", "score": "0.7337958", "text": "public function rules()\n {\n $rules = [];\n foreach ($this->request->get('from') as $key => $value) {\n $rules['from.'.$key] = 'required|date_format:H:i';\n }\n foreach ($this->request->get('to') as $key => $value) {\n $rules['to.'.$key] = 'required|date_format:H:i|after:from.'.$key;\n }\n return $rules;\n }", "title": "" }, { "docid": "b0925106218f8820d94a617257a4836a", "score": "0.7336303", "text": "public function rules()\n {\n $rules = [];\n\n if (!empty($this->updateFormRequest)) {\n $childRequestClass = $this->updateFormRequest;\n $updateFormRequest = $childRequestClass::createFromBase($this);\n $updateFormRequest->setRouteResolver($this->getRouteResolver());\n $updateFormRequest->setContainer(Container::getInstance());\n $rules = $updateFormRequest->rules();\n\n if (!empty($this->requiredFields)) {\n foreach ($this->requiredFields as $field) {\n if (!empty($rules[$field]) && strpos($rules[$field], 'required') === false) {\n $rules[$field] = 'required|' . $rules[$field];\n }\n }\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "ae487a99d7065a6f8f1ab8f33df61fc4", "score": "0.73188865", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n case 'POST':\n return [\n 'nombre' => 'required|max:255',\n 'anionacim' => 'required|numeric|between:1999,2050',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'nombre' => 'required|max:255',\n 'anionacim' => 'required|numeric|between:1999,2050',\n 'course_id' => 'required',\n ];\n default:\n break;\n }\n return [];\n }", "title": "" }, { "docid": "98a2d0607c174cdb03f971a1b925e482", "score": "0.73172957", "text": "public function rules()\n {\n switch($this->method()) {\n case \"POST\":\n return [\n 'username' => 'required|between:1,10|unique:users',\n 'realname' => 'required|between:1,10',\n 'sex' => 'required|integer',\n 'email' => 'email|required|unique:users',\n 'role_id' => 'required',\n ];\n break;\n case \"PATCH\":\n $uri = $this->getRequestUri();\n $user_id = explode('/', $uri)[2];\n return [\n 'username' => 'required|between:1,10|unique:users,username,'.$user_id,\n 'realname' => 'required|between:1,10',\n 'sex' => 'required|integer',\n 'email' => 'email|required',\n 'role_id' => 'required',\n 'password' => 'between:6,20|nullable'\n ];\n break;\n }\n }", "title": "" }, { "docid": "95c60f6a61e3216a2cc215222da38751", "score": "0.73172367", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'name_plural' => 'max:255',\n ];\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "47a5d75dccfbc3edc811665c08995b13", "score": "0.7312593", "text": "public function rules()\r\n {\r\n $validation = [\r\n \"machine\" => \"required\",\r\n \"folds_available\" => \"required\",\r\n \"min_end_fold\" => \"required\",\r\n \"max_length_mm\" => \"required\",\r\n \"speed\" => \"required\",\r\n \"year\" => \"required\",\r\n \"notes\" => \"required\",\r\n \"serial_Nos\" => \"required\",\r\n \r\n ];\r\n\r\n if ($this->isMethod(\"put\")) {\r\n $validation = [\r\n \"machine\" => \"required\",\r\n \"folds_available\" => \"required\",\r\n \"min_end_fold\" => \"required\",\r\n \"max_length_mm\" => \"required\",\r\n \"speed\" => \"required\",\r\n \"year\" => \"required\",\r\n \"notes\" => \"required\",\r\n \"serial_Nos\" => \"required\",\r\n ];\r\n }\r\n\r\n return $validation;\r\n }", "title": "" }, { "docid": "fb6c5dcacb5cc77db1ae704b126ff2bc", "score": "0.73121655", "text": "public function rules()\n {\n switch (Request::getPathInfo()) {\n case '/api/auth/login':\n return [\n 'phone' => 'required|regex:/^1\\d{10}$/',\n 'password' => 'required|min:6|max:12|regex:/^[\\S]{6,12}$/',\n ];\n break;\n case '/api/auth/register':\n return [\n 'phone' => 'required|regex:/^1\\d{10}$/|unique:customer_users',\n 'password' => 'required|min:6|max:12|regex:/^[\\S]{6,12}$/',\n 'invite_code' => 'required|digits:6',\n 'code' => 'required|digits:4',\n ];\n break;\n case '/api/auth/forget':\n return [\n 'phone' => 'required|regex:/^1\\d{10}$/',\n 'code' => 'required|digits:4',\n 'password' => 'required|min:6|max:12|regex:/^[\\S]{6,12}$/',\n ];\n break;\n default:\n return [];\n }\n }", "title": "" }, { "docid": "5def4639e3c0e44e7fe6d6334ecff230", "score": "0.7311007", "text": "public function rules(): array\n {\n $rules = new ValidationRules();\n\n return [\n 'name' => \"required|string|min:{$rules->name_min}|max:{$rules->name_max}\",\n 'email' => [\"required\", 'string', 'email', \"max:{$rules->email_max}\", Rule::unique('users')->ignore($this->user()->id)],\n\t\t\t'role_in_company_id' => ['required_with:company_name', Rule::in(Arr::pluck(config('handbook.user_roles'), 'id'))],\n 'tin' => ['required', 'string', new ValidationTinOrRole($this->request->all())],\n 'phone' => ['nullable', \"regex:{$rules->pattern_phone}\"],\n ];\n }", "title": "" }, { "docid": "d5512a72de8e53f5286610c9f122077d", "score": "0.7310639", "text": "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n break;\n case 'DELETE':\n break;\n case 'POST':\n {\n return [\n 'id' => 'required|numeric|exists:employees',\n 'date' => 'required|date_format:d/m/Y',\n 'exams' => 'required|exists:exams,id'\n ];\n break;\n }\n case 'PUT':\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n\n }", "title": "" }, { "docid": "7fe21936a5ae789f35ceedd8e66618d7", "score": "0.73092955", "text": "public function rules()\n {\n $rules = array();\n $rules['nombre'] = $this->validarNombre();\n $rules['apellidos'] = $this->validarApellidos();\n $rules['fecha_nacimiento'] = $this->validarFecha_nacimiento();\n $rules['email'] = $this->validarEmail();\n $rules['estudios'] = $this->validarEstudios();\n $rules['direccion'] = $this->validarDireccion();\n return $rules;\n }", "title": "" } ]
57fb6e57a35d9e8d3f0cbdb2f2ff6eb9
Get the base path for the cache.
[ { "docid": "eefe5f0c58d9850dad1072431fb2b686", "score": "0.0", "text": "protected function getPath()\n {\n return $this->path;\n }", "title": "" } ]
[ { "docid": "fdc4a5e8b6a8ea0f1416b60e19e82bfa", "score": "0.78017735", "text": "public function getBasePath()\n {\n if (null === $this->basePath)\n {\n // for BC\n $this->basePath = sfConfig::get('sf_module_cache_dir');\n }\n\n return $this->basePath;\n }", "title": "" }, { "docid": "5b56b17b6468e2cae19762d46677ff34", "score": "0.7638109", "text": "private function base()\r\r\n\t{\r\r\n\t\tif (!array_key_exists('base', $this->arrCache))\r\r\n\t\t{\r\r\n\t\t\t$this->arrCache['base'] = $this->url() . TL_PATH . '/';\r\r\n\t\t}\r\r\n\r\r\n\t\treturn $this->arrCache['base'];\r\r\n\t}", "title": "" }, { "docid": "de1f80edc68fe3dfb488a8fbb2736bc9", "score": "0.75841546", "text": "public function cache_path() {\n\n # Fix https://code.google.com/p/add-mvc-framework/issues/detail?id=152\n if (!$this->enable_cache) {\n return null;\n }\n\n if (empty($this->cache_dir)) {\n $this->cache_dir = add::config()->caches_dir.'/'.preg_replace('/\\W+/','_',get_called_class()).'.class.cache';\n if (!file_exists($this->cache_dir)) {\n mkdir($this->cache_dir,0777);\n }\n }\n # ^ Fix https://code.google.com/p/add-mvc-framework/issues/detail?id=152\n\n\n e_developer::assert($this->cache_dir,\"Cache directory variable is blank\");\n\n\n\n $cache_file_name = sha1($this->url);\n if ($this->curl_options[CURLOPT_HTTPPROXYTUNNEL]) {\n $cache_file_name .= sha1($this->curl_options[CURLOPT_PROXY]);\n }\n\n return $this->cache_dir.'/'.$cache_file_name;\n }", "title": "" }, { "docid": "eedd503ee7779932402c966e2785171a", "score": "0.7477197", "text": "public function getCachePath()\n {\n return $this->cachePath;\n }", "title": "" }, { "docid": "aeadb57ea4ac0cca1382d605359378b8", "score": "0.73772675", "text": "public function getCachedPath()\n {\n return $this->cachedPath;\n }", "title": "" }, { "docid": "6abef8634f907ad46cc626ad0264204e", "score": "0.73484325", "text": "public static function get_base_path() {\r\n\t\treturn dirname( __FILE__ );\r\n\t}", "title": "" }, { "docid": "5e3fa989bc3d7bcd641bf9c4b3a771f2", "score": "0.7343227", "text": "public function base() {\n\t\tstatic $sPath;\n\t\tif (!isset($sPath)) {\n\t\t\t$sPath = dirname(__FILE__);\n\t\t\t$sPath = rtrim($sPath, '/');\n\t\t}\n\t\treturn $sPath;\n\t}", "title": "" }, { "docid": "118b3dfc68dde6d14671779e1cc00016", "score": "0.7290886", "text": "public static function getBasepath() {\n\t\tself::readTSConfig();\n\t\treturn self::$basepath;\n\t}", "title": "" }, { "docid": "3d9bcd76e96c41499f75a84e0ebff617", "score": "0.72269183", "text": "public function getCacheFilepath()\n {\n return $this->cacheFilepath;\n }", "title": "" }, { "docid": "4441df3354ee6f34becbe2099d3d1630", "score": "0.72184014", "text": "public function getCachePath()\n {\n\n $request = $this->resolveRequestObject(func_get_args());\n\n $requestPrefix = $this->makeRequestPrefix($request);\n\n $path = parent::getCachePath($request);\n\n if ($this->cachePathPrefix) {\n return str_replace(\n $this->cachePathPrefix,\n $this->cachePathPrefix .'/'. $requestPrefix,\n $path\n );\n }\n\n return \"{$requestPrefix}/{$path}\";\n }", "title": "" }, { "docid": "18b1b406c3d7254bf4360602fc978859", "score": "0.7166732", "text": "function breeze_get_cache_base_path( $is_network = false, $blog_id_requested = 0 ) {\n\n\tif ( empty( $blog_id_requested ) ) {\n\t\t$blog_id_requested = isset( $GLOBALS['breeze_config']['blog_id'] ) ? $GLOBALS['breeze_config']['blog_id'] : 0;\n\t}\n\n\tif ( ! $is_network && is_multisite() ) {\n\n\t\tif ( empty( $blog_id_requested ) ) {\n\t\t\tglobal $blog_id;\n\t\t\t$path = rtrim( WP_CONTENT_DIR, '/\\\\' ) . '/cache/breeze/';\n\t\t\tif ( ! empty( $blog_id ) ) {\n\t\t\t\t$path .= abs( intval( $blog_id ) ) . DIRECTORY_SEPARATOR;\n\t\t\t}\n\t\t} else {\n\t\t\t$path = rtrim( WP_CONTENT_DIR, '/\\\\' ) . '/cache/breeze/';\n\t\t\t$path .= abs( intval( $blog_id_requested ) ) . DIRECTORY_SEPARATOR;\n\t\t}\n\t} else {\n\t\t$path = rtrim( WP_CONTENT_DIR, '/\\\\' ) . '/cache/breeze/';\n\t}\n\n\treturn $path;\n}", "title": "" }, { "docid": "9398c289ae9c69df50647aded518e097", "score": "0.71141464", "text": "public function getBasePath()\n {\n return base_path();\n }", "title": "" }, { "docid": "409475394ad0560e267abc867eefe8de", "score": "0.7084194", "text": "static public function getBasePath()\n {\n return static::getSharedInstance()->getBasePath();\n }", "title": "" }, { "docid": "df3b8f29f6883418645db87528b9b580", "score": "0.70608264", "text": "public function getBasePath()\n {\n $base = $this->app->get('path.base') ? $this->app->get('path.base').'/' : '';\n $base = $this->unifySlashes($base);\n\n return $base;\n }", "title": "" }, { "docid": "fe49bb32de0d049a8b8963120018c868", "score": "0.70306003", "text": "protected static function getCacheDirectory()\n {\n return realpath(storage_path('framework/cache'));\n }", "title": "" }, { "docid": "380dbab95d9d6b303c2143b1ee6e6b40", "score": "0.70304585", "text": "function self_script_in_cache_path ()\n\t\t{\n\t\t\t// out from 1.4.0\n\t\t\t/*\n\t\t\t$fname = explode(\"/\",$this->self_script());\n\t\t\t$fname = $fname[count($fname) - 1];\n\t\t\treturn $this->CACHE_PATH.\"/\".$fname;\n\t\t\t*/\n\t\t\t// into in 1.4.0\n\t\t\treturn $this->cache_path(basename($this->self_script()));\n\t\t}", "title": "" }, { "docid": "d94f0b26471a1f22c733e818e8ed79fa", "score": "0.6993701", "text": "public function getPath () {\n\t\treturn $this->basePath;\n\t}", "title": "" }, { "docid": "6e97d72174cf8c37c5139c25c72736f7", "score": "0.6986607", "text": "public static function getCacheFilePath()\n {\n return static::getCacheDirectory().DIRECTORY_SEPARATOR.static::getCacheFileName();\n }", "title": "" }, { "docid": "2977f3424df73c36d820f6339c0dd0d2", "score": "0.6977181", "text": "public static function getBasePath() {\n return static::$_basePath;\n }", "title": "" }, { "docid": "8ada3a05165f4d41207a0a103bbe0b95", "score": "0.69763595", "text": "function get_base_path(){\n return App::getBasePath();\n }", "title": "" }, { "docid": "e016ee852be9a201ed16f1c092941967", "score": "0.697028", "text": "public function getCacheDir();", "title": "" }, { "docid": "72906aebbf397a8709a70cf8f71d6ad8", "score": "0.6952755", "text": "public function getBasePath(): string\n\t{\n\t\tif($this->basePath === null)\n\t\t{\n\t\t\t$path = $this->server->get('SCRIPT_NAME', '');\n\n\t\t\t$this->basePath = rtrim(str_replace(basename($path), '', $path), '/');\n\t\t}\n\n\t\treturn $this->basePath;\n\t}", "title": "" }, { "docid": "144d7ae9bdb4327dcd58737aeab1a917", "score": "0.694009", "text": "public function getBasePath(): string\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "144d7ae9bdb4327dcd58737aeab1a917", "score": "0.694009", "text": "public function getBasePath(): string\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "73aaa0f512e25309ccaaec533fd6a495", "score": "0.6934258", "text": "function base_path()\n\t{\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "6f35cf5da8b7322b836543927413858a", "score": "0.6914569", "text": "public static function get_base_path_network()\n {\n global $wpdb;\n if (defined('PATH_CURRENT_SITE')) {\n return PATH_CURRENT_SITE;\n } else {\n return $wpdb->get_var(\"SELECT `path` FROM `{$wpdb->prefix}blogs` WHERE `blog_id` = 1\");\n }\n }", "title": "" }, { "docid": "a2b86b79d067abaea637021e29cc3ff7", "score": "0.69131714", "text": "function base_path( $path = null )\n\t{\n\t\treturn fw()->buildPath( $path, 'base' );\n\t}", "title": "" }, { "docid": "7134b75451ad56b905d3979d8c1ce364", "score": "0.6911334", "text": "public function get_base_path() {\n\t\t// Craft the Base Path\n\t\t$path = array_merge( (array) $this->template_base_path, $this->folder );\n\n\t\t// Implode to avoid Window Problems\n\t\t$path = implode( DIRECTORY_SEPARATOR, $path );\n\n\t\t/**\n\t\t * Allows filtering of the base path for templates\n\t\t *\n\t\t * @param string $path Complete path to include the base folder\n\t\t * @param self $template Current instance of the Tribe__Template\n\t\t */\n\t\treturn apply_filters( 'tribe_template_base_path', $path, $this );\n\t}", "title": "" }, { "docid": "baadb399ec12be7d87c62b2f873b6c83", "score": "0.6908156", "text": "public function getBasePath()\n {\n return config('repository.generator.basePath', app_path());\n }", "title": "" }, { "docid": "bbcc0a9e413d0af434f69db7f72a36c4", "score": "0.68741524", "text": "public function getSmartyCachePath()\n {\n return $this->getValue('nb_site_smarty_cache_path');\n }", "title": "" }, { "docid": "5a2057020ea3a302d59b97aff2cacd80", "score": "0.6869505", "text": "private function getCache(){\r\n $cache = 'cache/views/' . $this->name . '/';\r\n \r\n return $cache;\r\n }", "title": "" }, { "docid": "36f3bf78e9da11adc888f6195a61ca36", "score": "0.6867403", "text": "public function getBaseURL()\n {\n $url = '';\n\n // add absolute if necessary\n if ($this->absolute) {\n $url .= $this->app->pm->base_url;\n }\n\n // add base path\n $url .= $this->app->pm->base_path;\n\n return $url;\n }", "title": "" }, { "docid": "a246edf4a20951d005194655480aa60c", "score": "0.68673193", "text": "function getBasePath() {\r\n\t\treturn getcwd();\r\n\t}", "title": "" }, { "docid": "14179d752da29cd55fd40285364bde38", "score": "0.6855667", "text": "public function getBasePath()\n {\n return $this->getValue('nb_site_base_path');\n }", "title": "" }, { "docid": "69ed3f4ce3eb1047985f33273471f757", "score": "0.6824907", "text": "public function getBasePath()\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "69ed3f4ce3eb1047985f33273471f757", "score": "0.6824907", "text": "public function getBasePath()\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "69ed3f4ce3eb1047985f33273471f757", "score": "0.6824907", "text": "public function getBasePath()\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "69ed3f4ce3eb1047985f33273471f757", "score": "0.6824907", "text": "public function getBasePath()\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "9d65c442b1b6d751eaac53715f656266", "score": "0.6814425", "text": "public function getBasePath() {\n\t\treturn $this->basePath;\n\t}", "title": "" }, { "docid": "0b1771e2930ea98341773b24265114e5", "score": "0.6810307", "text": "public function basePath()\n {\n if ($this->serverBasePath === null) {\n $this->serverBasePath = implode('/', array_slice(explode('/', $this->server('SCRIPT_NAME')), 0, -1)).'/';\n }\n return $this->serverBasePath;\n }", "title": "" }, { "docid": "f4e5a4dc9e7e8261204977927d692a47", "score": "0.6801529", "text": "protected function get_base_path() {\n $info = entity_get_info($this->object['entity_type']);\n if (isset($info['bundles'][$this->object['bundle']]['admin'])) {\n $admin = $info['bundles'][$this->object['bundle']]['admin'];\n // Extract path information from the bundle.\n if (isset($admin['real path'])) {\n return $admin['real path'] . '/fields/' . $this->object['field_name'];\n }\n else {\n // We don't have real path, use path instead, may work or not.\n return $admin['path'] . '/fields/' . $this->object['field_name'];\n }\n }\n }", "title": "" }, { "docid": "17e902c84c59b04ab2322e8d67afb5f7", "score": "0.67984146", "text": "public function getBasePath()\n {\n return $this->_basePath;\n }", "title": "" }, { "docid": "17e902c84c59b04ab2322e8d67afb5f7", "score": "0.67984146", "text": "public function getBasePath()\n {\n return $this->_basePath;\n }", "title": "" }, { "docid": "948644d7decec2cb9f6d6916a667194d", "score": "0.6784262", "text": "public function basePath()\n {\n return $this->basePath;\n }", "title": "" }, { "docid": "3eca0bf451ea130c6ff1f8711d99cb67", "score": "0.6775706", "text": "public function getAbsoluteDirectory()\n {\n return Yii::getAlias($this->containerBasePath);\n }", "title": "" }, { "docid": "5ef470fdfd292722c84b52035296ff82", "score": "0.67727226", "text": "public function getRelativeBasePath(){\n\t\t$basePath = $this->getBasePath();\n\t\t$remove = Mage::getBaseDir().DS;\n\t\t$relativePath = substr($basePath, strlen($remove));\n\t\treturn $relativePath;\n\t}", "title": "" }, { "docid": "749245b9224cd188f717b7da981f470a", "score": "0.67660004", "text": "private function _get_cache_url_path($cache_key)\n {\n return $this->settings['cache_url'] . $cache_key;\n }", "title": "" }, { "docid": "a3968f06e974cc0f4c13dfa111f08403", "score": "0.6732559", "text": "public function getCacheDirectory(): string\n {\n return $this->cacheDirectory;\n }", "title": "" }, { "docid": "676d00cb5ea2af83344e2e36dbb419b3", "score": "0.6719211", "text": "function cache_path ( $fname )\n\t\t{\n\t\t\t// out from 1.4.0\n\t\t\t/*\n\t\t\t$fname = explode(\"/\",$fname);\n\t\t\t$fname = $fname[count($fname) - 1];\n\t\t\treturn $this->CACHE_PATH.\"/\".$fname;\n\t\t\t*/\n\t\t\t// into in 1.4.0\n\t\t\treturn $_SERVER['DOCUMENT_ROOT'].$this->CACHE_PATH.'/'.basename($fname);\n\t\t}", "title": "" }, { "docid": "c1850c78c773c8f66f0ee0a984b2c7a2", "score": "0.67081225", "text": "function base_path($relPath = '')\n{\n global $app;\n $path = (stripos($relPath, '/') === 0) ? $app->basePath() . $relPath : $app->basePath() . \"/$relPath\";\n return str_replace('//', '/', $path);\n}", "title": "" }, { "docid": "8b26c8560319d9aee535cb521397638f", "score": "0.67036754", "text": "public function getCacheDir()\n\t{\n\t\treturn $this->cache_dir;\n\t}", "title": "" }, { "docid": "a8216ef53b3f1d3305b2d9ac2e9a1054", "score": "0.66997564", "text": "private function cacheFile() {\n $cacheFilename = $this->userIP;\n $segments = explode(\".\", $this->userIP);\n $subdir = $this->cachePrefix.end($segments);\n $this->validateCacheDir($this->cacheDir.$subdir);\n return sprintf(\"%s/%s\", $this->cacheDir.$subdir, $cacheFilename . $this->cacheExtension);\n }", "title": "" }, { "docid": "c929a661e5aa4aa6c8fabb47210baae6", "score": "0.6690896", "text": "public function getCacheDir() {\n\t\treturn $this->cacheDir;\n\t}", "title": "" }, { "docid": "eecc4ec050240cc685b96260a8aa84e5", "score": "0.66794986", "text": "private function getCacheDir() {\n if ($this->cacheDir == null) {\n $this->cacheDir = WCMF_BASE.'/app/cache/';\n }\n return $this->cacheDir;\n }", "title": "" }, { "docid": "7b476005aa827dc4fd827b5f4fbb9529", "score": "0.66764843", "text": "function base_path($path = '')\n {\n return getcwd();\n }", "title": "" }, { "docid": "8c0389998cac6e3efff5a8ca98610abb", "score": "0.6670601", "text": "public static function getBasePath(){\r\n\t\t$ServerPath = $_SERVER['DOCUMENT_ROOT'];\r\n $ScriptPath = substr(dirname($_SERVER['SCRIPT_FILENAME']), strlen($ServerPath));\r\n\t\t$ScriptPath = str_replace(WEBROOT,'',$ScriptPath);\r\n\t\tif (substr($ScriptPath,0,1) == '/'){\r\n\t\t\treturn substr($ScriptPath,1);\r\n\t\t}else{\r\n\t\t\treturn $ScriptPath;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "856b42454e709c70b6f2ce9348bac50d", "score": "0.6663574", "text": "public function getCacheDir()\n {\n if ($this->_cache_dir === null)\n $this->_cache_dir = realpath(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'cache');\n\n return $this->_cache_dir;\n }", "title": "" }, { "docid": "d55a5c9bd4bb552054e4c03e1f79a2ef", "score": "0.6661522", "text": "public function getUrlBase(): string\n {\n return $this->urlBase;\n }", "title": "" }, { "docid": "5d387d2e87956c519a437ecf59fc032c", "score": "0.6643073", "text": "public function getCacheDirectory() {\n\n return $this->_cacheDirectory;\n\t}", "title": "" }, { "docid": "2ff4bfd99adf13e3fe26cd6bd6bda31d", "score": "0.66426456", "text": "public function getCacheDir()\n {\n if ($this->options->has('project_cache_dir')) {\n return $this->rootDir.'/'.$this->options->get('project_cache_dir');\n }\n\n return $this->rootDir;\n }", "title": "" }, { "docid": "9abe0b45e20058baaac08036ee619aa8", "score": "0.66360176", "text": "public function getBasePath();", "title": "" }, { "docid": "9abe0b45e20058baaac08036ee619aa8", "score": "0.66360176", "text": "public function getBasePath();", "title": "" }, { "docid": "7d56d2f24acbca9e0d2c819215545776", "score": "0.6634186", "text": "public function getBaseUrl()\n {\n return rtrim(dirname($this->getScriptUrl()), '\\\\/');\n }", "title": "" }, { "docid": "594c19dca6485abd122a5ee1aa1d282f", "score": "0.6628319", "text": "function getBaseURL() \n {\n // NOTE: this uses the SITE_KEY_SERVER_URL defined key to pull the path\n // to the called page. This server key may be different on different\n // systems.\n $baseURL = SITE_SERVER_HTTP.$_SERVER['HTTP_HOST'].$_SERVER[ SITE_KEY_SERVER_URL ];\n\n return $baseURL;\n \n }", "title": "" }, { "docid": "547ec75fd92af083947d3d1d209046af", "score": "0.66266716", "text": "public function base()\n\t{\n\t\tglobal $config;\n\t\treturn (isset($config['uri']) && isset($config['uri']['base']) \n\t\t\t? $config['uri']['base'] : null);\n\t}", "title": "" }, { "docid": "228400b55c3e00d9b36106eb70af25b1", "score": "0.66170806", "text": "public function getBasePath(){\n\t\tif (!$this->getInstall()){\n\t\t\treturn Mage::getBaseDir('var').DS.'modulecreator'.DS.$this->getNamespace().\"_\".$this->getModuleName().DS;\n\t\t}\n\t\treturn Mage::getBaseDir().DS;\n\t}", "title": "" }, { "docid": "13580ab3b307449cfd1933c6bd2efb23", "score": "0.6616799", "text": "public function getBasePath()\n {\n if ($this->_basePath === null) {\n $class = new \\ReflectionClass($this);\n $this->_basePath = dirname($class->getFileName());\n }\n\n return $this->_basePath;\n }", "title": "" }, { "docid": "cba0ca62394740699d8c0ba204f32ae5", "score": "0.6598003", "text": "private function getStorageBasePath()\n {\n return $this->isLocal() ? 'storage/' : '';\n }", "title": "" }, { "docid": "4a06d80c7d22eb73ab076e0ccdd35b8b", "score": "0.65975684", "text": "function base_path() {\n return $GLOBALS['base_path'];\n}", "title": "" }, { "docid": "7fe4603de6b60a11d8eb011ed5181d84", "score": "0.6597427", "text": "public function getCacheDir()\n {\n return $this->getRootDir().'/app/cache';\n }", "title": "" }, { "docid": "a9126cc5bf11e6e3f0c8ecbf4262b649", "score": "0.65941656", "text": "public function getCachedServicesPath()\n {\n return $this->normalizeCachePath('APP_SERVICES_CACHE', 'cache/services.php');\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.6590441", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.6590441", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "19e8c16a408039846c4ac8cbb0f96989", "score": "0.65903604", "text": "private function _get_cache_file_path($cache_key)\n {\n return $this->settings['cache_path'] . $cache_key;\n }", "title": "" }, { "docid": "cb8607cc24afdbf774b2bf85567c7d02", "score": "0.6587384", "text": "function getFilePath ()\n\t{\n\t\treturn AE_APP_CACHE . sha1($this->getIdentifier()) . '.cache' ;\n\t}", "title": "" }, { "docid": "6aebbb48637c30bece91c4e588133744", "score": "0.65873635", "text": "public function getBaseDir() {\n return substr(\n $_SERVER['SCRIPT_NAME'], 0, \n strrpos($_SERVER['SCRIPT_NAME'], '/')\n );\n }", "title": "" }, { "docid": "6c13ad37edd5f27fcb7046d76c0f647c", "score": "0.65793556", "text": "public function getCacheDir()\n {\n return __DIR__.'/../var/cache/'.$this->getEnvironment();\n }", "title": "" }, { "docid": "232ed8806b5e285d3d1b26487163b037", "score": "0.6572136", "text": "function base_path($path=''){\n\t\treturn app()->basePath().($path?DIRECTORY_SEPARATOR.$path:$path);\n\t}", "title": "" }, { "docid": "dae5f828563cf6b055c04375d12ac5c8", "score": "0.657107", "text": "function base_path($path = '')\n {\n return app()->basePath($path);\n }", "title": "" }, { "docid": "5e4cb79d09c431e581d279241e67ba76", "score": "0.65681785", "text": "public function getBaseUrl()\n {\n $request = $this->container->get('request');\n $url_base = $request->getScheme() . '://' . $request->getHttpHost() . $request->getBasePath();\n return $url_base;\n }", "title": "" }, { "docid": "042761ccca45a1d9543a4d4a55148a7a", "score": "0.65646124", "text": "public static function getBasePath() {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "b80c3bdf7aae5308ed7adb5be8e33477", "score": "0.6560261", "text": "public function baseDir()\n {\n // 'uploads/photos/'\n return substr(config('filesystems.disks.uploads.url'), 1) . '/';\n }", "title": "" }, { "docid": "e28698c6901f74c3ddc12c4a6ec2cd84", "score": "0.6557991", "text": "function get_base_dir(){\n\t\treturn dirname(__FILE__) . '/';\n\t}", "title": "" }, { "docid": "c5a90a5189068d7e26dd4166662db517", "score": "0.655717", "text": "function realpath_cache_get(){}", "title": "" }, { "docid": "1b61c0ff8f2e865b82f168035b95c754", "score": "0.6556822", "text": "public function basepath(): string\n {\n /** @var \\App\\Model\\Table\\GraphicsTable $graphicsTable */\n $graphicsTable = TableRegistry::getTableLocator()->get('Graphics');\n\n return $graphicsTable->getNextDirNumber();\n }", "title": "" }, { "docid": "e71eea72723a1b60b2e9b21236e4f4a5", "score": "0.6555799", "text": "public static function getBasePath(){}", "title": "" }, { "docid": "3404b71bdbfe4d934f05ed1ff85d767c", "score": "0.6546001", "text": "public function getBaseURL()\n {\n return WFUtility::makePath(JURI::root(true), $this->getRootDir());\n }", "title": "" }, { "docid": "3e9d1a3ff748eb75e4f23e6441ad8b65", "score": "0.65399057", "text": "static function base()\n {\n $base = common_config('integration', 'taguri');\n\n if (empty($base)) {\n\n $base = common_config('site', 'server').','.date('Y-m-d');\n\n $pathPart = trim(common_config('site', 'path'), '/');\n\n if (!empty($pathPart)) {\n $base .= ':'.str_replace('/', ':', $pathPart);\n }\n }\n\n return $base;\n }", "title": "" }, { "docid": "dc8b64a8aaf15b3016586ed5bb9c829e", "score": "0.6536049", "text": "public static function base()\n {\n if (!static::$base) {\n $base = Config::get('application.url');\n static::$base = ('' === $base) ? Request::foundation()->getRootUrl() : $base;\n }\n\n return static::$base;\n }", "title": "" }, { "docid": "9264efbc4f835b43d24765c90850bbc3", "score": "0.65293807", "text": "function cache_path(){\n $appPath = env('APP_PATH',false);\n if($appPath){\n return $appPath.env('CACHE_PATH','cache');\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "87e385504c39cd5bd7a2780645168183", "score": "0.6522237", "text": "abstract public function getBasePath(): string;", "title": "" }, { "docid": "4fdf320ef800a3b9609891b2f34df0f3", "score": "0.6519268", "text": "function currentPathUrl() {\n return createBaseUrl(currentPathInfo());\n}", "title": "" }, { "docid": "7f85e25752cc8fe92d49e25b5cc6d486", "score": "0.65158397", "text": "public static function get_url_base() {\n return Config::URL_BASE;\n }", "title": "" }, { "docid": "a0522043e04cb5e766213222e3efd1fa", "score": "0.6502454", "text": "public function getBaseURL(): string\n\t{\n\t\tif($this->baseURL === null)\n\t\t{\n\t\t\t// Get the protocol\n\n\t\t\t$protocol = $this->isSecure() ? 'https://' : 'http://';\n\n\t\t\t// Get the server name and port\n\n\t\t\tif(($host = $this->server->get('HTTP_HOST')) === null)\n\t\t\t{\n\t\t\t\t$host = $this->server->get('SERVER_NAME');\n\n\t\t\t\t$port = $this->server->get('SERVER_PORT');\n\n\t\t\t\tif($port !== null && $port != 80)\n\t\t\t\t{\n\t\t\t\t\t$host = \"{$host}:{$port}\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Put them all together along with the base path\n\n\t\t\t$this->baseURL = \"{$protocol}{$host}{$this->getBasePath()}\";\n\t\t}\n\n\t\treturn $this->baseURL;\n\t}", "title": "" }, { "docid": "15708f3fbb82b3abd5ce33e5d666dc8a", "score": "0.6501603", "text": "public function getCacheUrl()\n {\n return $this->_cacheUrl;\n }", "title": "" }, { "docid": "7221779e01fa49a9e5acd60205174cf2", "score": "0.64930016", "text": "static public function getBaseURL()\n {\n return static::getSharedInstance()->getBaseURL();\n }", "title": "" }, { "docid": "f1bd63f19dbe5b5b482494e53c4aaeda", "score": "0.64929366", "text": "public function getBasePathAction()\n\t\t{\n\t\t\t$basePath = $_SERVER['DOCUMENT_ROOT'].$this->get('request')->getBaseUrl();\n\t\t\treturn $basePath;\n\t\t}", "title": "" }, { "docid": "dae54aa9de6fd4f667bcdcddcf65aa23", "score": "0.64635885", "text": "protected function getViewsBasePath()\n {\n $path = $this->app['config']->get('templates.views');\n\n if (is_null($path)) {\n $path = $this->app['config']->get('view.paths.0');\n }\n\n if (is_null($path)) {\n $path = base_path('resources/views');\n }\n\n return realpath($path);\n }", "title": "" }, { "docid": "021c938d1a134e9b07708ddee4e4f001", "score": "0.64592254", "text": "public static function defaultBasePath(): string\n {\n $filename = basename($_SERVER['SCRIPT_NAME'], '.php');\n return ($filename === 'index') ?\n dirname($_SERVER['SCRIPT_NAME']) : $_SERVER['SCRIPT_NAME'];\n }", "title": "" }, { "docid": "ee658695060a248f33327ed58c6c9042", "score": "0.645751", "text": "public function getCachedPackagesPath() {\n return $this->normalizeCachePath('APP_PACKAGES_CACHE', 'cache/packages.php');\n }", "title": "" }, { "docid": "d598ed47f991e70202391a7a23e19409", "score": "0.64504045", "text": "public function scriptBasePath() {\n return $this->scriptBasePath;\n }", "title": "" } ]
684d1954ba398ac263873af28ce44f88
Apply bold, italic and underline to a content Just once for every typeface is enough. If there is less than 3 occurrences, then, priority to bold, then italize, then underline.
[ { "docid": "818eedc4660ab8a3ef909f6954903513", "score": "0.61770564", "text": "static function apply_biu_to_content($content, $keyword_arr) {\r\n \t$settings = WPPostsRateKeys_Central::get_md5_settings(TRUE);\r\n \t\r\n \t$new_content = $content;\r\n \t\r\n \t/*\r\n \t * Make the same for each keyword\r\n \t */\r\n \t\r\n \tforeach ($keyword_arr as $keyword_arr_item) {\r\n \t\r\n\t \t/*\r\n\t \t * Check for this $already_apply_... because: \r\n\t \t * if the first keyword is italized, second is underlined,\r\n\t \t * then, we will find the third to bold. If there is no third keyword, then no bold face\r\n\t \t * \r\n\t \t */\r\n\t \tif ($settings['allow_bold_style_to_apply']===1 || $settings['allow_bold_style_to_apply']==='1')\r\n\t \t\t$already_apply_bold = FALSE;\r\n\t\t\t\telse\r\n\t \t\t$already_apply_bold = TRUE;\r\n\t \tif ($settings['allow_italic_style_to_apply']===1 || $settings['allow_italic_style_to_apply']==='1')\r\n\t \t\t$already_apply_italic = FALSE;\r\n\t\t\t\telse\r\n\t \t\t$already_apply_italic = TRUE; \t\r\n\t \tif ($settings['allow_underline_style_to_apply']===1 || $settings['allow_underline_style_to_apply']==='1')\r\n\t \t\t$already_apply_underline = FALSE;\r\n\t\t\t\telse\r\n\t \t\t$already_apply_underline = TRUE;\r\n\t\t\t\t\r\n\t \t// Pass through all keyword until ends or until are applied all designs\r\n\t \t$how_many_keys = WPPostsRateKeys_Keywords::how_many_keywords(array($keyword_arr_item), $new_content);\r\n\t \t\r\n\t \t\r\n\t \t// To avoid make the request for each keyword: Get pieces by keyword for determine if some has the design applied\r\n\t \t$pieces_by_keyword = WPPostsRateKeys_Keywords::get_pieces_by_keyword(array($keyword_arr_item), $new_content,TRUE);\r\n\t \t$pieces_by_keyword_matches = $pieces_by_keyword[1];\r\n\t \t$pieces_by_keyword = $pieces_by_keyword[0];\r\n\t \t\r\n\t \t// First, only check for designs already applied\r\n\t \tfor ($i=1;$i<=$how_many_keys;$i++) {\r\n\t \t\t\r\n\t \t\t// Stop if are already all the design applied\r\n\t\t \tif ($already_apply_bold && $already_apply_italic && $already_apply_underline)\r\n\t\t \t\tbreak;\r\n\t \t\t\r\n\t \t\t// Getting the position\r\n\t \t\t$key_pos = WPPostsRateKeys_Keywords::strpos_offset($keyword_arr_item,$new_content,$i,$pieces_by_keyword,$pieces_by_keyword_matches);\r\n\t \t\t\r\n\t \t\tif ($key_pos!==FALSE) {\r\n\t\t \t\t$already_style = WPPostsRateKeys_HtmlStyles::if_some_style_or_in_tag_attribute($new_content,array($keyword_arr_item),$i);\r\n\t\t \t\t\r\n\t\t \t\tif ($already_style) {\r\n\t\t \t\t\tif ($already_style[1] == 'bold')\r\n\t\t \t\t\t\t$already_apply_bold = TRUE;\r\n\t\t \t\t\telseif ($already_style[1] == 'italic')\r\n\t\t \t\t\t\t$already_apply_italic = TRUE;\r\n\t\t \t\t\telseif ($already_style[1] == 'underline')\r\n\t\t \t\t\t\t$already_apply_underline = TRUE;\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t \t}\r\n\t \t\r\n\t \t// Apply designs pendings to apply\r\n\t \tfor ($i=1;$i<=$how_many_keys;$i++) {\r\n\t \t\t\r\n\t \t\t// Stop if are already all the design applied\r\n\t\t \tif ($already_apply_bold && $already_apply_italic && $already_apply_underline)\r\n\t\t \t\tbreak;\r\n\t \t\t\r\n\t \t\t// Getting the position. Here can't be calculate one time ($pieces_by_keyword) and rehuse it because the content changes\r\n\t \t\t$key_pos = WPPostsRateKeys_Keywords::strpos_offset($keyword_arr_item,$new_content,$i);\r\n\t \t\t$pieces_by_keyword_matches_item = $pieces_by_keyword_matches[$i-1];\r\n\t \t\t\r\n\t \t\t/*\r\n\t \t\t// Determine which is the keyword that continues\r\n\t \t\t// Getting this text of keyword, allow us to be aware if a Keyword has any upper case\r\n\t \t\tif (WPPostsRateKeys_Settings::support_multibyte()) {\r\n\t \t\t\t$text_replace = mb_substr($new_content,$key_pos,mb_strlen($pieces_by_keyword_matches_item,'UTF-8'),'UTF-8');\r\n\t \t\t}\r\n\t \t\telse {\r\n\t \t\t\t//unused //$piece_with_keyword = substr($new_content,$key_pos);\r\n\t \t\t\t$text_replace = substr($new_content,$key_pos,strlen($pieces_by_keyword_matches_item));\r\n\t \t\t}\r\n\t \t\t*/\r\n\t \t\t\r\n\t \t\tif ($key_pos!==FALSE) {\r\n\t\t \t\t$already_style = WPPostsRateKeys_HtmlStyles::if_some_style_or_in_tag_attribute($new_content,array($keyword_arr_item),$i);\r\n\t\t \t\t\r\n\t\t \t\tif ($already_style) {\r\n\t\t \t\t\tif ($already_style[1] == 'bold')\r\n\t\t \t\t\t\t$already_apply_bold = TRUE;\r\n\t\t \t\t\telseif ($already_style[1] == 'italic')\r\n\t\t \t\t\t\t$already_apply_italic = TRUE;\r\n\t\t \t\t\telseif ($already_style[1] == 'underline')\r\n\t\t \t\t\t\t$already_apply_underline = TRUE;\r\n\t\t \t\t}\r\n\t\t \t\telse {\r\n\t\t\t \t\tif (!$already_apply_bold) {\r\n\t\t\t \t\t\t$keyword_with_style = WPPostsRateKeys_HtmlStyles::apply_bold_styles($pieces_by_keyword_matches_item);\r\n\t\t\t\t \t\t$already_apply_bold = TRUE;\r\n\t\t\t \t\t}\r\n\t\t\t \t\telseif (!$already_apply_italic) {\r\n\t\t\t \t\t\t$keyword_with_style = WPPostsRateKeys_HtmlStyles::apply_italic_styles($pieces_by_keyword_matches_item);\r\n\t\t\t\t \t\t$already_apply_italic = TRUE;\r\n\t\t\t \t\t}\r\n\t\t\t \t\telseif (!$already_apply_underline) {\r\n\t\t\t \t\t\t$keyword_with_style = WPPostsRateKeys_HtmlStyles::apply_underline_styles($pieces_by_keyword_matches_item);\r\n\t\t\t\t \t\t$already_apply_underline = TRUE;\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\t\t\t \t\tif (WPPostsRateKeys_Settings::support_multibyte()) {\r\n\t\t\t \t\t\t$new_content = self::mb_substr_replace($new_content,$keyword_with_style\r\n\t\t\t \t\t\t\t\t,$key_pos, ($key_pos+mb_strlen($pieces_by_keyword_matches_item,'UTF-8')-1));\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse {\r\n\t\t\t \t\t\t$new_content = substr_replace($new_content,$keyword_with_style\r\n\t\t\t \t\t\t\t\t\t\t,$key_pos,strlen($pieces_by_keyword_matches_item));\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\t\t\t\t\t\r\n\t\t\t \t\t// Calculate how many keyword, because in case the keyword is, for example \"b\" this value will change \r\n\t\t\t \t\t$how_many_keys = WPPostsRateKeys_Keywords::how_many_keywords(array($keyword_arr_item), $new_content);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t \t}\r\n \t}\r\n \t\r\n \treturn $new_content;\r\n }", "title": "" } ]
[ { "docid": "6e376e338ea2f927d84701b27e5b31cc", "score": "0.5909255", "text": "function decorates($content) {\n $result = bold_decorate($content);\n $result = underline_decorate($result);\n $result = italic_decorate($result);\n return quotes_decorate($result);\n}", "title": "" }, { "docid": "ae70e36b2f95479fde478e11d09d51a8", "score": "0.54808956", "text": "function MakeItalic(){}", "title": "" }, { "docid": "952bdc38a41cd339436bf596fc63a20d", "score": "0.5443229", "text": "protected function _doItalicAndBold($text) {\n\t\t$boldPattern = '/(\\W|\\A)(\\*\\*|__)(?=\\S)([^\\n]*?\\S[\\*_]*)\\2(\\W|\\Z)/';\n\t\t$italicPattern = '/(\\W|\\A)(\\*|_)(?=\\S)([^\\n_\\*]*?\\S)\\2(\\W|\\Z)/';\n\t\t$text = preg_replace($boldPattern, '\\1<strong>\\3</strong>\\4', $text);\n\t\t$text = preg_replace($italicPattern, '\\1<em>\\3</em>\\4', $text);\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "27797634b3bebb38fd3db296daeac1a7", "score": "0.53883165", "text": "function Bold(){}", "title": "" }, { "docid": "7c681197d7d5fca1ed9a08eb9d5c8ce4", "score": "0.5297619", "text": "function MakeBold(){}", "title": "" }, { "docid": "20c25b3dee42b9c743d32c39ba1f578d", "score": "0.5253617", "text": "function chandelier_elated_google_fonts_styles() {\n $font_simple_field_array = chandelier_elated_options()->getOptionsByType('fontsimple');\n if(!(is_array($font_simple_field_array) && count($font_simple_field_array) > 0)) {\n $font_simple_field_array = array();\n }\n\n $font_field_array = chandelier_elated_options()->getOptionsByType('font');\n if(!(is_array($font_field_array) && count($font_field_array) > 0)) {\n $font_field_array = array();\n }\n\n $available_font_options = array_merge($font_simple_field_array, $font_field_array);\n $font_weight_str = '100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic';\n\n //define available font options array\n $fonts_array = array();\n foreach($available_font_options as $font_option) {\n //is font set and not set to default and not empty?\n $font_option_value = chandelier_elated_options()->getOptionValue($font_option);\n if(chandelier_elated_is_font_option_valid($font_option_value) && !chandelier_elated_is_native_font($font_option_value)) {\n $font_option_string = $font_option_value.':'.$font_weight_str;\n if(!in_array($font_option_string, $fonts_array)) {\n $fonts_array[] = $font_option_string;\n }\n }\n }\n\n wp_reset_postdata();\n\n $fonts_array = array_diff($fonts_array, array('-1:'.$font_weight_str));\n $google_fonts_string = implode('|', $fonts_array);\n\n //default fonts should be separated with %7C because of HTML validation\n $default_font_string = 'Crimson Text:'.$font_weight_str.'|Cabin:'.$font_weight_str.'|Lateef:'.$font_weight_str;\n\n //is google font option checked anywhere in theme?\n if (count($fonts_array) > 0) {\n\n //include all checked fonts\n $fonts_full_list = $default_font_string . '|' . str_replace('+', ' ', $google_fonts_string);\n $fonts_full_list_args = array(\n 'family' => urlencode($fonts_full_list),\n 'subset' => urlencode('latin,latin-ext'),\n );\n\n $chandelier_elated_fonts = add_query_arg( $fonts_full_list_args, 'https://fonts.googleapis.com/css' );\n wp_enqueue_style( 'chandelier_elated_google_fonts', esc_url_raw($chandelier_elated_fonts), array(), '1.0.0' );\n\n } else {\n //include default google font that theme is using\n $default_fonts_args = array(\n 'family' => urlencode($default_font_string),\n 'subset' => urlencode('latin,latin-ext'),\n );\n $chandelier_elated_fonts = add_query_arg( $default_fonts_args, 'https://fonts.googleapis.com/css' );\n wp_enqueue_style( 'chandelier_elated_google_fonts', esc_url_raw($chandelier_elated_fonts), array(), '1.0.0' );\n }\n\n }", "title": "" }, { "docid": "c04463ad158e423a2ed3321a7c399a85", "score": "0.5247738", "text": "public function base_styles() \n\t{\n\t\t$this->add_style ('I', array('font_style' => 'I'));\n\t\t$this->add_style ('B', array('font_style' => 'B'));\n\t\t$this->add_style ('U', array('font_style' => 'U'));\n\t}", "title": "" }, { "docid": "2fda7ce638435d0ea8136f712a206aca", "score": "0.5113878", "text": "function SetFonts($normal_face, $fixed_face, array $sizes=NULL){}", "title": "" }, { "docid": "2fda7ce638435d0ea8136f712a206aca", "score": "0.5113321", "text": "function SetFonts($normal_face, $fixed_face, array $sizes=NULL){}", "title": "" }, { "docid": "2fda7ce638435d0ea8136f712a206aca", "score": "0.5113321", "text": "function SetFonts($normal_face, $fixed_face, array $sizes=NULL){}", "title": "" }, { "docid": "bd70e7ba2c91af901782f83ebafbdd74", "score": "0.5095741", "text": "public function AddFormat($format,$tipe,$mode,$size)//Format font jadi bold\r\n {\r\n\t\t\r\n\t\t$tipe=strtoupper($tipe);\r\n\t\tif($tipe == 'B'){\t\t\t\r\n\t\t\t$format->set_bold();\r\n\t\t} \r\n\t\t\r\n\t\tif($tipe == 'I'){\t\t\t\r\n\t\t\t$format->set_italic();\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'U'){\t\t\t\t\r\n\t\t\t$format->set_underline($mode);\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'UI'){\t\t\t\t\r\n\t\t\t$format->set_underline($mode);\r\n\t\t\t$format->set_italic();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'BI'){\t\t\t\t\r\n\t\t\t$format->set_bold();\r\n\t\t\t$format->set_italic();\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'HA'){\t\t\t\t\r\n\t\t\t$format->set_align($mode);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'C'){\t\t\t\t\r\n\t\t\t$format->set_color($mode);\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'BD'){\t\t\t\t\r\n\t\t\t$format->set_border($mode);\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'WR'){\t\t\t\t\r\n\t\t\t$format->set_text_wrap($mode);\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif($tipe == 'NUMFORMAT'){\t\t\t\r\n\t\t\t$format->set_num_format($mode);\r\n\t\t} \r\n\t\t\r\n\t\tif(!empty($size)){\t\t\t\r\n\t\t\t$format->set_size($size);\r\n\t\t}\t\t\t\r\n\t\treturn $format;\r\n }", "title": "" }, { "docid": "6e4a3776b1609d311d9839d745954c58", "score": "0.5045469", "text": "function italic_decorate($content) {\n $pattern = '/\\[italic\\s*class\\s*=\\s*[\\\"|\\'](.*)[\\\"|\\']\\s*\\](.*)\\[\\/italic\\]/';\n $template = '<i class=\"$1\">$2</i>'; \n if (preg_match($pattern, $content) == 0) { \n $pattern = '/\\[italic\\](.*)\\[\\/italic\\]/';\n $template = '<i>$1</i>'; \n }\n return preg_replace($pattern, $template, $content);\n}", "title": "" }, { "docid": "957009e55a64a503aa3a699daed2060c", "score": "0.50139767", "text": "function addFonts() {\n\t\t$this->addFont('3OF9','','3OF9.php');\n\t\t$this->addFont('baskerville','','baskerville.php');\n\t\t$this->addFont('baskerville','B','baskervilleb.php');\n\t\t$this->addFont('baskerville','I','baskervillei.php');\n\t\t$this->addFont('calibri','','calibri.php');\n\t\t$this->addFont('calibri','I','calibrii.php');\n\t\t$this->addFont('calibri','B','calibrib.php');\n\t\t$this->addFont('calibri','BI','calibribi.php');\n\t\t$this->addFont('cursive','','cursive.php');\n\t\t$this->addFont('cursive','B','cursiveb.php');\n\t\t$this->addFont('georgia','','georgia.php');\n\t\t$this->addFont('georgia','I','georgiai.php');\n\t\t$this->addFont('georgia','B','georgiab.php');\n\t\t$this->addFont('georgia','BI','georgiabi.php');\n\t\t$this->addFont('monospace','','monospace.php');\n\t\t$this->addFont('monospace','B','monospaceb.php');\n\t\t$this->addFont('sans-serif','','sans-serif.php');\n\t\t$this->addFont('sans-serif','B','sans-serifb.php');\n\t\t$this->addFont('sans-serif','I','sans-serifi.php');\n\t\t$this->addFont('sans-serif','BI','sans-serifbi.php');\n\t\t$this->addFont('serif','','serif.php');\n\t\t$this->addFont('serif','B','serifb.php');\n\t\t$this->addFont('serif','I','serifi.php');\n\t\t$this->addFont('serif','BI','serifbi.php');\n\t\t$this->addFont('tahoma','','tahoma.php');\n\t\t$this->addFont('tahoma','B','tahomab.php');\n\t\t$this->addFont('times','','times.php');\n\t\t$this->addFont('times','B','timesb.php');\n\t\t$this->addFont('times','I','timesi.php');\n\t\t$this->addFont('times','BI','timesbi.php');\n\t\t$this->addFont('verdana','','verdana.php');\n\t\t$this->addFont('verdana','B','verdanab.php');\n\t\t$this->addFont('verdana','I','verdanai.php');\n\t\t$this->addFont('verdana','U','verdanaz.php');\n\t}", "title": "" }, { "docid": "250c834cb9adcf73dd7f9a283590c66c", "score": "0.50098485", "text": "function UseNormalFont(){}", "title": "" }, { "docid": "63eb8c56e002f2a4a70fc34670aafba4", "score": "0.4967303", "text": "function bold_decorate($content) {\n $pattern = '/\\[bold\\s*class\\s*=\\s*[\\\"|\\'](.*)[\\\"|\\']\\s*\\](.*)\\[\\/bold\\]/';\n $template = '<b class=\"$1\">$2</b>'; \n if (preg_match($pattern, $content) == 0) { \n $pattern = '/\\[bold\\](.*)\\[\\/bold\\]/';\n $template = '<b>$1</b>'; \n }\n return preg_replace($pattern, $template, $content);\n}", "title": "" }, { "docid": "baee9e60f79a6be659e04301279f4a09", "score": "0.4960962", "text": "function SetFontItalic($x){}", "title": "" }, { "docid": "09e304d45cf41236dd12c338aa5749ab", "score": "0.49454483", "text": "function considine_card_cstep_font_options_font($option, $type = 'title') {\n if ($type == 'title') {\n $default_font_css = array(\n 'font-family' => 'Georgia, sans-serif',\n 'font-style' => 'italic'\n );\n $font_id = $option->field_option_font1[LANGUAGE_NONE][0]['fid'];\n }\n if ($type == 'body') {\n $default_font_css = array(\n 'font-family' => 'Arial, sans-serif',\n 'font-style' => 'normal'\n );\n $font_id = $option->field_option_font2[LANGUAGE_NONE][0]['fid'];\n }\n $style = '';\n $font = fontyourface_get_font($font_id);\n $option_wrapper = entity_metadata_wrapper('field_collection_item', $option);\n // Font size.\n $font_size = $option_wrapper->field_option_font_size->value();\n $font->css_size = (!empty($font_size)) ? $font_size : '';\n // Font line height.\n $font_height = $option_wrapper->field_option_font_height->value();\n $font->css_line_height = (!empty($font_height)) ? $font_height : '';\n // Getting json.\n $font_css = considine_card_fontyourface_font_json($font);\n //$font_css = fontyourface_font_css($font);\n if (!empty($font_css)) {\n $style = $font_css;\n }\n else {\n $style = drupal_json_encode($default_font_css);\n }\n return $style;\n}", "title": "" }, { "docid": "e87ee7cbe8c1dba36a4c12c5a2634947", "score": "0.49272168", "text": "function dirtysuds_content_taggedtext(){\n\n\tglobal $cleanup_search,$cleanup_replace, $allowed_taggedtext_tags, $conversion_table, $tagged_tags, $html_tags, $trickyCharacters, $postparastyle, $newLine, $posth3style, $posth4style; // 120618\n\n\tremove_all_filters('loop_end');\n\n\t$content = get_the_content();\n\t$content = strip_shortcodes($content);\n\n\t// Change double line-breaks in the text into HTML paragraphs\n\t$content = wpautop($content);\n\n\t// Strip all HTML except for $allowed_taggedtext_tags\n\t$content = wp_kses($content,$allowed_taggedtext_tags);\n\n\t// Add Smart Quotes\n\t$content = wptexturize($content);\n\t$content = trim($content);\n\n\t//Convert special characters to HTML entities\n\t$content = mb_convert_encoding($content,'UTF-8',get_bloginfo('charset'));\n\t$content = htmlentities($content, ENT_QUOTES, 'UTF-8', false);\n\t$content = strtr($content,$trickyCharacters);\n\t$content = preg_replace($html_tags,$tagged_tags,$content);\n\t$content = strtr($content,$conversion_table);\n/*\n\t// Replace Unordered List Items with bullets\n\t$unorderedLists = explode('<ul>',' '.$content);\n\t$countUnorderedLists = count($unorderedLists);\n\n\tfor ($i=1;$i<$countUnorderedLists+1;$i=$i+2) {\n\t\t$thislist = explode('</ul>',$unorderedLists[$i]);\n\t\t$thislist = $thislist[0];\n\t\t$content = strtr(\n\t\t\t$content,\n\t\t\tarray(\n\t\t\t\t'<ul>'.$thislist.'</ul>' =>\n\t\t\t\tstrtr(\n\t\t\t\t\t$thislist,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'<li>' => \"<bnListType:Bullet>\",\n\t\t\t\t\t\t'</li>' => \"\\x0a<bnListType:>\",\n\t\t\t\t\t\t\"<bnListType:>\\x0a<bnListType:Bullet>\" => \"<bnListType:><bnListType:Bullet>\",\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}\n\n\t*/\n\t$content = trim($content);\n\treturn $content;\n}", "title": "" }, { "docid": "674823b848452254df793d2c20bf03fb", "score": "0.49268472", "text": "function SetBold($set){}", "title": "" }, { "docid": "807850a3414a7b4c0dd0fb3d2b87778b", "score": "0.48850602", "text": "public function setup_blog_typography() {\n\t\t$archive_typography = array(\n\t\t\tConfig::CSS_SELECTOR_ARCHIVE_POST_TITLE => Config::MODS_TYPEFACE_ARCHIVE_POST_TITLE,\n\t\t\tConfig::CSS_SELECTOR_ARCHIVE_POST_EXCERPT => Config::MODS_TYPEFACE_ARCHIVE_POST_EXCERPT,\n\t\t\tConfig::CSS_SELECTOR_ARCHIVE_POST_META => Config::MODS_TYPEFACE_ARCHIVE_POST_META,\n\t\t\tConfig::CSS_SELECTOR_SINGLE_POST_TITLE => Config::MODS_TYPEFACE_SINGLE_POST_TITLE,\n\t\t\tConfig::CSS_SELECTOR_SINGLE_POST_META => Config::MODS_TYPEFACE_SINGLE_POST_META,\n\t\t\tConfig::CSS_SELECTOR_SINGLE_POST_COMMENT_TITLE => Config::MODS_TYPEFACE_SINGLE_POST_COMMENT_TITLE,\n\t\t);\n\t\tforeach ( $archive_typography as $selector => $mod ) {\n\t\t\t$this->_subscribers[ $selector ] = [\n\t\t\t\tConfig::CSS_PROP_FONT_SIZE => [\n\t\t\t\t\tDynamic_Selector::META_KEY => $mod . '.fontSize',\n\t\t\t\t\tDynamic_Selector::META_IS_RESPONSIVE => true,\n\t\t\t\t\tDynamic_Selector::META_SUFFIX => 'px',\n\t\t\t\t],\n\t\t\t\tConfig::CSS_PROP_LINE_HEIGHT => [\n\t\t\t\t\tDynamic_Selector::META_KEY => $mod . '.lineHeight',\n\t\t\t\t\tDynamic_Selector::META_IS_RESPONSIVE => true,\n\t\t\t\t\tDynamic_Selector::META_SUFFIX => '',\n\t\t\t\t],\n\t\t\t\tConfig::CSS_PROP_LETTER_SPACING => [\n\t\t\t\t\tDynamic_Selector::META_KEY => $mod . '.letterSpacing',\n\t\t\t\t\tDynamic_Selector::META_IS_RESPONSIVE => true,\n\t\t\t\t],\n\t\t\t\tConfig::CSS_PROP_FONT_WEIGHT => [\n\t\t\t\t\tDynamic_Selector::META_KEY => $mod . '.fontWeight',\n\t\t\t\t],\n\t\t\t\tConfig::CSS_PROP_TEXT_TRANSFORM => $mod . '.textTransform',\n\t\t\t];\n\t\t}\n\t}", "title": "" }, { "docid": "484b62b91b39ea2142546b15377c5e15", "score": "0.48832592", "text": "function Italic(){}", "title": "" }, { "docid": "e152531d43212367a32b58c021ad61ad", "score": "0.4865786", "text": "function GetFontBold(){}", "title": "" }, { "docid": "d8e8593a7cc8ea905f92628fcf9f4469", "score": "0.4848733", "text": "function GetFontItalic(){}", "title": "" }, { "docid": "a9f503106375f16b11973fe990ff6490", "score": "0.48328415", "text": "function HasFontItalic(){}", "title": "" }, { "docid": "dfc75c60c97197b9a1bcd6e72a872e65", "score": "0.48216847", "text": "function SetFontBold($x){}", "title": "" }, { "docid": "8194f37bce24bd5bfe3a8a46da957935", "score": "0.4817772", "text": "function SetItalic($set){}", "title": "" }, { "docid": "bcfac54b05dc0e2eb361f382b3801fd3", "score": "0.48022795", "text": "function underline_decorate($content) {\n $pattern = '/\\[undelrine\\s*class\\s*=\\s*[\\\"|\\'](.*)[\\\"|\\']\\s*\\](.*)\\[\\/underline\\]/';\n $template = '<u class=\"$1\">$2</u>'; \n if (preg_match($pattern, $content) == 0) { \n $pattern = '/\\[underline\\](.*)\\[\\/underline\\]/';\n $template = '<u>$1</u>'; \n }\n return preg_replace($pattern, $template, $content);\n}", "title": "" }, { "docid": "6564fcab867b016fe3a990bd277ae45f", "score": "0.4801053", "text": "private function compressTexts() {\r\n\r\n }", "title": "" }, { "docid": "e6e77335fb002d5713aed8ab05122654", "score": "0.47994754", "text": "function theme_formatter($content) {\n\t$new_content = '';\n\t$pattern_full = '{(\\[raw\\].*?\\[/raw\\])}is';\n\t$pattern_contents = '{\\[raw\\](.*?)\\[/raw\\]}is';\n\t$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);\n\t\n\tforeach ($pieces as $piece) {\n\t\tif (preg_match($pattern_contents, $piece, $matches)) {\n\t\t\t$new_content .= $matches[1];\n\t\t} else {\n\t\t\t$new_content .= wptexturize(wpautop($piece));\n\t\t}\n\t}\n\n\treturn $new_content;\n}", "title": "" }, { "docid": "2966ea1137714e23f11fc505f7df38ac", "score": "0.4799032", "text": "function StyleSetFontAttr($styleNum, $size, $faceName, $bold, $italic, $underline, wxFontEncoding $encoding=null){}", "title": "" }, { "docid": "c3e1138728d8f4db0d54ba6324918f18", "score": "0.47916362", "text": "function ptc_text_styling( $option, $content_layout ) {\n\t$content_layout[$option . '_shadow_opacity'] = 1;\n\n\t// Setting some variables (to avoid WP_DEBUG errors)\n\t$vars_to_set = array(\n\t\t$option . '_fontfamily',\n\t\t$option . '_fontsize',\n\t\t$option . '_font_weight',\n\t\t$option . '_font_style',\n\t\t$option . '_line_height',\n\t\t$option . '_textdecoration',\n\t\t$option . '_text_transform',\n\t\t$option . '_small_caps',\n\t\t$option . '_shadow_x_coordinate',\n\t\t$option . '_shadow_y_coordinate',\n\t\t$option . '_shadow_blur_radius',\n\t\t$option . '_shadow_colour',\n\t\t$option . '_shadow_opacity',\t\t\n\t\t$option . '_bordertop_width',\n\t\t$option . '_borderbottom_width',\n\t\t$option . '_bordertop_type',\n\t\t$option . '_borderbottom_type',\n\t\t$option . '_bordertop_colour',\n\t\t$option . '_borderbottom_colour',\n\t\t$option . '_margin_top',\n\t\t$option . '_margin_right',\n\t\t$option . '_margin_bottom',\n\t\t$option . '_margin_left',\n\t\t$option . '_padding_top',\n\t\t$option . '_padding_right',\n\t\t$option . '_padding_bottom',\n\t\t$option . '_padding_left',\n\t);\n\tforeach ( $vars_to_set as $var ) {\t\t\t\n\t\tif ( empty( $content_layout[$var] ) && '0' != $content_layout[$var] )\n\t\t\t$content_layout[$var] = '';\n\t}\n\n\t$textstyling = \"\tfont-family: \" . ptc_convert_fontfamily( $content_layout[$option . '_fontfamily'] ) . \";\n\tfont-size: \" . $content_layout[$option . '_fontsize'] . \"px;\n\tcolor: \" . $content_layout[$option . '_textcolour'] . \";\n\tfont-weight: \" . $content_layout[$option . '_font_weight'] . \";\n\tfont-style: \" . $content_layout[$option . '_font_style'] . \";\n\tline-height: \" . $content_layout[$option . '_line_height'] . \"px;\n\ttext-decoration: \" . $content_layout[$option . '_textdecoration'] . \";\n\ttext-transform: \" . $content_layout[$option . '_text_transform'] . \";\n\tfont-variant: \" . $content_layout[$option . '_small_caps'] . \";\n\ttext-shadow: \" . $content_layout[$option . '_shadow_x_coordinate'] . \"px \" . $content_layout[$option . '_shadow_y_coordinate'] . \"px \" . $content_layout[$option . '_shadow_blur_radius'] . \"px rgba(\" . ptc_hex2RGB( $content_layout[$option . '_shadow_colour'] ) . \", \" . $content_layout[$option . '_shadow_opacity'] . \");\n\tborder-top: \" . $content_layout[$option . '_bordertop_width'] . \"px \" . $content_layout[$option . '_bordertop_type'] . \" \" . $content_layout[$option . '_bordertop_colour'] . \";\n\tborder-bottom: \" . $content_layout[$option . '_borderbottom_width'] . \"px \" . $content_layout[$option . '_borderbottom_type'] . \" \" . $content_layout[$option . '_borderbottom_colour'] . \";\n\tmargin: \" . $content_layout[$option . '_margin_top'] . 'px ' . $content_layout[$option . '_margin_right'] . 'px ' . $content_layout[$option . '_margin_bottom'] . 'px ' . $content_layout[$option . '_margin_left'] . \"px;\n\tpadding: \" . $content_layout[$option . '_padding_top'] . 'px ' . $content_layout[$option . '_padding_right'] . 'px ' . $content_layout[$option . '_padding_bottom'] . 'px ' . $content_layout[$option . '_padding_left'] . \"px;\n\t\" . ptc_backgroundimage_creator( $content_layout, $option . '_background' ) . \"\n\";\n\treturn $textstyling;\n}", "title": "" }, { "docid": "f36a3e947361d6d5053717e1453d3086", "score": "0.47730026", "text": "function nbbj_captions_taggedtext(){\n\tglobal $postparastyle, $captionstyle, $storycaptions, $allowed_taggedtext_tags, $trickyCharacters, $html_tags, $tagged_tags, $conversion_table, $newLine ;\n\tif ($storycaptions) { \n\t\t$storycaptions = wpautop($storycaptions);\n\t\t$storycaptions = wptexturize($storycaptions);\n\t\t$storycaptions = trim($storycaptions);\n\t\t$storycaptions = mb_convert_encoding($storycaptions,'UTF-8',get_bloginfo('charset'));\n\t\t$storycaptions = esc_html($storycaptions); // NBBJ 120622 WP function to handle amp and quotes\n\t\t$storycaptions = htmlentities($storycaptions, ENT_QUOTES, 'UTF-8', false);\n\t\t$storycaptions = strtr($storycaptions,$trickyCharacters);\n\t\t$conversion_table['<p>'] = $newLine.'<ParaStyle:'.$captionstyle.'>'; // NBBJ 120522 replaces body text with caption style\n\t\t$storycaptions = preg_replace($html_tags,$tagged_tags,$storycaptions);\n\t\t$storycaptions = strtr($storycaptions,$conversion_table);\n\t\t$captioncleanupsearch = array(\n\t\t\t\t\t\t\t\t'/^<0x000D><ParaStyle:'.$captionstyle.'>/',\n\t\t\t\t\t\t\t\t'/<0x000A><0x000D><ParaStyle:'.$captionstyle.'>/',\n\t\t\t\t\t\t\t\t'/(<0x000D>){0}<0x000A>(<0x000D>){0}/'\n\t\t\t\t\t\t\t\t); // NBBJ 120522 cleans up extra soft returns\n\t\t$captioncleanupreplace = array(\n\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t'<0x000D><ParaStyle:'.$captionstyle.'>',\n\t\t\t\t\t\t\t\t'<0x000D><ParaStyle:'.$captionstyle.'>'\n\t\t\t\t\t\t\t\t);\n\t\t$storycaptions = preg_replace($captioncleanupsearch,$captioncleanupreplace,$storycaptions); // NBBJ 120522 cleans up extra soft returns\n\t\t$storycaptions = '<ParaStyle:'.$captionstyle.'>'.$storycaptions.$newLine;\n\t\t$conversion_table['<p>'] = $newLine.'<ParaStyle:'.$postparastyle.'>'; // NBBJ 120523 resets back to body text style\n\t}\n\t\telse { $storycaptions = \"\"; }\n\treturn $storycaptions;\n}", "title": "" }, { "docid": "e093724b6337143fd91a82a1230dfe11", "score": "0.47680816", "text": "function fl_font(\n $_file, $id, $text, $fontname, $fontsize, $color=\"#000000\",\n $tag=\"img\", $seo=true, $out_image_file_type=\"png\"\n ) {\n $out=\"\";\n global $fl_smashed_cache;\n $cached=fl_text_render(\n $_file, $id, $text, $fontname, $fontsize, $color,\n $out_image_file_type\n );\n if ( $cached === false ) return '<!-- fl_text_render error: see log -->';\n if ( $seo === true )\n $seo_tag='<div style=\"display:none;visibility:hidden;\">'.$text.'</div>';\n else $seo_tag='';\n if ( is($tag,'div') ) {\n $d=getimagesize($cached);\n $css='<style>#'.$id\n .' div {background:url(\\''\n .$fl_smashed_cache\n .'\\') left top;width:'\n .$d[0].'px;height:'\n .$d[1].'px;display:block;float:left;}<style>';\n $out.= $css.'<div class=\"'.$id.'\"></div>';\n return true;\n } else if ( is($tag,'span') ) {\n $d=getimagesize($cached);\n $css='<style>#'.$id\n .' span {background:url(\\''\n .$fl_smashed_cache\n .'\\') left top;width:'\n .$d[0].'px;height:'\n .$d[1].'px;display:block;float:left;}<style>';\n $out.= $css.'<span class=\"'.$id.'\"></span>';\n return true;\n } else {\n if ( !is($tag,'img') ) {\n fllog('fl_font in file `'.$_file.'`: bad value for $tag parameter, defaulting to img');\n }\n $out.= '<img src=\"/'\n .($fl_smashed_cache.$id.'.'.$out_image_file_type)\n .'\" border=\"0\">'.$seo_tag;\n return $out;\n }\n return '';\n}", "title": "" }, { "docid": "2d3c069863598cc8decde42e44b5a303", "score": "0.47468314", "text": "function StyleSetItalic($style, $italic){}", "title": "" }, { "docid": "3ee575389c9d8896b528d6469fd25d9d", "score": "0.47464764", "text": "public function buildCSS($type = 'normal', $format = 'woff2') {\n\n $oCss = new Sabberworm\\CSS\\CSSList\\Document();\n\n // Create different setup for different styles (Open Sans Bold Italic)\n\n foreach($this->font_list as $family) {\n $dir = str_replace(' ', '', $family->family).\"/\";\n\n foreach($family->types as $version) {\n\n $oFontFace = new Sabberworm\\CSS\\RuleSet\\AtRuleSet(\"font-face\");\n\n // font-family: \"Open Sans\";\n $name = new Sabberworm\\CSS\\Rule\\Rule(\"font-family\");\n $name->setValue('\"'. $family->family .'\"');\n $oFontFace->addRule($name);\n\n // font-weight: 400;\n $weight = new Sabberworm\\CSS\\Rule\\Rule(\"font-weight\");\n $weight->setValue($version->weight);\n $oFontFace->addRule($weight);\n\n // font-style: normal;\n $style = new Sabberworm\\CSS\\Rule\\Rule(\"font-style\");\n $style->setValue($version->style);\n $oFontFace->addRule($style);\n\n // Font loading logic via CSS! - font-display: swap;\n $style = new Sabberworm\\CSS\\Rule\\Rule(\"font-display\");\n $style->setValue(\"swap\");\n $oFontFace->addRule($style);\n\n // src:\n $src = new Sabberworm\\CSS\\Rule\\Rule(\"src\");\n\n if($type == \"datauri\") {\n if(!isset($version->files->$format)) {\n $this->setError(\"The requested format '\".$format.\"' is not available.\");\n return;\n }\n\n // src: url(data-bas64)\n $string = new Sabberworm\\CSS\\Value\\CSSString($this->datauri($version->files->$format, $format));\n $url = new Sabberworm\\CSS\\Value\\URL($string);\n $src->setValue($url);\n $oFontFace->addRule($src);\n\n } else {\n\n // EOT IE9 compat mode (fallback src)\n $format = 'eot';\n\n $string = new Sabberworm\\CSS\\Value\\CSSString('./font/' . $dir . $this->nameFont($version->id).\".\".$format);\n $url = new Sabberworm\\CSS\\Value\\URL($string);\n $src->setValue($url);\n $oFontFace->addRule($src);\n\n\n // src multiple (real deal)\n $src_multiple = new Sabberworm\\CSS\\Rule\\Rule(\"src\");\n $src_value = new Sabberworm\\CSS\\Value\\RuleValueList();\n\n\n // Add EOT for IE 6-8\n $oString = new Sabberworm\\CSS\\Value\\CSSString('./font/' . $dir . $this->nameFont($version->id).\".\".$format . \"?#iefix\");\n $oUrl = new Sabberworm\\CSS\\Value\\URL($oString);\n\n $oFormat = new Sabberworm\\CSS\\Value\\CSSFunction(\"format\", $this->fontfaceFormat(\"eot\"));\n\n $oUrlWithFormat = new Sabberworm\\CSS\\Value\\RuleValueList(' ');\n $oUrlWithFormat->setListComponents([\n $oUrl,\n $oFormat\n ]);\n\n $src_value->addListComponent($oUrlWithFormat);\n\n // Modern browsers\n $format_list = array_diff(self::SUPPORTED_FORMATS, ['eot']);\n\n foreach($format_list as $format) {\n $path = './font/' . $dir . $this->nameFont($version->id).\".\".$format;\n if($format == 'svg') $path .= '#'.str_replace(' ', '', $family->family);\n $oString = new Sabberworm\\CSS\\Value\\CSSString($path);\n $oUrl = new Sabberworm\\CSS\\Value\\URL($oString);\n\n $oFormat = new Sabberworm\\CSS\\Value\\CSSFunction(\"format\", $this->fontfaceFormat($format));\n\n $oUrlWithFormat = new Sabberworm\\CSS\\Value\\RuleValueList(' ');\n $oUrlWithFormat->setListComponents([\n $oUrl,\n $oFormat\n ]);\n\n $src_value->addListComponent($oUrlWithFormat);\n }\n\n $src_multiple->setValue($src_value);\n $oFontFace->addRule($src_multiple);\n }\n\n $oCss->append($oFontFace);\n\n }\n }\n\n $oFormat = Sabberworm\\CSS\\OutputFormat::createPretty();\n return $oCss->render($oFormat);\n }", "title": "" }, { "docid": "d0142a6169ae081d12b0cffc1209f97a", "score": "0.47373217", "text": "function StyleSetBold($style, $bold){}", "title": "" }, { "docid": "2e0285825554497cca9774244acf8d67", "score": "0.4723407", "text": "public function buildList() {\n\n $font_list = [];\n $oParser = new CSSParser($this->css);\n\n $oCss = $oParser->parse();\n $oCssContents = $oCss->getContents();\n\n // Each @font-face\n foreach($oCssContents as $font) {\n $fontRuleList = $font->getRules();\n $name = null;\n $weight = 400;\n $style = 'normal';\n $src = null;\n\n // Go through properties\n foreach($fontRuleList as $fontRule) {\n if($fontRule->getRule() == \"font-family\")\n $name = trim(strval($fontRule->getValue()), '\"');\n\n if($fontRule->getRule() == \"font-weight\")\n $weight = intval(strval($fontRule->getValue()));\n\n if($fontRule->getRule() == \"font-style\")\n $style = strval($fontRule->getValue());\n\n if($fontRule->getRule() == \"src\")\n $src = $fontRule->getValue();\n }\n\n $styleID = encodeSpacing($name. ':' . $weight . ($style!=\"normal\" ? $style : ''));\n\n // Ignore if no name\n if(is_null($name) || is_null($src))\n break;\n\n // Add family to font list\n if(!isset($font_list[$name])) {\n $font_list[$name] = [];\n $font_list[$name]['family'] = $name;\n $font_list[$name]['types'] = [];\n\n if($this->critical_subset)\n $font_list[$name]['family'] .= \" Critical\";\n }\n\n // Add font variation\n if(!isset($font_list[$name]['types'][$styleID])) {\n $font_list[$name]['types'][$styleID] = new stdClass();\n }\n $font_list[$name]['types'][$styleID]->id = $styleID;\n $font_list[$name]['types'][$styleID]->weight = $weight;\n $font_list[$name]['types'][$styleID]->style = $style;\n\n\n // Files\n if(!isset($font_list[$name]['types'][$styleID]->files)) {\n $font_list[$name]['types'][$styleID]->files = new stdClass();\n }\n // Break down src\n if($src instanceof Sabberworm\\CSS\\Value\\URL) {\n $details = processURL($src);\n $font_list[$name]['types'][$styleID]->files->$details['ext'] = $details['file'];\n\n } elseif($src instanceof Sabberworm\\CSS\\Value\\RuleValueList) {\n\n $components = $src->getListComponents();\n if($components[0] instanceof Sabberworm\\CSS\\Value\\RuleValueList) {\n $components = $components[0]->getListComponents();\n }\n\n foreach($components as $bit) {\n if($bit instanceof Sabberworm\\CSS\\Value\\URL) {\n $details = processURL($bit);\n $font_list[$name]['types'][$styleID]->files->$details['ext'] = $details['file'];\n break;\n }\n }\n } else {\n var_dump($src);\n die();\n }\n }\n\n // Make list of styles an unordered array\n foreach($font_list as $key => $family) {\n // Real count\n $this->count += count($font_list[$key]['types']);\n\n $font_list[$key]['types'] = array_values($family['types']);\n $font_list[$key] = (object) $font_list[$key];\n }\n\n $this->font_list = array_values($font_list);\n return;\n }", "title": "" }, { "docid": "d24e6619b9129df1f123f6f36fc0e424", "score": "0.47148553", "text": "function handleStyleCharacters($matches) {\n global $COLOUR_CHAR, $CANCEL_CHAR, $BOLD_CHAR, $openStyles;\n $replacementText = '';\n //If we're already doing something, anything, stop doing that.\n if ($openStyles['background'] !== '' or $openStyles['foreground'] !== '' or $openStyles['bold'] === TRUE) {\n $replacementText .= '</span>';\n }\n //Bold text. If we're already doing bold, stop it. If we're not, start\n if ($matches[0] === $BOLD_CHAR) {\n $openStyles['bold'] = !$openStyles['bold'];\n }\n //Colour char. If it's only that, clear colours. If it's followed by just one number, it's just foreground colour. Two numbers is fore- and background\n elseif (strpos($matches[0], $COLOUR_CHAR) !== FALSE) {\n //A single colour character. Clear all colours\n if ($matches[0] === $COLOUR_CHAR) {\n $openStyles['background'] = '';\n $openStyles['foreground'] = '';\n }\n //We've got at least a foreground colour\n else {\n $openStyles['foreground'] = $matches[2];\n //There's a background colour too (which includes the comma)\n if (isset($matches[3])) {\n $openStyles['background'] = ltrim($matches[3], ',');\n }\n }\n }\n //We either reached a Cancel char, or the end of the sentence. Cleanup time!\n else {\n $openStyles['background'] = '';\n $openStyles['foreground'] = '';\n $openStyles['bold'] = FALSE;\n }\n \n //Now that all the parsing is done, construct the new <span>, if necessary\n if ($openStyles['background'] !== '' or $openStyles['foreground'] !== '' or $openStyles['bold'] === TRUE) {\n $replacementText .= '<span class=\"';\n if ($openStyles['background'] !== '') {\n $replacementText .= 'bg'.$openStyles['background'].' ';\n }\n if ($openStyles['foreground'] !== '') {\n $replacementText .= 'fg'.$openStyles['foreground'].' ';\n }\n if ($openStyles['bold'] === TRUE) {\n $replacementText .= 'bold';\n }\n $replacementText = rtrim($replacementText).'\">';\n }\n return $replacementText;\n }", "title": "" }, { "docid": "ce400a8a30f009648f06c8f43d777e5a", "score": "0.46742916", "text": "function SetStandardFonts($size=-1, $normal_face=wxEmptyString, $fixed_face=wxEmptyString){}", "title": "" }, { "docid": "ce400a8a30f009648f06c8f43d777e5a", "score": "0.4674218", "text": "function SetStandardFonts($size=-1, $normal_face=wxEmptyString, $fixed_face=wxEmptyString){}", "title": "" }, { "docid": "ce400a8a30f009648f06c8f43d777e5a", "score": "0.4674218", "text": "function SetStandardFonts($size=-1, $normal_face=wxEmptyString, $fixed_face=wxEmptyString){}", "title": "" }, { "docid": "3a48a0719c90699ab32e7664ceb74c72", "score": "0.46686244", "text": "public function setTextFormatting( $type, $value )\n {\n if ( $this->document === null )\n {\n $this->initialize();\n }\n\n switch ( $type )\n {\n case 'font-style':\n if ( ( $value === 'oblique' ) ||\n ( $value === 'italic' ) )\n {\n $this->trySetFont(\n $this->currentFont['name'],\n $this->currentFont['style'] | self::FONT_OBLIQUE\n );\n }\n else\n {\n $this->trySetFont(\n $this->currentFont['name'],\n $this->currentFont['style'] & ~self::FONT_OBLIQUE\n );\n }\n break;\n\n case 'font-weight':\n if ( ( $value === 'bold' ) ||\n ( $value === 'bolder' ) )\n {\n $this->trySetFont(\n $this->currentFont['name'],\n $this->currentFont['style'] | self::FONT_BOLD\n );\n }\n else\n {\n $this->trySetFont(\n $this->currentFont['name'],\n $this->currentFont['style'] & ~self::FONT_BOLD\n );\n }\n break;\n\n case 'font-family':\n $this->trySetFont( $value, $this->currentFont['style'] );\n break;\n\n case 'font-size':\n $this->currentFont['size'] = ezcDocumentPcssMeasure::create( $value )->get( 'pt' );\n\n if ( $this->currentFont['font'] !== null )\n {\n if ( $this->currentPage )\n {\n $this->currentPage->setFontAndSize(\n $this->currentFont['font'],\n $this->currentFont['size']\n );\n }\n else\n {\n $this->dummyDoc->getCurrentPage()->setFontAndSize(\n $this->currentFont['font'],\n $this->currentFont['size']\n );\n }\n }\n break;\n\n case 'color':\n if ( $this->currentPage )\n {\n $this->currentPage->setRGBFill(\n $value['red'],\n $value['green'],\n $value['blue']\n );\n }\n\n default:\n // @todo: Error reporting.\n }\n }", "title": "" }, { "docid": "d44baba8da2bdee61d40c8f7bf829585", "score": "0.46622062", "text": "function TextWidth($style, $text){}", "title": "" }, { "docid": "c80a9d5a7825e9a10e6fa6a5eaeaf5e8", "score": "0.46617702", "text": "function parseDocument()\r\n {\r\n //$doc_buffer = $this->specialCharacters($this->document);\r\n //if(preg_match(\"/<UL>(.*?)<\\/UL>/mi\", $doc_buffer)) {\r\n // $doc_buffer = str_replace(\"<UL>\", \"\", $doc_buffer);\r\n // $doc_buffer = str_replace(\"</UL>\", \"\", $doc_buffer);\r\n // $doc_buffer = preg_replace(\"/<LI>(.*?)<\\/LI>/mi\", \"\\\\f3\\\\'B7\\\\tab\\\\f{$this->font_face} \\\\1\\\\par\", $doc_buffer);\r\n //}\r\n //$doc_buffer = preg_replace(\"/<P>(.*?)<\\/P>/mi\", \"\\\\1\\\\par \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<B>(.*?)<\\/B>/mi\", \"\\\\b \\\\1\\\\b0 \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<I>(.*?)<\\/I>/mi\", \"\\\\i \\\\1\\\\i0 \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<U>(.*?)<\\/U>/mi\", \"\\\\ul \\\\1\\\\ul0 \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<STRIKE>(.*?)<\\/STRIKE>/mi\", \"\\\\strike \\\\1\\\\strike0 \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<SUB>(.*?)<\\/SUB>/mi\", \"{\\\\sub \\\\1}\", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<SUP>(.*?)<\\/SUP>/mi\", \"{\\\\super \\\\1}\", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<SMALL>(.*?)<\\/SMALL>/mi\", \"\\\\fs{$this->font_size_small}\\\\b \\\\1\\\\b0\\\\fs{$this->font_size} \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<BIG>(.*?)<\\/BIG>/mi\", \"\\\\fs{$this->font_size_big}\\\\b \\\\1\\\\b0\\\\fs{$this->font_size} \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<H1>(.*?)<\\/H1>/mi\", \"\\\\pard\\\\qc\\\\fs40 \\\\1\\\\par\\\\pard\\\\fs{$this->font_size} \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<H2>(.*?)<\\/H2>/mi\", \"\\\\pard\\\\qc\\\\fs32 \\\\1\\\\par\\\\pard\\\\fs{$this->font_size} \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<H1>(.*?)<\\/H1>/mi\", \"\\\\fs48\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<H2>(.*?)<\\/H2>/mi\", \"\\\\fs36\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<H3>(.*?)<\\/H3>/mi\", \"\\\\fs27\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\r\n //$doc_buffer = preg_replace(\"/<HR(.*?)>/i\", \"\\\\brdrb\\\\brdrs\\\\brdrw30\\\\brsp20 \\\\pard\\\\par \", $doc_buffer);\r\n //$doc_buffer = str_replace(\"<BR>\", \"\\\\par \", $doc_buffer);\r\n //$doc_buffer = str_replace(\"<TAB>\", \"\\\\tab \", $doc_buffer);\r\n\r\n $doc_buffer = $this->nl2par($doc_buffer);\r\n\r\n return $doc_buffer;\r\n }", "title": "" }, { "docid": "95926ade9220bc79bc2e65c5305e5d7f", "score": "0.46613935", "text": "function StyleGetBold($style){}", "title": "" }, { "docid": "a7d54a2979f08b6fa7f724dc833fb139", "score": "0.46604937", "text": "function StyleGetItalic($style){}", "title": "" }, { "docid": "5526912f131b93b2f6665ab5a8616706", "score": "0.46488568", "text": "private function format($text) {\n\n\t\t$text = str_replace('%22', '\"', $text);\t\t\t// double quotes\n\t\t$text = str_replace('%20', ' ', $text);\t\t\t// spaces\n\t\t$text = str_replace('&nbsp;', ' ', $text);\t\t// spaces\n\t\t$text = str_replace(' ', ' ', $text);\t\t\t// double spaces\n\t\t$text = str_replace(' - ', ' &#8211; ', $text);\t\t// dash\n\n\t\t// dubious classes and suchlike from fucking Microsoft word processing\n\t\t$text = preg_replace('/<p(.*?)>/', '<p>', $text);\n\t\t$text = preg_replace('/<h1(.*?)>/', '<h1>', $text);\n\t\t$text = preg_replace('/<h2(.*?)>/', '<h2>', $text);\n\t\t$text = preg_replace('/<h3(.*?)>/', '<h4>', $text);\n\t\t$text = preg_replace('/<ul(.*?)>/', '<ul>', $text);\n\t\t$text = preg_replace('/<ol(.*?)>/', '<ol>', $text);\n\t\t$text = preg_replace('/<li(.*?)>/', '<li>', $text);\n\t\t$text = preg_replace('/<a(.*?)>/', '<a>', $text);\n\t\t$text = preg_replace('/<span(.*?)>/', '<span>', $text);\n\t\t$text = preg_replace('/<table(.*?)>/', '<table>', $text);\n\t\t$text = preg_replace('/<thead(.*?)>/', '<thead>', $text);\n\t\t$text = preg_replace('/<tbody(.*?)>/', '<tbody>', $text);\n\t\t$text = preg_replace('/<tfoot(.*?)>/', '<tfoot>', $text);\n\t\t$text = preg_replace('/<tr(.*?)>/', '<tr>', $text);\n\t\t$text = preg_replace('/<th(.*?)>/', '<th>', $text);\n\t\t$text = preg_replace('/<td(.*?)>/', '<td>', $text);\n\n\t\t$text = strip_tags($text, '<p><h1><h2><h3><h4><ul><ol><li><a><span><b><i><u><em><strong><table><thead><tbody><tfoot><tr><th><td>'); \n\t\t$text = mysqli_real_escape_string($this->mysqli, $text);\n\n\t\treturn $text; \n\t}", "title": "" }, { "docid": "b26141328f31703e31219cf875a97480", "score": "0.4646159", "text": "public function clean_texts() {\n\n if ($this->version->code <= 19) {\n $format = 1;\n } else {\n $format = 2;\n }\n\n foreach ($this as $string) {\n $string->clean_text($format);\n }\n }", "title": "" }, { "docid": "6108c7633f9deae3d9d21e93f8fbbd81", "score": "0.46285233", "text": "function typography_css( $style ) {\n\n\t\t\t$body_obj = new Jetpack_Color( get_theme_mod( 'body_bg_color', '#ffffff' ) );\n\t\t\t$b_p_obj = new Jetpack_Color( get_theme_mod( 'color_brand_primary', '#428bca' ) );\n\n\t\t\t$body_bg = '#' . str_replace( '#', '', $body_obj->toHex() );\n\t\t\t$body_lum = $body_obj->toLuminosity();\n\n\t\t\t// Base font settings\n\t\t\t$font_base_family = get_theme_mod( 'font_base_family', '\"Helvetica Neue\", Helvetica, Arial, sans-serif' );\n\t\t\t// TODO: use getReadableContrastingColor() from Jetpack_Color class.\n\t\t\t// See https://github.com/Automattic/jetpack/issues/1068\n\t\t\t$font_base_color = '#' . $body_obj->getGrayscaleContrastingColor(10)->toHex();\n\n\t\t\t$font_base_weight = get_theme_mod( 'font_base_weight', '#333333' );\n\t\t\t$font_base_size = get_theme_mod( 'font_base_size', ( 'px' == get_theme_mod( 'font_size_units', 'px' ) ) ? 14 : 1.5 );\n\t\t\t$font_base_height = get_theme_mod( 'font_base_height', 1.4 );\n\n\t\t\t$style .= 'body {font-family:' . $font_base_family . ';color:' . $font_base_color . ';font-weight:' . $font_base_weight . ';font-size:' . $font_base_size . get_theme_mod( 'font_size_units', 'px' ) . ';line-height:' . $font_base_height . ';}';\n\n\t\t\t// Headers font\n\t\t\t$headers_font_family = get_theme_mod( 'headers_font_family', '\"Helvetica Neue\", Helvetica, Arial, sans-serif' );\n\n\t\t\t$style .= 'h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{';\n\t\t\t$style .= 'font-family: ' . $headers_font_family . ';';\n\t\t\t$style .= 'color: ' .$font_base_color . ';';\n\t\t\t$style .= 'font-weight: ' . get_theme_mod( 'font_headers_weight', 400 ) . ';';\n\t\t\t$style .= 'line-height: ' . get_theme_mod( 'font_headers_height', 1.1 ) . ';';\n\t\t\t$style .= '}';\n\n\t\t\t$style .= 'h1, .h1 { font-size: ' . intval( ( 260 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\t\t\t$style .= 'h2, .h2 { font-size: ' . intval( ( 215 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\t\t\t$style .= 'h3, .h3 { font-size: ' . intval( ( 170 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\t\t\t$style .= 'h4, .h4 { font-size: ' . intval( ( 110 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\t\t\t$style .= 'h5, .h5 { font-size: ' . intval( ( 100 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\t\t\t$style .= 'h6, .h6 { font-size: ' . intval( ( 85 / 215 ) * get_theme_mod( 'font_headers_size', 215 ) ) . '%; }';\n\n\t\t\t// Navigation font\n\t\t\t$navbar_font_family = get_theme_mod( 'font_menus_font_family', '\"Helvetica Neue\", Helvetica, Arial, sans-serif' );\n\t\t\t$navbar_obj = new Jetpack_Color( get_theme_mod( 'body_bg_color', '#ffffff' ) );\n\n\t\t\t$style .= '.navbar{';\n\t\t\t$style .= 'font-family: ' . $navbar_font_family . ';';\n\t\t\t$style .= 'font-weight: ' . get_theme_mod( 'font_menus_weight', 400 ) . ';';\n\t\t\t$style .= 'line-height: ' . get_theme_mod( 'font_menus_height', 1.1 ) . ';';\n\t\t\t$style .= '}';\n\n\t\t\t// Navigation font\n\t\t\t$jumbotron_font_family = get_theme_mod( 'font_jumbotron_font_family', '\"Helvetica Neue\", Helvetica, Arial, sans-serif' );\n\t\t\t$jumbotron_obj = new Jetpack_Color( get_theme_mod( 'jumbo_bg', '#ffffff' ) );\n\n\t\t\t$style .= '.jumbotron{';\n\t\t\t$style .= 'color: ' . '#' . $body_obj->getGrayscaleContrastingColor(10)->toHex() . ';';\n\t\t\t$style .= 'font-family: ' . $navbar_font_family . ';';\n\t\t\t$style .= 'font-weight: ' . get_theme_mod( 'font_jumbotron_weight', 400 ) . ';';\n\t\t\t$style .= 'line-height: ' . get_theme_mod( 'font_jumbotron_height', 1.1 ) . ';';\n\t\t\t$style .= '}';\n\n\t\t\t// Make sure links are readable\n\t\t\t$links_color = $b_p_obj->getReadableContrastingColor( $body_obj, 2 );\n\t\t\t// Use \"body a\" instead of plain \"a\" to override the defaults\n\t\t\t$style .= 'body a, body a:visited, body a:hover { color: #' . $links_color->toHex() . ';}';\n\n\t\t\treturn $style;\n\n\t\t}", "title": "" }, { "docid": "1bd249e792fe76d6a221943ea4ed0f1a", "score": "0.45840767", "text": "function SetFontUnderlined($x){}", "title": "" }, { "docid": "ab2da91de960150e9b543291cf74fdc3", "score": "0.45823595", "text": "function format_content( $text ) {\n\n\t\t$text = wptexturize( $text );\n\t\t$text = convert_chars( $text );\n\t\t$text = wpautop( $text );\n\t\treturn $text;\n\n\t}", "title": "" }, { "docid": "556205f4c6b41c593af6104be1f5eda9", "score": "0.45815533", "text": "function GetTextEffects(){}", "title": "" }, { "docid": "747cd8d204272ce2bcc86a1e8321fc3e", "score": "0.45753357", "text": "function GetFontStyle(){}", "title": "" }, { "docid": "f5bb83c08293b11b9bf62ce58a9c1e53", "score": "0.45675644", "text": "abstract public function setTextFormatting( $type, $value );", "title": "" }, { "docid": "7f0ffbd53542279e27aff0385b73ae47", "score": "0.45641416", "text": "function GetFontWeight(){}", "title": "" }, { "docid": "e6e51860f06266d7e633d4c3354838c3", "score": "0.45595604", "text": "protected function processAllText()\n {\n $htmlArray = $this->processText($this->html, $this->opensTracking);\n $this->processedHtml = $htmlArray['text'];\n\n $plainTextArray = $this->processText($this->plainText, false);\n $this->processedPlainText = $plainTextArray['text'];\n\n $subjectArray = $this->processText($this->title, false);\n $this->processedSubject = $subjectArray['text'];\n\n $this->fieldMap = $this->processFieldMap($htmlArray['field_map'], $plainTextArray['field_map'], $subjectArray['field_map']);\n $this->defaultValues = $htmlArray['default_values'] + $plainTextArray['default_values'] + $subjectArray['default_values'];\n }", "title": "" }, { "docid": "2792c522089eb7af74bf71e244a9c2ec", "score": "0.4554136", "text": "function HasFontWeight(){}", "title": "" }, { "docid": "e667a9df4fab9b1007df6c59e375b466", "score": "0.45430857", "text": "function set_font($val) {\n $this->__font_size_calculated = false;\n //see __set and __get, on all assignments clear cache, not needed on direct set through __set\n $this->_prop_cache[\"font\"] = null;\n $this->_props[\"font\"] = $val;\n\n $important = isset($this->_important_props[\"font\"]);\n\n if ( preg_match(\"/^(italic|oblique|normal)\\s*(.*)$/i\",$val,$match) ) {\n $this->_set_style(\"font_style\", $match[1], $important);\n $val = $match[2];\n } else {\n $this->_set_style(\"font_style\", self::$_defaults[\"font_style\"], $important);\n }\n\n if ( preg_match(\"/^(small-caps|normal)\\s*(.*)$/i\",$val,$match) ) {\n $this->_set_style(\"font_variant\", $match[1], $important);\n $val = $match[2];\n } else {\n $this->_set_style(\"font_variant\", self::$_defaults[\"font_variant\"], $important);\n }\n\n //matching numeric value followed by unit -> this is indeed a subsequent font size. Skip!\n if ( preg_match(\"/^(bold|bolder|lighter|100|200|300|400|500|600|700|800|900|normal)\\s*(.*)$/i\",$val,$match) &&\n !preg_match(\"/^(?:pt|px|pc|em|ex|in|cm|mm|%)/\",$match[2])\n ) {\n $this->_set_style(\"font_weight\", $match[1], $important);\n $val = $match[2];\n } else {\n $this->_set_style(\"font_weight\", self::$_defaults[\"font_weight\"], $important);\n }\n\n if ( preg_match(\"/^(xx-small|x-small|small|medium|large|x-large|xx-large|smaller|larger|\\d+\\s*(?:pt|px|pc|em|ex|in|cm|mm|%))\\s*(.*)$/i\",$val,$match) ) {\n $this->_set_style(\"font_size\", $match[1], $important);\n $val = $match[2];\n if (preg_match(\"/^\\/\\s*(\\d+\\s*(?:pt|px|pc|em|ex|in|cm|mm|%))\\s*(.*)$/i\",$val,$match) ) {\n $this->_set_style(\"line_height\", $match[1], $important);\n $val = $match[2];\n } else {\n $this->_set_style(\"line_height\", self::$_defaults[\"line_height\"], $important);\n }\n } else {\n $this->_set_style(\"font_size\", self::$_defaults[\"font_size\"], $important);\n $this->_set_style(\"line_height\", self::$_defaults[\"line_height\"], $important);\n }\n\n if(strlen($val) != 0) {\n $this->_set_style(\"font_family\", $val, $important);\n } else {\n $this->_set_style(\"font_family\", self::$_defaults[\"font_family\"], $important);\n }\n }", "title": "" }, { "docid": "e28b84ec08b50c74b7cd32e96fb0094f", "score": "0.45400777", "text": "public function processContent()\n {\n list($r, $g, $b) = $this->TEXT_COLOR;\n $this->pdf->SetTextColor($r, $g, $b);\n\n //Set the font, font type and size\n $this->pdf->SetFont($this->TEXT_FONT, $this->TEXT_TYPE, $this->TEXT_SIZE);\n\n $this->TEXT_STRLINES = $this->multicell->stringToLines($this->getContentWidth(), $this->getText());\n\n $this->calculateCellHeight();\n }", "title": "" }, { "docid": "b07b5b50221a7843156e91df6104112d", "score": "0.45393133", "text": "function stylePartida($nivel) {\r\n\tif ($nivel == \"1\") return \"style='font-weight:bold; font-size:12px;'\";\r\n\telseif ($nivel == \"2\") return \"style='font-weight:bold; font-size:10px;'\";\r\n\telseif ($nivel == \"3\") return \"style='text-decoration:underline; font-size:10px;'\";\r\n\telse return \"\";\r\n}", "title": "" }, { "docid": "b628257c3faece0b6c7714499ca97d38", "score": "0.45364085", "text": "public function addFont($name, $style = 'normal', $weights = array('400'), $formats = false, $subsets = false) {\n foreach ($weights as $weight) {\n if (!$formats) {\n $this->_request[$name][$style][$weight]['formats'] = $this->_getFormats();\n } else {\n $this->_request[$name][$style][$weight]['formats'] = array_merge($this->_request[$name][$style]['formats'], $formats);\n }\n }\n if ($subsets) {\n //have fun, i'm not going to implement subsets\n }\n }", "title": "" }, { "docid": "469221a335c7f8bba78e82b5d8857ff3", "score": "0.45170197", "text": "function classymissy_styles_custom_font() {\t\n\t$fonts \t\t = classymissy_fonts_selected();\n\t$font_custom = classymissy_option('fonts','customfont-name');\n\t$font_custom2 = classymissy_option('fonts','customfont2-name');\n\n\t$out = '';\n\n\tif( $font_custom && in_array( $font_custom, $fonts ) ){\n\t\t$out .= '@font-face {';\n\t\t\t$out .= 'font-family: \"'. $font_custom .'\";';\n\t\t\t$out .= 'src: url(\"'. classymissy_option('fonts','customfont-eot') .'\");';\n\t\t\t$out .= 'src: url(\"'. classymissy_option('fonts','customfont-eot') .'#iefix\") format(\"embedded-opentype\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont-woff') .'\") format(\"woff\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont-ttf') .'\") format(\"truetype\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont-svg') . $font_custom .'\") format(\"svg\");';\n\t\t\t$out .= 'font-weight: normal;';\n\t\t\t$out .= 'font-style: normal;';\n\t\t$out .= '}';\n\t}\n\t\n\tif( $font_custom2 && in_array( $font_custom2, $fonts ) ){\n\t\t$out .= '@font-face {';\n\t\t\t$out .= 'font-family: \"'. $font_custom2 .'\";';\n\t\t\t$out .= 'src: url(\"'. classymissy_option('fonts','customfont2-eot') .'\");';\n\t\t\t$out .= 'src: url(\"'. classymissy_option('fonts','customfont2-eot') .'#iefix\") format(\"embedded-opentype\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont2-woff') .'\") format(\"woff\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont2-ttf') .'\") format(\"truetype\"),';\n\t\t\t\t$out .= 'url(\"'. classymissy_option('fonts','customfont2-svg') . $font_custom2 .'\") format(\"svg\");';\n\t\t\t$out .= 'font-weight: normal;';\n\t\t\t$out .= 'font-style: normal;';\n\t\t$out .= '}';\n\t}\n\n\treturn $out;\n}", "title": "" }, { "docid": "530dd890e72168dae6086595b78ea9ef", "score": "0.4505025", "text": "function FindOrCreateFont($point_size, wxFontFamily $family, wxFontStyle $style, wxFontWeight $weight, $underline=false, $facename=wxEmptyString, wxFontEncoding $encoding=null){}", "title": "" }, { "docid": "f40641055f5229048535deb1129c459d", "score": "0.44988063", "text": "function setFont($family, $style='', $size=0) {\n //Select a font; size given in points\n global $fpdf_charwidths;\n\n $family = strtolower($family);\n if ($family == '') {\n $family = $this->FontFamily;\n }\n if ($family == 'arial') {\n $family = 'helvetica';\n } elseif ($family == 'symbol' or $family == 'zapfdingbats') {\n $style = '';\n }\n $style = strtoupper($style);\n if (FALSE !== strpos($style, 'U')) {\n $this->underline = TRUE;\n $style = str_replace('U', '', $style);\n } else {\n $this->underline = FALSE;\n }\n if ($style == 'IB') {\n $style = 'BI';\n }\n if ($size == 0) {\n $size = $this->FontSizePt;\n }\n //Test if font is already selected\n if ($this->FontFamily == $family &&\n $this->FontStyle == $style &&\n $this->FontSizePt == $size &&\n $this->FontSetForPage == $this->page &&\n !$this->intpl) {\n return;\n }\n\n //Test if used for the first time\n $fontkey = $family.$style;\n\n if (!isset($this->fonts[$fontkey])) {\n //Check if one of the standard fonts\n if (isset($this->CoreFonts[$fontkey])) {\n $this->addFont($family, $style, $this->CoreFonts[$fontkey].'.php');\n } else {\n $this->Error('Undefined font: '.$family.' '.$style);\n }\n }\n\n //Select it\n $this->FontFamily = $family;\n $this->FontStyle = $style;\n $this->FontSizePt = $size;\n $this->FontSize = $size / $this->k;\n $this->CurrentFont = &$this->fonts[$fontkey];\n if ($this->page > 0) {\n $this->FontSetForPage = $this->page;\n $this->_out(\n sprintf(\n 'BT '.$this->fontprefix.'%d %.2f Tf ET',\n $this->CurrentFont['i'],\n $this->FontSizePt\n )\n );\n }\n\n if ($this->intpl) {\n $this->res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];\n } else {\n $this->res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey];\n }\n }", "title": "" }, { "docid": "5695dbcd5bee71aae09c1cbaea78ff6f", "score": "0.4489645", "text": "function boj_sc5_bold( $attr, $content ) {\n return \"<strong>\".do_shortcode( $content ).\"</strong>\";\n}", "title": "" }, { "docid": "8259aaac55359da2fa873cbcf7321c0b", "score": "0.44853553", "text": "function Apply(wxTextAttr $style, wxTextAttr $compareWith=null){}", "title": "" }, { "docid": "50a76e384dda7972ccb9e62d5c6f5745", "score": "0.4470886", "text": "function my_formatter($content) {\n $new_content = ’;\n $pattern_full = '{([raw].*?[/raw])}is';\n $pattern_contents = '{[raw](.*?)[/raw]}is';\n $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);\n \n foreach ($pieces as $piece) {\n if (preg_match($pattern_contents, $piece, $matches)) {\n $new_content .= $matches[1];\n } else {\n $new_content .= wptexturize(wpautop($piece));\n }\n }\n \n return $new_content;\n}", "title": "" }, { "docid": "98c43c276f181c9dc7980f4c5eadddde", "score": "0.44616342", "text": "function SetFont($family,$style='',$size=0)\n{\n\t//global $fpdf_charwidths;\n\n\t$family=strtolower($family);\n\tif($family=='')\n\t\t$family=$this->FontFamily;\n\tif($family=='arial')\n\t\t$family='helvetica';\n\telseif($family=='symbol' or $family=='zapfdingbats')\n\t\t$style='';\n\t$style=strtoupper($style);\n\tif(is_int(strpos($style,'U')))\n\t{\n\t\t$this->underline=true;\n\t\t$style=str_replace('U','',$style);\n\t}\n\telse\n\t\t$this->underline=false;\n\tif($style=='IB')\n\t\t$style='BI';\n\tif($size==0)\n\t\t$size=$this->FontSizePt;\n\t//Test if font is already selected\n\tif($this->FontFamily==$family and $this->FontStyle==$style and $this->FontSizePt==$size)\n\t\treturn;\n\t//Test if used for the first time\n\t$fontkey=$family.$style;\n\tif(!isset($this->fonts[$fontkey]))\n\t{\n\t\t//Check if one of the standard fonts\n\t\tif(isset($this->CoreFonts[$fontkey]))\n\t\t{\n\t\t\tif(!isset($this->fpdf_charwidths[$fontkey]))\n\t\t\t{\n\t\t\t\t//Load metric file\n\t\t\t\t$file=$family;\n\t\t\t\tif($family=='times' or $family=='helvetica')\n\t\t\t\t\t$file.=strtolower($style);\n\t\t\t\t$file.='.php';\n\t\t\t\tif(defined('FPDF_FONTPATH'))\n\t\t\t\t\t$file=FPDF_FONTPATH.$file;\n\t\t\t\t//include($file);\n\t\t\t\tif(!isset($this->fpdf_charwidths[$fontkey]))\n\t\t\t\t\t$this->Error('Could not include font metric file');\n\t\t\t}\n\t\t\t$i=count($this->fonts)+1;\n\t\t\t$this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'up'=>-100,'ut'=>50,'cw'=>$this->fpdf_charwidths[$fontkey]);\n\t\t}\n\t\telse\n {\n\t\t\t$this->Error('Undefined font: '.$family.' '.$style);\n }\n\t}\n\t//Select it\n\t$this->FontFamily=$family;\n\t$this->FontStyle=$style;\n\t$this->FontSizePt=$size;\n\t$this->FontSize=$size/$this->k;\n\t$this->CurrentFont=$this->fonts[$fontkey];\n\tif($this->page>0)\n\t\t$this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));\n}", "title": "" }, { "docid": "b1484f660d8f310c21287ca7ed1e6277", "score": "0.4459098", "text": "function GetItemFont($item){}", "title": "" }, { "docid": "4fe2c19146821cc2524c702c53b3fa2a", "score": "0.4458768", "text": "function my_custom_styles( $init_array ) { \n\n $style_formats = array( \n // These are the custom styles\n array( \n 'title' => 'Download PDF Button', \n 'block' => 'a', \n 'classes' => 'pdf_dl',\n 'wrapper' => true,\n ), \n array( \n 'title' => 'Blue Inline Button', \n 'block' => 'span', \n 'classes' => 'blue-inline-right-arrow',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'Light Download PDF Button', \n 'block' => 'a', \n 'classes' => 'pdf_dl light',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'Inline blue link with arrow', \n 'block' => 'div', \n 'classes' => 'inline-link-with-arrow',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'CTA Button', \n 'block' => 'a', \n 'classes' => 'button',\n 'wrapper' => true,\n ),\n array( \n 'title' => 'Light CTA Button', \n 'block' => 'a', \n 'classes' => 'button light',\n 'wrapper' => true,\n ), \n array( \n 'title' => 'Inline CTA Button', \n 'block' => 'span', \n 'classes' => 'inline-links-wrap',\n 'wrapper' => true,\n ),\n array(\n \t'title' => 'Underlined Title',\n \t'block' => 'span',\n \t'classes' => 'underlined-heading',\n \t'wrapper' => true,\n ),\n \tarray(\n\t \t'title' => 'Centered Title with Line Rules',\n\t \t'block' => 'div',\n\t \t'classes' => 'centered-title-with-line-rules',\n\t \t'wrapper' => true,\n ),\n \tarray(\n\t \t'title' => 'Paragraph with top line rule',\n\t \t'block' => 'span',\n\t \t'classes' => 'para-top-line-rule',\n\t \t'wrapper' => true,\n ),\n \tarray(\n\t \t'title' => 'Blockquote Author',\n\t \t'block' => 'span',\n\t \t'classes' => 'blockQuoteAuthor',\n\t \t'wrapper' => true,\n ),\n \tarray(\n\t \t'title' => 'Heading without para spacing',\n\t \t'block' => 'div',\n\t \t'classes' => 'noMarginBottom',\n\t \t'wrapper' => true,\n ),\n \tarray(\n\t \t'title' => 'Narrow Blockquote',\n\t \t'block' => 'span',\n\t \t'classes' => 'narrowBlockQuote',\n\t \t'wrapper' => true,\n )\n ); \n // Insert the array, JSON ENCODED, into 'style_formats'\n $init_array['style_formats'] = json_encode( $style_formats ); \n \n return $init_array; \n \n}", "title": "" }, { "docid": "4141d81ef90709c5ed487e853cf7981c", "score": "0.44569013", "text": "public static function insertText($content) {\n\t\tif (!is_single() || false == self::$enabled) {\n\t\t\treturn $content;\n\t\t}\n\t\t\n\t\tglobal $post;\n\t\t\n\t\t$bottom_paragraph = get_option( '_cfat_bottom_paragraphs') !== false ? get_option( '_cfat_bottom_paragraphs') : 0;\n\n\t\t$bottom_paragraph_override = get_post_meta( get_the_ID(), '_cf-arbitrary-text-paragraph-override', true);\n\t\tif (trim($bottom_paragraph_override) !== '') {\n\t\t\t$bottom_paragraph = $bottom_paragraph_override;\n\t\t}\n\n\t\t$options = self::getPostOptions($post->ID);\n\n\t\t// Check if auto-enable is set\n\t\t$enabled = !empty($options['enable']);\n\n\t\tif (isset($options['name'])) {\n\t\t\t$package_name = $options['name'];\n\t\t}\n\n\t\t// Check if the post has text enabled, short circuit if not\n\t\tif ((!$enabled || empty($package_name))) {\n\t\t\tif (!empty($options['auto-disable'])) {\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\t// Check if auto-enable is set for this post type\n\t\t\t$auto_options = self::getAutoEnableOptions();\n\t\t\tif (!isset($auto_options[$post->post_type]) || empty($auto_options[$post->post_type]['package'])) {\n\t\t\t\t// Return if not enabled and no auto-enable package set\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\t$package_name = $auto_options[$post->post_type]['package'];\n\t\t\t$enabled = true;\n\t\t}\n\n\t\tif (empty($package_name)) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t$package_name = str_replace('&', '&amp;', $package_name);\n\n\t\t// Get package information for post\n\t\t$packages = self::getPackages();\n\t\t$package = $packages[$package_name];\n\n\t\t// Return gracefully if package not found.\n\t\tif (!is_array($package)) {\n\t\t\tif (!empty($options['auto-disable'])) {\n\t\t\t\treturn $content;\n\t\t\t}\n\n\t\t\t// Check if auto enable package was searched\n\t\t\tif (!isset($auto_options)) {\n\t\t\t\t// Check if auto-enable is set for this post type\n\t\t\t\t$auto_options = self::getAutoEnableOptions();\n\t\t\t\tif (!isset($auto_options[$post->post_type]) || empty($auto_options[$post->post_type]['package'])) {\n\t\t\t\t\t// Return if not enabled and no auto-enable package set\n\t\t\t\t\treturn $content;\n\t\t\t\t}\n\n\t\t\t\t$package_name = $auto_options[$post->post_type]['package'];\n\t\t\t\t$package = $packages[$package_name];\n\t\t\t}\n\n\t\t\tif (!is_array($package)) {\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$paragraph_delimiter = apply_filters('cf-arbitrary-p-delimiter', '</p>');\n\n\t\t// Find paragraphs\n\t\t$paragraphs = apply_filters('cf-arbitrary-paragraphs', explode($paragraph_delimiter, $content), $content, $paragraph_delimiter);\n\n\t\t$paragraphs_total = count($paragraphs) - 1; // There always seems ot be a \"bonus\" empty paragrpah at the end.\n\t\t$package_options = self::getPackageOptions($package_name);\n\n\t\t// Re-assemble content with\n\t\t$paragraph_counter = 1;\n\t\t$new_content = '';\n\t\tforeach ((array)$paragraphs as $paragraph) {\n\t\t\tif (empty($paragraph) || $paragraph == PHP_EOL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$new_content .= $paragraph . $paragraph_delimiter;\n\t\t\tif ($paragraph == $paragraph_delimiter) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach ($package as $zone) {\n\n\t\t\t\tif ( ($zone['position'] == $paragraph_counter) ||\n\t\t\t\t\t (($zone['position'] > $paragraphs_total) && ($paragraph_counter == ($paragraphs_total - $bottom_paragraph)) && empty($package_options['paragraph_limit_display']))\n\t\t\t\t ) {\n\n\t\t\t\t\t$wrap_snippet = !empty($zone['margin']) || !empty($zone['align']);\n\n\t\t\t\t\tif ($wrap_snippet) {\n\t\t\t\t\t\t$new_content .= '<font class=\"cfat-snippet cfat-snippet-' . $paragraph_counter . ' cfat-snippet-' . $zone['snippet'];\n\n\t\t\t\t\t\tif (!empty($zone['align'])) {\n\t\t\t\t\t\t\t$new_content .= ' cfat-align-' . $zone['align'];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$new_content .= '\" style=\"display:block;';\n\n\t\t\t\t\t\tif (!empty($zone['margin']) && is_numeric($zone['margin'])) {\n\t\t\t\t\t\t\t$new_content .= ' margin:' . $zone['margin'];\n\n\t\t\t\t\t\t\tif (is_numeric($zone['margin'])) {\n\t\t\t\t\t\t\t\t$new_content .= 'px';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$new_content .= '\">';\n\t\t\t\t\t}\n\n\t\t\t\t\t$new_content .= cfsp_get_content( $zone['snippet'] );\n\n\t\t\t\t\tif ($wrap_snippet) {\n\t\t\t\t\t\t$new_content .= '</font>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$paragraph_counter++;\n\t\t}\n\n//\t\t$package_options = self::getPackageOptions($package_name);\n//\n//\t\tif (empty($package_options) || empty($package_options['paragraph_limit_display'])) {\n//\t\t\t// Handle ads that didn't have enough paragraphs, basically put them at the end.\n//\t\t\tforeach ($package as $zone) {\n//\t\t\t\tif ($zone['position'] >= $paragraph_counter) {\n//\t\t\t\t\t$new_content .= cfsp_get_content( $zone['snippet'] );\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\n\t\treturn $new_content;\n\t}", "title": "" }, { "docid": "9c02cad8890f96cd8d9244ee887731eb", "score": "0.4452259", "text": "public function display_override() {\n $display_data = $this->CI->output->get_output(); \n \n // now modify the data before sending it ot the output\n $startSrch = '<p class=\"lead\">';\n $endSrch = '</p>';\n $startSrchLen = strlen($startSrch);\n $startPos = 0;\n $newDisplayData = array();\n // loop through the text looking for \"lead\" paragraphs and process\n // the text in those paragraphs using wrapUCase(), adding the result\n // to $newDisplayData\n do {\n // find a lead paragraph\n $pos = strpos($display_data, $startSrch, $startPos);\n if ($pos != FALSE) {\n // if this is the first one we have found, initialise the new \n // string with text up to this point\n if ($startPos == 0 ){\n $newDisplayData[] = substr($display_data, $startPos, $pos + $startSrchLen);\n }\n // reset the start to be the first character of the paragraph text\n $startPos = $pos + $startSrchLen;\n\n // now find the end of the paragraph\n $endPos = strpos($display_data, $endSrch, $startPos); \n \n // extract the text and make every capital letter bold\n $newDisplayData[] = $this->wrapUCase(substr($display_data, $startPos, $endPos-$startPos));\n $startPos = $endPos;\n }\n else{\n // there are no more paragraphs matching to copy the remainder of the text\n $newDisplayData[] = substr($display_data, $startPos);\n }\n } while ($pos != FALSE);\n\n // if we found any matching paragraphs replace $displayData with the new\n // data that incorporates the modifications\n if ($startPos > 0 ){\n $display_data = implode($newDisplayData);\n }\n \n // now put the data back into the output to be displayed\n $this->CI->output->set_output($display_data);\n }", "title": "" }, { "docid": "ea0867c4be27ae249bdb13ec0f5b999b", "score": "0.44516605", "text": "function JanosBibliographyStyle($bibentry) {\n $title = $bibentry->getTitle();\n $type = $bibentry->getType();\n\n $entry=array();\n\n // author\n if ($bibentry->hasField('author')) {\n $entry[] = '<span class=\"bibauthor\">'.$bibentry->getFormattedAuthorsString().'</span>';\n }\n\n // title\n $title = '\"'.'<span class=\"bibtitle\">'.$title.'</span>'.'\"';\n if ($bibentry->hasField('url')) $title = ' <a'.get_target().' href=\"'.$bibentry->getField('url').'\">'.$title.'</a>';\n $entry[] = $title;\n\n\n // now the origin of the publication is in italic\n $booktitle = '';\n\n if (($type==\"misc\") && $bibentry->hasField(\"note\")) {\n $booktitle = $bibentry->getField(\"note\");\n }\n\n if ($type==\"inproceedings\" && $bibentry->hasField(BOOKTITLE)) {\n $booktitle = '<span class=\"bibbooktitle\">'.'In '.$bibentry->getField(BOOKTITLE).'</span>';\n }\n\n if ($type==\"incollection\" && $bibentry->hasField(BOOKTITLE)) {\n $booktitle = '<span class=\"bibbooktitle\">'.'Chapter in '.$bibentry->getField(BOOKTITLE).'</span>';\n }\n\n if ($type==\"article\" && $bibentry->hasField(\"journal\")) {\n $booktitle = '<span class=\"bibbooktitle\">'.''.$bibentry->getField(\"journal\").'</span>';\n }\n\n\n\n //// ******* EDITOR\n $editor='';\n if ($bibentry->hasField(EDITOR)) {\n $editor = $bibentry->getFormattedEditors();\n }\n\n if ($booktitle!='') {\n if ($editor!='') $booktitle .=' ('.$editor.')';\n $entry[] = '<i>'.$booktitle.'</i>';\n }\n\n\n $publisher='';\n if ($type==\"phdthesis\") {\n $publisher = 'PhD thesis, '.$bibentry->getField(SCHOOL);\n }\n\n if ($type==\"mastersthesis\") {\n $publisher = 'Master\\'s thesis, '.$bibentry->getField(SCHOOL);\n }\n if ($type==\"techreport\") {\n $publisher = 'Technical report, ';\n $publisher .=$bibentry->getField(\"institution\");\n if ($bibentry->hasField(\"number\")) {\n $publisher .= ' '.$bibentry->getField(\"number\");\n }\n }\n if ($bibentry->hasField(\"publisher\")) {\n $publisher = $bibentry->getField(\"publisher\");\n }\n\n if ($publisher!='') $entry[] = $publisher;\n\n if ($type==\"article\") {\n if ($bibentry->hasField('volume')) $entry[] = \"vol. \".$bibentry->getField(\"volume\");\n if ($bibentry->hasField('number')) $entry[] = 'no. '.$bibentry->getField(\"number\");\n }\n\n if ($bibentry->hasField('address')) $entry[] = $bibentry->getField(\"address\");\n\n if ($bibentry->hasField('pages')) $entry[] = str_replace(\"--\", \"-\", \"pp. \".$bibentry->getField(\"pages\"));\n\n\n if ($bibentry->hasField(YEAR)) $entry[] = $bibentry->getYear();\n\n $result = implode(\", \",$entry).'.';\n\n // add the Coin URL\n $result .= \"\\n\".$bibentry->toCoins();\n\n return '<span itemscope=\"\" itemtype=\"http://schema.org/ScholarlyArticle\">'.$result.'</span>';\n}", "title": "" }, { "docid": "b0efdd0229f8973d8c8c8bff0a6e55b7", "score": "0.44475657", "text": "function SetFont($family, $style='', $size=0)\n{\n\tglobal $fpdf_charwidths;\n\n\t$family=strtolower($family);\n\tif($family=='')\n\t\t$family=$this->FontFamily;\n\tif($family=='arial')\n\t\t$family='helvetica';\n\telseif($family=='symbol' || $family=='zapfdingbats')\n\t\t$style='';\n\t$style=strtoupper($style);\n\tif(strpos($style,'U')!==false)\n\t{\n\t\t$this->underline=true;\n\t\t$style=str_replace('U','',$style);\n\t}\n\telse\n\t\t$this->underline=false;\n\tif($style=='IB')\n\t\t$style='BI';\n\tif($size==0)\n\t\t$size=$this->FontSizePt;\n\t//Test if font is already selected\n\tif($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)\n\t\treturn;\n\t//Test if used for the first time\n\t$fontkey=$family.$style;\n\tif(!isset($this->fonts[$fontkey]))\n\t{\n\t\t//Check if one of the standard fonts\n\t\tif(isset($this->CoreFonts[$fontkey]))\n\t\t{\n\t\t\tif(!isset($fpdf_charwidths[$fontkey]))\n\t\t\t{\n\t\t\t\t//Load metric file\n\t\t\t\t$file=$family;\n\t\t\t\tif($family=='times' || $family=='helvetica')\n\t\t\t\t\t$file.=strtolower($style);\n\t\t\t\tinclude($this->_getfontpath().$file.'.php');\n\t\t\t\tif(!isset($fpdf_charwidths[$fontkey]))\n\t\t\t\t\t$this->Error('Could not include font metric file');\n\t\t\t}\n\t\t\t$i=count($this->fonts)+1;\n\t\t\t$name=$this->CoreFonts[$fontkey];\n\t\t\t$cw=$fpdf_charwidths[$fontkey];\n\t\t\t$this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw);\n\t\t}\n\t\telse\n\t\t\t$this->Error('Undefined font: '.$family.' '.$style);\n\t}\n\t//Select it\n\t$this->FontFamily=$family;\n\t$this->FontStyle=$style;\n\t$this->FontSizePt=$size;\n\t$this->FontSize=$size/$this->k;\n\t$this->CurrentFont=&$this->fonts[$fontkey];\n\tif($this->page>0)\n\t\t$this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));\n}", "title": "" }, { "docid": "fd1bf9e52ac606cd55d4fcb287b690dd", "score": "0.44452283", "text": "function SetTextEffects($effects){}", "title": "" }, { "docid": "458681331b6f6b5112874a7e7f7f1871", "score": "0.44426683", "text": "function sienna_mikado_contact_form7_text_styles_1() {\n\t\t$selector = array(\n\t\t\t'.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-text',\n\t\t\t'.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-number',\n\t\t\t'.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-date',\n\t\t\t'.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t'.cf7_custom_style_1 select.wpcf7-form-control.wpcf7-select',\n\t\t\t'.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-quiz'\n\t\t);\n\t\t$styles = array();\n\n\t\t$color = sienna_mikado_options()->getOptionValue('cf7_style_1_text_color');\n\t\tif($color !== '') {\n\t\t\t$styles['color'] = $color;\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_1 ::-webkit-input-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_1 :-moz-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_1 ::-moz-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_1 :-ms-input-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t}\n\n\t\t$font_size = sienna_mikado_options()->getOptionValue('cf7_style_1_text_font_size');\n\t\tif($font_size !== '') {\n\t\t\t$styles['font-size'] = sienna_mikado_filter_px($font_size).'px';\n\t\t}\n\n\t\t$line_height = sienna_mikado_options()->getOptionValue('cf7_style_1_text_line_height');\n\t\tif($line_height !== '') {\n\t\t\t$styles['line-height'] = sienna_mikado_filter_px($line_height).'px';\n\t\t}\n\n\t\t$font_family = sienna_mikado_options()->getOptionValue('cf7_style_1_text_font_family');\n\t\tif(sienna_mikado_is_font_option_valid($font_family)) {\n\t\t\t$styles['font-family'] = sienna_mikado_get_font_option_val($font_family);\n\t\t}\n\n\t\t$font_style = sienna_mikado_options()->getOptionValue('cf7_style_1_text_font_style');\n\t\tif(!empty($font_style)) {\n\t\t\t$styles['font-style'] = $font_style;\n\t\t}\n\n\t\t$font_weight = sienna_mikado_options()->getOptionValue('cf7_style_1_text_font_weight');\n\t\tif(!empty($font_weight)) {\n\t\t\t$styles['font-weight'] = $font_weight;\n\t\t}\n\n\t\t$text_transform = sienna_mikado_options()->getOptionValue('cf7_style_1_text_text_transform');\n\t\tif(!empty($text_transform)) {\n\t\t\t$styles['text-transform'] = $text_transform;\n\t\t}\n\n\t\t$letter_spacing = sienna_mikado_options()->getOptionValue('cf7_style_1_text_letter_spacing');\n\t\tif($letter_spacing !== '') {\n\t\t\t$styles['letter-spacing'] = sienna_mikado_filter_px($letter_spacing).'px';\n\t\t}\n\n\t\t$background_color = sienna_mikado_options()->getOptionValue('cf7_style_1_background_color');\n\t\t$background_opacity = 1;\n\t\tif($background_color !== '') {\n\t\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_1_background_transparency')) {\n\t\t\t\t$background_opacity = sienna_mikado_options()->getOptionValue('cf7_style_1_background_transparency');\n\t\t\t}\n\t\t\t$styles['background-color'] = sienna_mikado_rgba_color($background_color, $background_opacity);\n\t\t}\n\n\t\t$border_color = sienna_mikado_options()->getOptionValue('cf7_style_1_border_color');\n\t\t$border_opacity = 1;\n\t\tif($border_color !== '') {\n\t\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_1_border_transparency')) {\n\t\t\t\t$border_opacity = sienna_mikado_options()->getOptionValue('cf7_style_1_border_transparency');\n\t\t\t}\n\t\t\t$styles['border-color'] = sienna_mikado_rgba_color($border_color, $border_opacity);\n\t\t}\n\n\t\t$border_width = sienna_mikado_options()->getOptionValue('cf7_style_1_border_width');\n\t\tif($border_width !== '') {\n\t\t\t$styles['border-width'] = sienna_mikado_filter_px($border_width).'px';\n\t\t}\n\n\t\t$border_radius = sienna_mikado_options()->getOptionValue('cf7_style_1_border_radius');\n\t\tif($border_radius !== '') {\n\t\t\t$styles['border-radius'] = sienna_mikado_filter_px($border_radius).'px';\n\t\t}\n\n\t\t$padding_top = sienna_mikado_options()->getOptionValue('cf7_style_1_padding_top');\n\t\tif($padding_top !== '') {\n\t\t\t$styles['padding-top'] = sienna_mikado_filter_px($padding_top).'px';\n\t\t}\n\n\t\t$padding_right = sienna_mikado_options()->getOptionValue('cf7_style_1_padding_right');\n\t\tif($padding_right !== '') {\n\t\t\t$styles['padding-right'] = sienna_mikado_filter_px($padding_right).'px';\n\t\t}\n\n\t\t$padding_bottom = sienna_mikado_options()->getOptionValue('cf7_style_1_padding_bottom');\n\t\tif($padding_bottom !== '') {\n\t\t\t$styles['padding-bottom'] = sienna_mikado_filter_px($padding_bottom).'px';\n\t\t}\n\n\t\t$padding_left = sienna_mikado_options()->getOptionValue('cf7_style_1_padding_left');\n\t\tif($padding_left !== '') {\n\t\t\t$styles['padding-left'] = sienna_mikado_filter_px($padding_left).'px';\n\t\t}\n\n\t\t$margin_top = sienna_mikado_options()->getOptionValue('cf7_style_1_margin_top');\n\t\tif($margin_top !== '') {\n\t\t\t$styles['margin-top'] = sienna_mikado_filter_px($margin_top).'px';\n\t\t}\n\n\t\t$margin_bottom = sienna_mikado_options()->getOptionValue('cf7_style_1_margin_bottom');\n\t\tif($margin_bottom !== '') {\n\t\t\t$styles['margin-bottom'] = sienna_mikado_filter_px($margin_bottom).'px';\n\t\t}\n\n\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_1_textarea_height')) {\n\t\t\t$textarea_height = sienna_mikado_options()->getOptionValue('cf7_style_1_textarea_height');\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t\tarray('height' => sienna_mikado_filter_px($textarea_height).'px')\n\t\t\t);\n\t\t}\n\n\t\techo sienna_mikado_dynamic_css($selector, $styles);\n\t}", "title": "" }, { "docid": "7db013e9d3c76531c78846c72b991527", "score": "0.44292733", "text": "function sc_bold_format($attr, $content = null) {\n $params = shortcode_atts( array( \n 'class' => ''\n ), $attr );\n $class = '';\n $result = decorates($content); \n if (!isNullOrEmpty($params['class'])) {\n $class = ' class=\"' . $params['class'] . '\"';\n }\n return \"<b$class>$result</b>\";\n}", "title": "" }, { "docid": "e03630566b45d29fff3ce4f0844f711f", "score": "0.44289237", "text": "function ytfont($font, $selectors){\n\t$doc = JFactory::getDocument();\n\tif (trim($font)!='0' ){\n\t\tif (strpos($font, ',') ) {\n\t\t\t$doc->addStyleDeclaration($selectors.'{font-family:'.$font.'}');\n\t\t}else{\n\t\t\t$doc->addStyleSheet('http://fonts.googleapis.com/css?family='.$font);\n\t\t\t$font = str_replace(\"+\",\" \",(explode(':',$font)));\n\t\t\t$fontweight = isset($font[1]) ? $font[1] : null;;\n\t\t\t$fontitalic = strpos($fontweight, \"italic\");\n\t\t\t\n\t\t\tif ($fontitalic == true) {\n\t\t\t\t$fontweight_italic = substr($fontweight,0,$fontitalic );\n\t\t\t\t$doc->addStyleDeclaration($selectors.'{font-style:italic;font-weight:'.$fontweight_italic.'}');\n\t\t\t}\n\t\t\tif(trim($selectors)!=\"\"){\n\t\t\t\t$doc->addStyleDeclaration($selectors.'{font-family:'.$font[0].';font-weight:'.$fontweight.'}');\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "88186b2fb772dddc2ef4411ef7526d00", "score": "0.44282624", "text": "function autoparts_load_fonts() {\n\t\t$fonts = array();\n\t\tfor ($i=1; $i<=autoparts_get_theme_setting('max_load_fonts'); $i++) {\n\t\t\tif (($name = autoparts_get_theme_option(\"load_fonts-{$i}-name\")) != '') {\n\t\t\t\t$fonts[] = array(\n\t\t\t\t\t'name'\t => $name,\n\t\t\t\t\t'family' => autoparts_get_theme_option(\"load_fonts-{$i}-family\"),\n\t\t\t\t\t'styles' => autoparts_get_theme_option(\"load_fonts-{$i}-styles\")\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tautoparts_storage_set('load_fonts', $fonts);\n\t\tautoparts_storage_set('load_fonts_subset', autoparts_get_theme_option(\"load_fonts_subset\"));\n\t\t\n\t\t// Font parameters of the main theme's elements\n\t\t$fonts = autoparts_get_theme_fonts();\n\t\tforeach ($fonts as $tag=>$v) {\n\t\t\tforeach ($v as $css_prop=>$css_value) {\n\t\t\t\tif (in_array($css_prop, array('title', 'description'))) continue;\n\t\t\t\t$fonts[$tag][$css_prop] = autoparts_get_theme_option(\"{$tag}_{$css_prop}\");\n\t\t\t}\n\t\t}\n\t\tautoparts_storage_set('theme_fonts', $fonts);\n\t}", "title": "" }, { "docid": "4e57b1aa430c03d3bb6441ea37201e0b", "score": "0.44250727", "text": "function AddFont($family, $style='', $file='')\n{\n\t$family=strtolower($family);\n\tif($file=='')\n\t\t$file=str_replace(' ','',$family).strtolower($style).'.php';\n\tif($family=='arial')\n\t\t$family='helvetica';\n\t$style=strtoupper($style);\n\tif($style=='IB')\n\t\t$style='BI';\n\t$fontkey=$family.$style;\n\tif(isset($this->fonts[$fontkey]))\n\t\treturn;\n\tinclude($this->_getfontpath().$file);\n\tif(!isset($name))\n\t\t$this->Error('Could not include font definition file');\n\t$i=count($this->fonts)+1;\n\t$this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file);\n\tif($diff)\n\t{\n\t\t//Search existing encodings\n\t\t$d=0;\n\t\t$nb=count($this->diffs);\n\t\tfor($i=1;$i<=$nb;$i++)\n\t\t{\n\t\t\tif($this->diffs[$i]==$diff)\n\t\t\t{\n\t\t\t\t$d=$i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($d==0)\n\t\t{\n\t\t\t$d=$nb+1;\n\t\t\t$this->diffs[$d]=$diff;\n\t\t}\n\t\t$this->fonts[$fontkey]['diff']=$d;\n\t}\n\tif($file)\n\t{\n\t\tif($type=='TrueType')\n\t\t\t$this->FontFiles[$file]=array('length1'=>$originalsize);\n\t\telse\n\t\t\t$this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2);\n\t}\n}", "title": "" }, { "docid": "09ba38c750b4dabbcf2592eb6e537ee2", "score": "0.4420688", "text": "function sienna_mikado_contact_form7_text_styles_2() {\n\t\t$selector = array(\n\t\t\t'.cf7_custom_style_2 input.wpcf7-form-control.wpcf7-text',\n\t\t\t'.cf7_custom_style_2 input.wpcf7-form-control.wpcf7-number',\n\t\t\t'.cf7_custom_style_2 input.wpcf7-form-control.wpcf7-date',\n\t\t\t'.cf7_custom_style_2 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t'.cf7_custom_style_2 select.wpcf7-form-control.wpcf7-select',\n\t\t\t'.cf7_custom_style_2 input.wpcf7-form-control.wpcf7-quiz'\n\t\t);\n\t\t$styles = array();\n\n\t\t$color = sienna_mikado_options()->getOptionValue('cf7_style_2_text_color');\n\t\tif($color !== '') {\n\t\t\t$styles['color'] = $color;\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_2 ::-webkit-input-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_2 :-moz-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_2 ::-moz-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_2 :-ms-input-placeholder',\n\t\t\t\tarray('color' => $color)\n\t\t\t);\n\t\t}\n\n\t\t$font_size = sienna_mikado_options()->getOptionValue('cf7_style_2_text_font_size');\n\t\tif($font_size !== '') {\n\t\t\t$styles['font-size'] = sienna_mikado_filter_px($font_size).'px';\n\t\t}\n\n\t\t$line_height = sienna_mikado_options()->getOptionValue('cf7_style_2_text_line_height');\n\t\tif($line_height !== '') {\n\t\t\t$styles['line-height'] = sienna_mikado_filter_px($line_height).'px';\n\t\t}\n\n\t\t$font_family = sienna_mikado_options()->getOptionValue('cf7_style_2_text_font_family');\n\t\tif(sienna_mikado_is_font_option_valid($font_family)) {\n\t\t\t$styles['font-family'] = sienna_mikado_get_font_option_val($font_family);\n\t\t}\n\n\t\t$font_style = sienna_mikado_options()->getOptionValue('cf7_style_2_text_font_style');\n\t\tif(!empty($font_style)) {\n\t\t\t$styles['font-style'] = $font_style;\n\t\t}\n\n\t\t$font_weight = sienna_mikado_options()->getOptionValue('cf7_style_2_text_font_weight');\n\t\tif(!empty($font_weight)) {\n\t\t\t$styles['font-weight'] = $font_weight;\n\t\t}\n\n\t\t$text_transform = sienna_mikado_options()->getOptionValue('cf7_style_2_text_text_transform');\n\t\tif(!empty($text_transform)) {\n\t\t\t$styles['text-transform'] = $text_transform;\n\t\t}\n\n\t\t$letter_spacing = sienna_mikado_options()->getOptionValue('cf7_style_2_text_letter_spacing');\n\t\tif($letter_spacing !== '') {\n\t\t\t$styles['letter-spacing'] = sienna_mikado_filter_px($letter_spacing).'px';\n\t\t}\n\n\t\t$background_color = sienna_mikado_options()->getOptionValue('cf7_style_2_background_color');\n\t\t$background_opacity = 1;\n\t\tif($background_color !== '') {\n\t\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_2_background_transparency')) {\n\t\t\t\t$background_opacity = sienna_mikado_options()->getOptionValue('cf7_style_2_background_transparency');\n\t\t\t}\n\t\t\t$styles['background-color'] = sienna_mikado_rgba_color($background_color, $background_opacity);\n\t\t}\n\n\t\t$border_color = sienna_mikado_options()->getOptionValue('cf7_style_2_border_color');\n\t\t$border_opacity = 1;\n\t\tif($border_color !== '') {\n\t\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_2_border_transparency')) {\n\t\t\t\t$border_opacity = sienna_mikado_options()->getOptionValue('cf7_style_2_border_transparency');\n\t\t\t}\n\t\t\t$styles['border-color'] = sienna_mikado_rgba_color($border_color, $border_opacity);\n\t\t}\n\n\t\t$border_width = sienna_mikado_options()->getOptionValue('cf7_style_2_border_width');\n\t\tif($border_width !== '') {\n\t\t\t$styles['border-width'] = sienna_mikado_filter_px($border_width).'px';\n\t\t}\n\n\t\t$border_radius = sienna_mikado_options()->getOptionValue('cf7_style_2_border_radius');\n\t\tif($border_radius !== '') {\n\t\t\t$styles['border-radius'] = sienna_mikado_filter_px($border_radius).'px';\n\t\t}\n\n\t\t$padding_top = sienna_mikado_options()->getOptionValue('cf7_style_2_padding_top');\n\t\tif($padding_top !== '') {\n\t\t\t$styles['padding-top'] = sienna_mikado_filter_px($padding_top).'px';\n\t\t}\n\n\t\t$padding_right = sienna_mikado_options()->getOptionValue('cf7_style_2_padding_right');\n\t\tif($padding_right !== '') {\n\t\t\t$styles['padding-right'] = sienna_mikado_filter_px($padding_right).'px';\n\t\t}\n\n\t\t$padding_bottom = sienna_mikado_options()->getOptionValue('cf7_style_2_padding_bottom');\n\t\tif($padding_bottom !== '') {\n\t\t\t$styles['padding-bottom'] = sienna_mikado_filter_px($padding_bottom).'px';\n\t\t}\n\n\t\t$padding_left = sienna_mikado_options()->getOptionValue('cf7_style_2_padding_left');\n\t\tif($padding_left !== '') {\n\t\t\t$styles['padding-left'] = sienna_mikado_filter_px($padding_left).'px';\n\t\t}\n\n\t\t$margin_top = sienna_mikado_options()->getOptionValue('cf7_style_2_margin_top');\n\t\tif($margin_top !== '') {\n\t\t\t$styles['margin-top'] = sienna_mikado_filter_px($margin_top).'px';\n\t\t}\n\n\t\t$margin_bottom = sienna_mikado_options()->getOptionValue('cf7_style_2_margin_bottom');\n\t\tif($margin_bottom !== '') {\n\t\t\t$styles['margin-bottom'] = sienna_mikado_filter_px($margin_bottom).'px';\n\t\t}\n\n\t\tif(sienna_mikado_options()->getOptionValue('cf7_style_2_textarea_height')) {\n\t\t\t$textarea_height = sienna_mikado_options()->getOptionValue('cf7_style_2_textarea_height');\n\t\t\techo sienna_mikado_dynamic_css(\n\t\t\t\t'.cf7_custom_style_2 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t\tarray('height' => sienna_mikado_filter_px($textarea_height).'px')\n\t\t\t);\n\t\t}\n\n\t\techo sienna_mikado_dynamic_css($selector, $styles);\n\t}", "title": "" }, { "docid": "824edb60a7b1fe9668b48407f8743bf0", "score": "0.44127858", "text": "function wp_render_typography_support( $block_content, $block ) {\n\tif ( ! isset( $block['attrs']['style']['typography']['fontSize'] ) ) {\n\t\treturn $block_content;\n\t}\n\n\t$custom_font_size = $block['attrs']['style']['typography']['fontSize'];\n\t$fluid_font_size = wp_get_typography_font_size_value( array( 'size' => $custom_font_size ) );\n\n\t/*\n\t * Checks that $fluid_font_size does not match $custom_font_size,\n\t * which means it's been mutated by the fluid font size functions.\n\t */\n\tif ( ! empty( $fluid_font_size ) && $fluid_font_size !== $custom_font_size ) {\n\t\t// Replaces the first instance of `font-size:$custom_font_size` with `font-size:$fluid_font_size`.\n\t\treturn preg_replace( '/font-size\\s*:\\s*' . preg_quote( $custom_font_size, '/' ) . '\\s*;?/', 'font-size:' . esc_attr( $fluid_font_size ) . ';', $block_content, 1 );\n\t}\n\n\treturn $block_content;\n}", "title": "" }, { "docid": "d6bcc37e77c8baf9754bf74a267a9b9d", "score": "0.44122338", "text": "function nbbj_headline_taggedtext(){\n\tglobal $mainheadlinestyle, $storyprintheadline, $trickyCharacters, $html_tags, $tagged_tags, $conversion_table, $newLine;\n\tif ($storyprintheadline) { \n\t\t$storyprintheadline = wptexturize($storyprintheadline);\n\t\t$storyprintheadline = trim($storyprintheadline);\n\t\t$storyprintheadline = mb_convert_encoding($storyprintheadline,'UTF-8',get_bloginfo('charset'));\n\t\t$storyprintheadline = esc_html($storyprintheadline); // NBBJ 120622 WP function to handle amp and quotes\n\t\t$storyprintheadline = htmlentities($storyprintheadline, ENT_QUOTES, 'UTF-8', false);\n\t\t$storyprintheadline = strtr($storyprintheadline,$trickyCharacters);\n\t\t$storyprintheadline = preg_replace($html_tags,$tagged_tags,$storyprintheadline);\n\t\t$storyprintheadline = strtr($storyprintheadline,$conversion_table);\n\t\t$storyprintheadline = preg_replace('/(<0x000A>|\\n)/',' ',$storyprintheadline);\n\t\t$storyprintheadline = \"<ParaStyle:$mainheadlinestyle>\".$storyprintheadline.$newLine; } \n\t\telse { $storyprintheadline = \"\"; }\n\treturn $storyprintheadline;\n}", "title": "" }, { "docid": "f6251d391f64eab129bf53d5db98e865", "score": "0.44113323", "text": "function sommaire_d_article_balise($texte) {\r\n\t// si la balise n'est pas utilisee ou s'il n'y a aucun intertitre, on ne fait rien\r\n\tif(!defined('_sommaire_BALISE') || (strpos($texte, '<h')===false)) return '';\r\n\treturn cs_echappe_balises('html|code|cadre|frame|script|acronym|cite|onglets|table', 'sommaire_d_article_rempl', $texte, true);\r\n}", "title": "" }, { "docid": "5198a83d68843dbdede314df5e921bb5", "score": "0.4409961", "text": "function inspiry_google_fonts() {\n\n\t\t$font_families = array();\n\t\t$fonts_url = '';\n\t\t$subsets = 'latin,latin-ext';\n\n\t\t// Body Font\n\t\t$body_font = get_option( 'inspiry_body_font', 'Default' );\n\t\tif ( 'Default' !== $body_font ) {\n\t\t\t$font_families[] = $body_font . ':' . Inspiry_Google_Fonts::get_font_weights( $body_font, false, true );\n\t\t} else {\n\t\t\t// Open Sans is theme's default text font.\n\t\t\t$font_families[] = 'Open+Sans:400,400i,600,600i,700,700i';\n\t\t}\n\n\t\t// Heading Font\n\t\t$heading_font = get_option( 'inspiry_heading_font', 'Default' );\n\t\tif ( 'Default' !== $heading_font ) {\n\t\t\t$font_families[] = $heading_font . ':' . Inspiry_Google_Fonts::get_font_weights( $heading_font, false, true );\n\t\t} else {\n\t\t\t// Lato is theme's default heading font.\n\t\t\t$font_families[] = 'Lato:400,400i,700,700i';\n\t\t}\n\n\t\t// Secondary Font\n\t\t$secondary_font = get_option( 'inspiry_secondary_font', 'Default' );\n\t\tif ( 'Default' !== $secondary_font ) {\n\t\t\t$font_families[] = $secondary_font . ':' . Inspiry_Google_Fonts::get_font_weights( $secondary_font, false, true );\n\t\t} else {\n\t\t\t// Robot is theme's default secondary font.\n\t\t\t$font_families[] = 'Roboto:400,400i,500,500i,700,700i';\n\t\t}\n\n\t\t/*\n * This font is used on dashboard membership order completion page and will be included only on dashboard template.\n *\n * Translators: If there are characters in your language that are not\n * supported by Damion, translate this to 'off'. Do not translate into your own language.\n */\n\t\tif ( 'off' !== _x( 'on', 'Damion font: on or off', 'framework' ) && is_page_template( 'templates/dashboard.php' ) ) {\n\t\t\t$font_families[] = 'Damion';\n\t\t}\n\n\t\tif ( ( 'modern' === INSPIRY_DESIGN_VARIATION ) || is_page_template( 'templates/dashboard.php' ) ) {\n\t\t\t/*\n\t\t\t * Translators: If there are characters in your language that are not\n\t\t\t * supported by Rubik, translate this to 'off'. Do not translate into your own language.\n\t\t\t */\n\t\t\tif ( 'off' !== _x( 'on', 'Rubik font: on or off', 'framework' ) ) {\n\t\t\t\t$font_families[] = 'Rubik:400,400i,500,500i,700,700i';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $font_families ) ) {\n\t\t\t$query_args = array(\n\t\t\t\t'family' => implode( '|', array_unique( $font_families ) ),\n\t\t\t\t'subset' => urlencode( $subsets ),\n\t\t\t\t'display' => urlencode( 'fallback' ),\n\t\t\t);\n\n\t\t\t$fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );\n\t\t}\n\n\t\treturn esc_url_raw( $fonts_url );\n\t}", "title": "" }, { "docid": "4f1571a100ac26a70b35dc378b2f44d1", "score": "0.44093361", "text": "public function styles() {\n\t\treturn apply_filters( 'tf_module_text_styles', array(\n\t\t\t'tf_module_text_container' => array(\n\t\t\t\t'label' => __('Text Container', 'themify-flow'),\n\t\t\t\t'selector' => '.tf_module_text',\n\t\t\t\t'basic_styling' => array( 'background', 'font', 'padding', 'margin', 'border' ),\n\t\t\t),\n\t\t\t'tf_module_text_p' => array(\n\t\t\t\t'label' => __( 'Paragraph', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text p',\n\t\t\t\t'basic_styling' => array( 'border', 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_a' => array(\n\t\t\t\t'label' => __( 'Link', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text a',\n\t\t\t\t'basic_styling' => array( 'border', 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h1' => array(\n\t\t\t\t'label' => __( 'H1', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h1',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h2' => array(\n\t\t\t\t'label' => __( 'H2', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h2',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h3' => array(\n\t\t\t\t'label' => __( 'H3', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h3',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h4' => array(\n\t\t\t\t'label' => __( 'H4', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h4',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h5' => array(\n\t\t\t\t'label' => __( 'H5', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h5',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t\t'tf_module_text_h6' => array(\n\t\t\t\t'label' => __( 'H6', 'themify-flow' ),\n\t\t\t\t'selector' => '.tf_module_text h6',\n\t\t\t\t'basic_styling' => array( 'font', 'margin' ),\n\t\t\t),\n\t\t) );\n\t}", "title": "" }, { "docid": "94b9ba2d71a0f82a3ba7ef6147cb445a", "score": "0.440892", "text": "function SetTextEffectFlags($flags){}", "title": "" }, { "docid": "e3573dfbc21a67f7c39a437764b4fc4a", "score": "0.4408875", "text": "function cs_typo_echappe_balises($balises, $fonction, $texte, $arg=NULL){\n\tif(!strlen($texte)) return '';\n\tif (($fonction!==false) && !function_exists($fonction)) {\n\t\tspip_log(\"Erreur - cs_typo_echappe_balises() : $fonction() non definie !\");\n\t\treturn $texte;\n\t}\n\t// protection du texte\n\tif($balise!==false) {\n\t\tif(!strlen($balises)) $balises = 'html|code|cadre|frame|script';\n\t\t$balises = ',<('.$balises.')(\\s[^>]*)?>(.*)</\\1>,UimsS';\n\t\tinclude_spip('inc/texte');\n\t\t$texte = echappe_html($texte, 'CS', true, $balises);\n\t}\n\t// retour du texte simplement protege\n\tif ($fonction===false) return $texte;\n\t// retour du texte transforme par $fonction puis deprotege\n\treturn echappe_retour($arg==NULL?$fonction($texte):$fonction($texte, $arg), 'CS');\n}", "title": "" }, { "docid": "447e0fa821317783ccd01e69e73eff2a", "score": "0.44069964", "text": "static function insert_style(string $type): void {\n\n // Option-dependent styles\n $bg_colour = MJKANC_ACF::get(MJKANC_ACF::bg_colour);\n $text_colour = MJKANC_ACF::get(MJKANC_ACF::text_colour);\n $link_colour = MJKANC_ACF::get(MJKANC_ACF::link_colour);\n\n // For images, remove a few customizations\n $padding = ($type == 'image') ? '0' : '10px';\n $font_size = ($type == 'image') ? '0' : '190';\n $bg_colour = ($type == 'image') ? '#fff' : $bg_colour;\n $text_colour = ($type == 'image') ? '#000' : $text_colour;\n $link_colour = ($type == 'image') ? '#000' : $link_colour;\n\n echo JKNCSS::tag('\n /* Announcement */\n\n .'.self::cl_panel.' {\n border: none !important;\n background: '.$bg_colour.' !important;\n padding-top: '.$padding.' !important;\n padding-bottom: '.$padding.' !important;\n padding-left: '.$padding.';\n padding-right: '.$padding.';\n margin-top: 5px;\n margin-bottom: 15px;\n }\n\n .'.self::cl_table.' {\n width: 100% !important;\n margin-left: auto;\n margin-right: auto;\n }\n\n .'.self::cl_td.' {\n text-align: center;\n border: none;\n padding: 0;\n }\n\n /* Not sure why these would be different but okay */\n .'.self::cl_text.', .'.self::cl_text.' ul {\n font-size: '.$font_size.'% !important;\n }\n\n .'.self::cl_text.', .'.self::cl_text.' a {\n color: '.$text_colour.';\n text-transform: none !important;\n letter-spacing: .7px !important;\n text-align: inherit;\n font-family: \"Nunito\", Helvetica, Arial, sans-serif;\n font-weight: 600;\n line-height: 1.5;\n margin-bottom: 0;\n }\n \n .'.self::cl_text_block.' a {\n display: block;\n }\n\n .'.self::cl_text.' ul, .'.self::cl_text.' ul a {\n color: '.$link_colour.';\n font-family: \"Roboto\", sans-serif;\n list-style: none;\n line-height: 1.5;\n font-weight: 600;\n margin-bottom: 0px;\n }\n ');\n }", "title": "" }, { "docid": "0c85f668240e9c84efaee1b257e9362c", "score": "0.44033822", "text": "public function run()\n {\n //\n\n $prefixes = [\"Policy\",\"Education\",\"Tax\",\"Healthcare\",\"HOA\",\"Bylaws\",\"Procedures\",\"Human Resources\"];\n\n $content = [\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt ipsum ut lorem accumsan vulputate. In sit amet arcu imperdiet, ultricies sem nec, venenatis felis. Pellentesque tristique turpis ante, eget scelerisque velit blandit ac. Maecenas sit amet varius augue, in porttitor arcu. Donec gravida nec lacus vitae porttitor. Nulla est velit, scelerisque ac nisl sed, sollicitudin feugiat ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris et lorem elit. Phasellus vestibulum sagittis est, ut bibendum nisl rhoncus nec. Nulla a accumsan nunc.\",\n \"Morbi a accumsan enim. Mauris vel aliquet ex. Vestibulum gravida nunc a lacus consectetur, sit amet imperdiet arcu pulvinar. In nibh libero, ornare vitae mauris sit amet, lobortis maximus nulla. Pellentesque egestas eros non ornare mollis. Fusce ullamcorper tellus nisl, non pellentesque sem facilisis a. Curabitur condimentum, sapien vel tempor pharetra, erat enim bibendum ligula, ac tempus turpis orci ac magna. Duis fermentum tortor turpis, a vestibulum dolor finibus eget. Fusce libero ex, vestibulum placerat aliquam quis, tristique malesuada mauris. Maecenas dapibus justo vel sodales pulvinar. Aenean sit amet aliquet metus. Donec pulvinar sollicitudin orci, vitae dignissim sapien blandit vel.\",\n \"Nullam eget nulla magna. Duis vel leo non lectus interdum ultrices ac et est. Ut tincidunt faucibus porta. In in semper orci, sit amet mattis quam. Pellentesque pellentesque massa lorem, sed blandit arcu rutrum at. Pellentesque mattis, odio in mollis imperdiet, neque mauris iaculis nibh, sit amet faucibus turpis erat vel ipsum. Curabitur eu egestas est. Nam tincidunt diam nec erat placerat tempus. Donec porttitor felis ac scelerisque auctor. Proin posuere volutpat lacus non vestibulum. Fusce ut egestas magna.\",\n \"Etiam ut dui mattis, dictum neque at, ullamcorper urna. Duis semper metus a pulvinar finibus. Duis nec ligula sit amet nisl convallis efficitur in et augue. Sed lobortis sem a ligula facilisis condimentum. Praesent laoreet eleifend erat, sed pellentesque massa mattis nec. Vivamus varius varius nibh in vestibulum. Nunc eget facilisis eros, eu consectetur massa. Proin porta lectus id ligula pellentesque, in accumsan nisi lobortis. Suspendisse porta neque enim, non semper nibh faucibus eget. Donec maximus ut erat in aliquet. Vivamus nec libero arcu. Fusce congue nulla vitae metus tempus, nec aliquam nisi maximus. Mauris gravida a mauris vitae egestas. Nulla facilisi.\",\n \"Etiam eget diam in neque auctor mattis. Vestibulum pretium tempor mi, at commodo justo laoreet id. Mauris scelerisque diam nunc, eu viverra urna suscipit ullamcorper. Maecenas sollicitudin vulputate leo a eleifend. Maecenas ornare leo sed sem ornare tincidunt. Curabitur vitae ex in justo venenatis venenatis et sed nisi. Proin vitae erat congue, tristique leo quis, tristique enim. Cras imperdiet elit sed pulvinar posuere. Donec vel laoreet ex, vel varius lacus. Quisque sollicitudin, nibh ut placerat feugiat, mauris mauris feugiat ipsum, id luctus eros risus at erat. Morbi in ex feugiat, pulvinar urna ac, aliquet nunc. Nullam rutrum sem vel dui dictum, non placerat neque eleifend. Donec pellentesque interdum mi ut iaculis.\",\n \"Sed aliquam tortor porta nisl vulputate tincidunt. Mauris sit amet maximus arcu. Sed at suscipit elit, vel bibendum ligula. In a cursus diam. In imperdiet convallis tortor vel viverra. Curabitur sodales sit amet neque eu vestibulum. Pellentesque non accumsan massa, sed blandit tellus. Aliquam erat volutpat. Duis accumsan justo risus, et dignissim augue pellentesque non.\",\n \"Fusce in tempor nunc. Donec efficitur nisi sit amet tellus eleifend ornare. Sed nisi enim, laoreet ac dictum ut, posuere nec eros. Aenean at urna et sapien viverra vulputate. Praesent pharetra, elit et sodales ornare, massa dui facilisis nisl, ut vestibulum tellus arcu vel est. Praesent nunc sapien, commodo et eros ullamcorper, scelerisque suscipit arcu. Vestibulum semper semper nulla in rhoncus. Proin feugiat gravida erat, euismod molestie velit. Integer porttitor leo mi, sed pharetra leo auctor ac. In pellentesque euismod finibus. Sed malesuada risus ut leo condimentum semper.\",\n \"Suspendisse neque tellus, dignissim sit amet sagittis in, pulvinar a felis. Proin sit amet tempus leo. Sed rhoncus sem id mi molestie efficitur. Suspendisse egestas sapien non sem eleifend malesuada. In rutrum euismod quam, in feugiat metus pellentesque sed. Donec nec maximus sem, at molestie ante. Phasellus congue ante ac libero pulvinar blandit.\",\n \"Ut sit amet nibh vitae sem molestie scelerisque eu id elit. Nam pulvinar nisl quam, sed imperdiet urna ornare id. Ut massa ex, commodo at ante non, rutrum porttitor leo. Phasellus at risus id ex laoreet mollis ac non odio. Nulla aliquet blandit tempus. Quisque quis condimentum augue, vel venenatis libero. Nunc consequat rutrum congue. Phasellus sem dui, laoreet ut quam vehicula, porttitor semper purus. Donec laoreet tincidunt neque, non pellentesque velit ultricies ut. Etiam porttitor efficitur eleifend. Etiam dui diam, condimentum in quam nec, scelerisque molestie sapien. Proin maximus scelerisque eros, ac scelerisque leo. Vivamus ac neque ut dolor cursus lacinia eu at magna. Nunc imperdiet venenatis ornare. Nulla auctor ex non suscipit pulvinar.\",\n \"Nam ullamcorper odio eu massa iaculis dictum. Integer iaculis lectus quis lectus malesuada rutrum. Ut volutpat, ligula vitae consectetur consequat, massa lacus faucibus felis, vel venenatis tortor dolor et metus. Donec vitae pharetra felis, id interdum mi. Nam est ante, ornare ut volutpat vitae, eleifend a massa. Aenean ac blandit enim, eget accumsan nulla. Duis ac laoreet velit. Cras facilisis hendrerit augue. Praesent tristique pellentesque erat, ac placerat justo ornare vel. Vivamus sodales eleifend risus quis semper. Donec suscipit ullamcorper hendrerit.\",\n \"Sed consectetur, felis at convallis dapibus, orci dui sollicitudin orci, in rutrum nibh nisl et turpis. Duis scelerisque elit quis lorem feugiat, vitae consectetur ex porta. Integer vehicula, lorem facilisis varius dictum, libero lorem imperdiet enim, vel ultrices turpis nunc ac ante. Nunc pellentesque tristique pellentesque. Nulla rhoncus, libero nec blandit tincidunt, magna felis cursus elit, nec volutpat lacus quam nec sapien. Maecenas vitae laoreet risus. Maecenas fermentum in turpis eget eleifend. Morbi ac blandit sem. Phasellus molestie mi at urna tincidunt sagittis. Curabitur id lectus est. Suspendisse vestibulum lacus vitae aliquam aliquet.\",\n \"Morbi non laoreet ex, id mollis orci. Cras hendrerit nec elit sed fringilla. Aenean tincidunt porta quam, eget pretium orci ultricies at. Mauris ut venenatis leo. Ut vulputate purus in nulla sollicitudin, nec posuere nisl semper. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis vehicula orci ac dolor euismod, vitae efficitur sem pellentesque. Aenean laoreet, lectus ultricies tincidunt feugiat, elit enim dictum augue, eget semper diam enim non diam. Etiam lacinia facilisis dapibus. Mauris gravida nulla sit amet felis placerat, nec lacinia metus posuere. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam interdum consectetur tellus, nec aliquam nibh hendrerit a. Aliquam erat volutpat. Integer arcu nisi, commodo in lectus a, venenatis tristique ipsum. Quisque molestie porta cursus. Nulla congue porta dui in mattis.\",\n \"Sed interdum vestibulum eleifend. Fusce porttitor tincidunt augue, at convallis neque rhoncus mollis. Vivamus pretium porta arcu ac blandit. Duis sit amet gravida ipsum, eu faucibus tortor. Curabitur tincidunt, nunc eget accumsan interdum, odio massa eleifend nisl, vel bibendum lorem lacus tincidunt dolor. Cras interdum quam in ullamcorper molestie. Fusce id gravida ligula, at volutpat libero.\",\n \"Nullam non diam ultrices, maximus sapien id, aliquam tortor. Praesent ornare facilisis mi, et pretium tellus eleifend et. Mauris gravida feugiat velit, nec congue mauris ornare a. Vestibulum tincidunt hendrerit erat in venenatis. Nunc dapibus fringilla tempor. Sed semper malesuada tincidunt. Sed accumsan est sit amet ex dignissim auctor. Maecenas sit amet tortor dolor. Maecenas sollicitudin imperdiet erat, ut hendrerit nisl consequat id.\",\n \"Curabitur eu turpis consequat, eleifend mi nec, pellentesque leo. Praesent sollicitudin ac leo a mattis. Phasellus velit dolor, pulvinar semper commodo id, commodo vitae mi. Fusce at magna odio. Curabitur posuere nisl ac porttitor laoreet. Vestibulum non scelerisque augue, sit amet molestie urna. Cras maximus mollis mattis. Vivamus interdum posuere est vitae congue. Nulla lobortis orci et mi pulvinar, nec ullamcorper quam aliquet. Suspendisse facilisis elit leo, et mattis risus tempor in. Quisque id purus eu magna fringilla ullamcorper. Aliquam vel massa nec purus malesuada lobortis. Quisque volutpat, nisi vitae sagittis ullamcorper, lectus eros commodo nisi, vel condimentum ex ante eu tellus. Nulla at accumsan leo, quis porta lorem. Suspendisse ut pharetra sapien. Nulla ut fringilla nibh.\"\n ];\n\n DB::update(\"ALTER TABLE sections AUTO_INCREMENT = 403000;\");\n\n // Policies\n\n $document = Document::create(['type'=>'policy','name'=>'Heathcare Reform', 'short_synopsis'=>'Repeal and replacement of the Affordable Care Act','full_synopsis'=>'A formal replacement for the Affordable Care Act. The first step will be to completely repeal the Act. Then the replacement will be established.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'document_id'=>30001, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Gun Control Overhaul', 'short_synopsis'=>'Establishing limits on certain kind of firearms and establishing a national background check system','full_synopsis'=>'Establishing limits on certain kind of firearms, specifically assault rifles, and banning the sale of accessories that can be used to adapt semi-automatic to act as an automatic. This also establishes a national background check system to provide for approvals within minutes, thereby eliminating the gun show loophole.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'document_id'=>30002, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Local Townhomes CC&amp;R', 'short_synopsis'=>'Establishing new Covenants, Conditions, and Restrictions','full_synopsis'=>'Establishing new Covenants, Conditions, and Restrictions for the local Townhomes Homeowners Association. The current ones are too limiting.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'document_id'=>30002, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'School Board Policies', 'short_synopsis'=>'Establishing new policies for school board meetings.','full_synopsis'=>'Establishing new policies for school board meetings, for both audience participation and from the board members.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'document_id'=>30003, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'PTA Bylaws', 'short_synopsis'=>'Establishing new policies and procedures for the local school PTA','full_synopsis'=>'Establishing new policies and procedures for the local elementary school\\'s Parent Teacher Association, including member expectations and procedures for working with the administration.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Citywide Curfew', 'short_synopsis'=>'Establishing curfews for minors at different age groups','full_synopsis'=>'Establishing curfews for unaccompanied minors. Different age groups will have different curfew times.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Lagging Green Turn Arrows', 'short_synopsis'=>'Curabitur eu turpis consequat, eleifend mi nec, pellentesque leo.','full_synopsis'=>'Nullam non diam ultrices, maximus sapien id, aliquam tortor. Praesent ornare facilisis mi, et pretium tellus eleifend et.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Expansion of Private Concessionaires Inside National Parks', 'short_synopsis'=>'Nulla lobortis orci et mi pulvinar, nec ullamcorper quam aliquet.','full_synopsis'=>'Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis vehicula orci ac dolor euismod, vitae efficitur sem pellentesque. Aenean laoreet, lectus ultricies tincidunt feugiat, elit enim dictum augue, eget semper diam enim non diam.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Shortening the NBA Playoffs Schedule', 'short_synopsis'=>'Integer iaculis lectus quis lectus malesuada rutrum','full_synopsis'=>'Duis vehicula orci ac dolor euismod, vitae efficitur sem pellentesque. Aenean laoreet, lectus ultricies tincidunt feugiat, elit enim dictum augue, eget semper diam enim non diam.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Zoning Laws', 'short_synopsis'=>'Establishing zoning laws for future development in the city','full_synopsis'=>'Updating the zoning laws in the city for all future development. This includes establishing commercial, manufacturing, public-use, and housing sections.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Removal of Pennies as a Currency', 'short_synopsis'=>'Proposal to completely remove pennies from circulation and as a currency','full_synopsis'=>'The time has come for the penny to stop being produced and circulated. It costs more to produce a penny than its worth. Also establish a timeframe for removing from circulation and the calculations for totaling transactions that currently require pennies.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Presidential Primary Elections Overhaul', 'short_synopsis'=>'Presidential primary elections need to be changed to allow all states to equally affect the outcome.','full_synopsis'=>'Presidential primary elections should be on the same days for every state, so as to ensure that every state equally decides the party nominees, rather than states early in the primary cycle having an effect on the candidates remaining for states later in the cycle.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n $document = Document::create(['type'=>'policy','name'=>'Electoral Voting Overhaul', 'short_synopsis'=>'Without abolishing the electoral college, updating the way votes are distrubted.','full_synopsis'=>'The electoral college is a preferred way to elect the President, but it needs to be changed to more fairly distribute the electors, particulary through a weighted distribution of each states electors, based on that state\\'s popular vote.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $this->createSections($document,$content);\n\n\n for($z=1;$z<=10;$z++){\n $document = Document::create(['type'=>'policy','name'=>'Sample Policy '.($z*$z), 'short_synopsis'=>'Curabitur eu turpis consequat, eleifend mi nec, pellentesque leo.','full_synopsis'=>'Morbi non laoreet ex, id mollis orci. Cras hendrerit nec elit sed fringilla. Aenean tincidunt porta quam, eget pretium orci ultricies at.', 'published'=>1, 'public'=>1, 'house_document'=>0, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(10,30).\")\")]);\n $this->createSections($document,$content); \n }\n\n DB::update(\"ALTER TABLE documents AUTO_INCREMENT = 30001;\");\n\n // RFPs\n for($x=0;$x<8;$x++){\n $document = Document::create(['type'=>'rfp', 'name'=>$prefixes[$x].' RFP','short_synopsis'=>'short overview of '.$prefixes[$x].' RFP'.' with quick details about the objective','full_synopsis'=>\"A much longer explanation of the \".$prefixes[$x].\" RFP and what is expected in a response, including specific items that need to be addressed.\",'public'=>1,'published'=>1, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\"), 'submission_cutoff'=>\\DB::raw(\"ADDDATE(NOW(),\".rand(10,30).\")\")]);\n $this->createSections($document,$content);\n $document->child_count=$document->children->count();\n $document->save();\n }\n\n // Questions\n\n $document = Document::create(['type'=>'question','name'=>'Gun Control Questionnaire', 'short_synopsis'=>'Establishing the baseline for views on gun control','full_synopsis'=>'Establishing the baseline for views on gun control', 'published'=>1, 'public'=>1, 'house_document'=>1, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $questions = [\n \"Should guns be completely unregulated?\",\n \"Should citizens be allowed to open-carry firearms?\",\n \"Should citizens be allowed to conceal-carry firearms without a permit?\",\n \"Should citizens be allowed to conceal-carry firearms WITH a permit?\",\n \"Should assault rifles be banned?\",\n ];\n foreach($questions as $index=>$question)\n $section = Section::create(['title'=>'Question '.($index+1), 'content'=>$question, 'document_id'=>$document->id, 'user_id'=>100000, 'display_order'=>($index+1)]);\n\n $document = Document::create(['type'=>'question','name'=>'Abortion Questionnaire', 'short_synopsis'=>'Establishing the baseline for views on abortion','full_synopsis'=>'Establishing the baseline for views on abortion', 'published'=>1, 'public'=>1, 'house_document'=>1, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n $questions = [\n \"Should access to abortions be unregulated?\",\n \"Should abortions be legal in cases where the mother's life is endangered by the pregnancy?\",\n \"If a woman is raped, should she be allowed to get an abortion?\",\n \"If a woman gets impregnated by her husband, should she be allowed to get an abortion?\",\n \"If a woman gets impregnated by her boyfriend, should she be allowed to get an abortion?\",\n \"If a teenaged girl is raped, should she be allowed to get an abortion?\",\n \"If a teenaged girl gets impregnated by her boyfriend, should she be allowed to get an abortion?\",\n \"Should abortions be allowed after 1 month?\",\n \"Should abortions be allowed after 2 month?\",\n \"Should abortions be allowed after 3 month?\",\n \"Should abortions be allowed after 4 month?\",\n \"Should abortions be allowed after 5 month?\",\n \"Should abortions be allowed after 6 month?\",\n ];\n foreach($questions as $index=>$question)\n $section = Section::create(['title'=>'Question '.($index+1), 'content'=>$question, 'document_id'=>$document->id, 'user_id'=>100000, 'display_order'=>($index+1)]);\n\n $document = Document::create(['type'=>'question','name'=>'Healthcare Questionnaire', 'short_synopsis'=>'Establishing the baseline for views on healthcare','full_synopsis'=>'Establishing the baseline for views on healthcare', 'published'=>1, 'public'=>1, 'house_document'=>1, 'published'=>\\DB::raw(\"SUBDATE(NOW(),\".rand(5,10).\")\")]);\n Collaborator::create(['document_id'=>$document->id,'user_id'=>100000,'accepted'=>1,'owner'=>0,'admin'=>0,'editor'=>1,'reviewer'=>1,'viewer'=>1]);\n $questions = [\n \"Should the government be in charge of healthcare?\",\n \"Do you consider any government-run healthcare program to be socialized healthcare?\",\n \"Do you consider the Medicare program to be socialized healthcare?\",\n \"Should the insurance industty be regualted?\",\n \"Should pre-exising conditions be required to be covered by law?\",\n \"Should all children's medical care be covered by a state-sponsored program?\"\n ];\n foreach($questions as $index=>$question)\n $section = Section::create(['title'=>'Question '.($index+1), 'content'=>$question, 'document_id'=>$document->id, 'user_id'=>100000, 'display_order'=>($index+1)]);\n\n // update the sections counts\n foreach(Document::all() as $document){\n $document->section_count = $document->sections->count();\n $document->top_section_count = $document->topLevelSections->count();\n $document->save();\n }\n foreach(Section::all() as $section){\n $section->section_count = Section::where('parent_section_id',$section->id)->count();\n $section->save();\n }\n\n DB::update(\"UPDATE sections SET content = '' WHERE content IS NULL\");\n DB::update(\"UPDATE sections SET staged_content = '' WHERE staged_content IS NULL\");\n DB::update(\"UPDATE sections SET published=NOW(), `staged_title` = `title`, `staged_content` = `content`, `checksum` = MD5(CONCAT(`title`,`content`)), `staged_checksum` = MD5(CONCAT(`staged_title`,`staged_content`))\");\n\n\n }", "title": "" }, { "docid": "c99f97e7a3d4ae5be705e6dcd6201ec5", "score": "0.44028676", "text": "public static function load_font_face(&$params)\n\t{\n\t\n\t\n\t\t// Basic variables\n\t\t$output = '';\n\t\t$app = JFactory::getApplication();\n\t\t$doc = JFactory::getDocument();\n\t\t\n\t\t\t\t\n\t\t// Check if goole fonts are in use\n\t\t$fface1 = ($params->get('general_font_type') == 'custom1' || $params->get('headings_font_type') == 'custom1' || $params->get('menu_font_type') == 'custom1' || $params->get('submenu_font_type') == 'custom1' || $params->get('custom_font_type') == 'custom1' || $params->get('custom1_font_type') == 'custom1' || $params->get('custom2_font_type') == 'custom1');\n\t\t\n\t\t$fface2 = ($params->get('general_font_type') == 'custom2' || $params->get('headings_font_type') == 'custom2' || $params->get('menu_font_type') == 'custom2' || $params->get('submenu_font_type') == 'custom2' || $params->get('custom_font_type') == 'custom2' || $params->get('custom1_font_type') == 'custom2' || $params->get('custom2_font_type') == 'custom2');\n\t\t\n\t\t$fface3 = ($params->get('general_font_type') == 'custom3' || $params->get('headings_font_type') == 'custom3' || $params->get('menu_font_type') == 'custom3' || $params->get('submenu_font_type') == 'custom3' || $params->get('custom_font_type') == 'custom3' || $params->get('custom1_font_type') == 'custom3' || $params->get('custom2_font_type') == 'custom3');\n\t\t\n\t\t\n\t\t// Get font face array\n\t\t$farray = array($fface1, $fface2, $fface3);\n\t\t\n\t\t\n\t\t// Font face base path\n\t\t$ffpath = JURI::root(true) . '/templates/' . $app->getTemplate() . '/fonts/';\n\t\t\n\t\t\t\t\n\t\t// Load font-face\n\t\tif ($fface1 || $fface2 || $fface3)\n\t\t{\t\n\t\t\t$i = 0;\n\t\t\tforeach ($farray as $key=>$ffont)\n\t\t\t{\n\t\t\t\t$i++;\t\t\t\t\n\t\t\t\tif ($ffont)\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t// Define font url's\n\t\t\t\t\t$eot = $ffpath . $params->get('custom_font_eot' . $i, ''); \n\t\t\t\t\t$woff = $ffpath . $params->get('custom_font_woff' . $i, ''); \n\t\t\t\t\t$ttf = $ffpath . $params->get('custom_font_ttf' . $i, '');\n\t\t\t\t\t$svg = $ffpath . $params->get('custom_font_svg' . $i, '');\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$output .='@font-face {';\n\t\t\t\t\n\t\t\t\t\t$output .='font-family: \\'' . $params->get('custom_font_name' . $i) . '\\';';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ($params->get('custom_font_eot' . $i)!='' || \n\t\t\t\t\t\t$params->get('custom_font_woff' . $i)!='' || \n\t\t\t\t\t\t$params->get('custom_font_ttf' . $i)!='' || \n\t\t\t\t\t\t$params->get('custom_font_svg' . $i)!='')\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// IE9 Compat Modes \n\t\t\t\t\t\t$eot ? $output .='src: url(\\'' . $eot . '\\');' : '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$output .= 'src:';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// IE6-IE8\n\t\t\t\t\t\t$eot ? $output .= 'url(\\'' . $eot . '?#iefix\\') format(\\'embedded-opentype\\')' : '';\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Modern Browsers\n\t\t\t\t\t\tif ($woff)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$eot ? $output .= ',' : '';\t\n\t\t\t\t\t\t\t$output .= 'url(\\'' . $woff . '2\\') format(\\'woff2\\'),';\t\t\t\t\t\t\n\t\t\t\t\t\t\t$output .= 'url(\\'' . $woff . '\\') format(\\'woff\\')';\t\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// Safari, Android, iOS \n\t\t\t\t\t\tif ($ttf !='')\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t($eot || $woff) ? $output .= ',' : '';\t\t\t\t\t\t\n\t\t\t\t\t\t\t$output .= 'url(\\'' . $ttf . '\\') format(\\'truetype\\')';\t\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\tif ($svg)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t($eot || $woff || $ttf) ? $output .= ',' : '';\n\t\t\t\t\t\t\t$output .= 'url(\\'' . $svg . '#' . $params->get('custom_font_name' . $i). '\\') format(\\'svg\\')';\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\t\n\t\t\t\t\t\t$output .= ';';\t\t\t\t\t\t\t\n\t\t\t\t\t} // End if font eot, woff, ttf, svg\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$output .='}';\t\t\t\n\t\t\t\t} // End if ffont\n\t\t\t\t\t\t\n\t\t\t} // End foreach\t\n\t\t\t\n\t\t} // End if $fface1 || $fface2 || $fface3\n\t\t\n\t\treturn $output;\n\t\t\t\n\t\n\t}", "title": "" }, { "docid": "c3b8b7f3784a3372d7a8416dfa235e6a", "score": "0.44021446", "text": "function content_formatter($content) {\n\t $bad_content = array('<p></div></p>', '<p><div class=\"full', '_width\"></p>', '</div></p>', '<p><ul', '</ul></p>', '<p><div', '<p><block', 'quote></p>', '<p><hr /></p>', '<p><table>', '<td></p>', '<p></td>', '</table></p>', '<p></div>', 'nosidebar\"></p>', '<p><p>', '<p><a', '</a></p>', '_half\"></p>', '_third\"></p>', '_fourth\"></p>', '<p><p', '</p></p>', 'child\"></p>', '<p></p>');\n\t $good_content = array('</div>', '<div class=\"full', '_width\">', '</div>', '<ul', '</ul>', '<div', '<block', 'quote>', '<hr />', '<table>', '<td>', '</td>', '</table>', '</div>', 'nosidebar\">', '<p>', '<a', '</a>', '_half\">', '_third\">', '_fourth\">', '<p', '</p>', 'child\">', '');\n\t $new_content = str_replace($bad_content, $good_content, $content);\n\t return $new_content;\n\t}", "title": "" }, { "docid": "be998f4c2aa4a8c13378f80e8fd470dd", "score": "0.44007012", "text": "function PdfTrueTypeFont() {\n parent::PdfFont();\n $this->setSubtype(\"TrueType\");\n }", "title": "" }, { "docid": "dffc0f1082962c3bcbae7189d31d619f", "score": "0.43960038", "text": "function AddFont($family,$style='',$file='')\n{\n\t$family=strtolower($family);\n\tif($family=='arial')\n\t\t$family='helvetica';\n\t$style=strtoupper($style);\n\tif($style=='IB')\n\t\t$style='BI';\n\tif(isset($this->fonts[$family.$style]))\n\t\t$this->Error('Font already added: '.$family.' '.$style);\n\tif($file=='')\n\t\t$file=str_replace(' ','',$family).strtolower($style).'.php';\n\tif(defined('FPDF_FONTPATH'))\n\t\t$file=FPDF_FONTPATH.$file;\n\t//include($file);\n\t//if(!isset($name))\n\t//\t$this->Error('Could not include font definition file');\n\t$i=count($this->fonts)+1;\n\t$this->fonts[$family.$style]=array('i'=>$i,'type'=>$type,'name'=>$name,'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw,'enc'=>$enc,'file'=>$file);\n\tif($diff)\n\t{\n\t\t//Search existing encodings\n\t\t$d=0;\n\t\t$nb=count($this->diffs);\n\t\tfor($i=1;$i<=$nb;$i++)\n\t\t\tif($this->diffs[$i]==$diff)\n\t\t\t{\n\t\t\t\t$d=$i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tif($d==0)\n\t\t{\n\t\t\t$d=$nb+1;\n\t\t\t$this->diffs[$d]=$diff;\n\t\t}\n\t\t$this->fonts[$family.$style]['diff']=$d;\n\t}\n\tif($file)\n\t{\n\t\tif($type=='TrueType')\n\t\t\t$this->FontFiles[$file]=array('length1'=>$originalsize);\n\t\telse\n\t\t\t$this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2);\n\t}\n}", "title": "" }, { "docid": "1ecbb89170658355c0f4d45a6e1abb30", "score": "0.4381337", "text": "function SetNormalTextFontName($value){}", "title": "" }, { "docid": "270c9a246ea9a66833dda2721d23bf26", "score": "0.43751767", "text": "public function getFontFamilies($occurrence);", "title": "" }, { "docid": "ec4f60877740dcbd8018670183f79eff", "score": "0.43560028", "text": "public function clean_texts() {\n\n if ($this->version->code < mlang_version::MOODLE_20) {\n $format = 1;\n } else {\n $format = 2;\n }\n\n foreach ($this->get_iterator() as $string) {\n $string->clean_text($format);\n }\n }", "title": "" }, { "docid": "efd5e625f6a8f38f1cf672843eaf071b", "score": "0.43550307", "text": "function bold($input){\n\t\t//This will make everything bold!\n\t\techo \"<strong> $input </strong>\";\n\t}", "title": "" }, { "docid": "0d1b4b7a4d5b4b8a79adcc539a9927ca", "score": "0.43451524", "text": "public function add_editor_styles() {\n\t\t$font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Lato:300,400,700' );\n\t\tadd_editor_style( $font_url );\n\t}", "title": "" }, { "docid": "af5236c41f09eb37c7cf25a7ac733837", "score": "0.43242416", "text": "function onStartSaveNewNoticeWeb($action, $user, &$content, &$options)\n {\n $content = htmlspecialchars($content);\n $options['rendered'] = preg_replace(\"/(^|\\s|-)((?:awesome|awesomeness)[\\?!\\.\\,]?)(\\s|$)/i\", \" <b>$2</b> \", $content);\n }", "title": "" } ]
b963603ae1b1b27190c64496ed84dca3
Applies the Activity filter to SubStatements.
[ { "docid": "e75c4bf1813ac90a4326d442f868a86c", "score": "0.39096096", "text": "public function enableRelatedActivityFilter(): self\n {\n $this->filter['related_activities'] = 'true';\n\n return $this;\n }", "title": "" } ]
[ { "docid": "be65c457634d582877a5a5243f3d416f", "score": "0.46612793", "text": "public function execute() {\n\n // Find activity_included_setting\n if (!$this->get_setting_value('included')) {\n $this->log('activity skipped by _included setting', backup::LOG_DEBUG, $this->name);\n $this->plan->set_excluding_activities(); // Inform plan we are excluding actvities\n\n } else { // Setting tells us it's ok to execute\n parent::execute();\n }\n }", "title": "" }, { "docid": "0f4b72f8069a48f71729ed768be39cb7", "score": "0.4588693", "text": "function bp_mpo_activity_filter( $a, $activities ) {\n\tglobal $bp;\n\n\tif ( is_super_admin() )\n\t\treturn $activities;\n\n\tforeach ( $activities->activities as $key => $activity ) {\n\t\tif ( $activity->type == 'new_blog_post' || $activity->type == 'new_blog_comment' ) {\n\n\t\t\t$current_user = $bp->loggedin_user->id;\n\n\t\t\t// Account for bp-groupblog\n\t\t\tif ( $activity->component == 'groups' ) {\n\t\t\t\t$group_id = $activity->item_id;\n\t\t\t\t$blog_id = groups_get_groupmeta( $group_id, 'groupblog_blog_id' );\n\t\t\t} else {\n\t\t\t\t$blog_id = $activity->item_id;\n\t\t\t}\n\n\t\t\t$privacy = get_blog_option( $blog_id, 'blog_public' );\n\n\t\t\t$remove_from_stream = false;\n\n\t\t\tswitch ( $privacy ) {\n\t\t\t\tcase '1':\n\t\t\t\t\tcontinue;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '0':\n\t\t\t\t\tif ( $current_user != 0 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase '-1':\n\t\t\t\t\tif ( $current_user != 0 )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '-2':\n\t\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t\t$meta_key = 'wp_' . $blog_id . '_capabilities';\n\t\t\t\t\t\t$caps = get_user_meta( $current_user, $meta_key, true );\n\n\t\t\t\t\t\tif ( !empty( $caps ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '-3':\n\t\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t\tswitch_to_blog( $blog_id );\n\n\t\t\t\t\t\t$user = new WP_User( $current_user );\n\n\t\t\t\t\t\tif ( in_array( 'administrator', $user->roles ) )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trestore_current_blog();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$remove_from_stream = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( $remove_from_stream ) {\n\t\t\t\t$activities->activity_count = $activities->activity_count - 1;\n\t\t\t\tunset( $activities->activities[$key] );\n\n\t\t\t}\n\t\t}\n\t}\n\n\t$activities_new = array_values( $activities->activities );\n\t$activities->activities = $activities_new;\n\n\treturn $activities;\n}", "title": "" }, { "docid": "96bb5201e6d9b18775dcaee228da12aa", "score": "0.45685697", "text": "public function activateQueryableSubmenus()\n {\n add_filter('wp_nav_menu_objects', array($this, 'filterSubNavObjects'), 10, 2);\n }", "title": "" }, { "docid": "98d30a009ee625be8fc4c13100eeaa19", "score": "0.45070013", "text": "public function applyFilters() {\n\t\tforeach ($this->filters as $filter) {\n\t\t\t$filter->apply($this);\n\t\t}\n\t\t$this->removeFilters();\n\t}", "title": "" }, { "docid": "f3492a8dfafb5ac1350b648b4943c4a6", "score": "0.44568944", "text": "protected function loadSubQueries()\n {\n foreach ($this->subQueries as $subQuery) {\n $subQuery($this->tableQuery);\n }\n }", "title": "" }, { "docid": "d0ecd73baea23fd3003f01c8ceb299bc", "score": "0.4455624", "text": "public function applyFilter(Collection $models, $filter)\n {\n return $models->when($filter === 'self',\n fn ($models) => $models->whereIn('transaction_owner', ['self', '--'])\n )\n ->when($filter !== 'self',\n fn($models) => $models->where('transaction_owner', '=', $filter)\n );\n }", "title": "" }, { "docid": "ec178c5efe6cc690e9728da87521f07b", "score": "0.44138104", "text": "protected function consolidate(HTMLView $subView){\n\t \n }", "title": "" }, { "docid": "2bb1395d829c5320399b1a14c37c46a5", "score": "0.44049972", "text": "public function processFilter()\n {\n call_user_func($this->builder, $this);\n\n return $this->filter->execute();\n }", "title": "" }, { "docid": "73eea9b961de81d7192d076678d96e71", "score": "0.43395185", "text": "public function subSelect(){\n try {\n // Sparql11query.g:620:3: ( project whereClause solutionModifier ) \n // Sparql11query.g:621:3: project whereClause solutionModifier \n {\n $this->pushFollow(self::$FOLLOW_project_in_subSelect2248);\n $this->project();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_whereClause_in_subSelect2250);\n $this->whereClause();\n\n $this->state->_fsp--;\n\n $this->pushFollow(self::$FOLLOW_solutionModifier_in_subSelect2252);\n $this->solutionModifier();\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 }", "title": "" }, { "docid": "0375b95db4b37fb5aba1fae26083fe27", "score": "0.4320734", "text": "public function filterAfterAll($filter);", "title": "" }, { "docid": "580045397046c02ae9571a621f0eba14", "score": "0.42759904", "text": "function show_filter_unique_activities($where = '')\n\t\t{\n\t\t\t\n\t\t\t//do not forget the false to avoid unnecessary queries\n\t\t\t\t$unique_activities = $this->process_monitor->monitor_list_activities(0, -1, 'wf_name__desc', '', $where, false);\n\t\t\t\t\n\t\t\t//echo \"unique_activities: <pre>\";print_r($unique_activities);echo \"</pre>\";\n\t\t\t\n\t\t\t$this->t->set_var('filter_activity_selected_all', (!$this->filter_activity)? 'selected=\"selected\"' : '');\n\t\t\t$this->t->set_block($this->template_name, 'block_filter_activity', 'filter_activity');\n\t\t\tforeach ($unique_activities['data'] as $activity)\n\t\t\t{\n\t\t\t\t$this->t->set_var(array(\n\t\t\t\t\t'filter_activity_selected'\t=> ($activity['wf_activity_id'] == $this->filter_activity)? 'selected=\"selected\"' : '',\n\t\t\t\t\t'filter_activity_value'\t\t=> $activity['wf_activity_id'],\n\t\t\t\t\t'filter_activity_name'\t\t=> $activity['wf_name'].' ('.$activity['wf_procname']. ' '.$activity['wf_version'].')'\n\t\t\t\t));\n\t\t\t\t$this->t->parse('filter_activity', 'block_filter_activity', true);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f4af66098d97a5a319f1d79cb046d677", "score": "0.42386204", "text": "function cd_ab_rel_activity_filter( $action, $activity ) {\n\tswitch ( $activity->component ) {\n\t\tcase 'groups' :\n\t\t\t$cd_ab = get_blog_option( bp_get_root_blog_id(), 'cd_ab' );\n\t\t\tif ( $cd_ab['groups']['status'] === 'on' ) {\n\t\t\t\t$reverse_content = strrev( $action );\n\t\t\t\t$position = strpos( $reverse_content, 'gmi<' );\n\t\t\t\tpreg_match( '~group-(\\d++)-avatar~', $action, $match );\n\t\t\t\t$replace = \"rel='group_{$match[1]}' \";\n\t\t\t\t$action = substr_replace( $action, $replace, - $position + 1, 0 );\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn $action;\n}", "title": "" }, { "docid": "827a6380279f3a0cae3cc084925b7095", "score": "0.4214394", "text": "function render_subsubsub( $all_count, $my_count ) {\n\t\t$current_user = wp_get_current_user();\n\t\t$all_url = $this->current_request_with_params( \n\t\t\t\tarray('attendee' => 0 ) );\n\t\t$my_url = $this->current_request_with_params( \n\t\t\t\tarray('attendee' => $current_user->ID ) );\n\n\t\t$all_class = \"current\";\n\t\t$attended_class = \"\";\n\t\tif (array_key_exists('attendee', $_GET) && $_GET[\"attendee\"] && $_GET[\"attendee\"] == $current_user->ID) {\n\t\t\t$all_class = \"\";\n\t\t\t$attended_class = \"current\";\n\t\t} \n?>\n\n\t\t<ul class=\"subsubsub\">\n\t\t\t<li class=\"all\">\n\t\t\t\t<a class=\"<?php echo $all_class;?>\" href=\"<?php echo $all_url; ?>\">All\n\t\t\t\t\t<span class=\"count\">(<?php echo $all_count; ?>)</span>\n\t\t\t\t</a>\n\t\t\t\t|\n\t\t\t</li>\n\t\t\t<li class=\"attended\">\n\t\t\t\t<a class=\"<?php echo $attended_class; ?>\" href=\"<?php echo $my_url; ?>\">Attended By \n<?php\n\t\t\techo $current_user->display_name;\n?>\n\t\t\t\t\t<span class=\"count\">(<?php echo $my_count; ?>)</span>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n<?php\n\t}", "title": "" }, { "docid": "415d5dc0231e74e6580efc868c8ed177", "score": "0.4153149", "text": "public function addCurrentFilter()\n {\n $this->addIsActiveFilter();\n $now = (new \\DateTime('now', new \\DateTimeZone('UTC')))\n ->format(\\Magento\\Framework\\Stdlib\\DateTime::DATETIME_PHP_FORMAT);\n $this->getSelect()\n ->where(\n \"(main_table.active_from <= '$now' OR isnull(main_table.active_from)) AND \" .\n \" ('$now' <= main_table.active_to OR isnull(main_table.active_to))\");\n\n return $this;\n }", "title": "" }, { "docid": "a74d7cb6aad4840034e57928ecb46a64", "score": "0.41402882", "text": "private function filterByPermission(){\n\n }", "title": "" }, { "docid": "f44a175272348697bbcb59921cb49f08", "score": "0.4137953", "text": "function bpfit_walk_subtab_function_to_show_content() {\n\t\t\tinclude 'profile-menu/walk/bpfit-my-walk.php';\n\t\t}", "title": "" }, { "docid": "5248ca2bbe8a507971797e98afca9b58", "score": "0.41281956", "text": "public function byActivity(Activity $activity): self\n {\n $this->filter['activity'] = $activity->getId()->getValue();\n\n return $this;\n }", "title": "" }, { "docid": "76b938c551a97b2cb9df88d21d7ad056", "score": "0.4108536", "text": "public function applyFilterReport() {\n\t\t$this->table->writeFilterToSession();\n\t\t$this->table->resetOffset();\n\t\t$this->report();\n\t}", "title": "" }, { "docid": "938bbaad42a1fb0728e087deb70abf82", "score": "0.40999237", "text": "private function _applyEditableParam()\n {\n if ($this->editable) {\n // Limit the query to only the global sets the user has permission to edit\n $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds();\n $this->subQuery->andWhere(['elements.id' => $editableSetIds]);\n }\n }", "title": "" }, { "docid": "938bbaad42a1fb0728e087deb70abf82", "score": "0.40999237", "text": "private function _applyEditableParam()\n {\n if ($this->editable) {\n // Limit the query to only the global sets the user has permission to edit\n $editableSetIds = Craft::$app->getGlobals()->getEditableSetIds();\n $this->subQuery->andWhere(['elements.id' => $editableSetIds]);\n }\n }", "title": "" }, { "docid": "268cbefb54ef252f8531243520aa1e22", "score": "0.40685344", "text": "protected function applyFiltering()\n\t{\n\t\tif (!$this->hasFilters()) return;\n\n\t\tparse_str($this->filters, $list);\n\t\tforeach ($list as $column => $value) {\n\t\t\tif ($value !== '') {\n\t\t\t\t$this[$column]->applyFilter($value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "144d9ab7daed9e8b40b93d824d6f254b", "score": "0.4047504", "text": "private function filters() {\n\n\n\t}", "title": "" }, { "docid": "e94564fe883863b3c5b2b1e8ac97bd48", "score": "0.40428495", "text": "protected function applySqlStyleFilters(): self\n {\n $parsedStatements = $this->getParsedSqlFilters();\n\n if (empty($parsedStatements[1])) {\n return $this;\n }\n\n foreach ($parsedStatements[1] as $index => $statement) {\n $booleanOperator = $parsedStatements[2][$index - 1] ?? null;\n if ($this->isCombinedStatement($statement)) {\n $this->applyCombinedSqlStatement($statement, $booleanOperator);\n continue;\n }\n\n $this->applySqlStatement($statement, $booleanOperator);\n }\n\n return $this;\n }", "title": "" }, { "docid": "3fcae19efc0d868662e2421fb7aa1de3", "score": "0.40230545", "text": "public function searchSubContent()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set branch to search to a variable.\n $branch = $this->getSearchBranch();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields, $branch);\n }", "title": "" }, { "docid": "3910bd168d2b6133e71b6de2936cee8d", "score": "0.39535004", "text": "protected function ancestorsFetchConditions()\r\n {\r\n $filter_parent = $this->getState('filter.parent');\r\n if (!empty($filter_parent))\r\n {\r\n $this->setCondition('parent', new \\MongoId((string) $filter_parent));\r\n }\r\n \r\n $filter_path = $this->getState('filter.path');\r\n if (strlen($filter_path))\r\n {\r\n // if the path doesn't begin with /, prefix it with a /\r\n if (substr($filter_path, 0, 1) !== '/')\r\n {\r\n $filter_path = '/' . $filter_path;\r\n }\r\n $this->setCondition('path', $filter_path);\r\n }\r\n \r\n $filter_path_begins_with = $this->getState('filter.path_begins_with');\r\n if ($filter_path_begins_with && is_string($filter_path_begins_with))\r\n {\r\n $key = new \\MongoRegex('/^'.$filter_path_begins_with.'/i');\r\n \r\n $this->setCondition('path', $key);\r\n }\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "04800386ce16fefac8ce259d9f317c63", "score": "0.39480358", "text": "function sub_activity_list(){\n\t\t$this->load->model('operations_model'); \n $data['sub_activity_list']=$this->operations_model->display_activity($id);\n\t\t$this->load->view('sub_activity_list',$data);\n\t\t}", "title": "" }, { "docid": "33b25c50ad656e40c94d48ab6d5e9097", "score": "0.39480242", "text": "public function addAvailableScheduleFilter()\n {\n $this->addIsActiveFilter();\n $now = (new \\DateTime('now', new \\DateTimeZone('UTC')))\n ->format(\\Magento\\Framework\\Stdlib\\DateTime::DATETIME_PHP_FORMAT);\n $this->getSelect()\n ->where(\"('$now' <= main_table.active_to OR isnull(main_table.active_to))\");\n\n return $this;\n }", "title": "" }, { "docid": "988750a052f96a6b07857c1e3d4a82ef", "score": "0.39363068", "text": "public function filterBySub($sub = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($sub)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $sub)) {\n $sub = str_replace('*', '%', $sub);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(MenuTableMap::COL_SUB, $sub, $comparison);\n }", "title": "" }, { "docid": "9e244d0cbc84d85d3bdbb4e33cd76043", "score": "0.392367", "text": "public function enableRecursiveFilters()\n {\n $this->enableRecursiveFilters = true;\n }", "title": "" }, { "docid": "8f96d9fe96cabe779ea2659bcbcea071", "score": "0.39139852", "text": "private function modifyQuery($query, $tasksTable, $casesTable, $tpTable, $filteredTasksTable = false, $args)\n\t{\n\t\t$type = 'default';\n\t\tif (!empty($args['type'])) {\n\t\t\t$type = $args['type'];\n\t\t}\n\n\t\t$query->whereNested(function ($query) use ($tasksTable, $casesTable, $tpTable, $filteredTasksTable, $args) {\n\t\t\tif (!empty($args['addConditions'])) {\n\t\t\t\t$args['addConditions']($query);\n\t\t\t}\n\n\t\t\tif ($tasksTable) {\n\t\t\t\tif (count($this->fields->assignee)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignee_id\", $this->fields->assignee);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->assignor)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignor_id\", $this->fields->assignor);\n\t\t\t\t}\n\t\t\t\tif ($this->fields->surveystatus !== false) {\n\t\t\t\t\t$query->where(\"{$tasksTable}.status\", '=', $this->fields->surveystatus);\n\t\t\t\t}\n\t\t\t\tif (!$casesTable) {\n\t\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t\t$query->whereIn(\"{$tasksTable}.case_id\", $this->fields->caseid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($casesTable) {\n\t\t\t\tif ($this->fields->casestatus !== false) {\n\t\t\t\t\t$query->where(\"{$casesTable}.status\", '=', $this->fields->casestatus);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->patient)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.patient_id\", $this->fields->patient);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tp)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.treatment_path_id\", $this->fields->tp);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tpstep)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.step_id\", $this->fields->tpstep);\n\t\t\t\t}\n\n\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.id\", $this->fields->caseid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($tpTable) {\n\t\t\t\tif (count($this->fields->cp)) {\n\t\t\t\t\t$query->whereIn(\"{$tpTable}.clinical_path_id\", $this->fields->cp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($filteredTasksTable) {\n\t\t\t\t$query->whereNotNull(\"{$filteredTasksTable}.id\");\n\t\t\t}\n\t\t});\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "152852970ece248d0db50abfdcbe7477", "score": "0.39073217", "text": "function prepareActivityLogs() {\n $activity_logs_table = TABLE_PREFIX . 'activity_logs';\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n\n try {\n DB::execute(\"ALTER TABLE $activity_logs_table CHANGE object_id parent_id int(11) unsigned not null default '0'\");\n DB::execute(\"ALTER TABLE $activity_logs_table DROP project_id\");\n DB::execute(\"ALTER TABLE $activity_logs_table DROP comment\");\n DB::execute(\"ALTER TABLE $activity_logs_table ADD parent_type varchar(50) not null default '' after type\");\n DB::execute(\"ALTER TABLE $activity_logs_table ADD raw_additional_properties longtext null default null after created_by_email\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n try {\n DB::beginWork('Updating parent_type field value for activity logs');\n\n // We don't need this in activity log... Irrelevant\n DB::execute(\"DELETE FROM $activity_logs_table WHERE type IN (?)\", array(\n 'CommentsLockedActivityLog',\n 'CommentsUnlockedActivityLog',\n 'ObjectUpdatedActivityLog',\n 'TicketStatusUpdatedActivityLog', // @TODO\n ));\n\n $parent_ids = DB::executeFirstColumn(\"SELECT DISTINCT parent_id FROM $activity_logs_table\");\n if(is_foreachable($parent_ids)) {\n $project_object_rows = DB::execute(\"SELECT id, type FROM $project_objects_table WHERE id IN (?)\", $parent_ids);\n\n if(is_foreachable($project_object_rows)) {\n $type_map = array();\n foreach($project_object_rows as $row) {\n if(!isset($type_map[$row['type']])) {\n $type_map[$row['type']] = array();\n } // if\n\n $type_map[$row['type']][] = (integer) $row['id'];\n } // foreach\n\n foreach($type_map as $type => $ids) {\n DB::execute(\"UPDATE $activity_logs_table SET parent_type = ? WHERE parent_id IN (?)\", $type, $ids);\n } // foreach\n } // if\n } // if\n\n // Clean up\n DB::execute(\"DELETE FROM $activity_logs_table WHERE parent_type = ''\");\n\n DB::commit('Parent type value for activity logs updated');\n } catch(Exception $e) {\n DB::rollback('Failed to update parent type activity logs');\n return $e->getMessage();\n } // try\n\n try {\n DB::execute(\"ALTER TABLE $activity_logs_table ADD INDEX (parent_type, parent_id)\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "title": "" }, { "docid": "62365db416fc500c1144f00110813f90", "score": "0.39033604", "text": "public function filter() {\n\t $this->model->filter(array(\"status\"=>array(0,1)));\n\t if(Request::post(\"section\")){\n\t $section = new CmsSection(Request::post(\"section\"));\n\t foreach($section->tree() as $section) $section_ids[] = $section->primval;\n\t $this->model->filter(array(\"cms_section_id\"=>$section_ids));\n }\n\t parent::filter();\n\t}", "title": "" }, { "docid": "821d753b3548da3a90454fc55865c025", "score": "0.38928708", "text": "private function _applyFilter($filter)\n\t{\n\t\tglobal $context, $scripturl;\n\n\t\tif (isset($filter['variable']))\n\t\t{\n\t\t\t$context['filter'] = &$filter;\n\n\t\t\t// Set the filtering context.\n\t\t\tswitch ($filter['variable'])\n\t\t\t{\n\t\t\t\tcase 'id_member':\n\t\t\t\t\t$id = $filter['value']['sql'];\n\t\t\t\t\tMembersList::load($id, false, 'minimal');\n\t\t\t\t\t$name = MembersList::get($id)->real_name;\n\t\t\t\t\t$context['filter']['value']['html'] = '<a href=\"' . getUrl('profile', ['action' => 'profile', 'u' => $id, 'name' => $name]) . '\">' . $name . '</a>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'url':\n\t\t\t\t\t$context['filter']['value']['html'] = '\\'' . strtr(htmlspecialchars((substr($filter['value']['sql'], 0, 1) === '?' ? $scripturl : '') . $filter['value']['sql'], ENT_COMPAT, 'UTF-8'), array('\\_' => '_')) . '\\'';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'message':\n\t\t\t\t\t$context['filter']['value']['html'] = '\\'' . strtr(htmlspecialchars($filter['value']['sql'], ENT_COMPAT, 'UTF-8'), array(\"\\n\" => '<br />', '&lt;br /&gt;' => '<br />', \"\\t\" => '&nbsp;&nbsp;&nbsp;', '\\_' => '_', '\\\\%' => '%', '\\\\\\\\' => '\\\\')) . '\\'';\n\t\t\t\t\t$context['filter']['value']['html'] = preg_replace('~&amp;lt;span class=&amp;quot;remove&amp;quot;&amp;gt;(.+?)&amp;lt;/span&amp;gt;~', '$1', $context['filter']['value']['html']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'error_type':\n\t\t\t\t\t$context['filter']['value']['html'] = '\\'' . strtr(htmlspecialchars($filter['value']['sql'], ENT_COMPAT, 'UTF-8'), array(\"\\n\" => '<br />', '&lt;br /&gt;' => '<br />', \"\\t\" => '&nbsp;&nbsp;&nbsp;', '\\_' => '_', '\\\\%' => '%', '\\\\\\\\' => '\\\\')) . '\\'';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$context['filter']['value']['html'] = &$filter['value']['sql'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "39942d4eae1cf7e07e3dd1f083e7290a", "score": "0.38820386", "text": "protected function applyCriteria(){\n\n if( $this->skipCriteria === true )\n return $this;\n\n $criteria = $this->getCriteria();\n\n foreach($criteria as $c){\n if( $c instanceof Criteria ){\n $this->query = $c->apply($this->query, $this);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "ccf2f04d196421d70f20e7b42461a491", "score": "0.38642308", "text": "public function incrementSubQueryIndex(): void\n {\n $this->subQueryIndex++;\n }", "title": "" }, { "docid": "26f51f900023c2a97ef076b001f6e9d1", "score": "0.38633543", "text": "abstract public function filters();", "title": "" }, { "docid": "8ead1eaea67c7b6cf71baf9e29733572", "score": "0.38518497", "text": "public function listStaffIdActivityHasFilter($companyId, $departmentId = null, $level = 100)\n {\n $hFunction = new \\Hfunction();\n $modelStaffWorkDepartment = new QcStaffWorkDepartment();\n #mac dinh chon het cap bac\n $getAllLevel = $this->getDefaultAllLevel();\n # theo bo phan va cap bac\n if (!$hFunction->checkEmpty($departmentId) && $level < $getAllLevel) {\n $listWorkId = $modelStaffWorkDepartment->workIdActivityOfDepartment($departmentId);\n return QcCompanyStaffWork::where('company_id', $companyId)->whereIn('work_id', $listWorkId)->where('level', $level)->where('action', $this->getDefaultHasAction())->pluck('staff_id');\n } elseif (!$hFunction->checkEmpty($departmentId) && $level == $getAllLevel) { # theo bo phan va ko can cap bac\n $listWorkId = $modelStaffWorkDepartment->workIdActivityOfDepartment($departmentId);\n return QcCompanyStaffWork::where('company_id', $companyId)->whereIn('work_id', $listWorkId)->where('action', $this->getDefaultHasAction())->pluck('staff_id');\n } elseif ($hFunction->checkEmpty($departmentId) && $level < $getAllLevel) { # theo cap bat, khong phan biet bo phan\n return QcCompanyStaffWork::where('company_id', $companyId)->where('level', $level)->where('action', $this->getDefaultHasAction())->pluck('staff_id');\n } else {\n return QcCompanyStaffWork::where('company_id', $companyId)->where('action', $this->getDefaultHasAction())->pluck('staff_id');\n }\n }", "title": "" }, { "docid": "afbef3cbd57266b937f33ce7c75103d2", "score": "0.38451266", "text": "protected function applySiteConditions()\n {\n if ($this->site !== null) {\n $this->andWhere(Db::parseParam('siteId', $this->parseSiteValue($this->site)));\n }\n }", "title": "" }, { "docid": "a589ff7fa93fed189d42d6fb3376cb91", "score": "0.38412845", "text": "public function applyFilterSelect(Filter\\FilterSelect $filter)\n\t{\n\t\tforeach ($filter->getCondition() as $column => $value) {\n\t\t\t$expr = Criteria::expr()->eq($column, $value);\n\t\t\t$this->criteria->andWhere($expr);\n\t\t}\n\t}", "title": "" }, { "docid": "3f55906a18e60316bf22391715ce6766", "score": "0.3840779", "text": "protected function filterItems()\n\t{\n\t\t// must be in this order\n\t\t$this->applyDefaultFiltering();\n\t\t$this->applyDefaultSorting();\n\t\t$this->applyItems();\n\t\t$this->applyFiltering();\n\t\t$this->applySorting();\n\t\t$this->applyPaging();\n\t}", "title": "" }, { "docid": "f0546c36ae906446e27f2004a2999ab1", "score": "0.38323116", "text": "public function testFilterValidSubresources()\n\t{\n\t\t$parameters = array(\n\t\t\t\"acl\",\n\t\t\t\"versionId=3\",\n\t\t\t\"lifecycle=inf\",\n\t\t\t\"invalidParameter\",\n\t\t\t\"invalidParameter=value\"\n\t\t);\n\t\t$validParameters = array(\n\t\t\t\"acl\",\n\t\t\t\"versionId=3\",\n\t\t\t\"lifecycle=inf\",\n\t\t);\n\n\t\t$this->assertThat(\n\t\t\t$this->object->filterValidSubresources($parameters),\n\t\t\t$this->equalTo($validParameters)\n\t\t);\n\t}", "title": "" }, { "docid": "6fc24d239c7232efb3844be53ac158a9", "score": "0.3827453", "text": "public function testApply() {\n\t\t$group = new Group();\n\t\t$group->add($this->_paths['testClassTest']);\n\t\t$this->report->group = $group;\n\n\t\tComplexity::apply($this->report, $group->tests());\n\n\t\t$results = array_pop($this->report->results['filters'][$this->_paths['complexity']]);\n\t\t$expected = [$this->_paths['testClass'] => $this->_metrics];\n\t\t$this->assertEqual($expected, $results);\n\n\t\tFilters::clear($group);\n\t}", "title": "" }, { "docid": "e20f242a375aaa8249e1e523f5ee04d6", "score": "0.38267413", "text": "private function getParentFilter() {\n if($this->parent_filter === false) {\n $project_objects = DB::execute(\"SELECT id, LOWER(type) AS 'type' FROM \" . TABLE_PREFIX . \"project_objects WHERE project_id = ?\", $this->object->getId());\n if($project_objects) {\n $parents_by_type = array();\n \n foreach($project_objects as $project_object) {\n $type = $project_object['type'];\n \n if(isset($parents_by_type[$type])) {\n $parents_by_type[$type][] = $project_object['id'];\n } else {\n $parents_by_type[$type] = array($project_object['id']);\n } // if\n } // foreach\n \n foreach($parents_by_type as $type => $ids) {\n $parents_by_type[$type] = DB::prepare('(parent_type = ? AND parent_id IN (?))', $type, $ids);\n } // foreach\n \n $subtasks = DB::execute(\"SELECT id, LOWER(type) AS 'type' FROM \" . TABLE_PREFIX . 'subtasks WHERE ' . implode(' OR ', $parents_by_type));\n if($subtasks) {\n foreach($subtasks as $subtask) {\n $type = $subtask['type'];\n\n if(isset($parents_by_type[$type])) {\n $parents_by_type[$type][] = $subtask['id'];\n } else {\n $parents_by_type[$type] = array($subtask['id']);\n } // if\n } // foreach\n \n foreach($parents_by_type as $type => $ids) {\n if(is_array($ids)) {\n $parents_by_type[$type] = DB::prepare('(parent_type = ? AND parent_id IN (?))', $type, $ids);\n } // if\n } // foreach\n } // if\n \n $this->parent_filter = implode(' OR ', $parents_by_type);\n } else {\n $this->parent_filter = '';\n } // if\n } // if\n \n return $this->parent_filter;\n }", "title": "" }, { "docid": "94ae5d78e3d47e5115760c5339445a68", "score": "0.38264", "text": "public function runFilter( array $context )\n {\n foreach ( $context as $element )\n {\n if ( $element->status !== ezcTranslationData::TRANSLATED )\n {\n $element->translation = self::borkify( $element->original );\n }\n }\n }", "title": "" }, { "docid": "add15e53d9f4dbb5b7f51d6366db8b3f", "score": "0.3825388", "text": "public function applyFilter(Query $query);", "title": "" }, { "docid": "40bf2f6f4ab660a43785899bbb8f70af", "score": "0.38168445", "text": "public function filtering();", "title": "" }, { "docid": "1ab8db5d2b535f1253e9095b528e980b", "score": "0.38082424", "text": "protected abstract function filter();", "title": "" }, { "docid": "db4a7bd82de94d30fcf73feef115f18f", "score": "0.38032642", "text": "public function filter() {\r\n\t\t$this->resource->filter();\r\n\t}", "title": "" }, { "docid": "dc5647f2a530d42b4d725276517a369e", "score": "0.37952885", "text": "private function filterLevels()\n {\n if(empty($this->levels)) {\n return;\n }\n\n $this->query->andWhere(['IN', 'level', $this->levels]);\n }", "title": "" }, { "docid": "4d12151ef3ce3405a32f890596119680", "score": "0.37905633", "text": "private function addRightsClauseFilter() {\r\n\t\t\t// Add rights clause\r\n\t\t$this->addRightsFilter('rights', '');\r\n\r\n\t\t\t// Add status filter\r\n\t\tif( ! TodoyuAuth::isAdmin() ) {\r\n\t\t\t$statusIDs\t= TodoyuProjectProjectStatusManager::getStatusIDs();\r\n\t\t\tif( sizeof($statusIDs) > 0 ) {\r\n\t\t\t\t$statusList = implode(',', $statusIDs);\r\n\t\t\t\t$this->addRightsFilter('status', $statusList);\r\n\t\t\t} else {\r\n\t\t\t\t$this->addRightsFilter('Not', 0);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ceba668a4ef103eb26e981f01d547c00", "score": "0.37854943", "text": "public function generateQueries($update = false, $filterModelName = null, $recursive = false) {\n\t\tif (!is_null($filterModelName) && !$recursive) {\n\t\t\t// verify if model exists\n\t\t\tModelManager::getInstance()->getInstanceModel($filterModelName);\n\t\t}\n\t\t$projectModelNames = $this->getValidatedProjectModelNames($filterModelName, $recursive);\n\t\tModelUtils::sortModelNamesByInheritance($projectModelNames);\n\t\t\n\t\t$filterSqlTables = null;\n\t\t$foreignKeys = [];\n\t\t$errorSqlTables = [];\n\t\t\n\t\tif (!is_null($filterModelName)) {\n\t\t\t$filterSqlTables = $this->getFilterSqlTables($projectModelNames, $filterModelName, $recursive);\n\t\t}\n\t\t$tablesInfos = $this->getTablesInformations(\n\t\t\t$projectModelNames,\n\t\t\t$filterSqlTables,\n\t\t\t$update,\n\t\t\t$foreignKeys,\n\t\t\t$errorSqlTables\n\t\t);\n\t\treturn $this->buildDatabaseQueries($tablesInfos, $foreignKeys, $errorSqlTables);\n\t}", "title": "" }, { "docid": "0e496045224d0e198c73923639586b6e", "score": "0.37587786", "text": "public function sub_combine_c() {\n\t\t\n\t\techo 'Subchild begin-bring from childclass-> '.parent::combine_child().' <-subchild end';\n\t}", "title": "" }, { "docid": "9ba6afff2be036391535545e5def7b9b", "score": "0.37534493", "text": "function _filter_block_content_callback($matches)\n {\n }", "title": "" }, { "docid": "1b87b48774b6a12b4b30a98e641be7ca", "score": "0.37497076", "text": "public function activities()\n {\n return $this->morphMany(Config::get('auditing.activity'), 'auditable');\n }", "title": "" }, { "docid": "fcf365f31f14f0659579d8a52ecb99ef", "score": "0.3748524", "text": "public function applyFilterMultiSelect(Filter\\FilterMultiSelect $filter)\n\t{\n\t\t$values = $filter->getCondition()[$filter->getColumn()];\n\n\t\t$expr = Criteria::expr()->in($filter->getColumn(), $values);\n\t\t$this->criteria->andWhere($expr);\n\t}", "title": "" }, { "docid": "5deaa254f8cc38afb955ba660fa7526e", "score": "0.37480554", "text": "protected function applyCriteria()\n {\n if ($this->skipCriteria === true) {\n return $this;\n }\n\n $criteria = $this->getCriteria();\n\n if ($criteria) {\n foreach ($criteria as $c) {\n $this->model = $c->apply($this->model, $this);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "2090e7de17187a3d78b26f56e50de421", "score": "0.37462196", "text": "protected function getSubJsFile(): void\n {\n preg_match_all(self::REGEX_JS_INCLUDE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $this->sContents = str_replace($aHit[0][$i], '', $this->sContents);\n $this->sContents .= File::EOL . $this->oFile->getUrlContents($aHit[1][$i] . $aHit[2][$i]);\n }\n }", "title": "" }, { "docid": "a289495968000e43d7df7f34c0f0f9f8", "score": "0.37433514", "text": "public function session_count_by_activity($user_id = null, $start_date = null, $end_date = null, $activitygroup_id = null, $unit_id = null, $activity_id=null, $is_publish=null) {\n $conditions = array();\n $link['Activitygroup'] = array(\n 'fields'=>array(\n 'Activitygroup.name'\n )\n );\n\n if(!empty($user_id)){\n $conditions['AND'][$this->alias . \".countuser_id\"] = $user_id;\n }\n if(!empty($start_date)){\n $conditions['AND'][$this->alias . \".date >=\"] = $start_date;\n }\n if(!empty($end_date)){\n $conditions['AND'][$this->alias . \".date <=\"] = $end_date;\n }\n if(!empty($activitygroup_id)){\n $conditions['AND'][\"Activity.activitygroup_id\"] = $activitygroup_id;\n }\n if(!empty($activity_id)){\n $conditions['AND'][\"Activity.id\"] = $activity_id;\n }\n if(!empty($unit_id)){\n $conditions['AND'][\"Unit.id\"] = $unit_id;\n $link['Unit'] = array(\n 'fields'=>array(\n 'Unit.name'\n )\n );\n }\n\n if(isset($is_publish)){\n if($is_publish === 0){\n $conditions['AND'][\"Activity.publish\"] = 0;\n }else if($is_publish === 1){\n $conditions['AND'][\"Activity.publish\"] = 1;\n }\n }\n\n $options = array(\n 'fields' => array(\n \"sum(Activitysession.session) as total_session_count\",\n \"sum(Activitysession.session * Activitysession.extra_attendant) as total_extra_attendant\"\n ),\n 'link' => array(\n 'Activity'=>array(\n 'fields'=>array(\n 'Activity.id',\n \"Activity.name\",\n \"Activity.activity_code\",\n \"Activity.startdate\",\n \"Activity.enddate\",\n ),\n 'link'=>$link\n ),\n 'Countuser'=>array(\n 'fields'=>array(\n 'Countuser.name'\n )\n ),\n\n ),\n \"conditions\"=>$conditions,\n \"group\"=>array(\"Activity.id\")\n );\n\n return $this->find('all',$options);\n }", "title": "" }, { "docid": "cea471b12b3c25e34fa460f26a6599ab", "score": "0.37425315", "text": "function course_activities($args){\n if(is_singular('course')){\n $args['object'] = 'course';\n $args['primary_id'] = get_the_ID();\n }\n if(strpos($args['scope'],'course') !== false){ \n if(strpos($args['scope'],'personal') !== false){\n preg_match(\"/course_personal_([0-9]+)/\", $args['scope'],$matches); \n $args['scope'] = 'personal';\n $args['object'] = 'course';\n $args['user_id'] = get_current_user_id();\n $args['primary_id'] = $matches[1];\n }else{\n preg_match(\"/course_([0-9]+)/\", $args['scope'],$matches); \n $args['scope'] = '';\n $args['object'] = 'course';\n $args['primary_id'] = $matches[1];\n }\n }\n\n return $args;\n }", "title": "" }, { "docid": "70ce1b89f33bb12c005b0ef4a28cc34e", "score": "0.37403142", "text": "public function filterAll($filter, $args=[]);", "title": "" }, { "docid": "d5e3a6c6432b48ff40910d5ed61e7320", "score": "0.3739075", "text": "protected function applyFilterStatusProject($c)\n {\n $request = $this->getRequest();\n $user = $this->getUser();\n $status_project = null;\n // dans le cas ou on change de filtre .. \n if($request->getParameter('status')&&!$request->getParameter('page'))\n {\n // reset of page numbering -> go to 1\n $user->setAttribute('page', 1, 'project/list'); \n $status_project = $request->getParameter('status');\n }\n $status_project = $this->getCurrentStatusProject();\n \n if($status_project && $status_project != 'all'){\n if($status_project=='active'){\n $c->addJoin(StatusProjectPeer::ID, ProjectPeer::STATUS_PROJECT_ID);\n $c->add(StatusProjectPeer::POSITION, 200, Criteria::LESS_THAN);\n }else{\n $c->add(ProjectPeer::STATUS_PROJECT_ID, $status_project); \n }\n\n }\n\n }", "title": "" }, { "docid": "048a4e53fb06dd74035472e2d5190aee", "score": "0.37372342", "text": "function _prepareConditions($conditions, $pExtendingModuleID = null)\n{\n $debug_prefix = debug_indent(\"Module-_prepareConditions() {$this->ModuleID}:\");\n print \"$debug_prefix\\n\";\n $parentRecordConditions = array();\n $whereConditions = array();\n $protectJoinAliases = array();\n $SQL = '';\n\n $use_parent = true;\n if(empty($parentModuleID)){\n if(empty($this->parentModuleID)){\n $use_parent = false;\n } else {\n $parentModuleID = $this->parentModuleID;\n }\n }\n\n if($use_parent){\n $parentModule =& GetModule($parentModuleID);\n $parentPK = end($parentModule->PKFields);\n }\n\n if(! empty($pExtendingModuleID )){\n print \"extending module conditions: $pExtendingModuleID, {$this->ModuleID}\\n\";\n $extendingModule = GetModule($pExtendingModuleID);\n if(!empty( $extendingModule->extendsModuleFilterField )){\n $conditions[$extendingModule->extendsModuleFilterField] = $extendingModule->extendsModuleFilterValue;\n print \"added extended condition:\\n\";\n print_r($conditions);\n }\n }\n\n if(count($conditions) > 0){\n foreach($conditions as $conditionField => $conditionValue){\n print \"$debug_prefix Condition $conditionField => $conditionValue\\n\";\n\n $conditionModuleField = $this->ModuleFields[$conditionField];\n if(empty($conditionModuleField)){\n die(\"field {$this->ModuleID}.$conditionModuleField is empty\\n\");\n }\n $qualConditionField = $conditionModuleField->getQualifiedName($this->ModuleID);\n $conditionJoins = $conditionModuleField->makeJoinDef($this->ModuleID);\n if(count($conditionJoins) > 0){\n foreach(array_keys($conditionJoins) as $conditionJoinAlias){\n $protectJoinAliases[] = $conditionJoinAlias;\n }\n }\n\n if($use_parent){\n if(preg_match('/\\[\\*([\\w]+)\\*\\]/', $conditionValue, $match[1])){\n if($match[1][1] == $parentPK){\n $whereConditions[$qualConditionField] = '/**RecordID**/';\n } else {\n print \"SM found match $match[1][0]\\n\";\n $parentRecordConditions[$qualConditionField] = $match[1][1];\n }\n } else {\n $whereConditions[$qualConditionField] = $conditionValue;\n }\n } else {\n $whereConditions[$qualConditionField] = $conditionValue;\n }\n }\n }\n\n if($use_parent){\n $needParentSubselect = false;\n if(count($parentRecordConditions) > 0){\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n if(empty($parentModuleField)){\n die(\"field {$this->parentModuleID}.$parentConditionField is empty\\n\");\n }\n if(strtolower(get_class($parentModuleField)) != 'tablefield'){\n $needParentSubselect = true;\n }\n }\n if($needParentSubselect){\n $parentJoins = array();\n $parentSelects = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n $parentSelects[] = $parentModuleField->makeSelectDef('iparent');\n $parentJoins = array_merge($parentJoins, $parentModuleField->makeJoinDef('iparent'));\n }\n\n $subSQL = 'SELECT ';\n $subSQL .= implode(\",\\n\", $parentSelects);\n $subSQL .= \"\\nFROM `{$this->parentModuleID}` AS `iparent`\\n\";\n $parentJoins = SortJoins($parentJoins);\n $subSQL .= implode(\"\\n \", $parentJoins);\n $subSQL .= \"\\nWHERE `iparent`.$parentPK = '/**RecordID**/' \\n\";\n\n $SQL = \"\\n INNER JOIN ($subSQL) AS `parent` ON (\\n\";\n $parentConditionStrings = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentConditionStrings[] = \"`parent`.$parentConditionField = $localConditionField\";\n }\n $SQL .= implode(\"\\n AND \", $parentConditionStrings);\n $SQL .= \")\\n\";\n } else {\n $SQL = \"\\n INNER JOIN `{$this->parentModuleID}` AS `parent` ON (\\n\";\n $parentConditionStrings = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n $qualParentConditionField = $parentModuleField->getQualifiedName('parent');\n $parentConditionStrings[] = \"$localConditionField = $qualParentConditionField\";;\n }\n $SQL .= implode(\"\\n AND \", $parentConditionStrings);\n $SQL .= \")\\n\";\n\n $whereConditions[\"`parent`.$parentPK\"] = '/**RecordID**/';\n }\n\n }\n }\n\n debug_unindent();\n return array(\n 'parentJoinSQL' => $SQL,\n 'whereConditions' => $whereConditions,\n 'protectJoinAliases' => $protectJoinAliases\n );\n}", "title": "" }, { "docid": "e4a524e95c9605e46840cece305eebfb", "score": "0.37361568", "text": "protected function _applyOrderStatusFilter()\n {\n if (is_null($this->_orderStatus)) {\n return $this;\n }\n $orderStatus = $this->_orderStatus;\n if (!is_array($orderStatus)) {\n $orderStatus = array($orderStatus);\n }\n $this->getSelect()->where('status IN(?)', $orderStatus);\n return $this;\n }", "title": "" }, { "docid": "178d1f026599f8a404884d3963768a6d", "score": "0.37345535", "text": "public function applyFilter($dataSource)\r\n\t{\r\n\t\t$condition = $this->filter($dataSource);\r\n\t\tif ($condition) {\r\n\t\t\t$dataSource->apply($condition);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5827891feacb3e37a5f0ba35230f58d0", "score": "0.3729156", "text": "public function filter(){\n try {\n // Sparql11query.g:220:3: ( FILTER constraint ) \n // Sparql11query.g:221:3: FILTER constraint \n {\n $this->match($this->input,$this->getToken('FILTER'),self::$FOLLOW_FILTER_in_filter760); \n $this->pushFollow(self::$FOLLOW_constraint_in_filter762);\n $this->constraint();\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 }", "title": "" }, { "docid": "7b2e164fdc8673fe762f4965128bf2c8", "score": "0.3728934", "text": "public function testDestiny2GetDestinyAggregateActivityStats()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "892d2cef132d2d3b48f864f74ca84c6f", "score": "0.37258947", "text": "public function getSubMatchers();", "title": "" }, { "docid": "ea5e650f57c55a1405faaaa9c3f3c82e", "score": "0.37206554", "text": "function bpb_extended_filter_user_blogs( $args = array() ) {\n\tif ( ! bp_is_blogs_component() || ! bpb_extended()->is_debug ) {\n\t\treturn $args;\n\t}\n\n\tif ( ! empty( $args['user_id'] ) || bpb_extended_is_single_item() ) {\n\n\t\t$filter = false;\n\n\t\t$current_blog = bpb_extended_current_blog();\n\t\t$user_blogs = bpb_extended_get_user_blog_ids( $args['user_id'] );\n\t\t$user_blogs = wp_list_pluck( $user_blogs, 'blog_id' );\n\n\t\tif ( ! empty( $current_blog ) && empty( $current_blog->is_public ) ) {\n\t\t\t// user is not a member\n\t\t\tif ( ! $current_blog->is_member ) {\n\t\t\t\treturn $args;\n\t\t\t} else {\n\t\t\t\t$filter = true;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $args['user_id'] ) && bp_loggedin_user_id() == $args['user_id'] && ! bp_current_user_can( 'bp_moderate' ) ) {\n\t\t\t$filter = true;\n\t\t}\n\n\t\tif ( empty( $current_blog ) ) {\n\t\t\t$args['include_blog_ids'] = $user_blogs;\n\t\t\t$args['user_id'] = 0;\n\t\t}\n\n\t\tif ( ! empty( $filter ) ) {\n\t\t\t// Ouch! Danger zone, but it's the only way i've found\n\t\t\t// Don't worry the other filter will make this very temporary\n\t\t\tadd_filter( 'bp_current_user_can', '__return_true' );\n\n\t\t\t// Remove the above filter asap!\n\t\t\tadd_filter( 'bp_has_blogs', 'bpb_extended_filter_user_blogs_remove_filter' );\n\t\t}\n\t}\n\n\treturn $args;\n}", "title": "" }, { "docid": "91c1e2c8818491a99030edf311c051fe", "score": "0.3716408", "text": "public function _add_incident_filters()\n\t{\n\t\t$params = Event::$data;\n\t\t$params = array_merge($params, $this->params);\n\t\tEvent::$data = $params;\n\t}", "title": "" }, { "docid": "ba7278fa79d066b5672f7d7bf211a766", "score": "0.37028497", "text": "function updateRecordingVersionStatusApplyFilter($recordingid, $status, $typefilter, $statusfilter) {\nglobal $app, $debug, $jconf, $myjobid;\n\n\t// Check parameters\n\tif ( empty($status) ) {\n\t\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[ERROR] updateRecordingVersionStatusApplyFilter() called with invalid status: \" . $status, $sendmail = false);\n\t\treturn false;\n\t}\n\tif ( empty($typefilter) or ( $typefilter == \"all\" ) ) $typefilter = \"recording|content|pip\";\n\n\t// Build type filter\n\t$sql_typefilter = \"\";\n\t$tmp = explode(\"|\", $typefilter);\n\tfor ( $i = 0; $i < count($tmp); $i++ ) {\n\t\t// Check if type is valid\n\t\tif ( ( $tmp[$i] != \"recording\" ) and ( $tmp[$i] != \"content\" ) and ( $tmp[$i] != \"pip\" ) ) {\n\t\t\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[ERROR] updateRecordingVersionStatusApplyFilter() called with invalid type filter: \" . $typefilter, $sendmail = false);\n\t\t\treturn false;\n\t\t}\n\t\t$sql_typefilter .= \"'\" . $tmp[$i] . \"'\";\n\t\tif ( $i < count($tmp) - 1 ) $sql_typefilter .= \",\";\n\t}\n\t$sql_typefilter = \" AND ep.type IN (\" . $sql_typefilter . \")\";\n\n\t// Build status filter\n\t$sql_statusfilter = \"\";\n\tif ( !empty($statusfilter) ) {\n\t\t$tmp = explode(\"|\", $statusfilter);\n\t\tfor ( $i = 0; $i < count($tmp); $i++ ) {\n\t\t\t$sql_statusfilter .= \"'\" . $tmp[$i] . \"'\";\n\t\t\tif ( $i < count($tmp) - 1 ) $sql_statusfilter .= \",\";\n\t\t}\n\t\t$sql_statusfilter = \" AND rv.status IN (\" . $sql_statusfilter . \")\";\n\t}\n\n\t$query = \"\n\t\tUPDATE\n\t\t\trecordings_versions AS rv,\n encoding_profiles AS ep\n\t\tSET\n\t\t\trv.status = '\" . $status . \"'\n\t\tWHERE\n\t\t\trv.recordingid = \" . $recordingid . \" AND\n\t\t\trv.encodingprofileid = ep.id\" . $sql_typefilter . $sql_statusfilter;\n\n\ttry {\n $model = $app->bootstrap->getModel('recordings_versions');\n $rs = $model->safeExecute($query);\n\t} catch (exception $err) {\n\t\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[ERROR] SQL query failed.\\n\" . trim(substr($query, 1, 255)) . \"\\n\\nERR:\\n\" . trim(substr($err, 1, 255)), $sendmail = true);\n\t\treturn false;\n\t}\n\n\t// Log status change\n\t$debug->log($jconf['log_dir'], $myjobid . \".log\", \"[INFO] All recording versions with status filter = '\" . $statusfilter . \"' and type filter = '\" . $typefilter . \"' for recording id = \" . $recordingid . \" have been changed to '\" . $status . \"' status.\", $sendmail = false);\n\n\treturn true;\n}", "title": "" }, { "docid": "53d57f57f5a7a2b8411bcd87759930d2", "score": "0.36966118", "text": "function ProcessMultilevelSubCategories()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"ProcessMultilevelSubCategories();\" . \"<HR>\";\n if ($this->listSettings->HasItem(\"MAIN\", \"SUB_CATEGORIES_COUNT\")) {\n $this->sub_categories_count = $this->listSettings->GetItem(\"MAIN\", \"SUB_CATEGORIES_COUNT\");\n for ($i = 0; $i < $this->sub_categories_count; $i ++) {\n $sub_category = array();\n if ($this->listSettings->HasItem(\"SUB_CATEGORY_\" . $i, \"APPLY_LIBRARY\")) {\n $sub_category[\"library\"] = $this->listSettings->GetItem(\"SUB_CATEGORY_\" . $i, \"APPLY_LIBRARY\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_SUB_CATEGORY_LIBRARY\", array(\n $i), true);\n }\n if ($this->listSettings->HasItem(\"SUB_CATEGORY_\" . $i, \"LINK_FIELD\")) {\n $sub_category[\"link_field\"] = $this->listSettings->GetItem(\"SUB_CATEGORY_\" . $i, \"LINK_FIELD\");\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_SUB_CATEGORY_LINK_FIELD\", array(\n $i), true);\n }\n $this->sub_categories[] = $sub_category;\n }\n\n }\n else {\n $this->AddEditErrorMessage(\"EMPTY_SUB_CATEGORIES_COUNT\", array(), true);\n }\n\n }", "title": "" }, { "docid": "bca281e59bf1d08687ce6cbf5bb5ff58", "score": "0.36960387", "text": "public function executeFilters() {\n $this->checkIfValueIsNull();\n foreach ($this->filters as $filter) {\n $this->value = $filter->run($this->value);\n }\n return $this;\n }", "title": "" }, { "docid": "ff6fe2d97babe4858d5446bb45772c6c", "score": "0.36957148", "text": "public function runFilter( array $context )\n {\n foreach ( $context as $element )\n {\n if ( $element->status == ezcTranslationData::UNFINISHED )\n {\n $element->translation = $element->original;\n }\n }\n }", "title": "" }, { "docid": "818bb1b89c46e210af4b0c7bd1b7c15d", "score": "0.36913788", "text": "public function addActiveFilter()\n {\n return $this->addFieldToFilter('status', 1);\n }", "title": "" }, { "docid": "925c9ce49b7183ea63ad6c363b8bd406", "score": "0.36899656", "text": "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) {\n\t\t\t$SF[$k] = trim($v);\n\t\t}\n\t\t// Generate filter for the common fileds\n\t\tif ($SF[\"category_id\"])\t{\n\t\t \t$sql[] = \" AND category_id = \".intval($SF[\"category_id\"]).\" \";\n\t\t}\n\t\tif ($SF[\"user_id\"])\t{\n\t\t \t$sql[] = \" AND user_id = \".intval($SF[\"user_id\"]).\" \";\n\t\t}\n\t\tif (strlen($SF[\"admin_priority\"])) {\n\t\t \t$sql[] = \" AND admin_priority = \".intval($SF[\"admin_priority\"]).\" \";\n\t\t}\n\t\tif ($this->DEF_VIEW_STATUS || $SF[\"status\"]) {\n\t\t\t$status = $SF[\"status\"] ? $SF[\"status\"] : $this->DEF_VIEW_STATUS;\n\t\t\tif ($status == \"not_closed\") {\n\t\t\t \t$sql[] = \" AND status != 'closed' \";\n\t\t\t} else {\n\t\t\t \t$sql[] = \" AND status = '\"._es($SF[\"status\"]).\"' \";\n\t\t\t}\n\t\t}\n\t\tif (strlen($SF[\"subject\"])) {\n\t\t\t$sql[] = \" AND subject LIKE '\"._es($SF[\"subject\"]).\"%' \";\n\t\t}\n\t\tif (strlen($SF[\"message\"])) {\n\t\t\t$sql[] = \" AND message LIKE '\"._es($SF[\"message\"]).\"%' \";\n\t\t}\n\t\tif (!empty($SF[\"email\"])) {\n\t\t\t$sql[] = \" AND email LIKE '\"._es($SF[\"email\"]).\"%' \";\n\t\t}\n\t\tif ($SF[\"assigned_to\"])\t{\n\t\t \t$sql[] = \" AND assigned_to = \".intval($SF[\"assigned_to\"]).\" \";\n\t\t}\n\t\t// Add subquery to users table\n\t\tif (!empty($users_sql)) {\n\t\t\t$sql[] = \" AND user_id IN( SELECT id FROM \".db('user').\" WHERE 1=1 \".$users_sql.\") \";\n\t\t}\n\t\t// Default sorting\n\t\tif (!$SF[\"sort_by\"]) {\n\t\t\t$SF[\"sort_by\"]\t\t= \"opened_date\";\n\t\t\t$SF[\"sort_order\"]\t= \"DESC\";\n\t\t}\n\t\t// Sorting here\n\t\tif ($SF[\"sort_by\"]) {\n\t\t \t$sql[] = \" ORDER BY \".($this->_sort_by[$SF[\"sort_by\"]] ? $this->_sort_by[$SF[\"sort_by\"]] : $SF[\"sort_by\"]).\" \";\n\t\t\tif (strlen($SF[\"sort_order\"])) {\n\t\t\t\t$sql[] = \" \".$SF[\"sort_order\"].\" \";\n\t\t\t}\n\t\t}\n\t\t$sql = implode(\"\\r\\n\", (array)$sql);\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "abe073ca3397679f757b0b8a92f5b072", "score": "0.36864406", "text": "protected function afterLoad()\n {\n if ($this->_data &&\n $this->agenda instanceof \\Gems_Agenda &&\n ! $this->_subFilters) {\n\n // Flexible determination of filters to load. Save for future expansion of numbe rof fields\n $i = 1;\n $field = 'gaf_filter_text' . $i;\n $filterIds = array();\n while (array_key_exists($field, $this->_data)) {\n if ($this->_data[$field]) {\n $filterIds[] = intval($this->_data[$field]);\n }\n $i++;\n $field = 'gaf_filter_text' . $i;\n }\n\n if ($filterIds) {\n $filterObjects = $this->agenda->getFilters(\"SELECT *\n FROM gems__appointment_filters \n WHERE gaf_id IN (\" . implode(', ', $filterIds) . \")\n ORDER BY gaf_id_order\");\n\n // The order we get the filters may not be the same as the one in which they are specified\n foreach ($filterIds as $id) {\n foreach ($filterObjects as $filterObject) {\n if ($filterObject instanceof AppointmentFilterInterface) {\n if ($filterObject->getFilterId() == $id) {\n $this->_subFilters[$id] = $filterObject;\n break;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "c5fd1b6da6a63270cb5758e15d8a4088", "score": "0.36849374", "text": "abstract public function filter(Subscriber $subscriber, $root);", "title": "" }, { "docid": "3e5424fab885c96e30f9cd616944c671", "score": "0.3681947", "text": "function recent_activities() {\n $this->skip_layout = $this->request->isAsyncCall();\n\n $this->smarty->assign(array(\n 'grouped_activities' => group_by_date(ActivityLogs::findActiveProjectsActivitiesByUser($this->logged_user, 20), $this->logged_user),\n ));\n }", "title": "" }, { "docid": "765114efdf2582549430f8642ff729a8", "score": "0.36799273", "text": "public function apply($builder)\n {\n if (!empty($values = $this->getValues())) {\n $builder->whereIn('active', $values);\n }\n return $builder;\n }", "title": "" }, { "docid": "af41209def259a1e1adf573d8682034e", "score": "0.3676876", "text": "public function _map_main_filters()\n\t{\n\t\techo '</div><h3>'.Kohana::lang('actionable.actionable').'</h3><ul>';\n\t\tforeach ($this->media_values as $k => $val) {\n\t\t\techo \"<li><a id=\\\"media_$k\\\" href=\\\"#\\\"><span>$val</span></a></li>\";\n\t\t}\n\t\techo '</ul><div>';\n\t}", "title": "" }, { "docid": "74348cf4f2a921c75cec4d8926043490", "score": "0.3664134", "text": "protected function _run_filters($type)\n {\n $filters = array_merge_recursive((new ApplicationController())->_filters(), $this->_filters());\n \n if (isset($filters[$type])) {\n /**\n * Here we have to filter duped methods. We can't use array_unique\n * because the the methods could be like ['method_name', 'only' => [ actions ... ]]\n * and that will generate \"Array to string conversion\" error.\n */\n $ran_methods = [];\n foreach ($filters[$type] as $params) {\n if (($method = $this->_can_run_filter_method($params, $type)) && !in_array($method, $ran_methods)) {\n $this->$method();\n $ran_methods[] = $method;\n }\n }\n }\n }", "title": "" }, { "docid": "98a2693580c1d632b412e15eda95a685", "score": "0.36624405", "text": "private function processSuiteFilters(TestSuite $suite, array $arguments): void\n {\n if (empty($arguments['filter']) &&\n empty($arguments[self::PARALLEL_ARG]) &&\n empty($arguments['groups']) &&\n empty($arguments['excludeGroups'])) {\n return;\n }\n\n $filterFactory = new Factory();\n\n if (!empty($arguments['excludeGroups'])) {\n $filterFactory->addFilter(\n new ReflectionClass(ExcludeGroupFilterIterator::class),\n $arguments['excludeGroups']\n );\n }\n\n if (!empty($arguments['groups'])) {\n $filterFactory->addFilter(\n new ReflectionClass(IncludeGroupFilterIterator::class),\n $arguments['groups']\n );\n }\n\n if (!empty($arguments['filter'])) {\n $filterFactory->addFilter(\n new ReflectionClass('PHPUnit_Runner_Filter_Test'),\n $arguments['filter']\n );\n }\n\n if (!empty($arguments[self::PARALLEL_ARG])) {\n $filterFactory->addFilter(\n new ReflectionClass('PhpUnit\\Runner\\Filter\\Parallel'),\n $arguments[self::PARALLEL_ARG]\n );\n }\n\n $suite->injectFilter($filterFactory);\n }", "title": "" }, { "docid": "63f62a893676f2678c12aa63d499643b", "score": "0.36581922", "text": "private function applyCriteria()\n {\n foreach( $this->criteria as $criterion )\n {\n $this->query = $criterion->apply( $this->query, $this );\n }\n\n return $this;\n }", "title": "" }, { "docid": "ba2deb38b321813eb5253359d00a6ee2", "score": "0.36579064", "text": "public function filterBeforeAll($filter);", "title": "" }, { "docid": "027cae1709a78d9cf4e6af66feaa9f1f", "score": "0.36509633", "text": "function multiblog_filter_blogs(&$ctx, $is_include, $blogs) {\n\n # Set flag to indicate whether @blogs are to be included or excluded\n $is_include = $is_include == 'include_blogs' ? 1 : 0;\n\n # Set local blog\n $this_blog = $ctx->stash('blog_id');\n\n # Get the MultiBlog system config for default access and overrides\n $default_access_allowed = $ctx->mt->config('DefaultAccessAllowed');\n if (!isset($default_access_allowed))\n $default_access_allowed = 1;\n $cfg_access_overrides = $ctx->mt->config('AccessOverrides');\n $access_overrides = isset($cfg_access_overrides) ? json_decode( $cfg_access_overrides, true ) : array();\n\n # System setting allows access by default\n if ($default_access_allowed) {\n # include_blogs=\"all\"\n if ($is_include && ($blogs[0] == \"all\")) {\n # Check for any deny overrides. \n # If found, switch to exclude_blogs=\"...\"\n $deny = array();\n foreach (array_keys($access_overrides) as $o) {\n if (($o != $this_blog) && (isset($access_overrides[$o]) && ($access_overrides[$o] == MULTIBLOG_ACCESS_DENIED)))\n $deny[] = $o;\n }\n return count($deny) ? array('exclude_blogs', $deny)\n : array('include_blogs', array('all'));\n } elseif ( ( $blogs[0] == 'site' )\n || ( $blogs[0] == 'children' )\n || ( $blogs[0] == 'siblings' )\n ) {\n $mt = MT::get_instance();\n $ctx = $mt->context();\n $blog = $ctx->stash('blog');\n $allow = array();\n if ( !empty($blog) ) {\n $website = $blog->class == 'blog' ? $blog->website() : $blog;\n $blogs = $website->blogs();\n if ( empty( $blogs ) )\n $blogs = array();\n foreach($blogs as $b) {\n if ($b->id == $this_blog || (!isset($access_overrides[$b->id])) || ($access_overrides[$b->id] == MULTIBLOG_ACCESS_ALLOWED))\n array_push($allow, $b->id);\n }\n }\n return count($allow) ? array('include_blogs', $allow) : null;\n }\n # include_blogs=\"1,2,3,4\"\n elseif ($is_include && count($blogs)) {\n # Remove any included blogs that are specifically deny override\n # Return undef is all specified blogs are deny override\n $allow = array();\n foreach ($blogs as $b)\n if ($b == $this_blog || (!isset($access_overrides[$b])) || ($access_overrides[$b] == MULTIBLOG_ACCESS_ALLOWED))\n $allow[] = $b;\n return count($allow) ? array('include_blogs', $allow) : null;\n }\n # exclude_blogs=\"1,2,3,4\"\n else {\n # Add any deny overrides blogs to the list and de-dupe\n foreach (array_keys($access_overrides) as $o)\n if (($o != $this_blog) && (isset($access_overrides[$o]) && ($access_overrides[$o] == MULTIBLOG_ACCESS_DENIED)))\n $blogs[] = $o;\n $seen = array();\n foreach ($blogs as $b)\n $seen[$b] = 1;\n $blogs = array_keys($seen);\n return array('exclude_blogs', $blogs);\n }\n }\n # System setting does not allow access by default\n else {\n # include_blogs=\"all\"\n if ($is_include && ($blogs[0] == \"all\")) {\n # Enumerate blogs from allow override\n # Hopefully this is significantly smaller than @all_blogs\n $allow = array();\n foreach (array_keys($access_overrides) as $o)\n if (($o == $this_blog)\n || (isset($access_overrides[$o]) && ($access_overrides[$o] == MULTIBLOG_ACCESS_ALLOWED)))\n $allow[] = $o;\n if (!isset($access_overrides[$this_blog]))\n $allow[] = $this_blog;\n return count($allow) ? array('include_blogs', $allow) : null;\n } elseif ( ( $blogs[0] == 'site' )\n || ( $blogs[0] == 'children' )\n || ( $blogs[0] == 'siblings' )\n ) {\n $mt = MT::get_instance();\n $ctx = $mt->context();\n $blog = $ctx->stash('blog');\n $allow = array();\n if (!empty($blog) && $blog->class == 'blog') {\n require_once('class.mt_blog.php');\n $blog_class = new Blog();\n $blogs = $blog_class->Find(\"blog_parent_id = \" . $blog->parent_id);\n foreach($blogs as $b) {\n if ($b->id == $this_blog\n || (isset($access_overrides[$b->id]) && ($access_overrides[$b->id] == MULTIBLOG_ACCESS_ALLOWED)))\n array_push($allow, $b->id);\n }\n }\n return count($allow) ? array('include_blogs', $allow) : null;\n }\n # include_blogs=\"1,2,3,4\"\n elseif ($is_include && count($blogs)) {\n # Filter @blogs returning only those with allow override\n $allow = array();\n foreach ($blogs as $b)\n if ($b == $this_blog\n || (isset($access_overrides[$b]) && ($access_overrides[$b] == MULTIBLOG_ACCESS_ALLOWED)))\n $allow[] = $b;\n\n return count($allow) ? array('include_blogs', $allow) : null;\n }\n # exclude_blogs=\"1,2,3,4\"\n else {\n # Get allow override blogs and then omit \n # the specified excluded blogs.\n $allow = array();\n foreach (array_keys($access_overrides) as $o)\n if (($o == $this_blog)\n || (isset($access_overrides[$o]) && ($access_overrides[$o] == MULTIBLOG_ACCESS_ALLOWED)))\n $allow[] = $o;\n if (!isset($access_overrides[$this_blog]))\n $allow[] = $this_blog;\n $seen = array();\n foreach ($blogs as $b)\n $seen[$b] = 1;\n $blogs = array();\n foreach ($allow as $a)\n if (!isset($seen[$a])) $blogs[] = $a;\n return count($blogs) ? array('include_blogs', $blogs) : null;\n }\n }\n}", "title": "" }, { "docid": "4fc7541896f3179d30d33928b014a0ab", "score": "0.3650399", "text": "public function process_filter_data_query($filter_data = array())\r\n {\r\n if($this->is_error === true){return;}\r\n \r\n // Peform lower module/table query statement\r\n foreach ($this->model_id_list() as $convert_condition)\r\n {\r\n // Use to store the extracted data\r\n $data_record = array();\r\n \r\n // Loop through data to obtain all value\r\n foreach ($convert_condition[\"data_column\"] as $data)\r\n {\r\n $data_name = $data[\"data\"];\r\n $data_key = $data[\"column\"];\r\n \r\n // Need to process each data\r\n foreach($filter_data as $f_key => $f_data)\r\n {\r\n // Peform string serach to cater for \"=\", \">\" and \"<\" symbol\r\n if(strpos($f_key,$data_name) !== false)\r\n {\r\n // Perform string replace\r\n $new_key = str_replace($data_name, $data_key, $f_key);\r\n $data_record[$new_key] = $filter_data[$f_key];\r\n unset($filter_data[$f_key]);\r\n }\r\n }\r\n }\r\n\r\n if($data_record !== array())\r\n {\r\n $mode = $convert_condition[\"table\"].\"_model\";\r\n $this->load->model($mode); // Invoke necessary model\r\n \r\n // Throw to sub model to process\r\n $data_record = $this->$mode->process_filter_data_query($data_record);\r\n \r\n // Check any name that is not tie to model\r\n foreach ($data_record as $r_key => $d_key)\r\n {\r\n if(strpos($r_key, \".\") === false)\r\n {\r\n // Map those with current sub model\r\n $new_key = $convert_condition[\"table\"].\".\".$r_key;\r\n $data_record[$new_key] = $data_record[$r_key];\r\n unset($data_record[$r_key]);\r\n }\r\n }\r\n \r\n $filter_data = array_merge($filter_data, $data_record);\r\n }\r\n\r\n // Merge back the data to filter data\r\n\r\n // @todo - careful about the range search and pattern, might not require as\r\n // currently as the column need range is at top level \r\n //$keys = array_keys($array); \r\n //$search_count (int) preg_grep(\"/c$/\",$keys);\r\n }\r\n \r\n return $filter_data;\r\n }", "title": "" }, { "docid": "18d3999e6704347fc04d1fc47208ac47", "score": "0.36490378", "text": "protected function addWorkflowActivities()\n {\n // but are derived from the workflows.xml in order to model what we call \"workflow activities\".\n foreach ($this->aggregate_root_type_map as $aggregate_root_type) {\n $workflow_activities_map = $this->workflow_activity_service->getActivities($aggregate_root_type);\n\n foreach ($workflow_activities_map as $workflow_step => $workflow_activities) {\n $scope = sprintf(self::WORKFLOW_SCOPE_PATTERN, $aggregate_root_type->getPrefix(), $workflow_step);\n\n if ($this->activity_container_map->hasKey($scope)) {\n $container = $this->activity_container_map->getItem($scope);\n $container->getActivityMap()->append($workflow_activities);\n } else {\n $container_state = [ 'scope' => $scope, 'activity_map' => $workflow_activities ];\n $workflow_activity_container = new ActivityContainer($container_state);\n $this->activity_container_map->setItem($scope, $workflow_activity_container);\n }\n }\n }\n }", "title": "" }, { "docid": "4ce1210bc40eaf88cc1780bf8de05f06", "score": "0.36478823", "text": "public function filter($filter)\n {\n }", "title": "" }, { "docid": "2467f4e8013c0956551bfb278a02dbde", "score": "0.36460033", "text": "public function applyFilterSelect(Filter\\FilterSelect $filter)\n\t{\n\t\t$condition = $filter->getCondition();\n\n\t\tforeach ($condition as $column => $value) {\n\t\t\t$this->data_source->addTerm($column, $value);\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "01381e678d60b318d91b4f6a7c6eaeea", "score": "0.36447474", "text": "function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }", "title": "" }, { "docid": "3f131983c0975eb2213bd7dc1e9af6ee", "score": "0.36438075", "text": "public function filter(Record $record);", "title": "" }, { "docid": "1aa17e7a3fab867dcc71677113655eaa", "score": "0.36414075", "text": "protected function applyScopes()\n {\n if (true === $this->skipScope) {\n return $this;\n }\n\n $scopes = $this->getScopes();\n\n if ($scopes) {\n foreach ($scopes as $scope) {\n if ($scope instanceof ScopeInterface) {\n $this->model = $scope->apply($this->model, $this);\n }\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "cf125df4c012a0eccf11b5c3dd16ca7d", "score": "0.3627576", "text": "public function applyCriteria() {\n if ($this->skipCriteria === true) {\n return $this;\n }\n\n foreach ($this->getCriteria() as $criteria) {\n if ($criteria instanceof Criteria) {\n $this->model = $criteria->apply($this->model, $this);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "e7e4f60ab74960165958620030f085bd", "score": "0.3624282", "text": "public function edit_entries_additional_where ()\n\t{\n\t\t$where = (ee()->extensions->last_call) ?\n\t\t\t\t\tee()->extensions->last_call : array();\n\n\t\t$group_id = ee()->session->userdata['group_id'];\n\n\t\tif ($group_id == 1)\n\t\t{\n\t\t\treturn $where;\n\t\t}\n\n\t\tee()->load->library('calendar_permissions');\n\n\t\t$prefs = $this->data->get_module_preferences();\n\n\t\tif ( ee()->calendar_permissions->filter_on() != 'search_filter'\n\t\t\t OR in_array($group_id, ee()->calendar_permissions->get_groups_allowed_all()))\n\t\t{\n\t\t\treturn $where;\n\t\t}\n\n\t\t//if they arent allowed to see anything, lets skip the processing and just block the channel\n\t\t$allowed_calendars_for_group = ee()->calendar_permissions->get_allowed_calendars_for_group($group_id);\n\n\t\tif (empty($allowed_calendars_for_group))\n\t\t{\n\t\t\t$not_ch_id = 'channel_id !=';\n\n\t\t\tif ( ! isset($where[$not_ch_id]))\n\t\t\t{\n\t\t\t\t$where[$not_ch_id] = array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( ! is_array($where[$not_ch_id]))\n\t\t\t\t{\n\t\t\t\t\t$where[$not_ch_id] = array($where[$not_ch_id]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$where[$not_ch_id][] = $prefs['event_weblog'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$not_allowed_ids = ee()->calendar_permissions->get_denied_entry_ids($group_id);\n\n\t\t\t//if they are allowed to all calendars by checkboxes,\n\t\t\t//but not by the master allow all, this will be empty\n\t\t\tif ( ! empty($not_allowed_ids))\n\t\t\t{\n\t\t\t\t$not_entry_id = 'entry_id !=';\n\n\t\t\t\tif ( ! isset($where[$not_entry_id]))\n\t\t\t\t{\n\t\t\t\t\t$where[$not_entry_id] = array();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( ! is_array($where[$not_entry_id]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$where[$not_entry_id] = array($where[$not_entry_id]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$where[$not_entry_id] = array_merge(\n\t\t\t\t\t$where[$not_entry_id],\n\t\t\t\t\t$not_allowed_ids\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "bf2dff61fcfdf321cd4abd0a2b7a02e3", "score": "0.36223745", "text": "public function collapseAll()\n {\n foreach ($this->_tree as $key => $val) {\n if ($key !== self::BASE_ELT) {\n $this->collapse($val['v']);\n }\n }\n }", "title": "" }, { "docid": "d7437d568dedf630ef570c4e75ac4509", "score": "0.36184326", "text": "public function applyFilterSearch() {\n\t\t$this->table->writeFilterToSession();\n\t\t$this->table->resetOffset();\n\t\t$this->search();\n\t}", "title": "" }, { "docid": "6954a0b3cf9d00bfc7b60443c61a6e8b", "score": "0.3615234", "text": "public function removeSubRequests();", "title": "" }, { "docid": "c47f330ef3cc1831f742e29b33b9e8ca", "score": "0.3614485", "text": "abstract public function sendActive(Visitor $visitor, Modification $modification);", "title": "" }, { "docid": "02aca06cea88f3e40bd2ce992613eb7c", "score": "0.36051944", "text": "function isActivity() {\n\t\treturn $this->repoObj->lobType == 'activity';\n\t}", "title": "" }, { "docid": "ad9f849df08a25acde5f454b0a637c6c", "score": "0.36038402", "text": "protected function doSubSearchQuery($exp, $filter)\n {\n $operator = isset($filter['logic']) ? strtolower($filter['logic']) : 'and';\n $result = null;\n\n if (!empty($filter['filters']) && is_array($filter['filters'])) {\n $subs = [];\n foreach ($filter['filters'] as $offset => $filter_info) {\n // If there are sub filtering\n if (isset($filter_info['filters'])) {\n $_subs = $this->doSubSearchQuery($exp, $filter_info);\n\n if (!empty($_subs)) {\n $subs[] = $_subs;\n }\n continue;\n }\n\n\n // Otherwise, we do the query normally\n //$this->log('filters:'. print_r($filter_info, true), 'debug');\n\n\n $req_field = $filter_info['field'];\n\n // If the field does not configure, skip the query.\n if (!isset($this->filterable_fields[ $req_field])) {\n continue;\n }\n\n $all_db_fields = $this->filterable_fields[ $req_field]['db_field'];\n\n // List out all fields\n if (!is_array($all_db_fields)) {\n $all_db_fields = [$all_db_fields];\n }\n\n\n $sub = $exp->or_(\n function ($or) use ($all_db_fields, $filter_info) {\n\n $req_operator = $filter_info['operator'];\n $req_value = $filter_info['value'] ;\n\n // If passing string 'null', convert it into 'isnull' operator directly.\n if ($req_value == 'null') {\n $req_operator = 'isnull';\n }\n\n // List out all acceptable db fields\n foreach ($all_db_fields as $db_field) {\n // For the requested operator, use correct query method\n if ($req_operator == 'eq') {\n $or->eq($db_field, $req_value);\n } elseif ($req_operator == 'neq') {\n $or->notEq($db_field, $req_value);\n } elseif ($req_operator == 'startswith') {\n $or->like($db_field, $req_value .'%');\n } elseif ($req_operator == 'endswith') {\n $or->like($db_field, '%'.$req_value);\n } elseif ($req_operator == 'contains') {\n // Replace all space for the name\n $or->like(\"LCASE(\".$db_field.\")\", \"LCASE(\".'%'. $this->toLikeSearchString($req_value) .'%'.')');\n } elseif ($req_operator == 'doesnotcontain') {\n $or->notLike(\"LCASE(\".$db_field.\")\", \"LCASE(\".'%'. $this->toLikeSearchString($req_value) .'%'.')');\n } elseif ($req_operator == 'gte') {\n $or->gte($db_field, $req_value);\n } elseif ($req_operator == 'gt') {\n $or->gt($db_field, $req_value);\n } elseif ($req_operator == 'lower_than') {\n $or->lte($db_field, $req_value);\n } elseif ($req_operator == 'lower') {\n $or->lt($db_field, $req_value);\n } elseif ($req_operator == 'isnotnull') {\n $or->isNotNull($db_field);\n } elseif ($req_operator == 'isnull') {\n $or->isNull($db_field);\n } elseif ($req_operator == 'isnotempty') {\n $or->notEq($db_field, '');\n } elseif ($req_operator == 'isempty') {\n $or->eq($db_field, '');\n }\n }\n\n return $or;\n }\n );\n\n $subs[] = $sub;\n }\n\n if ($operator == 'or') {\n $result = $exp->or_($subs);\n }\n\n if ($operator == 'and') {\n $result = $exp->and_($subs);\n }\n }\n //$this->log(__METHOD__.':'. print_r($result, true), 'debug');\n return $result;\n }", "title": "" } ]
89eb1c5ae24dd38a3180080e787eaaf3
Gets a value from this container
[ { "docid": "45be7140ca0e9a6145b9955b9c1bd3c2", "score": "0.0", "text": "public function get($key)\n {\n if (!array_key_exists($key, $this->_values)) {\n return null;\n }\n \n return $this->_values[$key];\n }", "title": "" } ]
[ { "docid": "f3b03715523ef92e2b981dcbfde10894", "score": "0.76351106", "text": "function get_value() {\n if (isset($this->value))\n return $this->value;\n \n $Tainacan_Item_Metadata = \\Tainacan\\Repositories\\Item_Metadata::get_instance();\n return $Tainacan_Item_Metadata->get_value($this);\n }", "title": "" }, { "docid": "26277aaf1b26225bb6be6602d08511c4", "score": "0.74749", "text": "public function get($value);", "title": "" }, { "docid": "5bef8a9100715baefa7a9f3df65f43d0", "score": "0.7465133", "text": "public function getValue() {\r\n\t\treturn $this -> value;\r\n\t}", "title": "" }, { "docid": "8fae69bde74f44f597a16c2a830aed7f", "score": "0.7462589", "text": "function getValue() {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.74533296", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "bcefa69d558fcb82e703fa90e827fdc8", "score": "0.74533296", "text": "public function getValue()\n {\n return $this->_value;\n }", "title": "" }, { "docid": "f6852782968e32c8924fe06a6c3db9e4", "score": "0.7443335", "text": "public function getValue() {}", "title": "" }, { "docid": "d6f2b5ec5eb7ae623c540e2ea764f327", "score": "0.7438616", "text": "function getValue() {\r\n\t\treturn $this->value;\r\n\t}", "title": "" }, { "docid": "693c8b37d5e5b2733498818cc1f883e5", "score": "0.7432897", "text": "public function getValue(){\n return $this->_value;\n }", "title": "" }, { "docid": "4de3ba056ff1772f27107c009e137989", "score": "0.7425686", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "4de3ba056ff1772f27107c009e137989", "score": "0.7425686", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "362e2baee5c71a38218160202f8e3458", "score": "0.7425375", "text": "public function getValue() {\n return $this->_value;\n }", "title": "" }, { "docid": "362e2baee5c71a38218160202f8e3458", "score": "0.7425375", "text": "public function getValue() {\n return $this->_value;\n }", "title": "" }, { "docid": "9df4ff45dc7697d614b503ac9dc327ec", "score": "0.74060047", "text": "function getValue() {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "bd973914c5747df7f69f101c9919f5fb", "score": "0.73978883", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "97069889b378f6f164119dc4dea860a6", "score": "0.7391304", "text": "public function getValue()\r\n {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "2d5726ff220aa1e3cc75017ce231542a", "score": "0.73892295", "text": "public function getValue()\n {\n return $this->_Value;\n }", "title": "" }, { "docid": "c3ad7d28fa49ad49bdba618bef3376bf", "score": "0.73746127", "text": "public function getValue() {\n // like what you'd get from decoding JSON).\n return $this->value;\n }", "title": "" }, { "docid": "f4ad7541c9259a12d2130d945fe01d91", "score": "0.7367052", "text": "public function getValue()\n\t{\n\t\tif (array_key_exists($this->name, static::$values)) {\n\t\t\treturn static::$values[$this->name];\n\t\t}\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "91c5cd87d31ffc9abc0254094482c46d", "score": "0.73501617", "text": "public function getValue() {\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "9286dfe087fb2d87e9db4ace502b00fc", "score": "0.7347568", "text": "public final function getValue()\n {\n\n return $this->value;\n\n }", "title": "" }, { "docid": "b77d01bb4e6c85562e7a8aac84509ba4", "score": "0.7331369", "text": "public function get()\n {\n return $this->value;\n }", "title": "" }, { "docid": "b77d01bb4e6c85562e7a8aac84509ba4", "score": "0.7331369", "text": "public function get()\n {\n return $this->value;\n }", "title": "" }, { "docid": "e8120fab73e7cb6f634cf570da2d0751", "score": "0.7330396", "text": "public function getValue() {\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "d19c892768879698205ccf57f4ce7177", "score": "0.7326218", "text": "public function getValue()\n {\n return $this->value;\n }", "title": "" }, { "docid": "5dc20b498b5d774bf4a793ce65d65d36", "score": "0.7322091", "text": "public function getValue()\n {\n return $this->getData(self::VALUE);\n }", "title": "" }, { "docid": "c755ac429e2b08048500b03384f6a9fa", "score": "0.73213685", "text": "public function getValue ()\n\t\t{\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "89baac00cf73b6e07b7b91b70cbef69e", "score": "0.73197186", "text": "public function getValue(){\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "89baac00cf73b6e07b7b91b70cbef69e", "score": "0.73197186", "text": "public function getValue(){\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "222fa969591784b725d7f0341861b95c", "score": "0.7313421", "text": "function getValue(){\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "1c4d41118c77c383cf759d378ca78b2b", "score": "0.72870195", "text": "public function getValue() {\n return $this->value;\n }", "title": "" } ]
11b1858a6aa7c285aec317a98c2a1f86
Creates a select widget.
[ { "docid": "9692b56aee1a8fd9304af91cd60109d5", "score": "0.0", "text": "public function __construct($attrs=null, $choices=null)\n {\n /**\n * Run default widget constructor.\n */\n parent::__construct($attrs);\n \n /**\n * Initialize choices array if not given.\n */\n if (is_null($choices)) {\n $choices = array();\n }\n \n /**\n * Store widget choices.\n */\n $this->choices = $choices;\n }", "title": "" } ]
[ { "docid": "0ed04dca901ae34ba701159a6c32ef02", "score": "0.6994072", "text": "public function render_select(){\n $attributes = $this->get_attributes();\n if (isset($attributes['locked']) && (true === $attributes['locked'])){\n $attributes['disabled'] = true;\n unset($attributes['locked']);\n }\n $element = '<select';\n $element .= $this->attributes_concat($attributes);\n $element .= '>';\n\n if(!$this->get_attribute('required')){\n $app_field = $this->get_app_field();\n $label = $app_field->config['label'];\n $element .= '<option value=\"\">' . $label . '</option>';\n }\n \n $collection = $this->get_value();\n $item_ids = array();\n if ($collection){\n foreach($collection AS $item){\n $item_ids[] = $item->item_id;\n }\n }\n\n $items = (array) $this->get_attribute('items');\n foreach($items AS $item){\n if (in_array($item['item_id'], $item_ids)){\n $selected = 'selected ';\n } else {\n $selected = '';\n }\n $element .= '<option ' . $selected . 'value=\"' . $item['item_id'] . '\">' . $item['title'] . '</option>';\n }\n\n $element .= '</select>';\n\n return $element;\n }", "title": "" }, { "docid": "cdc9583f48fdd11fb7acfd6f3ac4cd1c", "score": "0.6825349", "text": "public function select() {\n $this->_validateCall('select');\n $this->_reset();\n $this->_addElement('type', 'select');\n return $this;\n }", "title": "" }, { "docid": "429df0af0fa64d520ab3c3dc152ec546", "score": "0.68013203", "text": "public function createSelect($options = null);", "title": "" }, { "docid": "631ee9bd1d0d69631fc3555e6d31195f", "score": "0.65264994", "text": "function CrearSelectPers($Vector){\r\n $nombre=$Vector[\"Nombre\"];\r\n $Evento=$Vector[\"Evento\"];\r\n $Ancho=$Vector[\"Ancho\"];\r\n $Alto=$Vector[\"Alto\"];\r\n print('<select name=\"'.$nombre.'\" '.$Evento.' style=\"width:'.$Ancho.'px; height:'.$Alto.'px;\" >');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "79feba0970ffd346688867b2c10aeaf4", "score": "0.65023404", "text": "public function openSelect()\n {\n $this->openTag('select');\n }", "title": "" }, { "docid": "e73f9640b51cccc9731c99535f79c08e", "score": "0.64278746", "text": "public function createSelect($label=\"\",$attributes=array(),$validate=array(),$options=array())\n {\n \n $type='select';\n $this->inputAttr = $attributes;\n $this->elementStart ='<p>';\n if ($label !=''){\n $this->elementStart .= \"<label>$label </label>\";\n }\n $this->elementStart .='<'.$type;\n \n if(count($this->inputAttr))\n {\n foreach($this->inputAttr as $key=>$value)\n {\n $this->elementStart.= ' '.$key.'=\"'.$value.'\"';\n }\n }\n \n if ($this->useValidation==true){\n $this->valAttr = $validate;\n \n if(count($this->valAttr))\n {\n $val ='';\n foreach($this->valAttr as $key=>$value)\n {\n \n $sep=',';\n \n $val .= $key.':'.$value.$sep;\n }\n $this->elementStart.=\"class={validate:{\".$val.\"}}\";\n }\n \n }\n $this->elementStart .='>';\n if (is_array($options)){\n \n while (list($key1) = each($options)){\n $this->elementStart .=\"<option \";\n while (list ($key2,$val2) = each ($options[\"$key1\"])){\n $va =\" $key2='$val2'\";\n \n }\n $this->elementStart .=\" $va >$key1</option>\";\n }\n }\n \n \n $this->elementStart.=\"</select></p>\";\n \n echo $this->elementStart;\n }", "title": "" }, { "docid": "6872ee5b97cd8c2951a9a05f6c3a7235", "score": "0.6421902", "text": "function &createSelectTag($options, $attributes=false, $parent=false)\n {\n $this->setNameToID(&$attributes);\n if (!is_array($options))\n {\n $id = $attributes['id'];\n $name = $attributes;\n $this->msgCenter->addDebug(\"Tried to add select ($name/$id) with no options.\");\n $options = array();\n }\n \n $selectTag = $this->createTag(\"select\", false, $attributes, $parent);\n foreach ($options as $index => $value)\n {\n if (is_a($value, \"gcOptionTag\"))\n {\n $selectTag->addContents($value);\n }\n else\n {\n $optionAttributes['value'] = $index;\n $this->createOptionTag($value, $optionAttributes, $selectTag);\n }\n }\n return $selectTag;\n }", "title": "" }, { "docid": "f5f6126ad6e35e4a972f87e6ada94fe7", "score": "0.6386106", "text": "function theme_select($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'size'));\n _form_set_class($element, array('form-select'));\n\n return '<select' . drupal_attributes($element['#attributes']) . '>' . form_select_options($element) . '</select>';\n}", "title": "" }, { "docid": "8c37baf34535313a4b56b4ec36e6fc05", "score": "0.6371878", "text": "function select($name = 'cmb',$class=null,$data = null,$multiple = null,$number = 0){\n\t\treturn \"<select name='\".$name.\"' id='\".substr($name,0,$number).\"' \".$multiple.\" style='width:200px;' class='ui-widget ui-state-default \".$class.\"'>\".$data.\"</select>\";\n\t}", "title": "" }, { "docid": "345865b619e153fff05cd200cd17e8e3", "score": "0.63447225", "text": "public function getSearchFormSelect()\n {\n $options = array_merge(\n [['value' => '', 'label' => __('Select Search Type')]],\n $this->getSearchFormOptions()\n );\n\n $select = $this->getLayout()->createBlock(\n \\Magento\\Framework\\View\\Element\\Html\\Select::class\n )->setName(\n 'search_by'\n )->setId(\n $this->getBlockId() . '-search_by'\n )->setOptions(\n $options\n );\n\n return $select->getHtml();\n }", "title": "" }, { "docid": "ccc2cc86a254d8bb0ffd44f6a7044c93", "score": "0.6329615", "text": "public function select()\n {\n return MetaFactory::createSelect();\n }", "title": "" }, { "docid": "50233bb9b21dfb8b47486bdaa74160e2", "score": "0.6195478", "text": "function base_select($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'size'));\n\n // Required for .required, .error classes.\n _form_set_class($element);\n\n return '<select' . drupal_attributes($element['#attributes']) . '>' . form_select_options($element) . '</select>';\n}", "title": "" }, { "docid": "09c99e1a99399d0ef8ff1a1614de38a4", "score": "0.6181801", "text": "public function render()\n {\n return view('components.inputs.select');\n }", "title": "" }, { "docid": "df1bb48d145a9eab21ab433ae563f4aa", "score": "0.61256814", "text": "public function createSelect($name, $label, $className = null, $noneOption = false)\r\n {\r\n $elem = new Zend_Form_Element_Select($name);\r\n $elem->setLabel($label);\r\n \r\n // if the option \"-\" must appear\r\n if ($noneOption) {\r\n $elem->addMultiOptions(array(\r\n \"-1\" => \"-\"\r\n ));\r\n }\r\n \r\n // Set CSS attributes\r\n if ($className != null) {\r\n $elem->setAttrib('class', $className);\r\n $elem->setDecorators(array(\r\n 'ViewHelper',\r\n 'Description',\r\n 'Errors',\r\n array(\r\n array(\r\n 'data' => 'HtmlTag'\r\n ),\r\n array(\r\n 'tag' => 'td'\r\n )\r\n ),\r\n array(\r\n 'Label',\r\n array(\r\n 'tag' => 'td',\r\n \"class\" => $className\r\n )\r\n ),\r\n array(\r\n array(\r\n 'row' => 'HtmlTag'\r\n ),\r\n array(\r\n 'tag' => 'tr'\r\n )\r\n )\r\n ));\r\n } else {\r\n $elem->setDecorators(array(\r\n 'ViewHelper',\r\n 'Description',\r\n 'Errors',\r\n array(\r\n array(\r\n 'data' => 'HtmlTag'\r\n ),\r\n array(\r\n 'tag' => 'td'\r\n )\r\n ),\r\n array(\r\n 'Label',\r\n array(\r\n 'tag' => 'td'\r\n )\r\n ),\r\n array(\r\n array(\r\n 'row' => 'HtmlTag'\r\n ),\r\n array(\r\n 'tag' => 'tr'\r\n )\r\n )\r\n ));\r\n }\r\n return $elem;\r\n }", "title": "" }, { "docid": "ef7e92777141ef476c26579b5889f9f3", "score": "0.6116179", "text": "public function render()\n {\n return view('components.select');\n }", "title": "" }, { "docid": "91e9c7ea7e0f80ba1cbc4d1d6b6ac9e5", "score": "0.6113212", "text": "public function render() {\n //if it is not an array , search the backend for the select options\n if( !is_array( $this->_field['options'] ) ) {\n $this->load_select_options( $this->_field['options'] );\n }\n\n $option = '<select' . $this->create_attributes() . '>';\n\n if( isset( $this->_field['blank'] ) ) {\n $option .= '<option value=\"\">' . $this->_field['blank'] . '</option>';\n }\n\n $option .= $this->create_select_options( $this->_field['options'], $this->_value );\n\n $option .= '</select>';\n\n echo $option;\n }", "title": "" }, { "docid": "d6cc0d02aadb90f6de15beb361f98ca8", "score": "0.6078596", "text": "public function select()\n\t{\n\t\treturn new Select($this);\n\t}", "title": "" }, { "docid": "75ff3e4ca68bc5ac4139dfaca32c4da1", "score": "0.6061368", "text": "public static function CreateElement($id = null,$Body = null){ \n $elemento = $Body->DOM->createElement(SimpleSelectBox::TAG_NAME);\n $elemento->setAttribute(\"id\",$id); \n return new SimpleSelectBox($elemento);\n }", "title": "" }, { "docid": "b15024bd60facdb0cd8c0488b4d45f87", "score": "0.60604906", "text": "protected function MakeSelect() {\n $html = EOL; // not sure if these should be an EOL here... might cause weird formatting issues\n\n if (!($this->options['source'] && (is_string($this->options['source']) || is_array($this->options['source'])))) {\n trigger_error('Input Error: Did not receive a SQL statement or array of values for select field (' . $this->name . ')', E_USER_ERROR);\n $html .= $this->value;\n\n } else {\n $selectSource = $this->options['source'];\n\n if ($this->options['multiple']) {\n $attributes = array('multiple' => 'multiple', 'size' => 4);\n } else {\n $attributes = array('size' => 1);\n }\n\n if (is_string($selectSource) && stripos($selectSource, 'select') === false) {\n // we have array in the source in the format of \"m|Male||f|Female\" that we need to explode\n $selectSource = GetSourceArray($selectSource);\n }\n\n // set up the select and add all or none options if selected\n $html .= '<select' . $this->DisplayAttributes($attributes) . '>' . EOL;\n if ($this->options['select_one_flag']) {\n $html .= $this->GetSelectOption($this->value, '', '-- Select One --');\n } // if\n if ($this->options['select_all_flag']) {\n $html .= $this->GetSelectOption($this->value, 'all', 'All');\n } // if\n if ($this->options['select_none_flag']) {\n $html .= $this->GetSelectOption($this->value, 'none', 'None');\n } // if\n if (is_array($this->options['add_values'])) {\n foreach ($this->options['add_values'] as $value => $name) {\n if (is_array($name)) {\n $html .= '<optgroup label=\"' . $this->CleanText($value) . '\">';\n foreach ($name as $subValue => $subName) {\n $html .= $this->GetSelectOption($this->value, $subValue, $subName);\n }\n $html .= '</optgroup>';\n } else {\n $html .= $this->GetSelectOption($this->value, $value, $name);\n }\n }\n } // if\n\n // now we need to loop throught the values to display in the select\n // if $this->options['select_value'] is a string, then use it as a sql statement\n // if $this->options['select_value'] is an array, then use it as an array\n if (is_array($selectSource)) {\n // loop through array creating option tags\n // if an array value is an array, look for a 'name' key within the sub array and make an optgroup\n\n foreach ($selectSource as $value => $name) {\n if (is_array($name)) {\n $html .= '<optgroup label=\"' . $this->CleanText($value) . '\">';\n foreach ($name as $subValue => $subName) {\n if (is_array($this->value)) {\n if (in_array($subValue, $this->value)) {\n $optionValue = $subValue;\n } else {\n $optionValue = '';\n }\n } else{\n $optionValue = $this->value;\n }\n\n if ($subValue || $subName) $html .= $this->GetSelectOption($optionValue, $subValue, $subName);\n }\n $html .= '</optgroup>';\n } else {\n if (is_array($this->value)) {\n if (in_array($value, $this->value)) {\n $optionValue = $value;\n } else {\n $optionValue = '';\n }\n } else{\n $optionValue = $this->value;\n }\n $html .= $this->GetSelectOption($optionValue, $value, $name);\n }\n }\n\n } else {\n $status = true;\n if ($this->options['source_id']) {\n $idField = $this->options['source_id'];\n } else {\n $status = false;\n trigger_error('No id field set for select');\n }\n\n // check to see if we have a value field\n if ($this->options['source_value']) {\n $valueField = $this->options['source_value'];\n } else {\n $status = false;\n trigger_error('No value field set for select');\n }\n\n if ($status) {\n $queryResult = $this->GetSource($selectSource, $idField, $valueField);\n if ($queryResult) {\n while ($queryResult->FetchInto($row)) {\n if (is_array($this->value)) {\n if (in_array($row[$idField], $this->value)) {\n $optionValue = $row[$idField];\n } else {\n $optionValue = '';\n }\n } else{\n $optionValue = $this->value;\n }\n $html .= $this->GetSelectOption($optionValue, $row[$idField], $row[$valueField]);\n } // while\n } else {\n // query failed...\n //$html .= '<!-- query failed -->' . EOL;\n } // if\n }\n }\n $html .= '</select>';\n } // if\n\n $this->html .= $html;\n }", "title": "" }, { "docid": "cc2930911172e5237c63760731b0b551", "score": "0.60459614", "text": "public function select(){\n\t\treturn new select($this);\n\t}", "title": "" }, { "docid": "e2e3ef01a43124180cdec953207c714d", "score": "0.6042796", "text": "public function select($args)\r\n\t{\r\n\t\t$input_args = $this->prepare_input_args($args, \"select\");\r\n\t\t\r\n\t\t//wcag 2.0\r\n\t\t//$accessibility_label = __(\"Choose an option:\", $this->plugin_slug);\r\n\t\t$accessibility_label = \"\";\r\n\t\tif(isset($input_args['accessibility_label']))\r\n\t\t{\r\n\t\t\tif($input_args['accessibility_label']!=\"\")\r\n\t\t\t{\r\n\t\t\t\t$accessibility_label = $input_args['accessibility_label'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$input_args['attributes']['title'] = $accessibility_label;\r\n\t\t\r\n\t\t//now we want to put the class attribute on the LI, and remove from input\r\n\t\t$input_args['attributes']['class'] .= ' '.$input_args['input_class'];\r\n\t\t$input_args['attributes']['class'] = trim($input_args['attributes']['class']);\r\n\t\tunset($input_args['input_class']);//don't want this visible to users\r\n\t\t\r\n\t\t//filter the input arguments before the html is generated - allowing almost all options to be modified\r\n\t\tif(has_filter('sf_input_object_pre')) {\r\n\t\t\t$input_args = apply_filters('sf_input_object_pre', $input_args, $this->sfid);\r\n\t\t}\r\n\t\t\r\n\t\t//prepare html\r\n\t\t$attibutes_html = $this->convert_attributes_to_html($input_args['attributes']);\r\n\t\t\r\n\t\t$prefix = \"\";\r\n\t\t$postfix = \"\";\r\n\t\t\r\n\t\tif(isset($input_args['prefix']))\r\n\t\t{\r\n\t\t\tif($input_args['prefix']!=\"\")\r\n\t\t\t{\r\n\t\t\t\t$prefix = $input_args['prefix'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isset($input_args['postfix']))\r\n\t\t{\r\n\t\t\tif($input_args['postfix']!=\"\")\r\n\t\t\t{\r\n\t\t\t\t$postfix = $input_args['postfix'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tob_start();\r\n\t\t\r\n\t\t?>\r\n\t\t<?php echo $prefix; ?><label>\r\n\t\t<?php if($accessibility_label!=\"\"){ ?><span class=\"screen-reader-text\"><?php echo $accessibility_label; ?></span><?php } ?>\r\n\t\t<select<?php echo $attibutes_html; ?>>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\t\r\n\t\t\tforeach($input_args['options'] as $option)\r\n\t\t\t{\r\n\t\t\t\t//check a default has been set and set it\r\n\t\t\t\tif(!isset($option->attributes))\r\n\t\t\t\t{\r\n\t\t\t\t\t$option->attributes = array(\r\n\t\t\t\t\t\t'class' => '',\r\n\t\t\t\t\t\t'id'\t=> ''\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($this->is_option_selected($option, $input_args['defaults']))\r\n\t\t\t\t{\r\n\t\t\t\t\t$option->attributes['selected'] = 'selected';\r\n\t\t\t\t\t$option->attributes['class'] = trim($option->attributes['class']).' sf-option-active';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(isset($option->attributes['selected']))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tunset($option->attributes['selected']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$container_attibutes_html = \"\";\r\n\t\t\t\tif(isset($option->count))\r\n\t\t\t\t{\r\n\t\t\t\t\t$option->attributes['data-sf-count'] = $option->count;\r\n\t\t\t\t}\r\n $option->attributes['data-sf-depth'] = \"0\";\r\n\r\n\t\t\t\t//add padding to labels for anything hierarchical\r\n\t\t\t\t$label_pad = '';\r\n\t\t\t\tif(isset($option->depth))\r\n\t\t\t\t{\r\n\t\t\t\t\t$label_pad = str_repeat('&nbsp;', $option->depth * 3);\r\n $option->attributes['data-sf-depth'] = $option->depth;\r\n\t\t\t\t}\r\n\r\n //create the attributes\r\n $option_attibutes_html = $this->convert_attributes_to_html($option->attributes);\r\n\r\n\r\n $option_label = $label_pad.$option->label;\r\n\t\t\t\t\r\n\t\t\t?>\r\n\t\t\t<option<?php echo $option_attibutes_html; ?> value=\"<?php echo esc_attr($option->value); ?>\"><?php echo $option_label; ?></option>\r\n\t\t\t<?php\r\n\t\t\t}\r\n\t\t\t?>\r\n\t\t</select>\r\n\t\t</label><?php echo $postfix; ?>\r\n\t\t<?php\r\n\t\t\r\n\t\t$output = ob_get_clean();\r\n\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "56521eeb2b63e6bd9314bd9c2a76ae55", "score": "0.6014902", "text": "public function render()\n {\n return view('components.forms.select');\n }", "title": "" }, { "docid": "33ee8fe4c8e5758b14016b43730952f4", "score": "0.60107315", "text": "public function show()\n {\n return FormField_Select::create($this->options);\n }", "title": "" }, { "docid": "67daf649251edb85d9c9363b67544a93", "score": "0.5985486", "text": "function CrearSelect2($Vector){\r\n $nombre=$Vector[\"Nombre\"];\r\n $evento=$Vector[\"Evento\"];\r\n $funcion=$Vector[\"Funcion\"];\r\n if($Vector[\"Required\"]==1){\r\n $R=\"required\";\r\n }else{\r\n $R=\"\";\r\n }\r\n print(\"<select $R name='$nombre' $evento='$funcion'>\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9aa767200e73f77ebe3ced4ca93ebe72", "score": "0.593607", "text": "function select($name, $id, $options, $showChoose = '', $currentValue = '', $class =''){\n\t\t/* If there's a class then show it then show it. */\n\t\t$class = ($class) ? ' class=\"'.$class.'\"' : '';\n\t\t\n\t\t\n\t\t$html = '<select name=\"'.$name.'\" id=\"'.$id.'\"'.$class.'>'.\"\\n\\t\";\n\t\t/* If there's a class then show it then show it. */\n\t\t$html .= ($showChoose) ? ' <option value=\"\">'.$showChoose.'</option>'.\"\\n\\t\" : '';\n\t\t\n\t\tforeach($options as $option => $value){\n\t\t\tunset($selected);\n\t\t\t$selected = ($value == $currentValue) ? ' selected=\"selected\"' : '';\n\t\t\t$html .= '<option value=\"'.$value.'\"'.$selected.'>'.$option.'</option>'.\"\\n\\t\";\n\t\t}\n\t\t$html .= '</select>'.\"\\n\\t\";\n\t\t\n\t\t\n\t\treturn $html;\n\t\n\t}", "title": "" }, { "docid": "e1c9291e2f914d66d59134d5c291a14e", "score": "0.59310246", "text": "public function render()\n {\n return view('components.lazy.input.select');\n }", "title": "" }, { "docid": "b2190ea42c2f74aa914348a56ffcbec5", "score": "0.59202033", "text": "public function getFormControl()\n\t{\n\t\tif ($this->element instanceof Nette\\Forms\\IControl) return $this->element;\n\t\t$this->element = new Nette\\Forms\\Controls\\SelectBox($this->getName(), $this->items);\n\n\t\t// prepare items\n\t\tif ($this->items === NULL) {\n\t\t\t$this->generateItems();\n\t\t}\n\n\t\t// skip first item?\n\t\tif ($this->firstEmpty) {\n\t\t\t$this->element->setPrompt('?');\n\t\t}\n\n\t\t// translate items?\n\t\tif (!$this->translateItems) {\n\t\t\t$this->element->setTranslator(NULL);\n\t\t}\n\n\t\treturn $this->element;\n\t}", "title": "" }, { "docid": "3042cf2d2bb900729049d3c41164e7e7", "score": "0.59121096", "text": "public function addSelect($name, $label = \"\", $id = \"\", array $options = array(), $multiple = FALSE) {\n $select = new SelectBox($name, $label, $id, $options,$multiple);\n $select->setOptions($options);\n $this->addComponent($name, $select);\n return $select;\n }", "title": "" }, { "docid": "83d3844a3b63957474129a5e8de0abe3", "score": "0.58573526", "text": "public function render()\n {\n return view('viewcreator::components.input-select');\n }", "title": "" }, { "docid": "a9365a93d55df79f945cc51334a56ae8", "score": "0.5846386", "text": "public function create() {\n return view('admin.settings.select_type');\n }", "title": "" }, { "docid": "25e09f55b5aff5190f6f158e814e9fa8", "score": "0.5819581", "text": "public function Field()\n {\n $classAttr = '';\n $options = '';\n if ($extraClass = trim($this->extraClass())) {\n $classAttr = \"class=\\\"$extraClass\\\"\";\n }\n if ($this->source) {\n foreach ($this->source as $value => $title) {\n $selected = $value == $this->value ? \" selected=\\\"selected\\\"\" : \"\";\n if ($selected && $this->value != 0) {\n $this->isSelected = true;\n }\n $options .= \"<option$selected value=\\\"$value\\\">$title</option>\";\n }\n }\n \n $id = $this->id();\n $disabled = $this->disabled ? \" disabled=\\\"disabled\\\"\" : \"\";\n \n return \"<select $classAttr $disabled name=\\\"$this->name\\\" id=\\\"$id\\\" size=\\\"$this->size\\\" multiple=\\\"multiple\\\">$options</select>\";\n }", "title": "" }, { "docid": "476b8c1affb8f698ea7bf93f85e2ec52", "score": "0.5803072", "text": "public static function getType()\n {\n return 'select';\n }", "title": "" }, { "docid": "b4097e2d17c746a5f25e568e9c8d9918", "score": "0.58024615", "text": "function health_select($variables) {\n _form_set_class($variables['element'], array('au-select'));\n return theme_select($variables);\n}", "title": "" }, { "docid": "8ae7d8292b98d040ba042f4d76038314", "score": "0.57851243", "text": "protected function _appendSelect(PapayaXmlElement $parent) {\n return $parent->appendElement(\n 'select',\n array(\n 'name' => $this->_getParameterName($this->getName()),\n 'type' => $this->_type,\n )\n );\n }", "title": "" }, { "docid": "4525bb2101475c32b2c0af2bc5901c07", "score": "0.5785118", "text": "public function createDropdown() {\n\n $this->sources = Source::InTeam(Auth::user()->allTeamNames());\n $this->types = Type::InTeam(Auth::user()->allTeamNames());\n\n If (isset($this->location->name)) {\n $this->sources = $this->sources->FilterOut($this->location->sources[0]->name);\n $this->types = $this->types->FilterOut($this->location->type->name);\n }\n\n $this->sources = $this->sources->get();\n $this->types = $this->types->get();\n }", "title": "" }, { "docid": "273a105db0feb59683eccba6142665ad", "score": "0.57752246", "text": "public function render(){\n\n $this->setDefaults();\n $this->sanitizeProperties();\n \n $this->properties['name'] = 'mc_list_select';\n\n $lists = Api::getListArray();\n\n Field::select(\n\n $this->properties['name'],\n $this->getLabel(),\n $lists,\n $this->properties\n\n )->render();\n\n }", "title": "" }, { "docid": "834c42562db3f5c54f9076fa6704bce7", "score": "0.57409525", "text": "public function select( $name, $config ) {\n extract( $config, EXTR_SKIP );\n\n if( !isset( $attrs ) )\n $attrs = array();\n\n $attrs[ 'name' ] = $name;\n\n $this->defaultArrayValue( $attrs, 'class', '' );\n $attrs[ 'class' ] .= ' select-field';\n \n $field = '';\n if( isset( $label ) )\n $field = $this->label( $name, $label );\n\n if( !isset( $selected ) )\n $selected = false;\n\n $field .= \"<select {$this->attrString( $attrs )}>\";\n foreach( $options as $value => $display ) {\n $field .= \"<option value=\\\"$value\\\"\";\n\n if( $value === $selected )\n $field .= \" selected=\\\"1\\\"\"; \n\n $field .= \">$display</option>\";\n }\n $field .= '</select>';\n\n if( isset( $desc ) )\n $field .= $this->description( $desc );\n\n echo $field;\n }", "title": "" }, { "docid": "9263e6df15bc832f10f3d428b07f2f75", "score": "0.57391703", "text": "protected function createSelectField($name, $label, $defaultValue, array $store, array $options = [])\n {\n $element = new Form\\Field\\Selection($name, $store);\n $element->fromArray($options);\n $element->setLabel($label);\n $element->setDefaultValue($defaultValue);\n\n return $element;\n }", "title": "" }, { "docid": "4e424e7e2aba1f748a5f09c1bd3eebe9", "score": "0.57321423", "text": "function addSelect($name, $title, $description, $options, $defaultOption, $required=false, $disabled=false, $onChange=\"\") {\r\n\t\t\t$this->p_addField(array('type' => 'select', 'title' => $title, 'name' => $name,\r\n\t\t\t\t'description' => $description, 'options' => $options, 'default' => $defaultOption, 'required' => $required, 'disabled' => $disabled, 'onchange' => $onChange));\r\n\t\t}", "title": "" }, { "docid": "79f899877dab6eaf97004bd635c15f99", "score": "0.5728317", "text": "private function selectInput( $input, $value ) {\n\t\t/**\n\t\t * Normalize the arguments required for this field type\n\t\t */\n\t\t$defaults = array(\n\t\t\t'label' => '',\n\t\t\t'class' => 'widefat',\n\t\t\t'options' => array(\n\t\t\t\t'' => __( 'Select Option', 'wpcl_plugin_scaffolding' ),\n\t\t\t),\n\t\t);\n\t\t$input = array_merge( $defaults, $input );\n\t\t/**\n\t\t * Do label\n\t\t */\n\t\tprintf( '<label for=\"%s\" style=\"margin-bottom: 5px; display: block;\">%s</label>',\n\t\t\t$this->get_field_name( $input['id'] ),\n\t\t\tesc_attr( $input['label'] )\n\t\t);\n\t\t/**\n\t\t * Open select\n\t\t */\n\t\tprintf( '<select name=\"%s\" id=\"%s\" class=\"%s\">',\n\t\t\t$this->get_field_name( $input['id'] ),\n\t\t\t$this->get_field_id( $input['id'] ),\n\t\t\t$input['class']\n\t\t);\n\t\t/**\n\t\t * Do Options\n\t\t */\n\t\tforeach( $input['options'] as $option_value => $label ) {\n\t\t\tprintf( '<option value=\"%s\"%s>%s</option>',\n\t\t\t\t$option_value,\n\t\t\t\tselected( $value, $option_value, false ),\n\t\t\t\t$label\n\t\t\t);\n\t\t}\n\t\t/**\n\t\t * Close Select\n\t\t */\n\t\techo '</select>';\n\t}", "title": "" }, { "docid": "e46fa26b0d54280b02b1387a4f991c3c", "score": "0.5723081", "text": "public function select($name, $options, $value = null, $attributes = [])\n {\n return new Select($name, $options, $value, $attributes);\n }", "title": "" }, { "docid": "757daa0a61e9eb6a66bbdbd239fc28c7", "score": "0.57043874", "text": "public function render()\n {\n return view('laravelforms::components.form-select');\n }", "title": "" }, { "docid": "3ed47d48a7b8d6cec995815a4753d333", "score": "0.56967866", "text": "public function render() \r\n\t{\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\tif ($this->multiple === true) \r\n\t\t{\r\n\t\t\t$content .= \"<select multiple='multiple' \";\r\n\t\t} \r\n\t\telse \r\n\t\t\r\n\t\t{\r\n\t\t\t$content .= \"<select \";\r\n\t\t}\r\n\t\t\r\n\t\t$content .= parent::render();\r\n\t\t\r\n\t\tif (count($this->attributes) > 0) \r\n\t\t{\r\n\t\t\tforeach ($this->attributes as $tag => $value) \r\n\t\t\t{\r\n\t\t\t\t$content .= \"$tag='$value' \";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$content .= \">\\n\";\r\n\r\n\t\t$content .= \"<option value=''></option>\\n\";\r\n\t\t\r\n\t\tforeach ($this->elements as $value => $text) \r\n\t\t{\r\n\t\t\t$content .= \"<option \" . ($this->isSelected($value) ? \"selected='selected'\" : \"\") . \" value='$value' >$text</option>\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t$content .= \"</select>\\n\";\r\n\t\t\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "65d47623fe4426e22e99111b9669d56b", "score": "0.5688471", "text": "public static function makeSelectorCat($sName){\n //the function that should make and then return the selector drop box.\n $iCnt = 0;\n $data = DB::table('categories')->select('categoryType')->get();\n echo \"<div class='form-group'><select name='$sName'>\";\n echo \"<option value='-1'>Select A Category</option>\";\n foreach ($data as $value) {\n $item = $value->categoryType;\n echo \"<option value='$iCnt'>$item</option>\";\n $iCnt++;\n }\n echo \"</select></div>\";\n }", "title": "" }, { "docid": "9123a278d2b2b1c7b1fea05cfb39670c", "score": "0.5679682", "text": "static function generate_select($argname, $pargopts) {\n \n $fout = '';\n $auxtype = 'select';\n\n if($pargopts==false){\n $pargopts = array();\n }\n \n $margs = array(\n 'options' => array(),\n 'class' => '',\n 'seekval' => '',\n 'extraattr'=>'',\n );\n\n $margs = array_merge($margs, $pargopts);\n\n $fout.='<select';\n $fout.=' name=\"' . $argname . '\"';\n if (isset($margs['class'])) {\n $fout.=' class=\"'.$margs['class'].'\"';\n }\n if ($margs['extraattr'] != '') {\n $fout.='' . $margs['extraattr'] . '';\n }\n \n $fout.='>';\n \n //print_r($margs['options']);\n\n foreach ($margs['options'] as $opt) {\n $val = '';\n $lab = '';\n\n\n\n if (is_array($opt) && isset($opt['lab']) && isset($opt['val'])) {\n $val = $opt['val'];\n $lab = $opt['lab'];\n } else {\n if (is_array($opt) && isset($opt['label']) && isset($opt['value'])) {\n\n $val = $opt['value'];\n $lab = $opt['label'];\n }else{\n $val = $opt;\n $lab = $opt;\n }\n\n }\n \n\n $fout.='<option value=\"' . $val . '\"';\n if ($margs['seekval'] != '' && $margs['seekval'] == $val) {\n $fout.=' selected';\n }\n\n $fout.='>' . $lab . '</option>';\n }\n $fout.='</select>';\n return $fout;\n }", "title": "" }, { "docid": "b1954dda37bf3f30b498f8043c58258c", "score": "0.5676479", "text": "function build_year_selection_box() {\n\t$user = 'root';\n\t$pass = 'root';\n\t$db = 'presidential_elections';\n\n\t$db = new mysqli('localhost', $user, $pass, $db) or die(\"Unable to connect to database\");\n\n\t$sql = \"SELECT * FROM election WHERE 1 ORDER BY year\";\n\t$result = $db->query($sql);\n\t\n\techo \"<select id='select_box_id'>\";\n\t\n\tif ($result->num_rows > 0) {\n\t\t// output data of each row\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\techo \"<option value='\" . $row['year'] . \"'>\" . $row['year'] .\"</option>\";\n\t\t}\n\t} else {\n\t\t\techo \"<option value='\" . \"DB_ERROR\" . \"'>\" . \"DB Access FAILED\" .\"</option>\";\n\t}\n\techo \"</select>\";\n}", "title": "" }, { "docid": "276727f4af06f25c1028c1d5bbf4d63f", "score": "0.5657482", "text": "protected function build_select_course_form()\n {\n $select = $this->addElement(\n 'select',\n 'select_course',\n array(get_lang('PickACourse'), 'test'),\n null\n );\n $coursecat = Category :: get_all_courses(api_get_user_id());\n //only return courses that are not yet created by the teacher\n\n foreach ($coursecat as $row) {\n $select->addoption($row[1],$row[0]);\n }\n $this->setDefaults(array(\n 'hid_user_id' => $this->category_object->get_user_id(),\n 'hid_parent_id' => $this->category_object->get_parent_id()\n ));\n $this->addElement('hidden','hid_user_id');\n $this->addElement('hidden','hid_parent_id');\n $this->addElement('submit', null, get_lang('Ok'));\n }", "title": "" }, { "docid": "30ece855bfb9eef61e5536d0674579d7", "score": "0.56309515", "text": "function creatHtmlSelect($name,$array,$selected,$attribut){\r\n\t\r\n\t\t$tmp = '<Select name=\"'.$name.'\" '.$attribut.' >'.\"\\n\";\r\n \r\n foreach($array as $key=>$value){\r\n \t\r\n \tif( $key == $selected){\r\n \t\t$tmp .= '<option value=\"'.$key.'\" SELECTED >'.$value.'</option>'.\"\\n\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$tmp .= '<option value=\"'.$key.'\">'.$value.'</option>'.\"\\n\";\t\r\n\t\t\t}\t\r\n }\r\n $tmp .= '</select>';\r\n\t\treturn $tmp;\t\r\n}", "title": "" }, { "docid": "3063c45efadcc768199de9f16450f5a2", "score": "0.5624147", "text": "protected function onLoad(): Select\r\n {\r\n }", "title": "" }, { "docid": "23e7678a7163c8d7dd7e643dd633d466", "score": "0.56051016", "text": "public function setInputSelect($name,$label,array & $options = [],array $attributes = []){ \n \n $input['type'] = 'Zend\\Form\\Element\\Select';\n $input['name'] = $name;\n \n if(empty($attributes)){\n $input['attributes'] = array('id' => $name,'onKeyDown' => 'return changeEnterToTab(this,event)'); \n }else{\n $input['attributes'] = array_merge(array('id' => $name,'onKeyDown' => 'return changeEnterToTab(this,event)'),$attributes); \n }\n \n $input['options'] = array(\n 'label' => $label,\n 'empty_option' => 'Escolha da lista',\n 'value_options' => $options\n ); \n \n $this->add($input);\n }", "title": "" }, { "docid": "77fa7a8d91341b72afdea2adff5a6190", "score": "0.5604792", "text": "public function render_select( $data ) {\n\t\textract( $this->fetch_element_data( $data ) );\t\n\t\t$multiple = ! empty( $data['multiple'] ) ? ' multiple ' : '';\n\n\t\tif ( $multiple && strpos( $name, '[' ) === false ) {\n\t\t\t$name .= '[]';\n\t\t}\n\t\t\n\t\t$ret = \n\t\t'<select\n\t\t\tname=\"' . $name . '\"\n\t\t\tid=\"' . $id . '\"\n\t\t\tclass=\"' . $class . '\"' .\n\t\t\t$multiple . $custom_data .\n\t\t\t' style=\"' . $css . '\"\n\t\t>';\n\n\t\tforeach( $values as $value => $text ) {\n\t\t\t$selected = $this->compare_select_value( $value, $active ) ? ' selected=\"selected\"' : '';\n\n\t\t\t$ret .=\n\t\t\t'<option value=\"' . htmlentities( $value ) . '\"' . $selected . '>' . $text . '</option>';\n\t\t}\n\n\t\t$ret .=\n\t\t'</select>';\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "32a15735ba2c8d7509d54966e4cf7be8", "score": "0.560397", "text": "function CrearOptionSelect($value,$label,$selected){\r\n\t\t\r\n\t\tif($selected==1)\r\n\t\t\tprint('<option value='.$value.' selected>'.$label.'</option>');\r\n\t\telse\r\n\t\t\tprint('<option value='.$value.'>'.$label.'</option>');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "32a15735ba2c8d7509d54966e4cf7be8", "score": "0.560397", "text": "function CrearOptionSelect($value,$label,$selected){\r\n\t\t\r\n\t\tif($selected==1)\r\n\t\t\tprint('<option value='.$value.' selected>'.$label.'</option>');\r\n\t\telse\r\n\t\t\tprint('<option value='.$value.'>'.$label.'</option>');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b0d9ecb2c12a5b788365967d816a7092", "score": "0.5598638", "text": "protected function MakeFormType() {\n $this->options['attributes'] = $this->attributes;\n $this->options['source'] = array('' => 'None');\n\n $methods = get_class_methods($this);\n sort($methods);\n\n foreach ($methods as $method) {\n if (strpos($method, 'Make') === 0) {\n $displayName = trim(preg_replace('/([A-Z])/', ' \\\\1', str_replace('Make', '', $method)));\n $value = str_replace(' ', '_', strtolower($displayName));\n $this->options['source'][$value] = $displayName;\n }\n }\n\n $select = new ClaeroField('select', $this->name, $this->value, $this->options);\n $this->html .= $select->GetHtml();\n }", "title": "" }, { "docid": "d54065c0a9180df0fd1b652dbdb1a764", "score": "0.55860156", "text": "public function creaDia() {\n $arr_dia = range(1, 30);\n \n //genera la lisda de dias\n $dia = new Select();\n $dia->creaLabel(\"Dia\");\n $dia->creaName(\"dia\");\n foreach ( $arr_dia as $opt ) {\n $dia->creaOption(new Option($opt, $opt));\n }\n $dia->render();\n }", "title": "" }, { "docid": "a22c1ec3f4cf5c05a9f4885ce373c11e", "score": "0.55762887", "text": "private function _dropdown() {\n\t\t$options = array();\n\t\tif ($this->properties['update']) {\n\t\t\t$options += array('update' => t('Update'));\n\t\t}\n\t\t$options_delete = array();\n\t\tif ($this->properties['delete']) {\n\t\t\t$options += array('delete' => t('Delete'));\n\t\t}\n\t\t$dropdown = array(\n\t\t\t'name' => 'crud_action', \n\t\t\t'options' => $options\n\t\t);\n\t\t$returns = \"<div id='crud_select' class='crud_select'>\";\n\t\t$returns .= $this->CI->form->dropdown($dropdown);\n\t\t$returns .= \"</div>\";\n\t\treturn $returns;\n\t}", "title": "" }, { "docid": "54f3e498009994ef2ce054d72f75859f", "score": "0.5572094", "text": "abstract public function getSelect();", "title": "" }, { "docid": "5ded3e1664bc36a0587da5f7d3b48987", "score": "0.5570566", "text": "private function getSelect( $select )\n {\n /** Check to see if we have arrays and that they have what we need. */\n if ( is_array( $select )\n && count ( $select ) > 0\n && isset( $select['items'] )\n && count ( $select['items'] ) > 0 )\n {\n if ( $select['load'] )\n {\n /** Get the select label (title). */\n $str = $select['label']['load'] ? $this->getLabel( $select ) : '';\n\n /** Open the select element. */\n $str .= '<select';\n\n /** Don't forget the leading blank space before each attribute. */\n\n /** Set the id (for use with label and accessibility purposes). */\n $str .= sprintf( ' id=\"%s\"', $select['name'] );\n\n /** Set the name (used when posting the form). */\n $str .= sprintf( ' name=\"%s_%s\"', $this->opts['form']['prefix'], $select['name'] );\n\n /** Set the size of the drop down. */\n $str .= sprintf( ' size=\"%s\"', $select['size'] );\n\n /** Allow multiple items to be selected (or not). It may help to set \"size\" to > 1, if true. */\n $str .= $select['multiple'] ? ' multiple' : '';\n\n /** Close the select tag. */\n $str .= '>' . PHP_EOL;\n\n /** Cycle through the options. */\n foreach ( $select['items'] as $item )\n {\n /** Process only if the object is slated to be included (loaded). */\n if ( $item['load'] )\n {\n /** Open the option element. */\n $str .= '<option';\n\n /** Set the value of the option element. */\n $str .= sprintf( ' value=\"%s\"', $item['value'] );\n\n /** If the item is a default, set it to default (or not). */\n $str .= isset( $item['default'] ) && $item['default'] ? ' selected=\"\"' : '';\n\n /** Close the opening option tag. */\n $str .= '>';\n\n /** Set the text of the option element. */\n $str .= $item['text'];\n\n /** Close the option element and add a new line. */\n $str .= '</option>' . PHP_EOL;\n } // end item load\n } // end foreach\n\n /** Close the select element. */\n $str .= '</select>' . PHP_EOL;\n\n /** Return the string. */\n return $str;\n }\n else\n {\n /** No select element to load, return false. */\n return false;\n }\n }\n else\n {\n /** Something wrong happened. We don't have what we need. */\n return false;\n }\n }", "title": "" }, { "docid": "7ec9c34f2bf137a1a44febddc180692f", "score": "0.5570546", "text": "public function action_select()\n {\n if (!empty($this->m_partial))\n {\n $this->partial($this->m_partial);\n return;\n } \n \n $output = $this->invoke(\"selectPage\");\n \n if ($output != \"\")\n {\n $this->getPage()->addContent($this->getNode()->renderActionPage(\"select\", $output));\n }\n }", "title": "" }, { "docid": "a7613aa03d317bdee850a1ec75d0a075", "score": "0.5570282", "text": "function combobox($name, $table, $field, $primary_key, $selected){\n\t$ci = get_instance();\n\t$cmb = \"<select name='$name' class='form-control'>\";\n\t$data = $ci->db->get($table)->result();\n\t$cmb .=\"<option value=''>-- PILIH --</option>\";\n\tforeach($data as $d){\t\t\n\t\t$cmb .=\"<option value='\".$d->$primary_key.\"'\";\n\t\t$cmb .= $selected==$d->$primary_key?\"selected='selected'\":'';\n\t\t$cmb .=\">\". strtoupper($d->$field).\"</option>\";\n\t}\n\t$cmb .=\"</select>\";\n\treturn $cmb;\n}", "title": "" }, { "docid": "8cfd8bb86ed302bfba2f5a73cf531e23", "score": "0.5566256", "text": "public static function selectBox() : void;", "title": "" }, { "docid": "656aa6b3f7a1e000a5340ab9d764bf96", "score": "0.55599856", "text": "public function getTypeSelect($type = null)\n {\n $options = [ \n 1 => ['value' => 1, 'label' => 'Type 1'], \n 2 => ['value' => 2, 'label' => 'Type 2'],\n 3 => ['value' => 3, 'label' => 'Type 3']\n ];\n\n\n $html = $this->getLayout()->createBlock(\n \\Magento\\Framework\\View\\Element\\Html\\Select::class\n )->setName(\n 'ticket[ticket_type]'\n )->setId(\n 'ticket_type'\n )->setTitle(\n $this->escapeHtml(__('Ticket Type'))\n )->setValue(\n ''\n )->setOptions(\n $options\n )->setExtraParams(\n 'data-validate=\"{\\'validate-select\\':true}\"'\n )->setValue(\n $type\n )->getHtml();\n\n \\Magento\\Framework\\Profiler::stop('TEST: ' . __METHOD__);\n return $html;\n }", "title": "" }, { "docid": "6a055d453cb215c83bde53753d19893a", "score": "0.5556316", "text": "public function generate()\n\t{\n\t\t// generate widget\n\t\t$objWidget = new \\FormSelectMenu();\n\t\t// is radio\n\t\tif($this->universalPaymentSelectIsRadio) { $objWidget = new \\FormRadioButton(); }\n\t\t$objWidget->name = $this->name;\n\t\t$objWidget->id = $this->id;\n\t\t$objWidget->class .= 'universalpayment_select';\n\t\t\n\t\t// get registered payment modules\n\t\t$arrPaymentModules = UniversalPayment::getInstance()->getPaymentModules();\n\t\t\n\t\tif(TL_MODE == 'BE')\n\t\t{\n\t\t\tif(count($arrPaymentModules) > 0)\n\t\t\t{\n\t\t\t\tforeach($arrPaymentModules as $value => $label)\n\t\t\t\t{\n\t\t\t\t\t$this->arrOptions[] = array('value'=>$value, 'label'=>trim($label));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif(TL_MODE == 'FE')\n\t\t{\n\t\t\t#$this->arrOptions =array( array('value'=>'','label'=>'-') );\n\t\t\n\t\t\t// fetch published payment fields\n\t\t\t$objDatabase = \\Database::getInstance();\n\t\t\t\n\t\t\t$findInSet = $objDatabase->findInSet('universalPaymentMethod',array_flip($arrPaymentModules));\n\t\t\t$objFields = $objDatabase->execute(\"SELECT * FROM tl_form_field WHERE type='universalpayment' AND \".$findInSet.' AND invisible!=1');\n\t\t\t\n\t\t\tif($objFields->numRows < 1)\n\t\t\t{\n\t\t\t\treturn '<span class=\"error\">'.$GLOBALS['TL_LANG']['MSC']['noActivePaymentMethods'].'</span>';\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\twhile($objFields->next())\n\t\t\t{\n\t\t\t\t$label = trim($arrPaymentModules[$objFields->universalPaymentMethod]);\n\t\t\t\t$value = $objFields->universalPaymentMethod;\n\t\t\t\t$this->arrOptions[] = array('value'=>$value, 'label'=>$label);\n\t\t\t}\n\t\t}\n\t\telse{}\n\n\t\t$objWidget->options = $this->arrOptions;\n\n\t\treturn $objWidget->generate();\n\t}", "title": "" }, { "docid": "fc16af59022eefa6697f4ee2feb8dd4e", "score": "0.5543434", "text": "public function render_content()\n{\nif(!empty($this->fonts))\n{\n?>\n<label>\n<span class=\"customize-category-select-control\"><?php echo esc_html( $this->label ); ?></span>\n<select <?php $this->link(); ?>>\n<?php\nforeach ( $this->fonts as $k => $v )\n{\nprintf('<option value=\"%s\" %s>%s</option>', $k, selected($this->value(), $k, false), $v->family);\n}\n?>\n</select>\n</label>\n<?php\n}\n}", "title": "" }, { "docid": "10f02a01cd4161015a1c86d1471d6123", "score": "0.55394703", "text": "function initDropDown(){\n\t\t$this->_drop_down = new DropDownInput();\n\t\t$this->_drop_down->setName((string)$this->field());\n\t}", "title": "" }, { "docid": "acc0012610d190d4b1575c554ebed016", "score": "0.5535915", "text": "public function __construct(SelectFieldType $fieldType)\n {\n $this->fieldType = $fieldType;\n }", "title": "" }, { "docid": "1ccfa2b784d145e2fc8a94956da01cd7", "score": "0.55327505", "text": "public function render_control( $input = null ) {\n $control = new CV_HTML( '<select>', array(\n 'name' => $this->handle,\n 'id' => $this->id,\n ) );\n foreach ( $this->config['options'] as $slug => $config ) {\n if ( ! is_array( $config ) ) {\n $control->append('<option value=\"' . $slug . '\" ' . selected( $input, $slug, 0 ) . '>' . $config . '</option>');\n continue;\n }\n $group = new CV_HTML( '<optgroup>', array(\n 'label' => $config['label'],\n ) );\n foreach ( $config['options'] as $val => $label ) {\n $group->append('<option value=\"' . $val . '\" ' . selected( $input, $val, 0 ) . '>' . $label . '</option>');\n }\n $control->append( $group );\n }\n return $control->render();\n }", "title": "" }, { "docid": "7388bf1670ce18f2a56e1ce9300f84de", "score": "0.5531486", "text": "function make_select_box($options, $selected, $select_identifier, $label_prompt, $submit_prompt = 'submit', $action_url = '')\n{\n\t$return_str = $temp_str = '';\n\t\n\tforeach ($options as $option => $option_lang)\n\t{\n\t\tif ($option != $selected)\n\t\t{\n\t\t\t$temp_str .= '<option value=\"' . $option . \"\\\">$option_lang</option>\";\n\t\t}\n\t\telse {\n\t\t\t$temp_str .= '<option value=\"' . $option . '\" selected=\"selected\">' . $option_lang . '</option>';\n\t\t}\n\t}\n\t\n\t$submit_prompt = ucfirst($submit_prompt);\n\t\n\tif ($options)\n\t{\n\t\t$return_str = '<fieldset><label for=\"' . $select_identifier . '\">' . $label_prompt . ': </label><select name=' . $select_identifier . ' id=\"' . $select_identifier . '\">' . $temp_str . '</select> <input class=\"button2\" type=\"submit\" value=\"' . $submit_prompt . '\" /></fieldset>';\n\t}\n\t\n\treturn $return_str;\n}", "title": "" }, { "docid": "9b03b315a17c22c802aab013681f251a", "score": "0.55286205", "text": "public function _initSelect()\n {\n parent::_initSelect();\n $this->addWebsitesToResult();\n return $this;\n }", "title": "" }, { "docid": "c66346e95be86e11654e51391c8a6acc", "score": "0.5522747", "text": "public static function ComboChoice_Declare($attr,$content)\n {\n return \"<?php ob_start(); ?>\"\n .$content\n .\"<?php \\$field->addChoice('\".$attr['id'].\"',ob_get_clean(),\".(isset($attr['selected'])?1:0).\"); ?>\\n\";\n }", "title": "" }, { "docid": "d9d789cf9b56917eb4f311ff7faac8e0", "score": "0.5521424", "text": "public static function select($form, $model, $field){\n \t\tif (ArrayHelper::keyExists('name', $field) ){\n \t\t\t\t$items = [];\n \t\t\t\t$checked = [];\n\n\t\t\t\tforeach ($field['items'] as $key => $value) {\n\t\t \t\t $items[$value['value']] = $value['text'];\n\t\t \t\t \n\t\t \t\t if (isset($value['checked'])){\n\t\t \t\t \t$checked[] = $key+1;\n\t\t \t\t } \n\t\t \t\t}\n\t\t \t\t\n\t\t\t\t$model->{$field['name']} = $checked;\n\t\t\t\t$select = $form->field($model, $field['name'])->dropDownList($items);\n\t\t\t\t$label = (isset($field['label'])) ? $field['label'] : '';\n\t\t\t\t$select->label($label);\n \t\t\treturn $select; \n\t\t}\n }", "title": "" }, { "docid": "01b7f0cf204b34ef722bb38064d83301", "score": "0.5521051", "text": "abstract protected function authenticateCreateSelect();", "title": "" }, { "docid": "0f9c6a2392ec511b19ab10503b7f475b", "score": "0.5515274", "text": "protected function render_select( $args = array() ) {\n\n\t\t$args = $this->normalize_args(\n\t\t\twp_parse_args(\n\t\t\t\t$args,\n\t\t\t\tarray(\n\t\t\t\t\t'selected' => $this->value(),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t?>\n\t\t<div class=\"sc-element sc-element-select <?php echo esc_attr( $this->wrap_class( $args ) ); ?>\">\n\t\t\t<?php\n\t\t\t$this->render_input_group_text( $args['text'] );\n\t\t\t$this->render_input_group_icon( $args['icon'] );\n\t\t\t?>\n\t\t\t<select <?php $this->link( $args['link'] ); ?> <?php $this->render_input_attrs( $args['input_attrs'] ); ?>>\n\t\t\t\t<?php\n\t\t\t\tforeach ( $args['choices'] as $value => $label ) {\n\t\t\t\t\techo '<option';\n\t\t\t\t\tif ( is_array( $label ) ) {\n\t\t\t\t\t\tforeach ( $label as $option_data_key => $option_data_value ) {\n\t\t\t\t\t\t\tif ( 'label' !== $option_data_key ) {\n\t\t\t\t\t\t\t\techo ' ' . esc_html( $option_data_key ) . '=\"' . esc_attr( $option_data_value ) . '\"';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$label = isset( $label['label'] ) ? $label['label'] : $value;\n\t\t\t\t\t}\n\t\t\t\t\techo ' value=\"' . esc_attr( $value ) . '\"' . selected( $args['selected'], $value, false ) . '>' . esc_attr( $label ) . '</option>';\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</select>\n\t\t\t<?php\n\t\t\t$this->render_input_group_unit( $args['unit'] );\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "a48358b9760d76fdbd728b1c2c0a44bb", "score": "0.5511737", "text": "public function render_field_select( $args ) {\n\n\t\t$value = esc_attr( $this->get_field_value( $args ) );\n\t\t$attrs = $this->get_field_attrs( $args );\n\n\t\t$html = sprintf( '<select name=\"%2$s\" id=\"%1$s\" %3$s>', $this->get_field_id( $args ), $this->get_field_name( $args ), $attrs );\n\t\tforeach ( $args['options'] as $key => $label ) {\n\t\t\t$html .= sprintf( '<option value=\"%s\"%s>%s</option>', $key, selected( $value, $key, false ), $label );\n\t\t}\n\t\t$html .= sprintf( '</select>' );\n\t\t$html .= $this->get_field_description( $args );\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "66dbc2767b638f68355bee150fdf1077", "score": "0.5511729", "text": "function initialize() {\n\n\t\t\t// vars\n\t\t\t$this->name = 'select';\n\t\t\t$this->label = _x( 'Select', 'noun', 'acf' );\n\t\t\t$this->category = 'choice';\n\t\t\t$this->description = __( 'A dropdown list with a selection of choices that you specify.', 'acf' );\n\t\t\t$this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-select.png';\n\t\t\t$this->doc_url = acf_add_url_utm_tags( 'https://www.advancedcustomfields.com/resources/select/', 'docs', 'field-type-selection' );\n\t\t\t$this->defaults = array(\n\t\t\t\t'multiple' => 0,\n\t\t\t\t'allow_null' => 0,\n\t\t\t\t'choices' => array(),\n\t\t\t\t'default_value' => '',\n\t\t\t\t'ui' => 0,\n\t\t\t\t'ajax' => 0,\n\t\t\t\t'placeholder' => '',\n\t\t\t\t'return_format' => 'value',\n\t\t\t);\n\n\t\t\t// ajax\n\t\t\tadd_action( 'wp_ajax_acf/fields/select/query', array( $this, 'ajax_query' ) );\n\t\t\tadd_action( 'wp_ajax_nopriv_acf/fields/select/query', array( $this, 'ajax_query' ) );\n\n\t\t}", "title": "" }, { "docid": "1336785373c34680a92ad19a0e15e29e", "score": "0.5511191", "text": "function render(){\n\t\t\n\t\t$class = (isset($this->field['class']))?$this->field['class']:'';\n\t\t\n\t\techo '<select id=\"'.$this->field['id'].'\" name=\"'.$this->args['opt_name'].'['.$this->field['id'].'][]\" class=\"nhpopts-cats_multi_select '.$class.'\" multiple=\"multiple\" style=\"width: 100%; max-width: 240px;\" data-placeholder=\"'.__( 'Select categories', 'best' ).'\">';\n\n\t\t$args = empty($this->field['args']) ? array() : wp_parse_args($this->field['args'], array());\n\t\t\n\t\t$cats = get_categories($args); \n\t\tforeach ( $cats as $cat ) {\n\t\t\t$selected = (is_array($this->value) && in_array($cat->term_id, $this->value))?' selected=\"selected\"':'';\n\t\t\techo '<option value=\"'.$cat->term_id.'\"'.$selected.'>'.$cat->name.'</option>';\n\t\t}\n\t\t\n\t\t\n\n\t\techo '</select>';\n echo '<input type=\"button\" id=\"'.$this->field['id'].'-selectall\" value=\"'.__('Select All', 'best' ).'\" class=\"button button-secondary select_all_cats\">';\n \n\t\techo (isset($this->field['desc']) && !empty($this->field['desc']))?'<br/><span class=\"description\">'.$this->field['desc'].'</span>':'';\n\t\t\n\t}", "title": "" }, { "docid": "3cdbaadc1d9b29c304d62563d1fb3c6b", "score": "0.55083907", "text": "public function languages_select()\n {\n $select = '<select>';\n $option = '<option value=\"_lang_code_\">_lang_name_</option>';\n foreach ($this->client->supportedLanguages as $langCode => $langName) {\n $optionTemp = str_replace('_lang_code_', $langCode, $option);\n $optionTemp = str_replace('_lang_name_', $langName, $optionTemp);\n $select .= $optionTemp;\n }\n $select .= '</select>';\n\n return $select;\n }", "title": "" }, { "docid": "f035590ec11909acf4b2fd0fcef24013", "score": "0.55071574", "text": "function _select_box($title,$name,$options,$baseurl='')\n\t{\n\t\tif ($baseurl)\t// we append the value to the baseurl\n\t\t{\n\t\t\tif (substr($baseurl,-1) != '=') $baseurl .= strpos($baseurl,'?') === False ? '?' : '&';\n\t\t\t$onchange=\"location='$baseurl'+this.value;\";\n\t\t}\n\t\telse\t\t\t// we add $name=value to the actual location\n\t\t{\n\t\t\t$onchange=\"location=location+(location.search.length ? '&' : '?')+'\".$name.\"='+this.value;\";\n\t\t}\n\t\t$select = ' <select style=\"width: 185px;\" name=\"'.$name.'\" onchange=\"'.$onchange.'\" title=\"'.\n\t\t\tlang('Select a %1',lang($title)).'\">'.\n\t\t\t$options.\"</select>\\n\";\n\n\t\treturn array(\n\t\t\t'text' => $select,\n\t\t\t'no_lang' => True,\n\t\t\t'link' => False\n\t\t);\n\t}", "title": "" }, { "docid": "54a2c34423e5b5149f59d977780f96ba", "score": "0.5500512", "text": "public function __construct($options = array(), $attributes = array())\n {\n if (!isset($options[\"choices\"]))\n {\n $options['choices'] = array();\n }\n\n sfWidgetFormChoice::__construct($options, $attributes);\n }", "title": "" }, { "docid": "b12e483267ffbe05dc118081370e1a24", "score": "0.5489543", "text": "function createComboBox($identifier, $name, $content, $selectedValue)\r\n\t{\r\n\t\t$output = '<select id=\"' . $identifier . '\" name=\"' . $name . '\" >';\r\n\r\n\t\tforeach($content as $index => $datas)\r\n\t\t{\r\n\t\t\tif(is_object($datas))\r\n\t\t\t{\r\n\t\t\t\t$selected = ($selectedValue == $datas->id) ? ' selected=\"selected\" ' : '';\r\n\t\t\t\t$output .= '<option value=\"' . $datas->id . '\" ' . $selected . ' >' . $datas->nom . '</option>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$selected = ($selectedValue == $index) ? ' selected=\"selected\" ' : '';\r\n\t\t\t\t$output .= '<option value=\"' . $index . '\" ' . $selected . ' >' . $datas . '</option>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$output .= '</select>';\r\n\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "ad18089a70265b72ce25144f08dbd23f", "score": "0.5463769", "text": "function formElementSelectEmergenciaTipo($input_nombre, $input_valor = \"\", $atributos){\n $select = New Emergencia_Form_Element_SelectTipo();\n $select->getElement()->addAtributos($atributos);\n $select->setNombre($input_nombre);\n return $select->render($input_valor);\n}", "title": "" }, { "docid": "4d20384e21f327cc98b670aabd11cb89", "score": "0.5452654", "text": "function createDropdownList($id = \"\", $name = \"\", $class = \"\", $style = \"\", $display_size = \"1\", $dataSource)\n{\n\n $html = \"<select id='\" . $id . \"' name='\" . $name . \"' class='$class' style='$style' size='$display_size'>\";\n if (sizeof($dataSource[\"data\"]) > 0) {\n foreach ($dataSource[\"data\"] as $key => $value) {\n if (array_key_exists(\"selected\", $dataSource) && in_array($value, $dataSource[\"selected\"])) {\n $html = $html . \"<option value='\" . $value . \"' selected>\" . $key . \"</option>\";\n } else {\n $html = $html . \"<option value='\" . $value . \"'>\" . $key . \"</option>\";\n }\n }\n }\n return $html = $html . \"</select>\";\n}", "title": "" }, { "docid": "25d3d780648f1933e070ad837cd471f5", "score": "0.5452334", "text": "function dynamicSelect($list, $name, $placeholder, $required){\r\n\t\t\r\n\t\tif($required){\r\n\t\t\t\r\n\t\t\t$init = \"<select required \";\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$init = \"<select \";\r\n\t\t\t\r\n\t\t}\r\n\t\t$html = $init . \"name='\" . $name . \"'> <option value='' selected>\" . $placeholder . \"</option>\";\r\n\t\tforeach($list as $item){\r\n\t\t\t$html .= \"<option value='\" . $item . \"'>\" . $item . \"</option>\";\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$html .= \"</select>\";\r\n\t\t\r\n\t\treturn $html;\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0d5af82b181a4e59147a23fda09db7f2", "score": "0.54445547", "text": "public function create()\n {\n return view('selections.create');\n }", "title": "" }, { "docid": "538a60758620eac5c616841de2d6f92b", "score": "0.5441666", "text": "function form_combobox($label, $name, $list, $width='5', $class=\"\", $attr=\"\"){\r\n echo'<div class=\"form-group\">\r\n <label for=\"'.$name.'\" class=\"col-sm-2 control-label\"> '.$label.'</label>\r\n <div class=\"col-sm-'.$width.'\">\r\n <select class=\"form-control '.$class.'\" name=\"'.$name.'\" id=\"'.$name.'\" '.$attr.'>\r\n <option value=\"\">- Pilih -</option>';\r\n\r\nforeach($list as $key => $val){\r\n echo '<option value='.$key.'>'.$val.'</option>';\r\n}\r\n\t\r\n echo '</select>\r\n </div> </div>';\r\n}", "title": "" }, { "docid": "115fb601b38cf0310b14772802369205", "score": "0.54377204", "text": "public static function select($name)\n {\n $input = new Select($name);\n return $input;\n }", "title": "" }, { "docid": "036483f4c2e13540e1676986b6a211cf", "score": "0.5433349", "text": "public function bbddSelect(){\n $datos=new bbdd();\n $datos=$datos->datosTipoVias();\n $cad=\"<select name='datosSelect'>\";\n for($i=0;$i<count($datos);$i++){\n $cad.=\"<option value='\".$datos[$i]['cod'].\"'>\".$datos[$i]['tipos'].\"</option>\";\n }\n $cad.=\"</select>\";\n return $cad;\n }", "title": "" }, { "docid": "b1bc2ccfe92fe4b3a4a5bc6a2f485070", "score": "0.5427743", "text": "function combo($sql, $name, $id, $value, $label){\n\t\t/*\n\t\t * $sql \t-> \t\tConsulta a ejecutar dentro del select\n\t\t * $name \t-> \t\tNombre del Select definido <select name=\"select\" id=\"\">\n\t\t * $id \t\t->\t\tIdentificador del elento select para sus porpiedades CSS\n\t\t * $value \t-> \t\tValor o valores de cada uno de los elementos de option en el select \"Id\" - \"Valor\"\n\t\t * $label \t-> \t\tEtiqueta que prcede al select \n\t\t * \n\t\t */\n\t\t\n\t\t//Asignar la consulta a la variable a utilizar en el metodo select\n\t\t$query = $sql;\n\n\t\t//Establecer la conecxion con la BD\n\t\tself::getConnection();\n\n\t\t//Preperara la consulta\n\t\t$result = self::$cnx->prepare($query);\n\n\t\t//Ejecutar la consulta\n\t\t$result->execute();\n\n\t\t//Devuelve numero de elementos encontrados en la ejecucacion de la consulta\n\t\t$rows = $result->rowCount();\t\n\n\t\t//echo \"Comenzando a crear select <br/>\";\n\n\n\t\techo '<div class=\"form-group\">';\n\t\techo '<label for=\"' . $id . '\">' . $label .'</label>';\n\t\t/*<select name=\"privilegio\" id=\"inputPrivi\" class=\"form-control\" required=\"required\">*/\n\t\techo '<select name=\"' . $name . '\" id=\"' . $id. '\" class=\"form-control\">';\n\n\n\t\t$iniselect = 1;\n\n\n\t\tif($rows > 0){\n\n\t\t\tif ($iniselect==1){\n\t\t\t\t//If some value is received from an unpdate form\n\t\t\t\tif($value != \"\"){\n\n\t\t\t\t\t$divide_values = explode(\"-\",$value);\n\t\t\t\t\t$id = $divide_values[0];\n\t\t\t\t\t$desc = $divide_values[1];\n\n\t\t\t\t\techo \"<option value='\" . $id . \"'>\". $desc . \"</option>\";\n \t\t\t}\n else{\n\n \techo \"<option value='0'>[ Seleccione una opcion ]</option>\";\n }\n \n while(list($id, $descrip) = $result->fetch()){\n\t if ($id == $value)\n\t echo '<option selected value=\"' . $id . '\">' . $descrip. '</option>';\n\t else\n\t echo '<option value=\"' . $id . '\">' . $descrip. '</option>';\n\t }\n\n }\n\n\t\t}else{\n\t\t\techo \"<option value='0'>'No hay opciones !!'</option>\";\n\t\t}\n\n\t\techo '</select>';\n\t\techo '<div>';\n\n\t\techo \"<br/></div>\";\n\t\t//Disconect from BD\n\t\tself::disconnect();\n\n\n\n\n\t}", "title": "" }, { "docid": "25981e52d3204878cbcbcf457557d825", "score": "0.5422814", "text": "public function email_types_select_html() {\n\n\t\t$email_type = $this->widget_meta( 'get', 'email_type' );\n\t\t$options = [\n\t\t\t'all' => esc_html__( 'All Emails', 'wp-mail-smtp-pro' ),\n\t\t\t'delivered' => esc_html__( 'Confirmed Emails', 'wp-mail-smtp-pro' ),\n\t\t\t'sent' => esc_html__( 'Unconfirmed Emails', 'wp-mail-smtp-pro' ),\n\t\t\t'unsent' => esc_html__( 'Failed Emails', 'wp-mail-smtp-pro' ),\n\t\t];\n\n\t\tif ( Helpers::mailer_without_send_confirmation() ) {\n\t\t\tunset( $options['sent'] );\n\t\t\t$options['delivered'] = esc_html__( 'Sent Emails', 'wp-mail-smtp-pro' );\n\t\t}\n\n\t\t?>\n\t\t<select id=\"wp-mail-smtp-dash-widget-email-type\" class=\"wp-mail-smtp-dash-widget-select-email-type\" title=\"<?php esc_attr_e( 'Select email type', 'wp-mail-smtp-pro' ); ?>\">\n\t\t\t<?php foreach ( $options as $key => $title ) : ?>\n\t\t\t\t<option value=\"<?php echo sanitize_key( $key ); ?>\" <?php selected( $email_type, sanitize_key( $key ) ); ?>>\n\t\t\t\t\t<?php echo esc_html( $title ); ?>\n\t\t\t\t</option>\n\t\t\t<?php endforeach; ?>\n\t\t</select>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "c18d4ec2d6e90acc351be3f6e259380e", "score": "0.54203135", "text": "public function render()\n {\n return view('components.inputs.bootstrap-dependent-select');\n }", "title": "" }, { "docid": "2cceb698823dec52f9d0218b44f37a7a", "score": "0.5412161", "text": "function selectHtml($login, $name, $condicion, $parametros, $orderby = 1, $valorSeleccionado = \"\", $blanco = true, $textoBlanco = \"&nbsp;\") {\r\n $select = \"<select name='$name' login='$login'>\";\r\n // $select .=\"</select>\";\r\n if ($blanco) {\r\n $select .=\"<option value=''>$textoBlanco</option>\";\r\n }\r\n $lista = $this->getList($condicion, $parametros, $orderby);\r\n foreach ($lista as $objeto) {\r\n $selected = \"\";\r\n if ($objeto->getLogin() == $valorSeleccionado) {\r\n $selected = \"selected\";\r\n }\r\n $select .=\"<option $selected value='\" . $objeto->getLogin() . \"'>\" .\r\n $objeto->getClave() . \", \" . $objeto->getApellidos() . \", \" .\r\n $objeto->getNombre() . \", \" . $objeto->getEmail() . \", \" .\r\n $objeto->getFechaalta() . \", \" . $objeto->getIsactivo() . \", \" .\r\n $objeto->getIsroot() . \", \" . $objeto->getRol() . \", \" .\r\n $objeto->getFechalogin() . \"</option>\";\r\n }\r\n $select .= \"</select>\";\r\n return $select;\r\n }", "title": "" }, { "docid": "84cf18c0df7d97fa3d036e590fa3f77b", "score": "0.5409235", "text": "public function getClassChoiceSelect()\n { \n //$classes = $this->getClasses();\n\n $class = new My_Model_Class();\n $classes = $class->getall();\n\n \n $elem = new Zend_Form_Element_Select('classes_id');\n $elem->setRequired($this->requiredVal)\n ->setLabel('Which co-op class are you planning to enroll in?');\n foreach ($classes as $c) {\n $elem->addMultiOptions(array($c['id'] => $c['name']));\n }\n \n return $elem;\n }", "title": "" }, { "docid": "e6a9ea11a15678d2d285bee11018bad3", "score": "0.54075253", "text": "private static function generateSelect(Array $data)\n {\n $label = '';\n $llabel = '';\n if (isset($data['label'])) {\n $label = $data['label'];\n unset($data['label']);\n }\n if (isset($data['llabel'])) {\n $llabel = $data['llabel'];\n unset($data['llabel']);\n }\n $html = '<select';\n foreach ($data as $name => $value) {\n if ($name!='value'&&$name!='values') {\n $html.=\" $name='$value'\";\n }\n }\n $html .= '>';\n foreach ($data['values'] as $name => $value) {\n if (empty($data['value'])) {\n $data['value'] = null;\n }\n $html.=\"<option value='$value'\".(($value==$data['value'])?\" selected\":'').\">$name</option>\";\n }\n $html .= '</select>';\n return '<label>'.$llabel.$html.$label.'</label>';\n }", "title": "" }, { "docid": "3c8e2b4562523e6f02e293408823f6ca", "score": "0.5400123", "text": "public function select(array $options)\n\t{\n\t\t$this->type = 'select';\n\t\t$this->options = $options;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b1fa779040348198e1b68f67b5c12b81", "score": "0.53986347", "text": "function twc_sidebar_select_box( $default = 'wp_inactive_widgets', $widget = null, $format = false, $name = null )\n{\n\t//initializing variables\n\tglobal $wp_registered_sidebars;\n\t$sidebars = $wp_registered_sidebars;\n\t$class = array('','selected=\"true\"');\n\t$select_filter = '';\n\t$sidebars_widgets = twc_wp_get_sidebars_widgets();\n\t\n\tif (!is_null($name))\n\t{\n\t\t$id = 'twc_sidebar_select_box_'.$widget['id'];\n\t}\n\telseif ($format)\n\t{\n\t\t$id = 'twc_sidebar_select_box_'.$widget['id'];\n\t\t$name = 'sidebar';\n\t}\n\telseif (!is_null($widget))\n\t{\n\t\t$id = 'twc_sidebar_select_box_'.$widget['id'];\n\t\t$name = 'widget-'.$widget['id_base'].'['.$widget['number'].'][sidebar_slug]';\n\t}\n\t\n\t$select = '<select id=\"'.$id.'\" name=\"'.$name.'\" class=\"twc_sidebar_select_box\">'.$select_filter;\n\t\n\tforeach ($sidebars as $slug => $sidebar)\n\t{\n\t\t$positions = count($sidebars_widgets[$slug]);\n\t\t$selected = 0;\n\t\tif ($default == $slug) $selected = 1;\n\t\t$select .= \"<option {$class[$selected]} positions='$positions' value='$slug'>{$sidebar['name']}</option>\";\n\t}\n\t\n\treturn $select.'</select>';\n}", "title": "" }, { "docid": "a8576a287ec5aec41fda4a336e2405c2", "score": "0.53838813", "text": "public function buildSelect($text, $id, $options, $tabIndex, $value = '') {\n $html = '<option value=\"nothing-selected\">- - - - - - -</option>';\n $select = explode(mswNL(), $options);\n foreach ($select AS $o) {\n $html .= '<option value=\"' . mswSH($o) . '\"' . mswSelectedItem($value, $o) . '>' . mswCD($o) . '</option>' . mswNL();\n }\n return mswNL() . '<div class=\"form-group\"><label>' . $text . '</label>' . mswNL() . '<select name=\"customField[' . $id . ']\" tabindex=\"' . $tabIndex . '\" class=\"form-control\">' . $html . '</select></div>' . mswNL();\n }", "title": "" }, { "docid": "6bb376d5ab2d01ac9770e7169b07993d", "score": "0.53745705", "text": "static function get_select_field($name, $value, $setting){\n $s = '<p class=\"select_field\">';\n $s .= '<label for=\"'.$name.'\">'.$setting['label'].'</label>';\n $s .= '<select class=\"widefat\" id=\"'.esc_attr( $name ).'\" name=\"'.$name.'\">';\n foreach ( $setting['options'] as $option_key => $option_value ) :\n $s .= '<option value=\"'.esc_attr( $option_key ).'\" '.selected( $option_key, $value, false ).'>'.esc_html( $option_value ).'</option>';\n endforeach;\n $s .= '</select>';\n $s .= '</p>';\n return $s;\n }", "title": "" }, { "docid": "51c3dc7bf90114bd06b6b418948a4a2a", "score": "0.53734446", "text": "function html_select($campo, $opciones, $valor, $att_select, $att_option)\n {\n $html_select = '<select name=\"' . $campo. '\"' . $att_select . '>';\n \n foreach ($opciones as $key => $texto_opcion) {\n\n $select_add = \"\";\n if ( $row[$id] == $default ){\n $select_add = \" selected='selected'\";\n }\n $html_select .= \"<option value='{$key}' {$select_add} {$att_option}>{$texto_opcion}</option>\";\n }\n $html_select .= '</select>';\n \n return $html_select;\n \n }", "title": "" }, { "docid": "70ce900ec69f0cdde29d5cd05b5d80af", "score": "0.5368989", "text": "function select($id, $label, $values, $option = '') {\r\n\t\t\tif ( $option == '') {\r\n\t\t\t\t$options = get_wpseo_options();\r\n\t\t\t\t$option = !empty($option) ? $option : $this->currentoption;\r\n\t\t\t} else {\r\n\t\t\t\tif ( function_exists('is_network_admin') && is_network_admin() ) {\r\n\t\t\t\t\t$options = get_site_option($option);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$options = get_option($option);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$output = '<label class=\"select\" for=\"'.$id.'\">'.$label.':</label>';\r\n\t\t\t$output .= '<select class=\"select\" name=\"'.$option.'['.$id.']\" id=\"'.$id.'\">';\r\n\t\t\t\r\n\t\t\tforeach($values as $value => $label) {\r\n\t\t\t\t$sel = '';\r\n\t\t\t\tif (isset($options[$id]) && $options[$id] == $value)\r\n\t\t\t\t\t$sel = 'selected=\"selected\" ';\r\n\r\n\t\t\t\tif (!empty($label))\r\n\t\t\t\t\t$output .= '<option '.$sel.'value=\"'.$value.'\">'.$label.'</option>';\r\n\t\t\t}\r\n\t\t\t$output .= '</select>';\r\n\t\t\treturn $output . '<br class=\"clear\"/>';\r\n\t\t}", "title": "" }, { "docid": "02b6fe47a0eed5ae9f356238b544be8b", "score": "0.53550506", "text": "public function getSelect() { return $this->select; }", "title": "" }, { "docid": "b0ab55d756e2bc7ab57858505fa3641f", "score": "0.5351958", "text": "public function setSelect($select) { $this->select = $select; }", "title": "" } ]
2754049bb5318d2dd8b3a3dcceef118b
Returns count of items in cart
[ { "docid": "787e313306241c5b258ff5e9251f5dd1", "score": "0.8641598", "text": "public function getItemsCount() {\n return (is_array($this->cart) && !empty($this->cart)) ? count($this->cart) : 0;\n }", "title": "" } ]
[ { "docid": "dbb4901fa9f24c86fec07b587bec0814", "score": "0.866665", "text": "function CountItems(){\n\t\t$c = $this->CartSession;\n\t\t$itemsAmount = 0;\n\t\tif ($c) {\n\t\t\t$cart = Order::get()->filter(array(\n\t\t\t\t\"ClientIdentifier\" => $c\n\t\t\t))->first();\n\t\t\tforeach($cart->Items() as $item){\n\t\t\t\t$itemsAmount += $item->Quantity;\n\t\t\t}\n\t\t}\n\t\treturn intval($itemsAmount);\n\n\t}", "title": "" }, { "docid": "864769c57f98eb2041d9be067c86643a", "score": "0.8495665", "text": "public function getCount() : int\n\t{\n\t\treturn count($this->session->getValue('cart'));\n\t}", "title": "" }, { "docid": "869fbd985fd68a875938063c3014e2c6", "score": "0.83521205", "text": "public static function countItems(){\n if (auth()->user()){\n return Cart::where('customer_id',auth()->id())->sum('quantity');\n }\n return 0 ;\n }", "title": "" }, { "docid": "9788c999267800a77539b2ca1676b4d8", "score": "0.8343324", "text": "public function total_items()\n\t{\n\t\treturn count($this->cart);\n\t}", "title": "" }, { "docid": "a2cd7b4ecd5a5c99c8989b81326fd9f1", "score": "0.83326066", "text": "function getCartNumItems()\n{\n\t$cartContent = array();\n\n\t$sid = session_id();\n\t$sql = \"SELECT ct_id, ct.pd_id, ct_qty, pd_name, pd_price, pd_thumbnail, pd.cat_id, pd.pd_qty\n\t\t\tFROM tbl_cart ct, tbl_product pd, tbl_category cat\n\t\t\tWHERE ct_session_id = '$sid' AND ct.pd_id = pd.pd_id AND cat.cat_id = pd.cat_id\";\n\t\n\t$result = dbQuery($sql);\n\t$numRow = dbNumRows($result);\n\treturn $numRow;\n}", "title": "" }, { "docid": "6c28d5d0bfad8db898bc56c8080bb053", "score": "0.8299022", "text": "public function getNumberOfItems() {\n $cart = $this->get();\n return sizeof($cart->getItems());\n }", "title": "" }, { "docid": "c6ead74603f7606c004b2149946ac802", "score": "0.8264984", "text": "public static function count_cart(){\n\t\t\tglobal $db;\n\n\t\t\n\t\t\t$user_id = isset($_SESSION['logged_user_id']) ? (int)($_SESSION['logged_user_id']) : 0; // Logged user id\n\t\t\t$count = 0; // Intialize for counting total quantity\n\n\t\t\t$sql = \"SELECT quantity FROM cart WHERE user_id = {$user_id} \";\n\t\t\t$result = $db->query($sql);\n\n\t\t\twhile($obj = $result->fetch_object()){\n\t\t\t\t$count += $obj->quantity;\n\t\t\t}\n\n\t\t\treturn $count;\n\t\t}", "title": "" }, { "docid": "06074e0dd6c7c0d2037adfc27c0a5288", "score": "0.82232183", "text": "public function countCarts(): int\n {\n return $this->query->count();\n }", "title": "" }, { "docid": "4723f73a2c90651ef4ae5c2147629570", "score": "0.8159683", "text": "public function Count()\n\t{\t$count = 0;\n\t\t\n\t\tif ($this->items)\n\t\t{\tforeach ($this->items as $product)\n\t\t\t{\t$count += $product['qty'];\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "db27592da631ad4cd13f802ac1ed7674", "score": "0.81590194", "text": "public static function countProductsInCart()\n {\n $sum = 0;\n $tab_prod = $_SESSION['panier'];\n\n foreach ($tab_prod as $data) {\n $sum += $data[\"quantity\"];\n }\n return $sum;\n }", "title": "" }, { "docid": "17d7df9e6c034158460dc4792c42106f", "score": "0.8103233", "text": "public function cartCount()\n {\n $count = $this->cart->itemCount();\n\n return $this->responseService->apiResponse('success', $count);\n }", "title": "" }, { "docid": "3d2f3b5c9c6d491ed6289b8769e5407d", "score": "0.80905944", "text": "function number_of_items_in_cart() {\r\n\tglobal $link;\r\n\t\r\n\tif (isset($_SESSION[\"current_user\"])) {\r\n\t\t\r\n\t\t$customer_id = $_SESSION[\"current_user\"];\r\n\t\t\r\n\t\t// Get all relevant data about this object\r\n\t\t$query_text = \"SELECT SUM(quantity) AS total_quantity FROM CART WHERE customer_id = ?\";\r\n\t\t$query = $link->prepare($query_text);\r\n\t\t$query->bind_param(\"s\", $customer_id);\r\n\t\tif(!$query->execute()) {\r\n\t\t\tquery_error($query_text); return False;\r\n\t\t}\r\n\t\tif (!$query) { return False; }\r\n\t\t\r\n\t\t$results = get_all_results_2d_array($query);\r\n\t\tif (!$results) { return False; }\r\n\t\t\r\n\t\treturn $results[0];\r\n\t\t\r\n\t} else {\r\n\t\treturn False;\r\n\t}\r\n}", "title": "" }, { "docid": "ab083fabca32549350e65fa221699728", "score": "0.8087291", "text": "public function CartCount()\n {\n // Prepare\n $this->dbh->prepare( \"SELECT sum(quantity) as quantity FROM $this->o_table WHERE c_id = $this->user_id AND status = 0\" );\n \n // Execute\n $exc = $this->dbh->execute();\n\n // Return the cart total on success FALSE on failure\n return $exc ? ( is_null( $count = $this->dbh->single_assoc()['quantity'] ) ? '0': $count ) : false;\n }", "title": "" }, { "docid": "2b87347cb0342de33ab0b5b8fb92784c", "score": "0.7909496", "text": "public function getItemsCount()\n {\n return count($this->basketItems);\n }", "title": "" }, { "docid": "6e5ee19b4eb3042eb60c2d883ee275b9", "score": "0.78804135", "text": "static function itemsInCart() {\n $userID = Session()->get('user')['id'];\n // returns count of the items present in the cart of the logged-in user\n return Cart::where('user_id', $userID)->count();\n }", "title": "" }, { "docid": "91eeb5b84e7368d3e2438019e9a70940", "score": "0.7855743", "text": "function cart_item_count () {\r\n\r\n $count = array_sum($_SESSION['cart']);\r\n return $count;\r\n}", "title": "" }, { "docid": "ded231a2b4b3122636656999fd9a1db6", "score": "0.7816119", "text": "public function itemsCount()\n {\n $items = $this->getOrderItems();\n\n $count = 0;\n foreach ($items as $value) {\n $count += $value->QUANTITY;\n }\n return $count;\n }", "title": "" }, { "docid": "c7cea8b3cd83625b449b3125eee1a044", "score": "0.7809506", "text": "public function getItemsCount() {\n $count = 0;\n foreach ($this as $product)\n {\n $count += $product->getQuantity();\n }\n\n return $count;\n }", "title": "" }, { "docid": "6c8bf98b80ad36a9d4cadc6449f49c7d", "score": "0.77660096", "text": "public function count()\n {\n $total = 0;\n foreach ($this->getIterator() as $item){\n $total += $item['qty'];\n }\n return $total;\n }", "title": "" }, { "docid": "9419834a8024c6066f21878658dab832", "score": "0.7732384", "text": "public function getStShopItemsCount()\n {\n return $this->count(self::STSHOPITEMS);\n }", "title": "" }, { "docid": "15a5fab8f08643ba87b63ab281d5645b", "score": "0.771443", "text": "public function get_total_items()\n {\n $num = 0;\n\n if(isset($_SESSION['cart']))\n {\n foreach($_SESSION['cart'] as $item)\n {\n $num = $num + $item;\n }\n }\n return $num;\n }", "title": "" }, { "docid": "80ff747413bbf85b62d0870687c67443", "score": "0.7702651", "text": "function cart_product_count() {\r\n\r\n return count($_SESSION['cart']);\r\n}", "title": "" }, { "docid": "d5e87a18c11e1aa50f2ca3e441e1cb82", "score": "0.76570165", "text": "public static function cartItem(){\n $userId=Session::get('user')['id'];\n return cart::where('user_id', $userId)->count();\n }", "title": "" }, { "docid": "d25eecd9e736da600fb9068ae389fe07", "score": "0.76179266", "text": "public function countAjax()\n\t{\n\t\treturn $this->cart->items()->count();\n\t}", "title": "" }, { "docid": "48452fda980998db4ff59e50a15ea1c0", "score": "0.7617436", "text": "public function numberItemOfCart() {\r\n $user_id = $this->userId();\r\n if(!$user_id) {return false;}\r\n\r\n $q_numberItemOfCart = $this->db->prepare(\"\r\n SELECT count(*)\r\n FROM `carts`\r\n WHERE `user_id` = :user_id\r\n \");\r\n $q_numberItemOfCart->bindParam(':user_id',$user_id);\r\n $q_numberItemOfCart->execute();\r\n return $q_numberItemOfCart->fetchColumn();\r\n }", "title": "" }, { "docid": "348adf42a765f341305fcbeee66b5bc4", "score": "0.7597525", "text": "public function count($totalItems = true)\n {\n $cart = $this->getContent();\n\n if (! $totalItems) {\n return $cart->count();\n }\n\n $count = 0;\n\n foreach ($cart as $row) {\n $count += $row->qty;\n }\n\n return $count;\n }", "title": "" }, { "docid": "ba7e40e5e2e2813d8c664d6ff8cddbdb", "score": "0.75915545", "text": "public function count($totalItems = true)\n {\n $cart = $this->getContent();\n\n if (!$totalItems) {\n return $cart->count();\n }\n\n $count = 0;\n\n foreach ($cart as $row) {\n $count += $row->qty;\n }\n\n return $count;\n }", "title": "" }, { "docid": "ed137b5ed32e093756b5db919027988a", "score": "0.75183123", "text": "public function getTotalCount() {\n\t\t$count = 0;\n\t\tforeach ($this->items as $item){\n\t\t\t$count += $item->getQuantity();\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "8c6580fb8c76282db60c7c93abec14f6", "score": "0.7504001", "text": "public function total_items()\n {\n return $this->cart_contents['total_items'];\n }", "title": "" }, { "docid": "e4bec820b839505fdd820e988332b7b1", "score": "0.749807", "text": "public function count()\n {\n return count((array)$this->items);\n }", "title": "" }, { "docid": "e51e0e1ef3c31768ee87d5a6f88ad077", "score": "0.745464", "text": "function get_myeshop_cart_itemcount(){\r\n\tglobal $blog_id;\r\n\t$total_items_in_cart = 0;\r\n\tif(isset($_SESSION['eshopcart'.$blog_id])) {\r\n\t\t$item_array = $_SESSION['eshopcart'.$blog_id];\r\n\t\t\r\n\t\tforeach($item_array as $item) {\r\n\t\t\t$total_items_in_cart = $total_items_in_cart + $item['qty'];\r\n\t\t}\r\n\t}\r\n\treturn $item_array;\r\n}", "title": "" }, { "docid": "79d7b111df4e0e2d6ec5907a6f036138", "score": "0.7449586", "text": "public function cart_count() \n\n\t{\n\n\t\t$this->db->select('temp_id');\n\n\t\t$this->db->from($this->table_temp);\n\n\t\t$this->db->where('temp_status', 'T');\n\n\t\t$this->db->where('temp_can_id', $this->session->userdata('cand_chid'));\n\n\t\treturn $this->db->count_all_results();\n\n }", "title": "" }, { "docid": "08ef63c19021f28bd8a8072c7115b03d", "score": "0.74197507", "text": "public function getItemsCount()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "d38e1deac67a1a62cb5401a86ea894fe", "score": "0.7418586", "text": "public function count() {\n return count($this->_items);\n }", "title": "" }, { "docid": "59314a59d7e3d0a5becd317f6fb5d780", "score": "0.74071693", "text": "public function count()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "5360dbd240cd5ed2c2a57843fcb6bf57", "score": "0.7398025", "text": "public function count_items() {\n\t\treturn SalesOrderDetailQuery::create()->filterByOrdernumber($this->oehdnbr)->count();\n\t}", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "91ea7862bc8fdc413ad04387381c199a", "score": "0.73977304", "text": "public function count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "e8606d49063035ae133fb79b75fa3af2", "score": "0.73917615", "text": "public function count() {\n return count($this->items);\n }", "title": "" }, { "docid": "e8606d49063035ae133fb79b75fa3af2", "score": "0.73917615", "text": "public function count() {\n return count($this->items);\n }", "title": "" }, { "docid": "c5336a4a88e264d49ff0231769362841", "score": "0.73556495", "text": "public function get_total_items_count()\n {\n return count($this->items);\n }", "title": "" }, { "docid": "9b377a2ad5bfca8a4f75511f7960ac90", "score": "0.735251", "text": "public function getNumberOfShoppingCartProducts() {\n\t\treturn count($this->_products);\n\t}", "title": "" }, { "docid": "56c888c7a13136d70f52448150a1b3fa", "score": "0.7352446", "text": "function items()\n {\n \tif(isset($_GET['add_cart']))\n \t{\n \t\tglobal $db;\n \t\t$ip_add=getRealIpAddr();\n \t\t$get_items=\"select * from cart where ip_add='$ip_add'\";\n \t\t$run_items = mysqli_query($db,\n \t\t\t$get_items);\n \t\t$count_items=mysqli_num_rows(\n \t\t\t$run_items); \n \t}\n \telse\n \t{\n\n \t\tglobal $db;\n \t\t$ip_add=getRealIpAddr();\n \t\t$get_items=\"select * from cart where ip_add='$ip_add'\";\n \t\t$run_items = mysqli_query($db,\n \t\t\t$get_items);\n \t\t$count_items=mysqli_num_rows(\n \t\t\t$run_items); \n\n\n\n \t}\n\n \techo $count_items;\n\n\n }", "title": "" }, { "docid": "b017073e78a7677d3a1106a0fcb21b82", "score": "0.73464495", "text": "function total_items(){\r\n\t\t \r\n\t\t\tif(isset($_GET['add_cart'])){\r\n\t\t\t\r\n\t\t\t\tglobal $con; \r\n\t\t\t\t\r\n\t\t\t\t$ip = getIp(); \r\n\t\t\t\t\r\n\t\t\t\t$get_items = \"select * from cart where ip_add='$ip'\";\r\n\t\t\t\t\r\n\t\t\t\t$run_items = mysqli_query($con, $get_items); \r\n\t\t\t\t\r\n\t\t\t\t$count_items = mysqli_num_rows($run_items);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t\tglobal $con; \r\n\t\t\t\t\r\n\t\t\t\t$ip = getIp(); \r\n\t\t\t\t\r\n\t\t\t\t$get_items = \"select * from cart where ip_add='$ip'\";\r\n\t\t\t\t\r\n\t\t\t\t$run_items = mysqli_query($con, $get_items); \r\n\t\t\t\t\r\n\t\t\t\t$count_items = mysqli_num_rows($run_items);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\techo $count_items;\r\n\t\t\t}", "title": "" }, { "docid": "2b12f66cd1f940c86d624a9973a3ec36", "score": "0.7332535", "text": "public function itemCount()\n\t{\n\t\tif($this->storage->all()){\n\t\treturn count($this->storage->all());\n\t\t}\n\t}", "title": "" }, { "docid": "3a84dcc24fbc09468db93f30404fdf87", "score": "0.7332112", "text": "function items(){\n\tif(isset($_GET['add_cart']))\n\t{\n\t\tglobal $db;\t\n\n\t\t$ip_add = get_client_ip_env();\n\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\n\t\t$run_items = mysqli_query($db, $get_items);\n\n\t\t$count_items = mysqli_num_rows($run_items);\n\n\n\t}\n\telse{\n\n\t\t$ip_add = get_client_ip_env();\n\n\t\tglobal $db;\n\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\n\t\t$run_items = mysqli_query($db,$get_items);\n\n\t\t$count_items = mysqli_num_rows($run_items);\n\t}\n\n\techo $count_items;\n}", "title": "" }, { "docid": "64faa9ed68763e292b28522b331e515a", "score": "0.7331247", "text": "public function count()\n {\n return count($this->_items);\n }", "title": "" }, { "docid": "64faa9ed68763e292b28522b331e515a", "score": "0.7331247", "text": "public function count()\n {\n return count($this->_items);\n }", "title": "" }, { "docid": "cf4b0b6f220b42dc143658864294a33b", "score": "0.73151827", "text": "public function getCountItems(): int;", "title": "" }, { "docid": "69d99db14c105ee2e741f7ea51d538f6", "score": "0.73090386", "text": "public function count()\n\t{\n\t\treturn count($this->items);\n\t}", "title": "" }, { "docid": "49dccb749461baf802f05e5ff7ab12bc", "score": "0.7300854", "text": "public function getItemsCount()\n {\n return $this->context->getEnvOption('itemsCount');\n }", "title": "" }, { "docid": "4b1c83eb02d92035b107b3103e68e4e5", "score": "0.7294857", "text": "function items()\n{\n\tif(isset($_GET['add_cart']))\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$ip_add = getRealIpAddr();\n\t\t\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\t\t\n\t\t$run_items = mysqli_query($db,$get_items);\n\t\t\n\t\t$count_items = mysqli_num_rows($run_items);\n\t}\n\telse\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$ip_add = getRealIpAddr();\n\t\t\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\t\t\n\t\t$run_items = mysqli_query($db,$get_items);\n\t\t\n\t\t$count_items = mysqli_num_rows($run_items);\n\t}\n\techo $count_items;\n}", "title": "" }, { "docid": "0dc62834d7dfc9fa73590202eb9914d0", "score": "0.72875255", "text": "public function count()\n {\n return count($this->itemCollection);\n }", "title": "" }, { "docid": "867d43dc346884553212cee7a8878a6b", "score": "0.7281182", "text": "public function count(): int\n {\n return count($this->items);\n }", "title": "" }, { "docid": "867d43dc346884553212cee7a8878a6b", "score": "0.7281182", "text": "public function count(): int\n {\n return count($this->items);\n }", "title": "" }, { "docid": "712d52ad41b6f6dc2d6edf480390a11f", "score": "0.7271226", "text": "public function count()\n {\n return count($this->products);\n }", "title": "" }, { "docid": "712d52ad41b6f6dc2d6edf480390a11f", "score": "0.7271226", "text": "public function count()\n {\n return count($this->products);\n }", "title": "" }, { "docid": "c338bf589e20f739cc179d97b50ffc66", "score": "0.7256685", "text": "public function itemCount(): int;", "title": "" }, { "docid": "94535db7462d1bcf1899f18845ed47aa", "score": "0.7256074", "text": "public function count(): int\n {\n return count($this->itemList);\n }", "title": "" }, { "docid": "b483b3664ae3e4aef4b7bee9e6f9d37d", "score": "0.724619", "text": "protected function _getItemCount()\n {\n return $this->_wishlistData->getItemCount();\n }", "title": "" }, { "docid": "44623375f782c4ba2fe23064f2cf55a7", "score": "0.72427315", "text": "function total_items()\n{\n\tglobal $conn;\n\tif(isset($_GET['add_cart']))\n\t{\n\t\t$ip = getIp();\n\t\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t\t$run_items = mysqli_query($conn, $get_items);\n\t\t$count_items = mysqli_num_rows($run_items);\n\t}\n\telse\n\t{\n\t\t$ip = getIp();\n\t\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t\t$run_items = mysqli_query($conn, $get_items);\n\t\t$count_items = mysqli_num_rows($run_items); \n\t}\n\techo $count_items;\n}", "title": "" }, { "docid": "4152a76a574881d56f9ed2b9ef5c79e5", "score": "0.72402716", "text": "public function count()\n {\n return count($this->item);\n }", "title": "" }, { "docid": "94e3d498ad746eaaeea44efdf0614667", "score": "0.7236927", "text": "private function countCartSum($items) {\n\t\t$sum = 0;\n\t\tforeach($items as $item) {\n\t\t\tif(!$item->sales->isEmpty()) {\n\t\t\t\t$sum += salesPrice($item->price, $item->sales[0]->discount)*$item->count;\n\t\t\t} elseif(\\Auth::check()) {\n\t\t\t\t$sum += discount_price($item->price)*$item->count;\n\t\t\t} else {\n\t\t\t\t$sum += $item->price*$item->count;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $sum;\n\t}", "title": "" }, { "docid": "3b7f56c5884af07c4cef8dbf1b313c0e", "score": "0.72185796", "text": "public function count() : int\n {\n return Arrays::count($this->items);\n }", "title": "" }, { "docid": "aabbe201cf8a06436676fcd8388b3d03", "score": "0.72142994", "text": "function total_items(){\r\n \r\n\tif(isset($_GET['add_cart'])){\r\n\t\r\n\t\tglobal $con; \r\n\t\t\r\n\t\t$ip = getIp(); \r\n\t\t\r\n\t\t$get_items = \"select * from cart where ip_add='$ip'\";\r\n\t\t\r\n\t\t$run_items = mysqli_query($con, $get_items); \r\n\t\t\r\n\t\t$count_items = mysqli_num_rows($run_items);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\r\n\t\tglobal $con; \r\n\t\t\r\n\t\t$ip = getIp(); \r\n\t\t\r\n\t\t$get_items = \"select * from cart where ip_add='$ip'\";\r\n\t\t\r\n\t\t$run_items = mysqli_query($con, $get_items); \r\n\t\t\r\n\t\t$count_items = mysqli_num_rows($run_items);\r\n\t\t\r\n\t\t}\r\n\t\r\n\techo $count_items;\r\n\t}", "title": "" }, { "docid": "1bcec04bb181a8aa6a588eb40cf14f78", "score": "0.7189834", "text": "public function count()\n {\n return count($this->_getItems());\n }", "title": "" }, { "docid": "fb65f12ade23e82d83fa2f977b0a7a65", "score": "0.7155161", "text": "public function count($withItemQty = true);", "title": "" }, { "docid": "4593e5eeaab68921bf87f915f13da4d7", "score": "0.71497935", "text": "public function numberOfItems();", "title": "" }, { "docid": "1a560eca1ae9044a2818ced7fb3a1ec0", "score": "0.7144853", "text": "#[\\ReturnTypeWillChange]\n public function count()\n {\n return $this->items->count();\n }", "title": "" }, { "docid": "aeebd1837c716ca67e2b8439065ec448", "score": "0.713988", "text": "public function count(): int\n {\n return count($this->items());\n }", "title": "" }, { "docid": "a3cf710f6d3ca9553cd6dd811baf38c1", "score": "0.71327406", "text": "function count_contents() {\n $total_items = 0;\n if (is_array($this->contents)) {\n reset($this->contents);\n while (list($products_id, ) = each($this->contents)) {\n $total_items += $this->get_quantity($products_id);\n }\n }\n\n // GA\n if (is_array($this->giveaway))\n {\n foreach ($this->giveaway as $giveaway)\n {\n $total_items += $giveaway['qty'];\n }\n }\n return $total_items;\n }", "title": "" }, { "docid": "4a888f42a2ac1ffda22d8d4ecc791861", "score": "0.71006536", "text": "public function getItemCount() {\n\t\treturn $this->items_count;\n\t}", "title": "" }, { "docid": "5ae870422ac8c8bafd940abe84382172", "score": "0.708767", "text": "public function count()\n {\n return count($this->nesty->getItems());\n }", "title": "" }, { "docid": "4b028869b48b26baaa75755f983fe95a", "score": "0.7083604", "text": "public function getItemCount()\n {\n $storedDisplayType = $this->_getCustomerSession()->getWishlistDisplayType();\n $currentDisplayType = Mage::getStoreConfig(self::XML_PATH_WISHLIST_LINK_USE_QTY);\n\n $storedDisplayOutOfStockProducts = $this->_getCustomerSession()->getDisplayOutOfStockProducts();\n $currentDisplayOutOfStockProducts = Mage::getStoreConfig(self::XML_PATH_CATALOGINVENTORY_SHOW_OUT_OF_STOCK);\n if (!$this->_getCustomerSession()->hasWishlistItemCount()\n || ($currentDisplayType != $storedDisplayType)\n || $this->_getCustomerSession()->hasDisplayOutOfStockProducts()\n || ($currentDisplayOutOfStockProducts != $storedDisplayOutOfStockProducts)) {\n $this->calculate();\n }\n\n return $this->_getCustomerSession()->getWishlistItemCount();\n }", "title": "" }, { "docid": "bf2c24506f9e47bb9d56491dc55f8384", "score": "0.70672065", "text": "public function getProductsCount()\n {\n if(empty($this->basketItems['PRODUCTS']))\n return 0;\n $cnt = 0;\n foreach($this->basketItems['PRODUCTS'] as $product)\n $cnt += $product['QUANTITY'];\n return $cnt;\n }", "title": "" }, { "docid": "6f81454a023edaa32577150afcc4666b", "score": "0.7055559", "text": "public function getTotalItemsCount()\n {\n return $this->totalItemsCount;\n }", "title": "" }, { "docid": "7f12d63cabc9f5498a38c46d763e7b48", "score": "0.70547", "text": "public function count()\n {\n $items = $this->getItems();\n\n return $items->count();\n }", "title": "" }, { "docid": "6ba981c832f997c2b68317e71147f7c2", "score": "0.7037144", "text": "public function getProductsCount()\n {\n $productCount = 0;\n foreach ($this->items as $item) {\n $productCount += $item->getProductsCount();\n }\n\n return $productCount;\n }", "title": "" }, { "docid": "3bbc2905aaf5b6ba821c2dd563af1e3d", "score": "0.7036131", "text": "public function getStItemsCount()\n {\n return $this->count(self::STITEMS);\n }", "title": "" }, { "docid": "3bbc2905aaf5b6ba821c2dd563af1e3d", "score": "0.70343834", "text": "public function getStItemsCount()\n {\n return $this->count(self::STITEMS);\n }", "title": "" }, { "docid": "3bbc2905aaf5b6ba821c2dd563af1e3d", "score": "0.70343834", "text": "public function getStItemsCount()\n {\n return $this->count(self::STITEMS);\n }", "title": "" }, { "docid": "41e1e7a213f14d694b6dbc667ce805e4", "score": "0.7001463", "text": "function recountTotalItemsInCart()\n{\n\tglobal $conn;\n\t$conn->connect();\n\t$qry = \"SELECT SUM(Quantity) as Total FROM shopcartitem WHERE ShopCartID=$_SESSION[Cart]\";\n\t$result = $conn->query($qry);\n\t$row = $conn->fetch_array($result);\n\t$conn->close();\n\t$_SESSION[\"NumCartItem\"]=$row[\"Total\"];\n}", "title": "" }, { "docid": "39af0f4ac141d2d34e71cf96221f8077", "score": "0.69960433", "text": "public function count()\n {\n return count($this->collectionItems);\n }", "title": "" }, { "docid": "0ec28e0d6f31965b93234f2d8fe61c8c", "score": "0.69835156", "text": "function getTotalItemCount() {\n\t\treturn $this->_total_items;\n\t}", "title": "" }, { "docid": "6f1e5556bd36fc721f571004f1b2cdb0", "score": "0.6982926", "text": "function woo_cart_but_count( $fragments ) {\n\tob_start();\n\n\t//$cart_count = WC()->cart->cart_contents_count;\n\t$cart_count = count( WC()->cart->get_cart() );\n\t$cart_url = wc_get_cart_url(); ?>\n <a style=\"padding: 10px 20px 5px!important\" class=\"cart-contents menu-item\" href=\"<?php echo $cart_url; ?>\" title=\"<?php _e( 'View your shopping cart' ); ?>\">\n\t\t<?php\n\t\tif ( $cart_count > 0 ) { ?>\n <span class=\"cart-contents-count\"><?php echo $cart_count; ?></span>\n\t\t\t<?php\n\t\t}\n\t\t?></a>\n\t<?php\n\t$fragments['a.cart-contents'] = ob_get_clean();\n\n\treturn $fragments;\n}", "title": "" }, { "docid": "eb98ffa7e135cf02b2b0a88ae01fa896", "score": "0.69683075", "text": "function list_items_total()\n\t{\n\t\treturn count($this->list_items());\n\t}", "title": "" }, { "docid": "39b96d611e40da04ce00687f18b5512a", "score": "0.69647676", "text": "public function getItemCount()\n {\n $this->revalidate();\n\n return $this->connection->fetchColumn('SELECT count(*) FROM ' . $this->table);\n }", "title": "" }, { "docid": "b006936ea322bdc86e1d9914d14d099d", "score": "0.69613355", "text": "public static function getItemCount()\n\t{\n\t\treturn count(self::$data);\n\t}", "title": "" }, { "docid": "1f3f16a086016e8a611b7a477dcf2179", "score": "0.6954738", "text": "public function getProductCounts($cartId = null)\n {\n if( empty($cartId) )\n {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $cartTableName = $this->info('name'); \n $cartId = $this->select()\n ->from($cartTableName, 'cart_id')\n ->where('owner_id = ?', $viewer_id)\n ->query()->fetchColumn();\n }\n \n if( !empty($cartId) ) {\n $cartProductTable = Engine_Api::_()->getDbtable('cartproducts', 'sitestoreproduct');\n \n $cartProductCount = $cartProductTable->select()\n ->from($cartProductTable->info('name'), 'SUM(quantity)')\n ->where('cart_id =?', $cartId)\n ->query()->fetchColumn();\n\n return $cartProductCount;\n }\n \n return 0;\n }", "title": "" }, { "docid": "869bd96a7bdd6de63723d72faf192cae", "score": "0.6946834", "text": "static function cartItem()\n { \n $userId = Session::get('user')['id'];\n return Cart::where('user_id',$userId)->count();\n \n //$data = Product::find($id);\n //$data = Product::all();\n //return view('detail',['product'=> $data]);\n }", "title": "" }, { "docid": "912fcf0e910b7f33555fc1cadba3dcc1", "score": "0.693927", "text": "function total_items(){\nif(isset($_GET['add_cart'])){\n\tglobal $con1;\n\t$ip = getIP();\n\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t$run_items = mysqli_query($con1,$get_items);\n\t$count_items = mysqli_num_rows($run_items);\n }\n\telse {\n\t\tglobal $con1;\n\t\t$ip = getIP();\n\t\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t\t$run_items = mysqli_query($con1,$get_items);\n\t\t$count_items = mysqli_num_rows($run_items);\n\n\t}\n\techo $count_items;\n}", "title": "" }, { "docid": "56c091aec1802182a0319e8641268fde", "score": "0.6935095", "text": "public function numberProducts(): int\n {\n return count($this->products);\n }", "title": "" }, { "docid": "20d60360efece7d889eea447ba2df2d7", "score": "0.6927192", "text": "public function getTotalItemCount()\n\t{\n\t\treturn count($this->getItems());\n\t}", "title": "" }, { "docid": "32db6401d2b2de4432b8376164e02369", "score": "0.6925072", "text": "protected function calculateTotalItemCount() {\n return count($this->getData());\n }", "title": "" } ]
2c3b784100b6197d5fb5c2f315052087
The task that belong to the user.
[ { "docid": "c603414d14e28ffb867befa918b2aebd", "score": "0.0", "text": "public function task()\n {\n return $this->hasMany(TaskRepository::class);\n }", "title": "" } ]
[ { "docid": "84230ff8600942847c940c2888dfde61", "score": "0.78533477", "text": "public function getTask()\n {\n return $this->task;\n }", "title": "" }, { "docid": "b94bfa20ae07c535532fb00f38c9a950", "score": "0.78395283", "text": "public function getTask() {\n return $this->task;\n }", "title": "" }, { "docid": "fb85af07d13df2a0c399305fa6d0db2d", "score": "0.77164793", "text": "public function getTask() {\n\t\treturn $this->task;\n\t}", "title": "" }, { "docid": "eea587e6d720c3ce43c5f59e10094232", "score": "0.7670788", "text": "public function getTask()\n\t{\n\t\treturn $this->task;\n\t}", "title": "" }, { "docid": "870665d09408eab97ec19f08c425bb99", "score": "0.72974885", "text": "public function getIdTask()\n {\n return $this->idTask;\n }", "title": "" }, { "docid": "4a3756e4340231101f795abdf963fc40", "score": "0.72819024", "text": "private function task()\n {\n return $this->request->get('task', FILTER_SANITIZE_STRING);\n }", "title": "" }, { "docid": "eb5b97156efeb63fea4066f9ef64aa47", "score": "0.7210956", "text": "public function task_owner() {\n return $this->belongsTo(User::class, 'user_id', 'id');\n }", "title": "" }, { "docid": "f3d20289a8f3afd1b46f0a20b99c17e6", "score": "0.7203945", "text": "public function getTask(): Task\n {\n return $this->task;\n }", "title": "" }, { "docid": "42d2802730711ff293c9e27395cc55f6", "score": "0.72014415", "text": "public function getTask() {\n if (isset($_REQUEST['task']))\n return $_REQUEST['task'];\n else\n return false;\n }", "title": "" }, { "docid": "9c01db3850281c1b081ee514ab7ea201", "score": "0.7182005", "text": "public function getTaskid()\r\n {\r\n return $this->taskid;\r\n }", "title": "" }, { "docid": "33697c909fa99d5d836f17ffe26d27ea", "score": "0.7157339", "text": "public function getTask()\n {\n return $this->hasOne(Task::className(), ['id' => 'task_id']);\n }", "title": "" }, { "docid": "375a031067c9ed9461648aae0343c1dc", "score": "0.715277", "text": "public function tasks()\n {\n return $this->hasOne(User::class, 'id', 'user_id');\n }", "title": "" }, { "docid": "aa732e5574c367385327764a99d6305d", "score": "0.70700336", "text": "public function taskCreator()\n {\n return $this->belongsTo('App\\Components\\User\\Models\\User', 'created_by');\n }", "title": "" }, { "docid": "44e26078a59e3ba51e2c7f4751103fc6", "score": "0.7040194", "text": "function taskName() {\n\t\treturn $this->taskName;\n\t}", "title": "" }, { "docid": "93417a8ed28278a83e18b1daec032be1", "score": "0.7029185", "text": "public function getTaskEntity()\n {\n return $this->taskEntity;\n }", "title": "" }, { "docid": "64fb6b4092efbb177e06e01452cd5241", "score": "0.70136666", "text": "protected function getExerciseUserTask()\n {\n return (new ExerciseUserTask());\n }", "title": "" }, { "docid": "1cdb39c487dec7af602bd412186cb6ef", "score": "0.7008819", "text": "public function getTask()\n {\n return $this->hasOne(Task::class, ['id' => 'task_id']);\n }", "title": "" }, { "docid": "44e1b2f347af252d2ded9ac4f6c342c7", "score": "0.7002608", "text": "public function getTaskName()\n {\n return $this->taskName;\n }", "title": "" }, { "docid": "bd1699b5857f7644e7c5a97b41af711d", "score": "0.68955934", "text": "final public function getTask() \n {\n if (isset($_REQUEST['task'])) \n {\n return $_REQUEST['task'];\n }\n else \n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "2ac177f64eb905f9bf5c5ff3bb388414", "score": "0.6754879", "text": "public function getTaskName() {}", "title": "" }, { "docid": "d741ce85b0acdfbe45e0f87ced64456e", "score": "0.671783", "text": "public function getTaskIdentifier()\n {\n return $this->taskType;\n }", "title": "" }, { "docid": "1ab611e5e4c971eed4d92f23f6c13ff7", "score": "0.6716632", "text": "public function getTaskNum()\n {\n return $this->task_num;\n }", "title": "" }, { "docid": "9ac17cf39760401cb07fff02366d70d7", "score": "0.6667581", "text": "public static function get_active_task() {\n\t\treturn get_transient( self::ACTIVE_TASK_TRANSIENT );\n\t}", "title": "" }, { "docid": "459c35d4ba5bfa0ad6aaceb7741e106c", "score": "0.6538914", "text": "public function getIdVisitTask()\n {\n return $this->idVisitTask;\n }", "title": "" }, { "docid": "4baf22477d53e6a1919e85d995b85f39", "score": "0.6503681", "text": "public function getTasksId()\n {\n return $this->hasOne(Tasks::className(), ['id' => 'idtask']);\n }", "title": "" }, { "docid": "146847c8819dcc65d1ead59d317eca54", "score": "0.6464652", "text": "public function getTask()\n {\n if ($this->task == null) {\n $this->task = $this->taskTypeRegistry->getTaskForType($this->taskType, $this, $this->processingConfiguration);\n }\n\n return $this->task;\n }", "title": "" }, { "docid": "e3fb95fcf4441aa4e614d42150e9c1ba", "score": "0.64514774", "text": "public function getUser() {\r\n return $this->user_id;\r\n }", "title": "" }, { "docid": "12be4f4ec5a561d83dbe89baa1b17822", "score": "0.64338434", "text": "public function taskMember()\n {\n return $this->hasMany(TaskMember::class, 'task_identification');\n }", "title": "" }, { "docid": "3a590795b64e77361d4585267770b3aa", "score": "0.6432644", "text": "public function getTaskId() {\r\n \r\n global $PROPERTIES;\r\n \r\n $table = $PROPERTIES['AGENDA_TABLE'];\r\n $q = new $PROPERTIES['DB_NAME'];\r\n $q->query('SELECT task_id FROM ' . $table . ' WHERE document_id = ' . $this->id);\r\n $q->next_record();\r\n \r\n return $q->Record['TASK_ID'];\r\n }", "title": "" }, { "docid": "533164c89fa52c42c1fe495fc581e8f7", "score": "0.643203", "text": "public function humanTask()\n {\n return WorkflowManager::humanTaskName($this->type);\n }", "title": "" }, { "docid": "d77e4ada9212943d9a8447a13039ae6c", "score": "0.64085364", "text": "public function getTask()\n\t{\n\t\treturn 'edit';\n\t}", "title": "" }, { "docid": "446899211a198b334116a0defc8cba76", "score": "0.63969", "text": "public function task()\n {\n return $this->belongsTo('App\\Models\\Task');\n }", "title": "" }, { "docid": "645f0103a70a3b87b2c20e5efdb2b292", "score": "0.63616264", "text": "public function getTaskType()\n {\n return $this->task_type;\n }", "title": "" }, { "docid": "df74feaa22a1f3efb11616a788f64857", "score": "0.6309691", "text": "public function getCollectionBuilderCurrentTask()\n {\n return $this->currentTask;\n }", "title": "" }, { "docid": "8576e6919d572a8db42c344c7af84574", "score": "0.630552", "text": "public function task()\n {\n\n $tasks = User::find($this->user_id)\n ->tasks()\n ->orderBy('created_at', 'desc')\n ->get();\n\n $tasksCount = count($tasks);\n\n return view('task', [\n 'tasks' => $tasks,\n 'tasksCount' => $tasksCount\n ]);\n }", "title": "" }, { "docid": "70ffd65583bee020988532f3a1e5ef16", "score": "0.6293149", "text": "public function forUser(User $user)\n {\n return Task::where('user_id', $user->id)\n ->orderBy('created_at', 'asc')\n ->get();\n }", "title": "" }, { "docid": "bb8bcd5ec1649f5b4a2041177f56f6e3", "score": "0.62659484", "text": "public function task()\n {\n return $this->belongsTo(Task::class);\n }", "title": "" }, { "docid": "bb8bcd5ec1649f5b4a2041177f56f6e3", "score": "0.62659484", "text": "public function task()\n {\n return $this->belongsTo(Task::class);\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.62504494", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.62504494", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "e1994b15a95606dced41c35076ffda75", "score": "0.62504494", "text": "public function user()\n {\n return $this->user;\n }", "title": "" }, { "docid": "c243a221e4db7db9c020fe9b111c17ea", "score": "0.6234824", "text": "private function getFrontUserTasksModel()\n\t{\n\t\tif (!$this->model_user_tasks)\n\t\t{\n\t\t\t$this->model_user_tasks = $this->getServiceLocator()->get(\"FrontUsers\\Models\\FrontUsersTasksModel\");\n\t\t}//end if\n\n\t\treturn $this->model_user_tasks;\n\t}", "title": "" }, { "docid": "51ac6d9533ae5d26d06f3862b13fb39a", "score": "0.6229595", "text": "public function task()\n {\n return $this->belongsTo('App\\Task');\n }", "title": "" }, { "docid": "33723f0945818cfb73648c4a357ead36", "score": "0.6227988", "text": "function getType ()\n\t\t{\n\t\t\treturn \"Task\";\n\t\t}", "title": "" }, { "docid": "fe19653e9107920c81beca08280d931e", "score": "0.62027067", "text": "public function getTaskName(): ?string\n {\n return $this->taskName;\n }", "title": "" }, { "docid": "594d5ef73a06f12d8e1c34f4312b9f6a", "score": "0.61796546", "text": "public function getAssignee(): ?string\n {\n return $this->taskAssignee;\n }", "title": "" }, { "docid": "685b0b49051e6b95ba3f46e59f100651", "score": "0.6178731", "text": "public function index()\n {\n return Task::with('user')->latest()->get();\n }", "title": "" }, { "docid": "31ce42f2944b083dce13968b62132ac8", "score": "0.6144889", "text": "public function getTaskId() {\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "2fb84b5939aeb9dfcf3eb3f58dd8394a", "score": "0.61355144", "text": "public function getUser()\r\n {\r\n return $this->user;\r\n }", "title": "" }, { "docid": "d79ca70172c514a9e4df6db24fa964de", "score": "0.61319065", "text": "public function getUser() {\n return $this->user;\n }", "title": "" }, { "docid": "d79ca70172c514a9e4df6db24fa964de", "score": "0.61319065", "text": "public function getUser() {\n return $this->user;\n }", "title": "" }, { "docid": "d79ca70172c514a9e4df6db24fa964de", "score": "0.61319065", "text": "public function getUser() {\n return $this->user;\n }", "title": "" }, { "docid": "d79ca70172c514a9e4df6db24fa964de", "score": "0.61319065", "text": "public function getUser() {\n return $this->user;\n }", "title": "" }, { "docid": "e5fffb58b9bf15b1be6cb645fe054ebc", "score": "0.6126449", "text": "public function gettask()\n\t{\n\t\t\t$postdata = $this->striptags($_POST);\n\t\t\textract($postdata);\n\t\t\t\n\t\t\t$cond = array();\n\t\t\t$table = 'tasks';\n\t\t\t\n\t\t\t$cond['TaskId'] = $id;\n\t\t\t\n\t\t\tif($this->commonmodel->checkexists($table,$cond))\n\t\t\t{\n\t\t\t\t$field='Task';\n\t\t\t\t$order_by='';\n\t\t\t\t$order_by_field='';\n\t\t\t\t$limit='';\n\t\t\t\t$task = $this->commonmodel->getAfield($table,$cond,$field,$order_by='',$order_by_field='',$limit='');\n\t\t\t\techo \"<p>\".$task.\"</p>\";\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"Sorry invalid request\";\n\t}", "title": "" }, { "docid": "60d9f7d601e3173b3acc04c954ee53fd", "score": "0.61210275", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "36005897c92e58bda72f2cc307f94b5e", "score": "0.61179507", "text": "public function getTaskCode()\n {\n return $this->task_code;\n }", "title": "" }, { "docid": "95f83bbab55df161b9ce2685850ef43e", "score": "0.6104601", "text": "public function getUser() {\n\t\treturn $this->user;\n\t}", "title": "" }, { "docid": "46c4ce7d217b759f2d2518bfedd21b46", "score": "0.6104526", "text": "public function getTask()\n {\n return $this->hasMany(Task::className(), ['location_id' => 'id']);\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "1df5e441660de3e94f9e1971de64642f", "score": "0.60985094", "text": "public function getUser()\n {\n return $this->user;\n }", "title": "" }, { "docid": "a65b2f8e89436509ecae940d8ee790e6", "score": "0.6094748", "text": "public function getUser() {\n\t\t\treturn $this->user;\n\t\t}", "title": "" }, { "docid": "425238ce9e7085eac7d5e9dae4d638f7", "score": "0.60937977", "text": "public function show(Task $task)\n {\n return $task;\n }", "title": "" }, { "docid": "425238ce9e7085eac7d5e9dae4d638f7", "score": "0.60937977", "text": "public function show(Task $task)\n {\n return $task;\n }", "title": "" }, { "docid": "2919d35dbc36716612b332c7edca0f45", "score": "0.6076064", "text": "public function getUser() {\n return $this->_user;\n }", "title": "" }, { "docid": "74a77a872b24d116fd7a344529baefd9", "score": "0.607446", "text": "public static function getTaskName(): string\n {\n // 定时任务名称\n return 'UsDoller';\n }", "title": "" }, { "docid": "f63b94978b83b95ed44ca497a4287a70", "score": "0.607166", "text": "public function getTaskStatus()\n {\n return $this->task_status;\n }", "title": "" }, { "docid": "6f6d2018e461263a660722d25e65c201", "score": "0.6062005", "text": "public function UserTaskAssign(){\n return $this->belongsTo('App\\User','id','user_id');\n }", "title": "" }, { "docid": "ef06b9453e4681993ebe23b3e1151af3", "score": "0.60619175", "text": "public function getScheduleItemUserId(){\n return $this->scheduleItemUserId;\n }", "title": "" }, { "docid": "c0211fc97e5375bde39a90418c55d520", "score": "0.60461783", "text": "public function getUser() {\n return $this->user;\n }", "title": "" }, { "docid": "d27aa76abe3677b7f7396c43883fdfa7", "score": "0.60406905", "text": "public function id_user()\n {\n return $this->_id_user;\n }", "title": "" }, { "docid": "1f70294ab664ff8f8c7251ba05b8f473", "score": "0.60388494", "text": "public function getUser()\n {\n return $this->_user;\n }", "title": "" }, { "docid": "1f70294ab664ff8f8c7251ba05b8f473", "score": "0.60388494", "text": "public function getUser()\n {\n return $this->_user;\n }", "title": "" }, { "docid": "1f70294ab664ff8f8c7251ba05b8f473", "score": "0.60388494", "text": "public function getUser()\n {\n return $this->_user;\n }", "title": "" }, { "docid": "a58d5c65007ea9e68dd556fe0bc14f2f", "score": "0.6038661", "text": "public function user()\n {\n if ($this->user !== null) {\n return $this->user;\n }\n }", "title": "" }, { "docid": "cebcf8ceb7a8c10e125826694311f6b5", "score": "0.60381144", "text": "public function getTaskId(): ?string;", "title": "" }, { "docid": "cebcf8ceb7a8c10e125826694311f6b5", "score": "0.60381144", "text": "public function getTaskId(): ?string;", "title": "" }, { "docid": "d7813d3c09f90c6ed573da3f598e5fe4", "score": "0.603718", "text": "public function getFromUser()\n {\n return $this->discussion->user;\n }", "title": "" }, { "docid": "76ec9037392abc582cbabb655e006e45", "score": "0.60320777", "text": "public function getUser()\n\t{\n\t\treturn $this->user;\n\t}", "title": "" }, { "docid": "76ec9037392abc582cbabb655e006e45", "score": "0.60320777", "text": "public function getUser()\n\t{\n\t\treturn $this->user;\n\t}", "title": "" } ]
5b55c09dc1824cbf6f7c70929e3da2c6
Return the location to redirect the user after creation.
[ { "docid": "2c87951757c50ca39abaa40f2a3e28e2", "score": "0.5760501", "text": "public static function redirectAfterCreate(NovaRequest $request, $resource)\n {\n return '/resources/' . static::uriKey() . '/' . $resource->getKey() . '/edit';\n }", "title": "" } ]
[ { "docid": "2ce40e1467ba01a7917ec9eabc3f55e0", "score": "0.6201224", "text": "public function redirectTo()\n {\n return auth()->user()->userable->cabinet_link;\n }", "title": "" }, { "docid": "542a84311d6637b6e5fb15c5f3577047", "score": "0.6193679", "text": "public function redirectTo() {\n $role = Auth::user()->user_type; \n switch ($role) {\n case 'investor':\n return '/investor_update_profile';\n break;\n case 'owner':\n return '/owner_update_profile';\n break; \n\n default:\n return '/login'; \n break;\n }\n }", "title": "" }, { "docid": "2372c1b825e91d2da3d7d4e677b6c32f", "score": "0.61812943", "text": "protected function redirectTo(){\n if(isset($_POST['redirectTo']))\n {\n return $_POST['redirectTo'];\n }\n else\n {\n $role = Auth::user()->role; \n // Check user role\n switch ($role) {\n case 1:\n return 'supplier/panel';\n break;\n case 2:\n return 'customer/panel';\n break; \n default:\n return '/login'; \n break;\n }\n }\n }", "title": "" }, { "docid": "63c788903e7799eb18a2f82f130cb386", "score": "0.6149703", "text": "public function create()\n {\n return view('location.create');\n }", "title": "" }, { "docid": "518670f4ef5e34914995fe25c8b135ab", "score": "0.60947204", "text": "public function redirectTo(): string\n {\n /** @var User $user */\n $user = Auth::user();\n\n return is_null($user->email) ? route('register.password-confirm') : $this->redirectTo;\n }", "title": "" }, { "docid": "a16240a9f650336752c15f878e77beeb", "score": "0.60535145", "text": "protected function redirectTo(){\n\t\t// redirect to it\n\t $intendedUrl = RequestFacade::session()->get('intendedUrl');\n\t if($intendedUrl && $intendedUrl!=route('show_login')){\n\t\t RequestFacade::session()->forget('intendedUrl');\n\t\t return $intendedUrl;\n\t }\n\n\t\t//Otherwise, we redirect him based on his role.\n\t if($this->user->is_contractor){\n\t\t return route('contractors_dashboard');\n\t }\n\t elseif ($this->user->hasRole('supplier-superadmin')){\n\t\t return route('suppliers_dashboard');\n\t }\n\t else\n\t\t return url('/');\n }", "title": "" }, { "docid": "eefa1de955ffcaed629fc67fd0dc8c60", "score": "0.6028773", "text": "public function redirectToProvider()\n {\n return Socialite::driver('facebook')->fields([\n 'first_name', 'last_name', 'email', 'gender'\n ])->scopes([\n 'email'\n ])->redirect();\n /*$user = Socialite::driver('facebook')->fields([\n 'first_name', 'last_name', 'email', 'gender'\n ])->scopes([\n 'email'\n ]);\n return $user->redirect();*/\n }", "title": "" }, { "docid": "e355e75ecf1c99f55ef8c4ab11105a90", "score": "0.6027899", "text": "public function create()\n {\n return redirect('/');\n }", "title": "" }, { "docid": "2b70812a5267a9c17267e3e80e1474ba", "score": "0.6016865", "text": "public function create()\n {\n return Redirect::to( 'https://' . Request::server('SERVER_NAME') . ':' . Request::server('SERVER_PORT') . Config::get(\"$this->cpath.idp_login\") . '?target=' . action($this->ctrpath . \"idpAuthorize\"));\n }", "title": "" }, { "docid": "4d30e71762c1ea8251c8b9a595d63651", "score": "0.5999663", "text": "protected function redirectTo()\n {\n if(Auth::check() && Auth::id() === 1) return 'manager/replenishment';\n else if(Auth::check()){\n $unfinished_wave = PickingWaves::getUserPickingWave(Auth::id());\n return ($unfinished_wave == null) ? 'clerk/pickingWaves' : 'clerk/pickingRoute/'. $unfinished_wave->id;\n }\n\n return '/';\n }", "title": "" }, { "docid": "89345a735962f40565220a62b73bcfc0", "score": "0.5999092", "text": "public function store(InformationValidator $input, User $user): RedirectResponse \n {\n if ($user = $user->create($input->all())->assignRole($input->role)) {\n if (! is_null($input->email_verified_at)) { // User needs to verify his/her user account.\n $user->update(['email_verified_at' => now()]);\n } \n\n $this->flashSuccess(\"There is created a login for {$user->name}\");\n } \n\n return redirect()->route('users.create');\n }", "title": "" }, { "docid": "24d5618060a1967792f348327c8728ff", "score": "0.59977597", "text": "public function createSucceed()\n {\n Messages::add('success', trans(\"orchestra/foundation::response.users.create\"));\n Messages::add('success', trans('orchestra/foundation::response.credential.register.email-send'));\n\n return Redirect::intended(handles('orchestra::login'));\n }", "title": "" }, { "docid": "8ec658411bf1eb87741ca10c0d10428e", "score": "0.5992284", "text": "public function redirectPath()\n {\n if ( Auth::check() ) {\n return Auth::user()->profilePath();\n }\n\n return '/';\n }", "title": "" }, { "docid": "b9e72983323f4176d2748c1a83c40116", "score": "0.5924245", "text": "public function create()\n\t{\n if (($redirect = $this->checkPermissions('ALL_PERMS')) !== true) {\n return $redirect;\n }\n\n\t\treturn View::make(\"oauth.create\");\n\t}", "title": "" }, { "docid": "76385256e12638d5e6cd740625da5499", "score": "0.5917613", "text": "private function redirect()\n {\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n $resultRedirect->setUrl($this->_redirect->getRefererUrl());\n\n return $resultRedirect;\n }", "title": "" }, { "docid": "a677384c97c61e40b6bc2ecdb1563947", "score": "0.5913764", "text": "public function create()\n {\n return view('admin.location.create');\n }", "title": "" }, { "docid": "a677384c97c61e40b6bc2ecdb1563947", "score": "0.5913764", "text": "public function create()\n {\n return view('admin.location.create');\n }", "title": "" }, { "docid": "c7a72247c3d3e28a9edbc0e67a8f1745", "score": "0.5910199", "text": "public function create()\n {\n return redirect()->back()\n ->withWarning('Los usuarios pueden autoregistrarse por el sistema de autenticacion integrado y verificar su correo.');\n //\n }", "title": "" }, { "docid": "d1a8b59cf22d80429992b76587bee251", "score": "0.5905645", "text": "public function create() {\n return Helper::redirectTo('/errors/404');\n }", "title": "" }, { "docid": "824f066c39d0f66fa4d7a52e059eb0b0", "score": "0.5890474", "text": "public function createSucceedWithoutNotification()\n {\n Messages::add('success', trans(\"orchestra/foundation::response.users.create\"));\n Messages::add('error', trans('orchestra/foundation::response.credential.register.email-fail'));\n\n return Redirect::intended(handles('orchestra::login'));\n }", "title": "" }, { "docid": "2f61fc20f0f7ca0b09366733bb055564", "score": "0.5847917", "text": "public function getRedirectPath()\n {\n // \tSession::flash('show_support', true);\n\n if (!strlen(Auth::user()->bio)) {\n // No bio\n Session::set('temp_redirect', Session::pull('redirect'));\n return action('UserController@showDetails');\n } else {\n return Session::pull('redirect');\n }\n }", "title": "" }, { "docid": "2ce33c1914b2eca0cba9b2643da4821d", "score": "0.58476555", "text": "public static function redirectAfterCreate(NovaRequest $request, $resource)\n {\n return '/resources/'.static::uriKey();\n }", "title": "" }, { "docid": "19a837506060f7fb5150a8d96b74e53c", "score": "0.5833837", "text": "public function redirect();", "title": "" }, { "docid": "4ee21e1789b725479e0c314042b63bec", "score": "0.5811178", "text": "public function mainAction()\n {\n return new RedirectResponse($this->get('router')->generate('zikulaintercommodule_user_view', array(), RouterInterface::ABSOLUTE_URL));\n }", "title": "" }, { "docid": "61f83e908f05f1719812d4ca096edd3f", "score": "0.5792607", "text": "public function create($redirect = null)\n {\n // If a user is already logged in, kick em out so a new account can be created.\n Sentry::logout();\n\n $referral = Referral::checkReferralCode(Session::get('referralCode'));\n $ppcCode = Landing::checkLandingCode(Session::get('ppcCode'));\n if(!$ppcCode)\n $ppcCode = StaticLanding::checkLandingCode(Session::get('ppcCode'));\n\n $ppcDb = Landing::where('code', Session::get('ppcCode'))->first();\n\n $email = '';\n\n if(!empty($ppcDb->email)) {\n $email = $ppcDb->email;\n }\n if(!empty($referral->email)) {\n $email = $referral->email;\n }\n\n return View::make('v3.users.create')\n ->with('referralCode', $referral ? $referral->code : null)\n ->with('redirect', $redirect)\n ->with('ppcCode', $ppcCode)\n ->with('email', $email);\n\n }", "title": "" }, { "docid": "0efd63b5f376289a358a81a535c415f4", "score": "0.5790601", "text": "public function redirectPath()\n {\n //TODO: Optimize this algorytm\n if (property_exists($this, 'redirectTo')) {\n if (Auth::user()->hasAnyRole('Admin')) {\n $this->redirectTo = property_exists($this, 'adminRedirectTo') ? $this->adminRedirectTo : $this->redirectTo;\n }\n return $this->redirectTo; \n }\n return '/';\n }", "title": "" }, { "docid": "6864ac0fd4be6d14b23ba5b0b9767912", "score": "0.5787277", "text": "function register()\n {\n \t\n \t//make a new user\n \t\n \t//register them\n \t\n \t//redirect\n \t\n }", "title": "" }, { "docid": "6e247caf1e3911515c379adccd80716a", "score": "0.5768573", "text": "protected function redirectPath()\n {\n return $this->redirectTo;\n }", "title": "" }, { "docid": "3055948abeef3b2e73ae0c26ae587bb2", "score": "0.5753056", "text": "public function registerNewUser() {\n if ($this->user->registerUser()) {\n // Log the user in, then return to the page from whence they came.\n $this->user->startSession();\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n } else {\n include('view/page/failure_page.php');\n }\n }", "title": "" }, { "docid": "7f1883b950bb89a77c8111ed0fcc3f16", "score": "0.57518166", "text": "public function create()\n {\n return view('administrator.property.location.create');\n }", "title": "" }, { "docid": "029c75d573279e4bacc1e982fa0093ed", "score": "0.5745678", "text": "function _get_form_redirect_link( &$pg, $_mode ){\n global $CTX, $FUNCS, $PAGE, $OBJ;\n\n if( $_mode=='edit' ){\n $redirect_dest = $CTX->get( 'k_qs_link' );\n }\n else{ // 'create' mode\n // redirect to 'edit' view of the newly created user\n $link = $FUNCS->generate_route( 'users', 'edit_view', array('nonce'=>$FUNCS->create_nonce('edit_page_'.$pg->id), 'id'=>$pg->id) );\n $redirect_dest = $FUNCS->get_qs_link( $link ); // link with passed qs parameters\n }\n\n return $redirect_dest;\n }", "title": "" }, { "docid": "190123344d32a218cd24322317e5a4e3", "score": "0.57409763", "text": "public function create()\n {\n return redirect()->route('saldo.index');\n }", "title": "" }, { "docid": "1c69a0d390e4e203c8009f4f5bca6cf3", "score": "0.5738617", "text": "public function template_redirect_user() {\n\t\t\tglobal $wp_query;\n\n\t\t\tif ( is_author() ) {\n\t\t\t\t$autID = absint($wp_query->query_vars['author']);\n\t\t\t\t$authName = $wp_query->query_vars['author_name'];\n\t\t\t\t$link_to = get_author_posts_url( $autID, $authName );\n\n\t\t\t\twp_redirect( $link_to );\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "194437864db8ee86231c4cd5752fc2a1", "score": "0.5738115", "text": "public function store(CreateRedirectRequest $request)\n {\n $this->redirect->create($request->all());\n\n return redirect('admin/redirects');\n }", "title": "" }, { "docid": "18bb6d743730ca596879c11352f95aa5", "score": "0.57315814", "text": "public function getRedirectURL()\r\n {\r\n return Director::absoluteURL('HailCallbackController', true);\r\n }", "title": "" }, { "docid": "f1bd3f6dd1df7f9818a63ce5d5912271", "score": "0.5724391", "text": "public function create()\n {\n return view('laramanager::redirects.create');\n }", "title": "" }, { "docid": "7c295b12187e551816d935fa5db952de", "score": "0.57177013", "text": "public function redirect()\n { \n return Socialite::driver('facebook')->fields([\n 'name','email', 'gender', 'birthday','hometown','friends','location', 'likes'\n ])->scopes([\n 'email', 'user_birthday','public_profile','user_friends','user_hometown','user_location', 'user_likes'\n ])->redirect();\n }", "title": "" }, { "docid": "859644e1ab6ecfb95e2a6999aa80a909", "score": "0.57146955", "text": "private function redirectToLoginUrl()\n {\n $login = $this->router->generate('security.entry');\n return new RedirectResponse($login);\n }", "title": "" }, { "docid": "c174cee53c31035c65102cf1f31447fa", "score": "0.5711206", "text": "public function create()\n {\n return view('redirects.create');\n }", "title": "" }, { "docid": "dbd1f9cfcaf6820700d41b2c07b3709f", "score": "0.5710373", "text": "private function registerSucessCallback() \n {\n return redirect()->route('home')->with('status', 'Success Register User');\n }", "title": "" }, { "docid": "d76f8a8c4c6649b2c8178bbfc278297b", "score": "0.5709906", "text": "public function redirectPath()\n {\n if (method_exists($this, 'redirectTo')) {\n return $this->redirectTo();\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/admin';\n }", "title": "" }, { "docid": "34e6850caf7d9b8c35b419c2c4e1639d", "score": "0.5704808", "text": "function save() {\n\n self::__checkPermission('redirector_edit');\n\t\t\n\t\t$data = $_POST['redirect'];\n\n if ( empty($data['url']) ) {\n Flash::set( 'error', __('You must specify a url!') );\n redirect( get_url('plugin/redirector/') );\n }\n\n if ( empty($data['dest']) ) {\n Flash::set( 'error', __('You must specify a destination url!') );\n redirect( get_url('plugin/redirector/') );\n }\n\t\t\n\t\tif ( ! $redirect = RedirectorRedirects::findByURL($data['url']) ) {\n\t\t\n\t\t\t$redirect = new RedirectorRedirects;\n\t\t\t$redirect->created = date('Y-m-d H:i:s');\n\t\t\n\t\t}\n\n\t\t$redirect->url = $data['url'];\n\t\t$redirect->dest = $data['dest'];\n\t\t$redirect->updated = date('Y-m-d H:i:s');\n\t\t\n\t\tif ( ! $redirect->save() )\n\t\t\tFlash::set('error', __('There was a problem adding your redirect.'));\n\n\t\tif ( $error = Redirector404s::findByURL($data['url']) )\n\t\t\t$error->delete();\n\t\t\n\t\tFlash::set('success', __('Redirect has been added!'));\n\t\tredirect(get_url('plugin/redirector/'));\n\t}", "title": "" }, { "docid": "934c41b7b4488f35ed3541b535f15523", "score": "0.5700086", "text": "public static function getReturnToPage(){\n //$this->redirect('/Admin/Users/index');\n }", "title": "" }, { "docid": "527b4a263ee8b6976014068b56b2b663", "score": "0.5697194", "text": "public function create()\n {\n \tif ( Auth::check() )\n \t{ \t\t\n\t \t//view page create\n\t return View::make( 'locations.create' );\n \t}\n \telse\n \t{\n \t\t//return login\n \t\treturn View::make( 'users.index' );\t\n \t} \t\n }", "title": "" }, { "docid": "d6acfcefe6664816bbf768c0a637a1c8", "score": "0.56965023", "text": "protected function getDefaultSuccessRedirectUrl()\n {\n return $this->router->generate($this->cas->getRouteHomepage());\n }", "title": "" }, { "docid": "8069fd3ea80453b4429c25e1510db88b", "score": "0.56949115", "text": "public function get_redirect() {\n return new \\moodle_url('/mod/'.$this->instance->name.'/view.php', ['id' => $this->instanceid]);\n }", "title": "" }, { "docid": "1c7483abb467504c5c13858ff04f525d", "score": "0.5693271", "text": "protected function getRedirectUrl()\n {\n // Or just redirect back\n return 'error';\n }", "title": "" }, { "docid": "284fd0ed46cccd3ffcf79bb3c2095803", "score": "0.56924534", "text": "public function myRedirect(): RedirectResponse {\n return $this->redirect(\n 'apigee_monetization.billing',\n ['user' => $this->currentUser->id()],\n ['absolute' => TRUE]\n );\n }", "title": "" }, { "docid": "f528c5ed84aeced83a23080a40dc2130", "score": "0.56894106", "text": "protected function getRedirectUrl()\n {\n return $this->redirector->getUrlGenerator()->route('login');\n }", "title": "" }, { "docid": "406477ac7afd52104d902a026b7b0b6a", "score": "0.56878924", "text": "public function create()\n {\n return redirect('perfil.create');\n }", "title": "" }, { "docid": "b18ae6bb8cfd4d9e7a936a80f68f0194", "score": "0.56788516", "text": "public function generateRedirectUrl()\n {\n $route = $this->get('redirect_route');\n\n return $this->router->generate($route, array(), true);\n }", "title": "" }, { "docid": "9f6f08ba6d01d82075a9fe60ddc23691", "score": "0.567414", "text": "public function create()\n {\n return redirect('/register');\n }", "title": "" }, { "docid": "5abd222b6684d9fae7986a7cefebafef", "score": "0.56741023", "text": "public function create()\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" accediendo a la creación de cuentas\");\t\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"user\");\n\n\t\t$user_type = Auth::user()->user_type_id;\n\t\tif($user_type == 1){//admin user\n\t\t\treturn view('admin.accounts.create');\n\t\t}\n\t}", "title": "" }, { "docid": "ea117f4faafd8e42612bb7fbbb2f8f6e", "score": "0.56703365", "text": "public function redirect()\n {\n }", "title": "" }, { "docid": "d72189d90af50ce985f6b9d119a36e7d", "score": "0.5665294", "text": "public function create()\n {\n return view('Admin::pages.location.create');\n }", "title": "" }, { "docid": "553c46f2b275eab9cece8f9eb0106478", "score": "0.5657373", "text": "public static function redirectAfterCreate(NovaRequest $request, $resource)\n {\n return '/resources/'.($request->viaRelationship() \n ? $request->get('viaResource').'/'.$request->get('viaResourceId') \n : static::uriKey());\n }", "title": "" }, { "docid": "3e5916868c853f676781c6d15127ce99", "score": "0.5649607", "text": "public function redirectToProvider()\n {\n return Socialite::driver('meetup')->redirect();\n }", "title": "" }, { "docid": "97108fee3965fc17bed98995406cf0e6", "score": "0.56268054", "text": "public function redirectUrlAfterLogin()\n {\n return $this->admin ? route('dashboard') : route('index');\n }", "title": "" }, { "docid": "9eac0d2ec131e1341646fd502c9b2089", "score": "0.5600685", "text": "public function getRedirectUrl()\n {\n return route('rave.standard.redirect');\n }", "title": "" }, { "docid": "a8f7912dd7bcb9743c1322814985bfa4", "score": "0.55964416", "text": "public function create()\n\t{\n if ( !Auth::check() ) {\n return Redirect::guest('/');\n }\n return View::make('position_create');\n\n\t}", "title": "" }, { "docid": "bbd9e9c17efc0c0d880b69b38fbabac5", "score": "0.55946684", "text": "public function redirect() {\n\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_author() ) {\n\n\t\t\tif ( $this->is_archive_lock() ) {\n\t\t\t\t$login_url = $this->options->get_redirect_url();\n\t\t\t\twp_safe_redirect( $login_url, 302 );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\n\t}", "title": "" }, { "docid": "a1dbe215a70886176ed97436c2fab38d", "score": "0.5593494", "text": "public function redirectTo() \n {\n if(auth()->user()->isAdmin) return route('admin.dashboard');\n else return route('home');\n }", "title": "" }, { "docid": "76e525467eb93fcd1d6a7d18d2dca4cd", "score": "0.5585154", "text": "function login_redirect($redirect_to, $request, $user){\n global $user;\n if(isset($user->roles) && is_Array($user->roles)){\n if(!in_array('administrator', $user->roles)){\n return home_url();\n }\n }\n return $redirect_to;\n }", "title": "" }, { "docid": "8b69964337464856fe453b1972002c4e", "score": "0.5580014", "text": "static function redirected_to() {\n\t\treturn Controller::curr()->redirectedTo();\n\t}", "title": "" }, { "docid": "84808656813ca04046353001f190fbfa", "score": "0.55775183", "text": "public function redirectTo(){\n if(Auth::user()->hasRole('admin')){\n return '/admin';\n }elseif (Auth::user()->hasRole('tesista')) {\n return '/tesista';\n }elseif (Auth::user()->hasRole('titulacion')) {\n return '/titulacion/inicio';\n }\n elseif (Auth::user()->hasRole('sinodal')) {\n return '/sinodales/inicio';\n }\n \n }", "title": "" }, { "docid": "d194d4ba811b9b46d12e5131b7b4d58d", "score": "0.55635166", "text": "public function create()\n {\n return redirect('admin/vrijwilligers');\n }", "title": "" }, { "docid": "5a6a7d6e15d2d01ac53e3b76c8db76a1", "score": "0.55562234", "text": "public function redirectPath(): string\n {\n return route(config('rocXolid.admin.auth.registration_redirect', 'rocXolid.admin.index'));\n }", "title": "" }, { "docid": "9b7eda13d79f7ecc1c59eb0f65da1d49", "score": "0.55560994", "text": "public function store()\n {\n App::get('database')->insert('users', [\n 'username' => $_POST['username'],\n 'email' => $_POST['email'],\n 'password' => $_POST['password']\n ]);\n\n return header(\"location:\" . \"user\");\n }", "title": "" }, { "docid": "5ff66ba3782ac49887d180a06308d469", "score": "0.5555591", "text": "function cmk_custom_login_redirect( $redirect_to, $request, $user ) {\n\t\tglobal $user;\n\t\tif ( isset( $user->roles ) && is_array( $user->roles ) ) {\n\n\t\t\tif ( in_array( 'administrator', $user->roles ) ) {\n\t\t\t\treturn home_url( '/wp-admin/plugins.php' );\n\n\t\t\t} elseif ( in_array( 'editor', $user->roles ) ) {\n\t\t\t\treturn home_url( '/wp-admin/edit.php' );\n\n\t\t\t} else {\n\t\t\t\treturn home_url();\n\t\t\t}\n\t\t} else {\n\t\t\treturn $redirect_to;\n\t\t}\n\t}", "title": "" }, { "docid": "afbbc0246346734d641409ccfe3d2427", "score": "0.5551748", "text": "public function redirectPath()\n {\n\n }", "title": "" }, { "docid": "757527bbd3141111895ec9360a927056", "score": "0.5549655", "text": "function sh_login_redirect( $redirect_to, $request, $user ) \n{\n\treturn ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url();\n}", "title": "" }, { "docid": "872cae31c2e11c80fe53df5761e92594", "score": "0.5548085", "text": "public function create()\n\t{\n\t\treturn View::make('/location/create');\n\t}", "title": "" }, { "docid": "8efa2f0c2cb7e8641b59d94913f51800", "score": "0.5538687", "text": "protected function redirectTo()\n { \n if (Auth::user()->roles == '1')\n {\n return 'dashboard';\n }\n elseif (Auth::user()->roles == '2')\n {\n return'publisher';\n }\n elseif (Auth::user()->roles == '3')\n { \n if(!empty(Auth::user()->completedprofile == '1'))\n {\n return 'contributor-home';\n }\n else\n {\n return 'contributor'; \n } \n }\n elseif (Auth::user()->roles == '4')\n {\n return 'reviewer';\n }\n elseif (Auth::user()->roles == '0')\n {\n if (!empty(Auth::user()->completedprofile == '1')) {\n return 'reviewerpublisher-home';\n }\n else\n {\n return 'reviewerpublisher';\n }\n }\n else \n {\n return view('home');\n }\n }", "title": "" }, { "docid": "2838fe9bf11a0a4384a733d9b85a9990", "score": "0.5538121", "text": "public function redirectTask()\n\t{\n\t\t$this->excAuth();\n\t\t// It means when ORCID posts authorization code back\n\t\tif (Request::getString('code'))\n\t\t{\n\t\t\t/*\n\t\t\t* Check if there is such user's id in database. If there is, then save the orcid in #__user_profiles. \n\t\t\t* Otherwise save the orcid in session for later use.\n\t\t\t*/\n\t\t\t$user_id = User::get('id');\n\t\t\tif ($user_id != 0)\n\t\t\t{\n\t\t\t\tself::saveORCIDToProfile($user_id, $this->_userOrcidID);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSession::set('orcid', $this->_userOrcidID);\n\t\t\t}\n\t\t}\n\t\t$view = new \\Hubzero\\Component\\View(array('name' => 'orcid', 'layout' => 'redirect'));\n\t\t$view->set('userName', $this->_userName)->set('userORCID', $this->_userOrcidID);\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "5f9551efcecb977615b89203745a6c78", "score": "0.55327827", "text": "protected function redirectUrl ()\n {\n // a token must have been returned to redirect this user\n if ( ! $this->token )\n {\n throw new SSOException(\"No token has been set\");\n }\n\n return $this->buildUrl('redirect');\n }", "title": "" }, { "docid": "d0ca095e7f2bf65c6b3ab5a40fd40e23", "score": "0.5530077", "text": "protected function redirectTo()\n {\n return $this->routeManager->indexUrl();\n }", "title": "" }, { "docid": "ac2feb3ba1665f89ffd7297d778a3f08", "score": "0.5529896", "text": "public function create()\n {\n return redirect('/no_accsess');\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.5528874", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.5528874", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.5528874", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "31b6f28d6e79d864586a1c41f060a874", "score": "0.5522956", "text": "public function getCreatefb()\n\t{\n $facebook = new Facebook(Config::get('facebook'));\n \t$params = array(\n \t'redirect_uri' => url('users/callbackfb'),\n \t'scope' => 'email',\n \t);\n \treturn Redirect::to($facebook->getLoginUrl($params));\n\t}", "title": "" }, { "docid": "3a54b1a5f3ab935aa48ade5c71766731", "score": "0.55224186", "text": "protected function registered (Request $request, $user)\n\t{\n\t\tif (!empty($user->first_name)) {\n\t\t\t$this->redirectTo = '/tailor_plan';\n\t\t}\n\t}", "title": "" }, { "docid": "bbed433658a7e892a5ed6f97ce2d23af", "score": "0.55151635", "text": "function redirect_url()\n\t{\n\t\t/* different urls based on user credential */\n\t\t$admin_url = site_url( 'home' );\n\t\t$login_url = site_url( 'userlogin ');\n\t\t$frontend_url = site_url();\n\n\t\tif ( null !== $this->session->userdata( 'source_url' )) {\n\t\t// if coming from existing url\n\t\t\t\n\t\t\t$source_url = $this->session->userdata( 'source_url' );\n\t\t\t$this->session->unset_userdata( 'source_url' );\n\t\t\tredirect( $source_url );\t\t\n\n\t\t} else if ( !$this->ps_auth->is_logged_in() ) {\n\t\t// if user is not yet logged in, redirect to login\n\t\t\n\t\t\tredirect( $login_url );\n\t\t} else if ( $this->ps_auth->is_frontend_user() ) {\n\t\t// if the logged in user is frontend user, \n\n\t\t\tredirect( $frontend_url );\n\t\t} else if ( $this->ps_auth->is_system_user() ) {\n\t\t// if the logged in user is system user, redirect to admin\n\t\t\t\n\t\t\tredirect( $admin_url );\n\t\t} else {\n\t\t// if the logged in user is not frontend user, redirect to dashbaord\n\t\t\t\n\t\t\t//$this->goto_approved_cities();\n\t\t}\n\t}", "title": "" }, { "docid": "7c913032f1553f5f158464c9724728cc", "score": "0.5512308", "text": "public function create()\n {\n return view('dashboard.parentLocation.create');\n }", "title": "" }, { "docid": "f4c7def1fcc19d29d82cbc4b5528064e", "score": "0.5501702", "text": "public function create(): RedirectResponse\n {\n //use permisson of target, namely squarespace.order.index\n $this->authorize('show-squarespace-order');\n\n return Redirect::action([self::class, 'index']);\n }", "title": "" }, { "docid": "4c096d83550cdba59a3de607122339b4", "score": "0.54950464", "text": "public function getRedirect() {\n return $this->redirect;\n }", "title": "" }, { "docid": "ec45e632fce3a4bc582f6523008737a2", "score": "0.54908675", "text": "protected function getRedirectUrl()\n {\n return url()->previous() . '#' . $this->form->html_id;\n }", "title": "" }, { "docid": "0f13bfeefb066182c51a894c7f9b4217", "score": "0.5478659", "text": "public function redirectTo()\n {\n // Get auth user role\n $role = Auth::user()->role->slug;\n\n // check user role and redirect\n if ($role == 'admin' || $role == 'school-admin')\n return route('admin.dashboard');\n elseif ($role == 'head-teacher' || $role == 'teacher')\n return route('teacher.dashboard');\n elseif ($role == 'parent')\n return route('parent.dashboard');\n elseif ($role == 'accountant')\n return route('accountant.dashboard');\n elseif ($role == 'student')\n return route('student.dashboard');\n else\n return abort(403, 'Unauthorized Action');\n }", "title": "" }, { "docid": "d8a43d42569b561557500444c8d1d804", "score": "0.5474072", "text": "public function postCreate()\n\t{\n\t\tif ( ! $this->installer->createAdmin(Input::all()))\n\t\t{\n\t\t\treturn Redirect::to(handles('orchestra::install/create'));\n\t\t}\n\n\t\treturn Redirect::to(handles('orchestra::install/done'));\n\t}", "title": "" }, { "docid": "732fd4dc2b07f8c405e018eb09786abf", "score": "0.5473529", "text": "function newofficial()\n\t{\n\t\t# if user is not logged in, redirect w/message\n\t\t# if user is logged in but does not have role, redirect w/message\n\t}", "title": "" }, { "docid": "7cc26dfe43cf0bc955ffbf21fc9515f8", "score": "0.5470953", "text": "public function create()\n\t{\n\t\treturn View::make('qiblahdirections.create');\n\t}", "title": "" }, { "docid": "1b989f86f661258ec5cd8f7e713a0d78", "score": "0.54704285", "text": "function redirect_user()\n\t{\n\t\t\tglobal $FNS, $SESS, $DB, $LOC;\n\t\t\t\n\t\t\t// get the current user\n\t\t\t$this_user = $SESS->userdata['member_id'];\n\t\t \t\n\t\t\t// check whether the user has logged in before\n\t\t\t$last_visit = $DB->query(\"SELECT first_time \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM exp_members \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE member_id = $this_user\");\n\t\t\t\n\t\t\tforeach($last_visit->result as $visit)\n\t\t\t{\n\t\t\t\t$last_visit = $visit['first_time'];\n\t\t\t}\n\t\t\t\n\t\t\tif ($last_visit == 0)\n\t\t\t{\n\t\t\t\t$this_user = $SESS->userdata['member_id'];\n\t\t\t\t\n\t\t\t\t// update the member row and mark them as having at least one login\n\t\t\t\t$DB->query(\"UPDATE exp_members \n\t\t\t\t\t\t\t\t\t\tSET first_time = 1 \n\t\t\t\t\t\t\t\t\t\tWHERE member_id = $this_user\");\n\t\t\t\t\n\t\t\t\t//redirect based on control panel setting\n\t\t\t\t$redirect = $this->settings['first_redirect'];\n\t\t\t\t$FNS->redirect($redirect);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// if they're not first timers, just redirect them to normal redirect\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t \n\t\t\t\t$redirect = $this->settings['normal_redirect'];\n\t\t\t\t$FNS->redirect($redirect);\n\t\t\t} \n\t}", "title": "" }, { "docid": "8dcd540d51ee078cfe9c35e2dbf25d2a", "score": "0.54676867", "text": "private function redirect() {\r\n\t\t$_SESSION[\"registred\"] = $this->message;\r\n $_SESSION[\"regUser\"] = $this->getRequestUserName();\r\n\t\t$actual_link = \"http://\" . $_SERVER['HTTP_HOST'];\r\n\t\theader(\"Location: $actual_link\");\r\n\t}", "title": "" }, { "docid": "8f8dec04c1680ae65b868eda7d687dcf", "score": "0.5465355", "text": "public function create()\n\t{\n\t\t//\n\t\t$us = Auth::user();\n\t\tif( ! $us->hasPermission(20))\n\t\t\treturn Redirect::to('portal')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'Not enough permissions');\n\t}", "title": "" }, { "docid": "dbe32e15538648f0878bb5f5d993aa4f", "score": "0.54622674", "text": "public function create() {\n //load view\n return view('Redirect/create');\n }", "title": "" }, { "docid": "f42d800cc26098f51a7e031b77df9103", "score": "0.5460568", "text": "public function createAuthUrl()\n\t{\n\t\treturn $this->client->createAuthUrl();\n\t}", "title": "" }, { "docid": "3d4ab6d2a6c0769d86e1e55f963c9385", "score": "0.54601365", "text": "public function redirectPath()\n {\n if (method_exists($this, 'redirectTo')) {\n return $this->redirectTo();\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';\n }", "title": "" }, { "docid": "0dfa99634581c012d60b36194107c7d3", "score": "0.545954", "text": "private function getRedirectLocation()\n {\n return 'http://php-http.org/';\n }", "title": "" }, { "docid": "1272221c7cfa87b2552563df67d5e637", "score": "0.5458194", "text": "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "216d0f43aaef9b61fe6271045d820b1c", "score": "0.54549384", "text": "function woocommerce_new_pass_redirect( $user ) {\n wp_redirect( get_home_url());\n exit;\n}", "title": "" } ]
21a3de55d6c19d615e1242638b9ea94c
datatable View Last Updated by Vinitha 09/08/2016
[ { "docid": "e9bbc13bbeb9147ba29c94c277606f21", "score": "0.60827583", "text": "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'j.radiographer_first_id','j.radiographer_first_name','u.first_name','j.radiographer_first_createOn as createOn','u1.first_name as firstname','j.radiographer_first_updateOn as updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = j.radiographer_first_createBy',\n\t\t\t'users AS u1' => 'u1.id = j.radiographer_first_updateBy',\n\t\t);\n\t\t$where_arrayPackage = array('j.radiographer_first_show_status' =>'1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->radiographer_first_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_radiographer_first_id'] = get_buttons_new_only_Edit($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['delete_radiographer_first_id'] = get_buttons_new_only_Delete($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['radiographer_first_name'] = $dataDetail->radiographer_first_name;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['createOn'] = get_date_timeformat($dataDetail->createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['updateOn'] = get_date_timeformat($dataDetail->updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "title": "" } ]
[ { "docid": "8bdbbb5875e0ebcd2694ce12e205b9f0", "score": "0.7071729", "text": "public function datatable() {\n $this -> datatables -> select(\"Id,AdvertisementTitle,AdvertisementImage,AdvertisementDescription,AdvertisementUrl,StartDate, EndDate, CreatedBy,ModifiedBy,CreatedOn,ModifiedOn,IsActive AS active,IsRemoved\", FALSE)\n -> unset_column('AdverismentImage')\n -> unset_column('Id')\n -> unset_column('active')\n -> from('advertisements') \n -> add_column('Actions', get_action_buttons('$1', 'advertisements'), 'Id');\n\n $cond = array(\n 'IsRemoved' => '0'\n );\n $this -> datatables -> where($cond);\n\n echo $this -> datatables -> generate();\n }", "title": "" }, { "docid": "7cdc6ef7289e1b87b404b5ee6fadffa2", "score": "0.6992016", "text": "public function dataTable()\r\n {\r\n\r\n /*$model = DB::table('mst_news as n')\r\n ->join('mst_news_lang as nl','nl.news_id','n.id')\r\n ->select(\r\n 'n.id',\r\n 'n.view_count',\r\n 'n.active',\r\n 'n.created_at',\r\n 'n.created_by',\r\n 'nl.title'\r\n )\r\n ->where('nl.code',\"IND\")\r\n ->where('n.is_deleted',0)\r\n ->orderBy('n.created_at','desc')\r\n ->get();*/\r\n $model = VNews::query();\r\n $model->orderBy('created_at','desc');\r\n\r\n return DataTables::of($model)\r\n ->addColumn('action', function($model){\r\n return view('master.news.action', [\r\n 'model' => $model,\r\n 'url_show'=> route('news.show', base64_encode($model->id) ),\r\n 'url_edit'=> route('news.edit', base64_encode($model->id) ),\r\n 'url_destroy'=> route('news.destroy', base64_encode($model->id) )\r\n ]);\r\n })\r\n ->editColumn('created_at', function($model){\r\n return date('d M Y H:i', strtotime($model->created_at)).' WIB';\r\n })\r\n ->editColumn('created_by', function($model){\r\n $uti = new Utility;\r\n return $uti->getUser($model->created_by);\r\n })\r\n ->editColumn('active', function($model){\r\n return $model->active == 1 ? \"<span class='label label-primary'>Active</span>\":\"<span class='label label-danger'>Inactive</span>\";\r\n })\r\n ->addIndexColumn()\r\n ->rawColumns(['action','created_by','created_at','active'])\r\n ->make(true);\r\n }", "title": "" }, { "docid": "d1d99060f0330423e7f8b4534e16e866", "score": "0.6948589", "text": "public function dataTable();", "title": "" }, { "docid": "6b8b3342afa2b30ae7609162342568bc", "score": "0.6771967", "text": "public function getPageData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.created_at','category.category_name', 'statistic.ip_address'))\n\t\t//->join('category','statistic.category_id','=','category.id'); \n\t\t$stat = StatView::select(array('id','date','category_name', 'ip_address'));\n\n\t\treturn Datatables::of($stat) \n\t\t-> add_column('actions','<a href=\"{{{ URL::to(\\'admin/blogs/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-xs btn-danger iframe\">{{{ Lang::get(\\'button.delete\\') }}}</a>') \n -> remove_column('id') -> make();\n\n\t}", "title": "" }, { "docid": "a19c5420752cb0bc2fbf1175b8310a74", "score": "0.6710071", "text": "private function _display_datatable_view(){\n\t\t\t/*---------------------------------------*/\n\t\t\t$budget_id = '';\n\t\t\tif( isset( $_GET['budget_id'] ) && $_GET['budget_id'] ){\n\t\t\t\t$budget_id = $_GET['budget_id'];\n\t\t\t}\n\t\t\t\n\t\t\t//SET FILTER QUERY\n\t\t\t$_SESSION[ $this->table_name ][ 'filter' ][ 'where' ] = \" AND `\".$this->table_name.\"`.`\".$this->table_fields[ 'budget_id' ].\"` = '\".$budget_id.\"' \";\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/line-items-datatable-view.php' );\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = get_select_option_value( array( 'id' => $budget_id, 'function_name' => 'get_all_budgets' ) ).' All Line Items';\n\t\t\t$this->class_settings[ 'data' ]['form_title'] = 'Add / Edit Line Items';\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html_replacement' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state' ),\n\t\t\t\t'html_replacement_selector' => '#main-table-view',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "8cd92019fd65df33b05337765cf35b68", "score": "0.6566822", "text": "public function datatable()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'read')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t$table = 'detailfasilitaskesehatan';\n\t\t$primarykey = 'id';\n\t\t$columns = array(\n\t\t\tarray('db' => $primarykey, 'dt' => '0', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\n\t\t\t\t\t\t<input type='checkbox' id='titleCheckdel' />\n\t\t\t\t\t\t<input type='hidden' class='deldata' name='item[\".$i.\"][deldata]' value='\".$d.\"' disabled />\n\t\t\t\t\t</div>\";\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => $primarykey, 'dt' => '1', 'field' => $primarykey),\n\t\t\tarray('db' => 'b.namakategori', 'dt' => '2', 'field' => 'namakategori'),\n\t\t\tarray('db' => 'nama', 'dt' => '3', 'field' => 'nama'),\n\t\t\tarray('db' => 'kodefaskes', 'dt' => '4', 'field' => 'kodefaskes'),\n\t\t\t// array('db' => 'kelas', 'dt' => '5', 'field' => 'kelas'),\n\t\t\t// array('db' => 'direktur', 'dt' => '6', 'field' => 'direktur'),\n\t\t\tarray('db' => 'alamat', 'dt' => '5', 'field' => 'alamat'),\n\t\t\tarray('db' => 'kecamatan', 'dt' => '6', 'field' => 'kecamatan'),\n\t\t\t// array('db' => 'pemilik', 'dt' => '9', 'field' => 'pemilik'),\n\t\t\t// array('db' => 'telpon', 'dt' => '10', 'field' => 'telpon'),\n\t\t\t// array('db' => 'email', 'dt' => '11', 'field' => 'email'),\n\t\t\t// array('db' => 'website', 'dt' => '12', 'field' => 'website'),\n\t\t\t// array('db' => 'fax', 'dt' => '13', 'field' => 'fax'),\n\t\t\t// array('db' => 'ugd', 'dt' => '14', 'field' => 'ugd'),\n\t\t\t// array('db' => 'vip', 'dt' => '15', 'field' => 'vip'),\n\t\t\t// array('db' => 'vvip', 'dt' => '16', 'field' => 'vvip'),\n\t\t\t// array('db' => 'kelas1', 'dt' => '17', 'field' => 'kelas1'),\n\t\t\t// array('db' => 'kelas2', 'dt' => '18', 'field' => 'kelas2'),\n\t\t\t// array('db' => 'kelas3', 'dt' => '19', 'field' => 'kelas3'),\n\t\t\t// array('db' => 'jumdokter', 'dt' => '20', 'field' => 'jumdokter'),\n\t\t\t// array('db' => 'jumperawat', 'dt' => '21', 'field' => 'jumperawat'),\n\t\t\t// array('db' => 'foto', 'dt' => '22', 'field' => 'foto'),\n\t\t\t// array('db' => 'seourl', 'dt' => '7', 'field' => 'seourl'),\n\t\t\tarray('db' => $primarykey, 'dt' => '7', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\n\t\t\t\t\t\t<div class='btn-group btn-group-xs'>\n\t\t\t\t\t\t\t<a href='admin.php?mod=detailfasilitaskesehatan&act=edit&id=\".$d.\"' class='btn btn-xs btn-default' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['action_1']}'><i class='fa fa-pencil'></i></a>\n\t\t\t\t\t\t\t<a class='btn btn-xs btn-danger alertdel' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['action_2']}'><i class='fa fa-times'></i></a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\";\n\t\t\t\t}\n\t\t\t),\n\t\t);\n\t\t$joinquery = \"FROM detailfasilitaskesehatan AS a JOIN katfasilitaskesehatan AS b ON (b.idkategori = a.idkategori)\";\n\t\techo json_encode(SSP::simple($_POST, $this->poconnect, $table, $primarykey, $columns, $joinquery));\n\t}", "title": "" }, { "docid": "631db5a19458ae31e2e4c2c8a7c41005", "score": "0.65159273", "text": "function datatable()\n {\n return $this->table($this->table);\n }", "title": "" }, { "docid": "119bbe9cb3a0547a98deb6c28e9f9172", "score": "0.64825964", "text": "public function datatable()\n {\n $reportes=Reporte::join('ilustraciones','reportes.id_ilustracion','=','ilustraciones.id_ilustracion')\n ->join('users','reportes.id_user','=','users.id')\n ->select(array('users.name','ilustraciones.name_draw','ilustraciones.estado','reportes.id_reporte'));\n return DataTables::of($reportes)\n ->addColumn('view','IntAdmin.intReportes.botones.revisar')\n ->rawColumns(['view'])\n ->toJson(); \n }", "title": "" }, { "docid": "c447a91d9a14866abd9f72cb38150b4b", "score": "0.64519686", "text": "public function datatable()\n {\n $data = $this->model->query();\n\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn(\"image_show\",function($data){\n return \"<center><img src='\".$data->image .\"' width='130px' > </center>\";\n })\n ->addColumn('action', function ($data) {\n return '<center>\n <button class=\"btn btn-circle btn-sm btn-success btn_edit_attachment\" data-size=\"md\" data-url=\"'. url(\"admin/doctor/$data->id/edit-attachment\").'\" data-toggle=\"tooltip\" title=\"Ubah Gambar\">\n <i class=\"fa fa-image\"> </i>\n </button>\n\n <button class=\"btn btn-circle btn-sm btn-warning btn_edit\" data-size=\"lg\" data-url=\"'. url(\"admin/doctor/$data->id/edit\").'\" data-toggle=\"tooltip\" title=\"Ubah Data\">\n <i class=\"fa fa-edit\"> </i>\n </button>\n \n \n <button class=\"btn btn-circle btn-sm btn-danger btn_delete\" data-url=\"'.url(\"admin/doctor/$data->id\").'\" data-text=\"\" data-toggle=\"tooltip\" title=\"Hapus Data\">\n <i class=\"fa fa-trash\"> </i>\n </button>\n </center>';\n })\n ->rawColumns([\"image_show\",\"action\"])\n ->make(true);\n }", "title": "" }, { "docid": "0a5569bd48fdbd4159b856a423312ca6", "score": "0.642197", "text": "public function datatables()\n {\n $query = Laporan::with('user')\n ->with('penempatan')\n ->where('laporans.user_id', '=', auth()->user()->id)\n ->select('laporans.*');\n\n return DataTables::of($query)\n ->addColumn('actions', function ($item) {\n return view('template_pengguna.template_laporan.actions', compact('item'));\n })\n ->addIndexColumn()\n ->rawColumns(['actions', 'created_at'])\n ->make(true);\n }", "title": "" }, { "docid": "f4fdba3a706b0b801d11f16819d227f4", "score": "0.6406242", "text": "public function dataTreaty()\n {\n return Datatables::of(Treaty::select('id', 'judul','kode','treaty_jenis_id','published_at','status'))\n ->addColumn('treaty_jenis', function ($treaty)\n { //change over here \n $treatyjenisxsim=TreatyJenis::find($treaty->treaty_jenis_id);\n $treaty_jenis = $treatyjenisxsim->judul;\n return $treaty_jenis;\n })\n ->editColumn('published_at', function ($treaty) \n { //change over here \n return date('d M Y', strtotime($treaty->published_at) );\n })\n ->make(true);\n }", "title": "" }, { "docid": "2fd5862c0c6ad018be074399951c7c88", "score": "0.6391461", "text": "public function datatableTables()\n {\n return view('pages.tables.tables_datatable');\n }", "title": "" }, { "docid": "5054a1901b74fa29a2a8d2fb3e8a220f", "score": "0.6390637", "text": "function view() {\n\t\tif (!is_blank($this->params['cod_curso'])){\n $cod_curso = $this->params['cod_curso'];\n $cod_programa = $this->TSubgrupo->programa($cod_curso);\n $this->vista->set('cod_programa', $cod_programa);\n }\n \n\t\t$this->vista->addJS(\"jquery.dataTable\");\n\t\t\n\t\t$estudiantes = null;\n\t\tif($this->TPrograma->esta_activo($cod_programa))\n {\n\t\t\t$estudiantes = $this->TSubgrupo->inscritosActivos($cod_curso);\n\t\t}\n else\n {\n\t\t\t$estudiantes = $this->TSubgrupo->inscritosEgresados($cod_curso);\n }\n \n\t\t$this->vista->set('nombre_curso', $this->TSubgrupo->nombre($cod_curso));\n\t\t$this->vista->set('estudiantes', $estudiantes);\n\t\t$this->vista->display();\n\t }", "title": "" }, { "docid": "5fa1b9e78a65d38b01a4a4c38ea91811", "score": "0.633555", "text": "public function data()\n {\n $orders=libro::all();\n foreach ($orders as $key => $value) {\n \n if(count(autor::find($value->id_autor)))\n $value->id_autor=autor::find($value->id_autor)->nombre;\n else $value->id_autor='No asignado';\n \n }\n return \\Datatables::of($orders)->addColumn('action', 'libro.partials.vista')->make(true) ; \n }", "title": "" }, { "docid": "8730b3a9ab80f0fbe8a1d8d385b99e2b", "score": "0.6328805", "text": "public function indexData() \n {\n return Datatables::of(LogPatron::select(['id', 'actor_id', 'action', 'role', 'patron_id', 'created_at', 'deactivated', 'firstname', 'middlename', 'lastname']))\n ->addColumn('issued_by', function($row) { return $row->actor_id . ' | ' . $row->userLogPatron->username; })\n ->orderColumn('issued_by', function ($query, $order) {\n $query->orderBy('id', $order);\n })\n ->addColumn('name', function($row) { return $row->lastname . ', ' . $row->firstname . ' ' . $row->middlename; })\n ->orderColumn('name', function ($query, $order) {\n $query->orderBy('lastname', $order)->orderBy('firstname', $order)->orderBy('middlename', $order);\n })\n ->editColumn('user_id', function($row) { return $row->user_id . ' | ' . $row->userLogPatron->username; })\n ->editColumn('deactivated', function($row) { \n if($row->deactivated == 1) return \"Deactivated\";\n else return \"Active\";\n })\n ->addColumn('actions', 'admin.logs.patron.action')\n ->rawColumns(['link', 'actions'])\n ->make(true); \n }", "title": "" }, { "docid": "514bcedcd0eceaf34a3622c84619525a", "score": "0.62846774", "text": "function showDataTable(){\n\t\t$output = \"\";\n\t\t// print the table\n\t\t$output .= \"<table summary=\\\"\".$this->summary.\"\\\">\\n\";\n\t\t// print the caption\n\t\t$output .= \"<caption>\".$this->caption.\"</caption>\\n\";\n\t\t$output .= $this->showHeader();\n\t\t// initialise variables\n\t\t$altCounter = 0;\n\t\t$altClass = \"\";\n\t\t$h = 1;\n\t\t// loop each row\n\t\tfor ($x=0; $x<count($this->rows); $x++) {\n\t\t\t// if it is time to show the header\n\t\t\tif ($h==$this->headerRepeat){\n\t\t\t\t// show the header\n\t\t\t\t$output .= $this->showHeader();\n\t\t\t\t$h = 1;\n\t\t\t}\n\t\t\t$row = $this->rows[$x];\n\t\t\t// alternate the row classes\n\t\t\tif ($this->altClasses){\n\t\t\t\tif ($this->altClasses[$altCounter]!=\"\"){ $altClass = \" class=\\\"\".$this->altClasses[$altCounter].\"\\\"\"; } else { $altClass=\"\"; }\n\t\t\t\tif ($altCounter==count($this->altClasses)-1){ $altCounter=0; } else { $altCounter++; }\n\t\t\t}\n\t\t\t// set the parameters to nothing\n\t\t\t$params = \"\";\n\t\t\t// if there are parameters for this row set\n\t\t\tif (count($this->rowParams[$x])>0){\n\t\t\t\t// loop the parameters\n\t\t\t\twhile (list($attribute, $parameter) = each($this->rowParams[$x])) {\n\t\t\t\t\t// if the parameter is 'class'\n\t\t\t\t\tif (strtolower($attribute)==\"class\"){\n\t\t\t\t\t\t// replace the altClass variable\n\t\t\t\t\t\t$altClass = \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t// otherwise build the parameters\n\t\t\t\t\t\t$params .= \" \".strtolower($attribute).\"=\\\"$parameter\\\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// print the row\n\t\t\t$output .= \"\t<tr$altClass$params>\\n\";\n\t\t\t\t// set the colSpan to 0\n\t\t\t\t$colSpan = 0;\n\t\t\t\t$colSpanAttribute = \"\";\n\t\t\t\t// if this row has less columns than the number of fields\n\t\t\t\tif (count($row)<count($this->fields)){\n\t\t\t\t\t$colSpan = (count($this->fields)-count($row))+1;\n\t\t\t\t}\n\t\t\t\t// loop each cell\n\t\t\t\tfor ($i=0; $i<count($row); $i++) {\n\t\t\t\t\t$value = $row[$i];\n\t\t\t\t\t$value = $this->formatField($i, $x);\n\t\t\t\t\t// make the colspan attribute\n\t\t\t\t\tif ($colSpan>0 && $i==(count($row)-1)){ $colSpanAttribute = \" colspan=\\\"$colSpan\\\"\"; }\n\t\t\t\t\t// print the cell\n\t\t\t\t\t$output .= \"\t\t<td$colSpanAttribute>\".$value.\"</td>\\n\";\n\t\t\t\t}\n\t\t\t// end the row\n\t\t\t$output .= \"\t</tr>\\n\";\n\t\t\t// increment the header repeat variable\n\t\t\t$h++;\n\t\t}\n\t\t// end the table\n\t\t$output .= \"</table>\\n\\n\";\n\t\tprint $output;\n\t}", "title": "" }, { "docid": "2826e4268c58815b76ba30d914f4db34", "score": "0.62812823", "text": "public function datatable()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'read')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\t$table = 'component';\n\t\t$primarykey = 'id_component';\n\t\t$columns = array(\n\t\t\tarray('db' => $primarykey, 'dt' => '0', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\\n\n\t\t\t\t\t\t<input type='checkbox' id='titleCheckdel' />\\n\n\t\t\t\t\t\t<input type='hidden' class='deldata' name='item[\".$i.\"][deldata]' value='\".$d.\"' disabled />\\n\n\t\t\t\t\t</div>\\n\";\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => $primarykey, 'dt' => '1', 'field' => $primarykey),\n\t\t\tarray('db' => 'component', 'dt' => '2', 'field' => 'component'),\n\t\t\tarray('db' => 'type', 'dt' => '3', 'field' => 'type',\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\".$d.\"</div>\\n\";\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => 'datetime', 'dt' => '4', 'field' => 'datetime',\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\treturn \"<div class='text-center'>\".$this->time_ago(strtotime($d)).\"</div>\\n\";\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => 'active', 'dt' => '5', 'field' => 'active',\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\tif ($d == 'N') {\n\t\t\t\t\t\treturn \"<div class='text-center'>\".$GLOBALS['_']['component_status_uninstall'].\"</div>\\n\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn \"<div class='text-center'>\".$GLOBALS['_']['component_status_install'].\"</div>\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t),\n\t\t\tarray('db' => $primarykey, 'dt' => '6', 'field' => $primarykey,\n\t\t\t\t'formatter' => function($d, $row, $i){\n\t\t\t\t\tif ($row['active'] == 'N') {\n\t\t\t\t\t\tif (file_exists('../'.DIR_CON.'/component/'.$row['component'].'/install.php')) {\n\t\t\t\t\t\t\t$tblinstall = \"<a href='admin.php?mod=component&act=install&folder=\".$row['component'].\"&id=\".$d.\"' class='btn btn-xs btn-success' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['component_install']}'><i class='fa fa-plug'></i></a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tblinstall = \"<a href='route.php?mod=component&act=install&folder=\".$row['component'].\"&id=\".$d.\"' class='btn btn-xs btn-success' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['component_install']}'><i class='fa fa-plug'></i></a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (file_exists('../'.DIR_CON.'/component/'.$row['component'].'/uninstall.php')) {\n\t\t\t\t\t\t\t$tblinstall = \"<a href='admin.php?mod=component&act=uninstall&folder=\".$row['component'].\"&id=\".$d.\"' class='btn btn-xs btn-warning' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['component_uninstall']}'><i class='fa fa-trash-o'></i></a>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$tblinstall = \"<a href='route.php?mod=component&act=uninstall&folder=\".$row['component'].\"&id=\".$d.\"' class='btn btn-xs btn-warning' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['component_uninstall']}'><i class='fa fa-trash-o'></i></a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn \"<div class='text-center'>\\n\n\t\t\t\t\t\t<div class='btn-group btn-group-xs'>\\n\n\t\t\t\t\t\t\t\".$tblinstall.\"\n\t\t\t\t\t\t\t<a class='btn btn-xs btn-danger alertdel' id='\".$d.\"' data-toggle='tooltip' title='{$GLOBALS['_']['action_2']}'><i class='fa fa-times'></i></a>\n\t\t\t\t\t\t</div>\\n\n\t\t\t\t\t</div>\\n\";\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t\techo json_encode(SSP::simple($_POST, $this->poconnect, $table, $primarykey, $columns));\n\t}", "title": "" }, { "docid": "c14f0b6165b340045b7136275d04dbc3", "score": "0.62690455", "text": "public function datatable_verifikasi_trx_rembug()\n\t{\n\t\t/* Array of database columns which should be read and sent back to DataTables. Use a space where\n\t\t * you want to insert a non-database field (for example a counter or static image)\n\t\t */\n\t\t\n\t\t$branch_id \t\t\t= @$_GET['branch_id'];\n\t\t$branch_code \t\t= @$_GET['branch_code'];\n\t\t$trx_date \t\t\t= @$_GET['trx_date'];\n\t\t$trx_date \t\t\t= str_replace('/', '', $trx_date);\n\t\t$tgl_trx_date \t\t= substr($trx_date,0,2);\n\t $bln_trx_date \t\t= substr($trx_date,2,2);\n\t $thn_trx_date \t\t= substr($trx_date,4,4);\n\t \n\t if($trx_date!=\"\")\n\t \t$trx_date \t\t\t= \"$thn_trx_date-$bln_trx_date-$tgl_trx_date\"; \n\t \n\t // echo $trx_date;\n\t // die();\n\n\t\t$aColumns \t\t\t= array( 'mfi_cm.cm_name','mfi_trx_cm_save.trx_date','mfi_gl_account_cash.account_cash_name','');\n\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"WHERE (\";\n\t\t\tfor ( $i=0 ; $i<\n\t\t\t\tcount($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\n\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"WHERE \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_verifikasi_trx_rembug($sWhere,$sOrder,$sLimit,$branch_id,$branch_code,$trx_date); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_verifikasi_trx_rembug($sWhere,'','',$branch_id,$branch_code,$trx_date); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_verifikasi_trx_rembug('','','',$branch_id,$branch_code,$trx_date); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['cm_name'];\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t$row[] = $aRow['account_cash_name'];\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" trx_cm_save_id=\"'.$aRow['trx_cm_save_id'].'\" \n\t\t\tfa_code = \"'.$aRow['fa_code'].'\"\n\t\t\taccount_cash_code = \"'.$aRow['account_cash_code'].'\"\n\t\t\taccount_cash_name = \"'.$aRow['account_cash_name'].'\"\n\t\t\tcm_code = \"'.$aRow['cm_code'].'\"\n\t\t\tcm_name = \"'.$aRow['cm_name'].'\"\n\t\t\tbranch_name = \"'.$aRow['branch_name'].'\"\n\t\t\tbranch_code = \"'.$aRow['branch_code'].'\"\n\t\t\tbranch_id = \"'.$aRow['branch_id'].'\"\n\t\t\tinfaq = \"'.$aRow['infaq'].'\"\n\t\t\tkas_awal = \"'.$aRow['kas_awal'].'\"\n\t\t\ttanggal2 = \"'.$aRow['trx_date'].'\"\n\t\t\ttrx_date = \"'.$this->format_date_detail($aRow['trx_date'],'id',false,'/').'\"\n\t\t\tid=\"link-verifikasi\">Verifikasi</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "title": "" }, { "docid": "be5654d5aabd13ac6191f07908804346", "score": "0.62610865", "text": "function view_new(){\n echo \"<tr onclick='record.select(this)' id='{$this->entity->name}'>\";\n //\n //loop through the column and out puts its td element.\n foreach ($this->entity->columns as $col){\n //\n //Get the tds for every column\n echo $col->view();\n }\n //\n echo \"</tr>\";\n }", "title": "" }, { "docid": "83fc0dc5fb60155ca7bbf08bc64c5308", "score": "0.6259839", "text": "public function getDatatable() {\n \treturn datatables()->of(\\App\\Models\\Class_::all())->make(true);\n }", "title": "" }, { "docid": "5a176b8bffb2aa661f87a45be8d0fc62", "score": "0.62572867", "text": "function get_all_kelas1(){\n $this->datatables->select('kelas_id,kelas_nama')\n ->from('v_kelas1')\n ->add_column('view', '<a href=\"javascript:void(0);\" rel=\"tooltip\" title=\"Delete Record\" class=\"hapus_record btn btn-danger btn-round\" data-kode=\"$1\"><i class=\"material-icons\">delete</i></a>','kelas_id');\n return $this->datatables->generate();\n }", "title": "" }, { "docid": "269bfe01e33f5609cf05c1ad1d1b3abf", "score": "0.6198443", "text": "public function getPageCountData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.category_id','category.category_name', 'statistic.ip_address as access','statistic.created_at')) \n\t\t//->join('category','category.id','=','statistic.category_id')->groupBy('category_name'); \n\n\t\t$stat = StatView::select(array('id','category_name', 'ip_address as temp2', 'ip_address as temp1'))->groupBy('category_name');\n\t\t\n\t\treturn Datatables::of($stat) \n\t\t-> edit_column('temp1','{{ DB::table(\\'stat_view\\')->where(\\'category_name\\', \\'=\\', $category_name)->orderBy(\\'date\\',\\'DESC\\')->first()->date }}')\n\t\t-> edit_column('temp2','{{ DB::table(\\'stat_view\\')->where(\\'category_name\\', \\'=\\', $category_name)->count() }}')\n\t\t-> remove_column('id') \n\t\t-> make();\n\n\t}", "title": "" }, { "docid": "20cdb7f98b891b808cd3c20dcba7e517", "score": "0.61898226", "text": "public function datatablesCatalogStatus()\n { \n DB::statement(DB::raw('set @rownum=0'));\n $tblCatalogStatus = TblCatalogStatus::select(\n [DB::raw('@rownum := @rownum + 1 AS rownum'),'id as tbl_catalog_status_id','status','description','created_at']);\n \n return Datatables::of($tblCatalogStatus)\n ->editColumn('description', '<span class=\"description\">{{$description}}</span><span style=\"right: 13px;position: absolute;\"><kbd class=\"kbd-danger hover cpointer delete-cs\" data-id=\"{{$tbl_catalog_status_id}}\">DELETE</kbd> <kbd class=\"kbd-primary hover cpointer edit-cs\" data-id=\"{{$tbl_catalog_status_id}}\">EDIT</kbd></span>')\n ->setRowId('tbl_catalog_status_id')\n ->make(true);\n }", "title": "" }, { "docid": "5d3cd80ef547074f10368ba13e4f1af9", "score": "0.61883783", "text": "public function getReviewData() {\n\t\t//$stat = Statistic::select(array('statistic.id', 'statistic.created_at', 'statistic.ip_address','posts.title'))\n\t\t//->join('posts','posts.id','=','statistic.post_id')\n\t\t//->join('category','statistic.category_id','=','category.id')->groupBy('statistic.created_at'); \n\t\t$stat = StatView::select(array('id','date','review_name', 'ip_address'));\n\n\t\treturn Datatables::of($stat) \n\t\t\t-> add_column('actions','<a href=\"{{{ URL::to(\\'admin/blogs/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-xs btn-danger iframe\">{{{ Lang::get(\\'button.delete\\') }}}</a>')\n -> remove_column('id') -> make();\n\n\t}", "title": "" }, { "docid": "e08247ae0467b99b60f963a3019fc448", "score": "0.6183186", "text": "public function datatable()\n {\n $p = $this->getPermission('vehicle');\n $data = Vehicle::with(['Brand','Dependency'])->get();\n if(isset($p))\n foreach($data as $d)\n $d['p'] = array('a'=>false && $p->u,'e'=>$p->u,'d'=>$p->d);\n return datatables()->of($data)->toJson();\n }", "title": "" }, { "docid": "5e00f211d852cce790fbcb34c20d8a36", "score": "0.61782557", "text": "public function show_alldepartment_datatbl()\n {\n $model = new mainModel();\n $responese = $model->showAllData('mst_tbl_departments');\n return Datatables::of($responese)\n ->addIndexColumn()\n ->addColumn('action', function ($query) {\n $number = $query->DEPARTMENT_ID;\n $id = Crypt::encrypt($query->DEPARTMENT_ID);\n $get = DB::table('mst_tbl_functions')->where(['Flag'=>'Show'])->where('DEPARTMENT_ID', 'like', '%' . $number . '%')->get()->count();\n if ($get > 0) {\n return '<a href=\"'.action('Admin\\DepartmentController@editDepartments', Crypt::encrypt($query->DEPARTMENT_ID)).'\" id=\"userform'.$query->DEPARTMENT_ID.'\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\">Already Assined</a>\n ';\n } else {\n return '<a href=\"'.action('Admin\\DepartmentController@editDepartments', Crypt::encrypt($query->DEPARTMENT_ID)).'\" id=\"userform'.$query->DEPARTMENT_ID.'\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\" onclick=\"deleteDepartments('.\"'$id'\".',event)\"><img src=\"/asset/css/zondicons/zondicons/close.svg\"\n style=\"width: 15px; filter: invert(0.5);\" alt=\"\"></a>\n ';\n }\n })\n ->rawColumns(['action'])\n ->make(true);\n }", "title": "" }, { "docid": "0f79fe6f35268275fde22f30f40c7acd", "score": "0.61698747", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'centry_exit_log.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "37d0a262552571f92c98fd5ce2df123c", "score": "0.61663944", "text": "public function datatable()\n {\n $data = SchoolYear::orderBy('id', 'desc')->get();\n return DataTables::of($data)\n ->addIndexColumn()\n ->addColumn('semester', function ($query) {\n $semester = null;\n\n if ($query->semester == 1) {\n $semester = 'Ganjil';\n } else {\n $semester = 'Genap';\n }\n return $semester;\n })\n ->addColumn('status_active', function ($query) {\n $status = null;\n\n if ($query->status_active == 1) {\n $status = '<span class=\"label label-primary\">Aktif</span>';\n } else {\n $status = '<span class=\"label label-danger\">Tidak Aktif</span>';\n }\n return $status;\n })\n ->addColumn('action', function ($query) {\n $updateDelete = checkPermission()->update_delete;\n $update = checkPermission()->update;\n $delete = checkPermission()->delete;\n $button = null;\n\n if ($query->status_active == 1) {\n $button = '<a href=\"#\" class=\"btn btn-success btn-sm btn-edit\" title=\"Edit Data\" id=\"'. $query->id .'\" onclick=\"editData('. $query->id .')\"><i class=\"icon icon-pencil-square-o\"></i></a>';\n } else {\n if ($updateDelete) {\n $button = '<a href=\"#\" class=\"btn btn-warning btn-sm btn-switch\" title=\"Ubah Status\" id=\"'. $query->id .'\" onclick=\"changeStatus('. $query->id .')\"><i class=\"icon icon-power-off\"></i></a>\n <a href=\"#\" class=\"btn btn-success btn-sm btn-edit\" title=\"Edit Data\" id=\"'. $query->id .'\" onclick=\"editData('. $query->id .')\"><i class=\"icon icon-pencil-square-o\"></i></a>\n <a href=\"#\" class=\"btn btn-danger btn-sm\" id=\"'. $query->id .'\" onclick=\"deleteData('. $query->id .')\" title=\"Delete Data\"><i class=\"icon icon-trash-o\"></i></a>';\n } else if ($update) {\n $button = '<a href=\"#\" class=\"btn btn-warning btn-sm btn-switch\" title=\"Ubah Status\" id=\"'. $query->id .'\" onclick=\"changeStatus('. $query->id .')\"><i class=\"icon icon-power-off\"></i></a>\n <a href=\"#\" class=\"btn btn-success btn-sm btn-edit\" title=\"Edit Data\" id=\"'. $query->id .'\" onclick=\"editData('. $query->id .')\"><i class=\"icon icon-pencil-square-o\"></i></a>';\n } else if ($delete) {\n $button = '<a href=\"#\" class=\"btn btn-success btn-sm btn-edit\" title=\"Ubah Status\" id=\"'. $query->id .'\" onclick=\"changeStatus('. $query->id .')\"><i class=\"icon icon-power-off\"></i></a>\n <a href=\"#\" class=\"btn btn-danger btn-sm\" id=\"'. $query->id .'\" onclick=\"deleteData('. $query->id .')\" title=\"Delete Data\"><i class=\"icon icon-trash-o\"></i></a>';\n } else {\n $button = '<a href=\"#\" class=\"btn btn-warning btn-sm btn-switch\" title=\"Ubah Status\" id=\"'. $query->id .'\" onclick=\"changeStatus('. $query->id .')\"><i class=\"icon icon-power-off\"></i></a>';\n }\n }\n return $button;\n })\n ->rawColumns(['status_active', 'action'])\n ->make(true);\n }", "title": "" }, { "docid": "4d4af020af143e757f70399b2384d221", "score": "0.616427", "text": "public function dataTableAction()\r\n\t{\r\n\t\t$dataTable = $this->tableDataTable();\r\n\r\n\t\treturn new ViewModel(array(\r\n\t\t\t\t'tableDataTable' => $dataTable,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "67556d71e8cee258133f95ff7ae3e87c", "score": "0.61604595", "text": "function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'p.menu_id','p.menu_name','p.menu_area','p.menu_link','p.menu_position','p.menu_parent','p.menu_status','u.first_name','p.menu_createOn','u1.first_name as firstname','p.menu_updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = p.menu_createBy',\n\t\t\t'users AS u1' => 'u1.id = p.menu_updateBy',\n\t\t);\n\t\t//$where_arrayPackage = array('c.category_show_status' =>'1','s.status_show_status' =>'1');\n\t\t$where_arrayPackage = array('p.menu_parent' => '0','p.menu_status' => '1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_menu_module as p', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\t\t\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->menu_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_menu_id'] = get_buttons_new_only_Edit($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['delete_menu_id'] = get_buttons_new_only_Delete($dataDetail->menu_id,'admin/Equipment/');\n\t \t$responce->rows[$i]['cell']['menu_name'] = $dataDetail->menu_name;\n\t \t$responce->rows[$i]['cell']['menu_area'] = $dataDetail->menu_area;\n\t \t$responce->rows[$i]['cell']['menu_link'] = $dataDetail->menu_link;\n\t \t$responce->rows[$i]['cell']['menu_position'] = $dataDetail->menu_position;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['menu_createOn'] = get_date_timeformat($dataDetail->menu_createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['menu_updateOn'] = get_date_timeformat($dataDetail->menu_updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }", "title": "" }, { "docid": "b928d7096679fcf3a55522838ae79e91", "score": "0.61518425", "text": "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t//$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/custom-buttons.php' );\n\t\t\t//$this->datatable_settings['custom_edit_button'] = $this->_get_html_view();\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Discounts\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t//$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "title": "" }, { "docid": "b2f24a72300e61b0879b87238470316a", "score": "0.61508745", "text": "public function getTableData()\n\t{\n\t}", "title": "" }, { "docid": "99eb970ae8fb13901dffbc55aca46b0c", "score": "0.61346775", "text": "public function indexTable()\n {\n $this->paginate = array('all', 'order' => array('modified' => 'desc'));\n $contentVariableTables = $this->paginate('ContentVariableTable');\n $this->set(compact('contentVariableTables', $contentVariableTables));\n }", "title": "" }, { "docid": "63ba08ef3d445d47fef8130a93e40de5", "score": "0.61264336", "text": "function getDatatables()\r\n {\r\n $this->db->from(\"v_registro\");\r\n $query = $this->db->get();\r\n return $query->result();\r\n }", "title": "" }, { "docid": "fa2b63bca56dce5ad078b8be1f724d73", "score": "0.610389", "text": "public function dataKppJenis()\n {\n return Datatables::of(KppJenis::select('id', 'judul','created_at','status'))\n ->editColumn('created_at', function ($kppjenis) \n { //change over here \n return date('d M Y', strtotime($kppjenis->created_at) );\n })\n ->addColumn('kpps', function ($kppjenis) \n { //change over here \n return $kppjenis->kpps->count();\n })\n ->make(true);\n }", "title": "" }, { "docid": "12a0f8e77790e4223b403582b59df91e", "score": "0.609419", "text": "public function getData()\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->database();\n\n\t\t$aColumns = explode(\", \", $this->select);\n\t\t$searchColumns = $aColumns;\n\t\t$sTable = $this->table;\n\n\t\t//id table\n\t\t$idColumn = $aColumns[count($aColumns)-1];\n\t\t$idColumn = explode(\".\", $idColumn);\n\t\tif(count($idColumn)>1){\n\t\t\t$idColumn = $idColumn[1];\n\t\t}else{\n\t\t\t$idColumn = $idColumn[0];\n\t\t}\n\n\t\t//column ordenar al final\n\t\tfor ($i=0; $i < count($aColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $aColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$aColumns[$i] = trim($result[1]);\n\t\t\t}\n\t\t}\n\n\t\t//columnas para buscar\n\t\tfor ($i=0; $i < count($searchColumns) ; $i++) {\n\t\t\t$result = explode(\" AS \", $searchColumns[$i]);\n\t\t\tif(count($result)>1){\n\t\t\t\t$searchColumns[$i] = trim($result[0]);\n\t\t\t}\n\t\t}\n\n\t\t// Paging\n\t\t$limit = \"\";\n\t\tif(isset($_GET['iDisplayStart']) && $_GET['iDisplayLength'] != '-1')\n\t\t{\t\t\n\t\t\tif((int)$_GET['iDisplayStart']!=0){\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'].\" OFFSET \".(int)$_GET['iDisplayStart'].\" \";\n\t\t\t}else{\n\t\t\t\t$limit .= \" LIMIT \".(int)$_GET['iDisplayLength'];\n\t\t\t}\n\t\t}\n \n\t\t// Ordering\n\t\t$text_order_by_datatable = \"\";\n\t\tif(isset($_GET['iSortCol_0']))\n\t\t{\n\t\t\tfor($i=0; $i<intval($_GET['iSortingCols']); $i++)\n\t\t\t{\n\t\t\t\t$coma = ($i<intval($_GET['iSortingCols'])-1)?\", \":\"\";\n\t\t\t\tif($_GET['bSortable_'.intval($_GET['iSortCol_'.$i])] == 'true')\n\t\t\t\t{\n\t\t\t\t\t$text_order_by_datatable.=\" \".$searchColumns[(int)$_GET['iSortCol_'.$i]].\" \".strtoupper($_GET['sSortDir_'.$i]).$coma;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$text_order_by = \"\";\n\t\tif( !empty($text_order_by_datatable) && !empty($this->order_by) )\n\t\t{\n\t\t\t$text_order_by_datatable .= \", \";\n\t\t}\n\n\t\t$text_order_by_datatable = ($this->order_by!=\"\")?$text_order_by_datatable.$this->order_by:$text_order_by_datatable;\n\t\t$text_order_by .= (!empty($text_order_by_datatable)) ? \" ORDER BY \".$text_order_by_datatable : \" \";\n\t\t/* Multi column filtering */\n\t\t$where = \"\";\n\t\t$text_where_datatable = \"\";\n\t\tfor ( $i = 0 ; $i < count($searchColumns) ; $i++ )\n\t\t{\n\t\t\tif ( ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" ) && $_GET['sSearch'] != '' )\n\t\t\t{\n\t\t\t\tif($i==0){ $type=\"\"; }else{ $type=\" OR \"; }\n\t\t\t\t$text_where_datatable .= $type.$searchColumns[$i].\" LIKE '%\".$_GET['sSearch'].\"%' \";\n\t\t\t}\n\t\t}\n\t\tif($text_where_datatable!=\"\"){\n\t\t\t$text_where_datatable =\" (\".$text_where_datatable.\") \";\n\t\t}\n\n\t\t//where\n\t\tfor ($i=0; $i < count($this->where); $i++) {\n\t\t\tif($i==0 && $text_where_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $where==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif( !empty($this->where[$i][1]) )\n\t\t\t{\n\t\t\t\tif(!strpos($this->where[$i][0], \"=\")){\n\t\t\t\t\t$operador = \" = \";\n\t\t\t\t}\n\t\t\t\tif(!is_numeric($this->where[$i][1]) && strlen($this->where[$i][1])==1){\n\t\t\t\t\t$this->where[$i][1] = \"'\".$this->where[$i][1].\"'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$text_where_datatable.=$type.$this->where[$i][0].$operador.$this->where[$i][1].\" \";\n\t\t}\n\t\t$where = ($text_where_datatable!=\"\")?\" WHERE \".$text_where_datatable : \"\";\n\t\t\n $like = '';\n $text_like_datatable = '';\n for ($i=0; $i < count($this->like); $i++) {\n\t\t\tif($i==0 && $text_like_datatable!=\"\"){ $type=\" AND \"; }elseif($i==0 && $like==\"\"){ $type=\"\"; }else{ $type=\" AND \"; }\n\t\t\t$operador = \" \";\n\t\t\tif(!strpos($this->like[$i][0], \"=\")){\n\t\t\t\t$operador = \" like \";\n\t\t\t}\n\t\t\tif(!is_numeric($this->like[$i][1]) && strlen($this->like[$i][1])==1){\n\t\t\t\t$this->like[$i][1] = \"'\".$this->like[$i][1].\"'\";\n\t\t\t}\n\t\t\t$text_like_datatable.=$type.$this->like[$i][0].$operador.$this->like[$i][1].\" \";\n\t\t}\n if($where!='')\n {\n $like = ($text_like_datatable!=\"\")?\" AND \".$text_like_datatable : \"\";\n }else{\n $like = ($text_like_datatable!=\"\")?\" WHERE \".$text_like_datatable : \"\";\n }\n\n //group by\n $text_group_by = ( !empty($this->group_by) ) ? \" GROUP BY \".$this->group_by.\" \" : $this->group_by;\n \n \n\t\t//join\n\t\t$join = \"\";\n\t\tfor ($i=0; $i < count($this->join); $i++) {\n\t\t\tif(!isset($this->join[$i][2])){ $type_join=\"INNER\"; }else{ $type_join=$this->join[$i][2]; }\n\t\t\t$join.=\" \".$type_join.\" JOIN \".$this->join[$i][0].\" ON \".$this->join[$i][1].\" \";\n\t\t}\n\n\n\n\t\t$sql = \"SELECT \".$this->select.\" FROM \".$sTable.$join.$where.$like.$text_group_by.$text_order_by.$limit;\n\t\t//echo $sql;die;\n\t\t$rResult = $CI->db->query($sql);\n\n\t\t// Total data set length\n\t\t$iTotal = count($rResult->result());\n\n\t\t// Data set length after filtering\n\t\t$new_query = $CI->db->query(\"SELECT COUNT(*) AS found_rows FROM \".$sTable.$join.$where.$limit);\n\t\tif(count($new_query->row())>0){\n\t\t\t$iFilteredTotal = $new_query->row()->found_rows;\n\t\t}else{\n\t\t\t$iFilteredTotal = $iTotal;\n\t\t}\n\n\t\t// Output\n\t\t$output = array(\n\t\t\t'sEcho' => intval($_GET['sEcho']),\n\t\t\t'iTotalRecords' => $iTotal,\n\t\t\t'iTotalDisplayRecords' => $iFilteredTotal,\n\t\t\t'url' => urldecode($_SERVER['REQUEST_URI']),\n\t\t\t'aaData' => array()\n\t\t);\n\t\tforeach($rResult->result_array() as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\tfor($i=0; $i<count($aColumns); $i++)\n\t\t\t{\n\t\t\t\t$key = explode(\".\", $aColumns[$i]);\n\t\t\t\t$key = (count($key)>1) ? trim($key[1]) : trim($key[0]);\n\t\t\t\t$row[] = $aRow[$key];\n\t\t\t\tif (trim($key) == trim($idColumn)) { $row['DT_RowId'] = $aRow[$key]; } // Sets DT_RowId\n\t\t\t}\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\n\t\t//url export\n\t\t$url= urldecode($_SERVER['REQUEST_URI']);\n\t\t$output['links'] = \"$url\";\n\t\treturn $_GET['callback'].'('.json_encode( $output ).');';\n\t}", "title": "" }, { "docid": "9ec05abda63d8b059a5acebc0d97ab8b", "score": "0.6091302", "text": "public function show_alluser_datatbl()\n {\n $model = new mainModel();\n $UserId = session()->get('userid');\n $responese = $model->getAllUserDetails($UserId);\n return Datatables::of($responese)\n ->addIndexColumn()\n ->addColumn('master_roleId', function ($query) {\n $masterROles = $query->master_roleId;\n $sql = \"SELECT GROUP_CONCAT(MASTER_ROLE_NAME ,'') as 'MASTER_ROLE_NAME' FROM mst_tbl_master_role WHERE MASTER_ROLE_ID IN($masterROles) \";\n $info = DB::select(DB::raw($sql));\n // print_r();\n return $info[0]->MASTER_ROLE_NAME;\n })\n ->addColumn('REPORTING_MANGERS', function ($query) {\n $REPORTING = $query->REPORTING_MANGERS;\n $sql = \"SELECT GROUP_CONCAT(username ,'') as 'REPORTING_MANGERS' FROM mst_user_tbl WHERE userId IN($REPORTING) \";\n $info = DB::select(DB::raw($sql));\n // print_r();\n return $info[0]->REPORTING_MANGERS;\n })\n ->addColumn('PRIMARY_MANGER', function ($query) {\n if ($query->PRIMARY_MANGER != null) {\n $assinedusers = DB::table('mst_user_tbl')->where(['Flag' => 'Show', 'userId' => $query->PRIMARY_MANGER])->get()->first();\n return $assinedusers->username;\n } else {\n return 'Not Assinded';\n }\n })->addColumn('SHIFT_ID', function ($query) {\n if ($query->SHIFT_ID != 0) {\n $assinedShift = DB::table('mst_tbl_shifts')->where(['Flag' => 'Show', 'SHIFT_ID' => $query->SHIFT_ID])->get()->first();\n return $assinedShift->SHIFT_NAME;\n } else {\n return 'No Shifts';\n }\n })\n ->addColumn('action', function ($query) {\n $id = Crypt::encrypt($query->userId);\n return '<a href=\"' . action('Admin\\UserController@editUser', Crypt::encrypt($query->userId)) . '\" id=\"userform' . $query->userId . '\"><img src=\"/asset/css/zondicons/zondicons/edit-pencil.svg\" style=\"width: 15px;margin-right: 20px; filter: invert(0.5);\" alt=\"\"></a>\n <a href=\"javascript:void(0)\" onclick=\"deleteUser(' . \"'$id'\" . ',event)\"><img src=\"/asset/css/zondicons/zondicons/close.svg\"\n style=\"width: 15px; filter: invert(0.5);\" alt=\"\"></a>\n ';\n })\n ->rawColumns(['action', 'PRIMARY_MANGER', 'master_roleId', 'REPORTING_MANGERS'])\n ->make(true);\n\n }", "title": "" }, { "docid": "a68bbe8acb1dc346104b336e8b9f8a8a", "score": "0.60898846", "text": "public function getDatatable()\n {\n return Datatables::of($this->dashboardDocumentsRepository->getCollection([], ['id', 'name']))\n ->addColumn('actions', function($document){\n return view('includes._datatable_actions', [\n 'editUrl' => route('dashboard.documents.edit', $document->id),\n 'deleteUrl' => route('dashboard.documents.destroy', $document->id),\n 'downloadUrl' => route('dashboard.documents.download', $document->id)\n ]);\n })\n ->make();\n }", "title": "" }, { "docid": "57437ac96c143f2ecbe89633a82d1d31", "score": "0.60840976", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cCountry_list.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "72385a77b33b1b802eff1e0fe2c3854c", "score": "0.60799575", "text": "function grid_kd() \r\n {\r\n $cu_id = $this->uri->segment(4);\r\n $this->session->set_userdata('cu_id', $cu_id );\r\n $konterid = $this->uri->segment(5);\r\n $this->session->set_userdata('konter', $konterid );\r\n $this->load->library('Datatables');\r\n $this->datatables->select('notes, tarif, kamar, volume', false);\r\n $this->datatables->from('pad_customer_detail');\t\t\t\r\n $this->datatables->where('customer_id', $cu_id);\r\n $this->datatables->where('konterid', $konterid);\r\n $this->datatables->add_column('batal', '<a class=\"delete\" href=\"\">Hapus</a>');\r\n \r\n echo $this->datatables->generate();\r\n }", "title": "" }, { "docid": "2e6f4daa31bed6e0090137be8b58e787", "score": "0.60722804", "text": "private function _display_data_table(){\n\t\t\t$fields = array();\n\t\t\t$query = \"DESCRIBE `\".$this->class_settings['database_name'].\"`.`\".$this->table_name.\"`\";\n\t\t\t$query_settings = array(\n\t\t\t\t'database'=>$this->class_settings['database_name'],\n\t\t\t\t'connect' => $this->class_settings['database_connection'] ,\n\t\t\t\t'query' => $query,\n\t\t\t\t'query_type' => 'DESCRIBE',\n\t\t\t\t'set_memcache' => 1,\n\t\t\t\t'tables' => array( $this->table_name ),\n\t\t\t);\n\t\t\t$sql_result = execute_sql_query($query_settings);\n\t\t\t\n\t\t\tif($sql_result && is_array($sql_result)){\n\t\t\t\tforeach($sql_result as $sval)\n\t\t\t\t\t$fields[] = $sval;\n\t\t\t}else{\n\t\t\t\t//REPORT INVALID TABLE ERROR\n\t\t\t\t$err = new cError(000001);\n\t\t\t\t$err->action_to_perform = 'notify';\n\t\t\t\t\n\t\t\t\t$err->class_that_triggered_error = 'cdiscount.php';\n\t\t\t\t$err->method_in_class_that_triggered_error = '_display_data_table';\n\t\t\t\t$err->additional_details_of_error = 'executed query '.str_replace(\"'\",\"\",$query).' on line 208';\n\t\t\t\treturn $err->error();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//INHERIT FORM CLASS TO GENERATE TABLE\n\t\t\t$form = new cForms();\n\t\t\t$form->setDatabase( $this->class_settings['database_connection'] , $this->table_name , $this->class_settings['database_name'] );\n\t\t\t$form->uid = $this->class_settings['user_id']; //Currently logged in user id\n\t\t\t$form->pid = $this->class_settings['priv_id']; //Currently logged in user privilege\n\t\t\t\n\t\t\t$this->datatable_settings['current_module_id'] = $this->class_settings['current_module'];\n\t\t\t\n\t\t\t$form->datatables_settings = $this->datatable_settings;\n\t\t\t\n\t\t\t$returning_html_data = $form->myphp_dttables($fields);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'display-datatable',\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "06702d325d746804c09acf063b6033a3", "score": "0.604382", "text": "abstract public function datatables();", "title": "" }, { "docid": "0a095002c9188141d8f078e98e1a371c", "score": "0.60339946", "text": "function data_table(){\n $aColumns = array( 'guid','code','code','name','date','total_types','total_weight','total_amount','decomposition_status','guid','item_id','decomposition_status' );\t\n\t$start = \"\";\n $end=\"\";\n\n if ( $this->input->get_post('iDisplayLength') != '-1' )\t{\n $start = $this->input->get_post('iDisplayStart');\n $end=\t $this->input->get_post('iDisplayLength'); \n }\t\n $decomposition=\"\";\n if ( isset( $_GET['iSortCol_0'] ) )\n {\t\n for ( $i=0 ; $i<intval($this->input->get_post('iSortingCols') ) ; $i++ )\n {\n if ( $_GET[ 'bSortable_'.intval($this->input->get_post('iSortCol_'.$i)) ] == \"true\" )\n {\n $decomposition.= $aColumns[ intval( $this->input->get_post('iSortCol_'.$i) ) ].\" \".$this->input->get_post('sSortDir_'.$i ) .\",\";\n }\n }\n\n $decomposition = substr_replace( $decomposition, \"\", -1 );\n\n }\n\t\t\n $like = array();\n\tif ( $_GET['sSearch'] != \"\" )\n {\n $like =array(\n 'po_no'=> $this->input->get_post('code'),\n );\n\n }\n $this->load->model('items')\t ;\n $rResult1 = $this->items->get($end,$start,$like,$this->session->userdata['branch_id']);\n $iFilteredTotal =$this->items->count($this->session->userdata['branch_id']);\n $iTotal =$iFilteredTotal;\n $output1 = array(\n \"sEcho\" => intval($_GET['sEcho']),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => array()\n );\n\t\t\n foreach ($rResult1 as $aRow )\n {\n $row = array();\n for ( $i=0 ; $i<count($aColumns) ; $i++ )\n {\n if ( $aColumns[$i] == \"id\" )\n {\n $row[] = ($aRow[ $aColumns[$i] ]==\"0\") ? '-' : $aRow[ $aColumns[$i] ];\n }\n else if ( $aColumns[$i]== 'date' )\n {\n /* General output */\n $row[] = date('d-m-Y',$aRow[$aColumns[$i]]);\n }\n else if ( $aColumns[$i] != ' ' )\n {\n /* General output */\n $row[] = $aRow[$aColumns[$i]];\n }\n\n }\n\n $output1['aaData'][] = $row;\n }\n\techo json_encode($output1);\n }", "title": "" }, { "docid": "87a9cca3580983151e8d27a4344d0d93", "score": "0.603374", "text": "public function getDatatable(){\n if(!checkRole(getUserGrade(2))){\n prepareBlockUserMessage();\n return back();\n }\n\n $records = DB::table('lms_class_series')\n ->select('lms_class_series.id','classes.name','lmsseries.title')\n ->join('classes','classes.id','=','lms_class_series.class_id')\n ->join('lmsseries','lmsseries.id','=','lms_class_series.series_id')\n ->where([\n ['lms_class_series.delete_status',0]\n ])\n ->orderBy('lms_class_series.id','desc');\n\n return Datatables::of($records)\n ->addColumn('action',function(){\n return null;\n })\n ->editColumn('name', function($records){\n return '<a href=\"'.PREFIX.'lms/class-content/detail/'.$records->id.'\">'.$records->name.'</a>';\n })\n ->removeColumn('id')\n ->make();\n }", "title": "" }, { "docid": "51059f44584877375d50ce0967897c8a", "score": "0.6022822", "text": "function tableData(){\n\t\t$entity_type = in(\"entity_type\");\t\t\n\t\t$table = $entity_type()->getTable();\n\t\t$test = in('test');\n\n\t\t// Table's primary key\n\t\t$primaryKey = 'id';\n\n\t\t// Array of database columns which should be read and sent back to DataTables.\n\t\t// The `db` parameter represents the column name in the database, while the `dt`\n\t\t// parameter represents the DataTables column identifier. In this case simple\n\t\t// indexes\n\t\t$columns = array(\n\t\t\tarray( \t'db' => 'id',\n\t\t\t\t\t'dt' => 0 \n\t\t\t\t ),\n\t\t\tarray( \t'db' => 'created', \n\t\t\t\t\t'dt' => 1, \n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t),\n\t\t\tarray( \t'db' => 'updated',\n\t\t\t\t\t'dt' => 2,\n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t ),\n\t\t);\n\t\t\n\t\t$additional_columns = self::getAdditionalFields( $entity_type );\n\t\t\n\t\t$columns = array_merge( $columns, $additional_columns );\n\n\t\t// SQL server connection information\n\t\t$sql_details = array(\n\t\t\t'user' => 'root',\n\t\t\t'pass' => '7777',\n\t\t\t'db' => 'ci3',\n\t\t\t'host' => 'localhost'\n\t\t);\n\t\n\t\trequire( 'theme/admin/scripts/ssp.class.php' );\t\t\n\t\t$date_from = in(\"date_from\");\n\t\t$date_to = in(\"date_to\");\n\t\t$extra_query = null;\n\t\tif( !empty( $date_from ) ){\n\t\t\t$stamp_from = strtotime( $date_from );\n\t\t\t$extra_query .= \"created > $stamp_from\";\n\t\t}\n\t\tif( !empty( $date_to ) ){\n\t\t\t$stamp_to = strtotime( $date_to.\" +1 day\" ) - 1;\n\t\t\tif( !empty( $extra_query ) ) $extra_query .= \" AND \";\n\t\t\t$extra_query .= \"created < $stamp_to\";\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\techo json_encode(\n\t\t\tSSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns, $extra_query )\n\t\t);\n\t}", "title": "" }, { "docid": "40c2e78f91a7778d1ebcd1e2be5904c1", "score": "0.6015638", "text": "public function site_activities_datatable()\n\t\t{\n\t\t\t$delete = $this->Site_activities->delete_old_records();\n\t\t\t\n\t\t\t$list = $this->Site_activities->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t\n\t\t\tforeach ($list as $activity) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t//$row[] = '<input type=\"checkbox\" name=\"cb[]\" id=\"cb\" onclick=\"enableButton(this)\" value=\"'.$activity->id.'\">';\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$activity->id.'\"><label for=\"cb\"></label></div><div style=\"margin-left: 30%; margin-right: 30%; \">'.$activity->name .' ('.$activity->username.')</div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $activity->name .' ('.$activity->username.')';\n\t\t\t\t\n\t\t\t\t$row[] = $activity->description;\n\t\t\t\t\n\t\t\t\t$row[] = $activity->keyword;\n\t\t\t\t\n\t\t\t\t$row[] = date(\"F j, Y\", strtotime($activity->activity_time));\n\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Site_activities->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Site_activities->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "title": "" }, { "docid": "1c4813c105fafa2322c740f5e68664b5", "score": "0.59950113", "text": "public function datatable()\n {\n return view('usuarios.resultado');\n }", "title": "" }, { "docid": "f3fd318f2c120f5cb1664b8e00893104", "score": "0.59856296", "text": "public function table()\n\t{\n\t\t$this->datatables->select('experiment_id, user_id_caller, id');\n\t\t$this->datatables->from('caller');\n\n\t\t$this->datatables->edit_column('experiment_id', '$1', 'experiment_get_link_by_id(experiment_id)');\n\t\t$this->datatables->edit_column('user_id_caller', '$1', 'user_get_link_by_id(user_id_caller)');\n\t\t$this->datatables->edit_column('id', '$1', 'caller_actions(id)');\n\n\t\techo $this->datatables->generate();\n\t}", "title": "" }, { "docid": "a392f4a24b4f7f81ea967a610547f985", "score": "0.5976089", "text": "public function listtabelSDMAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('SDM');\n }", "title": "" }, { "docid": "c2da33938dfe37100afc786e41c7f0a1", "score": "0.5967068", "text": "private function tableDataTable()\r\n\t{\r\n\t\t$source = $this->getSource();\r\n\r\n\t\t//$table = new TableExample\\DataTable();\r\n\t\t$table = new Model\\DataInsTable();\r\n\t\t$table->setAdapter($this->getDbAdapter())\r\n\t\t->setSource($source)\r\n\t\t->setParamAdapter(new AdapterDataTables($this->getRequest()->getPost()))\r\n\t\t;\r\n\t\treturn $table;\r\n\t}", "title": "" }, { "docid": "54d44e9fb0504a7d2860157150342f21", "score": "0.59633267", "text": "public function recordGeneral()\n {\n return Datatables()->of(Record::with(\"user\")\n )\n ->editColumn('updated_at', function ($record) {\n return [\n 'display' => $record->updated_at->format('Y-m-d, G:i:s'), //, G:i:s\n 'timestamp' => $record->updated_at->timestamp\n ];\n })\n ->rawColumns(['descripcion', 'descripcion'])\n ->toJson();\n }", "title": "" }, { "docid": "d46195dbd146b05fa40c4a74d5263108", "score": "0.59603214", "text": "public function datatable()\n {\n $p = $this->getPermission('vehicleIn');\n $data = VehicleIn::with(['Vehicle', 'Department'])->get();\n if(isset($p))\n foreach($data as $d)\n $d['p'] = array('a'=>false && $p->u,'e'=>$p->u,'d'=>$p->d);\n return datatables()->of($data)->toJson();\n }", "title": "" }, { "docid": "d74c312afdd6c3cbbe85b4cd14cc51af", "score": "0.59550387", "text": "public function dataRevisionsTable();", "title": "" }, { "docid": "44316c3db663cc4cfbde71ff5ec35df9", "score": "0.5953283", "text": "public function bivapointhistory(){\n\t\t$this->db->where('CustomerMail', $this->session->userdata('useremail'));\n\t\t$this->db->order_by('ReferenceId', 'desc');\n\t\t$this->db->select('TrDate, EarnedPotint,Note');\n\t\t$query=$this->db->get('tbl_bvpoint_data');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "5200815f3a2f1f15fae18e109c0cebf0", "score": "0.5951401", "text": "public function datatables()\n\t{\n\t\t//menunda loading (bisa dihapus, hanya untuk menampilkan pesan processing)\n\t\t// sleep(2);\n\n\t\t//memanggil fungsi model datatables\n\t\t$list = $this->m_guestbook->get_datatables();\n\t\t$data = array();\n\t\t$no = $this->input->post('start');\n\n\t\t//mencetak data json\n\t\tforeach ($list as $field) {\n\t\t\t$no++;\n\t\t\t$row = array();\n\t\t\t$row[] = $no;\n\t\t\t$row[] = $field['nama'];\n\t\t\t$row[] = $field['nim'];\n\t\t\t$row[] = $field['email'];\n\t\t\t$row[] = $field['date'];\n\t\t\t$data[] = $row;\n\t\t}\n\n\t\t//mengirim data json\n\t\t$output = array(\n\t\t\t\"draw\" => $this->input->post('draw'),\n\t\t\t\"recordsTotal\" => $this->m_guestbook->count_all(),\n\t\t\t\"recordsFiltered\" => $this->m_guestbook->count_filtered(),\n\t\t\t\"data\" => $data,\n\t\t);\n\n\t\t//output dalam format JSON\n\t\techo json_encode($output);\n\t}", "title": "" }, { "docid": "3111af29050f711cdfe086ec92fd503f", "score": "0.5951304", "text": "public function dataTable()\n {\n return (new EloquentDataTable($this->query()))\n ->editColumn('alias', function (Menu $menu) {\n return '<span class=\"label bg-primary\">' . $menu->alias . '</span>';\n })\n ->editColumn('published', function (Menu $menu) {\n return dt_check($menu->published);\n })\n ->editColumn('authenticated', function (Menu $menu) {\n return view('administrator.navigation.menu.datatables.authenticated', $menu->toArray());\n })\n ->editColumn('title', function (Menu $menu) {\n return view('administrator.navigation.menu.datatables.title', compact('menu'))->render();\n })\n ->addColumn('type', function (Menu $menu) {\n return $menu->extension->name;\n })\n ->editColumn('lft', '<i class=\"fa fa-dot-circle-o\"></i>')\n ->addColumn('action', 'administrator.navigation.menu.datatables.action')\n ->rawColumns(['alias', 'published', 'authenticated', 'title', 'lft', 'action']);\n }", "title": "" }, { "docid": "98f6b0793bd5722f58605528960aeac6", "score": "0.593624", "text": "function horarios()\n {\n $this->view2->__construct($this->dataView,$this->dataTable);\n $this->view2->show();\n }", "title": "" }, { "docid": "47762118860fed5f7971bca2acedabbc", "score": "0.5927677", "text": "function Avi_list(){\n\t\t\n\t\t//Doctor INNER JOIN with availability for doctor name and his Avialibalility\n\t\t$data = $this->View('users.firstname,users.lastname,availability.id,availability.monday,availability.tuesday,availability.wednesday,availability.thursday,availability.friday,availability.saturday,availability.sunday,availability.date','users',\" LEFT JOIN availability ON users.id = availability.user_id \",'');\n\t\t\n\t\t//if availability is in table\n\t\t if($data){\n\t\t\t\n\t\t // for serial no\t \n\t\t $sno =1;\n\t\t \n\t\t // view all availability from table\n\t\t foreach($data as $value){\n\t\t\t \n\t\techo \t\"<tr>\n\t\t\t<td></td>\n\t\t\t<td>\".$sno++.\"</td>\n <td>\".$value['firstname'].\" \".$value['lastname'].\"</td>\n \n \n\t\t\t<td>\".$value['monday'].\"</td>\n\t\t\t<td>\".$value['tuesday'].\"</td>\n\t\t\t<td>\".$value['wednesday'].\"</td>\n\t\t\t<td>\".$value['thursday'].\"</td>\n\t\t\t<td>\".$value['friday'].\"</td>\n\t\t\t<td>\".$value['saturday'].\"</td>\n\t\t\t<td>\".$value['sunday'].\"</td>\n\t\t\t<td>\".$value['date'].\"</td>\n\t\t\t\n\t\t\t\n <td class='datatable-ct'>\n\t\t\t<a title='Edit' href='Availability?Edit=\".$value['id'].\"'><i class='fa fa-pencil-square-o' aria-hidden='true'></i></a>\n\t\t\t<a title='Edit Picture' href='Availability?Edit-Img=\".$value['id'].\"'><i class='fa fa-picture-o' aria-hidden='true'></i></a>\n\t\t\t<a href='Availability?List=\".$value['id'].\"' title='Delete'><i class='fa fa-trash' aria-hidden='true'></i></a>\n\t\t\t</td>\n </tr>\";\n\t\t\t \n\t\t\t\n\t\t } // Foreach close\n\t \n\t\t } // if close\n\t\t\n\t}", "title": "" }, { "docid": "f3792b491867cad797f38883ccf52e31", "score": "0.59185445", "text": "public function dataTable()\n {\n return (new EloquentDataTable($this->query()))\n ->addColumn('menus', function (Navigation $nav) {\n return '<span class=\"badge label-primary\">' . $nav->menus()->count() . '</span>';\n })\n ->editColumn('title', function (Navigation $navigation) {\n return html()->linkRoute('administrator.navigation.edit', $navigation->title, $navigation);\n })\n ->addColumn('action', function (Navigation $nav) {\n return view('administrator.navigation.datatables.action', $nav->toArray());\n })\n ->rawColumns(['menus', 'published', 'action'])\n ->editColumn('published', function (Navigation $row) {\n return dt_check($row->published);\n });\n }", "title": "" }, { "docid": "2c7458c3f9c29484b40150e5b8a5cf10", "score": "0.59023064", "text": "public function tablaIndex(){\n $listado = IngresosB3::orderBy('fecha', 'ASC')->get();\n\n foreach ($listado as $l){\n $l->fecha = date(\"d-m-Y h:i A\", strtotime($l->fecha));\n $servicio = ServiciosB3::where('id', $l->id_servicios)->pluck('nombre')->first();\n $l->servicio = $servicio;\n }\n\n return view('backend.bodega3.verificacion.tabla.tablaverificacion', compact('listado'));\n }", "title": "" }, { "docid": "d952cb86efb8ac099e601bb4641f4f4f", "score": "0.5899945", "text": "public function index()\n {\n return parent::getTable($this->columns, $this->url, 'table', 'Data Penjualan');\n }", "title": "" }, { "docid": "75beb6bc7a099f9597edb25370e345f6", "score": "0.58908945", "text": "public function refreshTable();", "title": "" }, { "docid": "5d03f7d9e46a2da88b93f8ed8bac1d40", "score": "0.58902115", "text": "public function getalltag()\n {\n // dd(\"herereee\");\n $tag=Tag::all();\n return Datatables::of($tag)\n // ->editColumn('created_at', '{!! $created_at !!}')\n ->editColumn('created_at', function ($tag) {\n return $tag->updated_at->format('d-M-Y');\n \n })\n ->editColumn('updated_at', function ($tag) {\n return $tag->updated_at->format('d-M-Y');\n \n })\n ->make(true);\n }", "title": "" }, { "docid": "a369a08c80f919b1dbca96465061683b", "score": "0.5876038", "text": "public function data()\n {\n $news = News::leftJoin('company', 'news.company_id', '=', 'company.id')\n ->select([\n 'news.id',\n 'news.title',\n 'news.description',\n 'news.content',\n 'news.created_at',\n 'news.updated_at',\n 'company.name as companyname'\n ]);\n\n return $this->createCrudDataTable($news, 'admin.news.destroy', 'admin.news.edit')->make(true);\n }", "title": "" }, { "docid": "21ea056599fda19e8857b4e726f66566", "score": "0.5873283", "text": "public function datatables()\n {\n $param = [\n 'url' => 'publikasi',\n 'action' => ['show', 'edit', 'destroy'],\n 'file' => 'publikasi.download'\n ];\n\n return Datatables::of(Publikasi::with(['katfile', 'user']))\n ->addColumn('action', function($data) use ($param) {\n return generateAction($param, $data->slug);\n })\n ->editColumn('file', function($data) use ($param) {\n return generateFileDownload(route($param['file'], $data->slug), $data->file, $data->nama);\n })\n ->editColumn('tanggal', function($data) {\n return date('d F Y', strtotime($data->tanggal));\n })\n ->addColumn('user', function($data) {\n if ($data->user) {\n return $data->user->username;\n }\n\n return '-';\n })\n ->rawColumns(['tanggal', 'file', 'action'])\n ->addIndexColumn()\n ->make(true);\n }", "title": "" }, { "docid": "181417f052692358b2fd30a7893e8f95", "score": "0.58610445", "text": "public function indexData()\n {\n $tickets = Ticket::with('provider', 'client')->where('type', 'admin');\n $url = url('/backend/tickets/');\n return Datatables::of($tickets)\n ->addColumn('action', function ($ticket) use($url) {\n return '<a href=\"'.$url.'/'.$ticket->id.'\" class=\"btn btn-success m-btn m-btn--icon\">\n <span><i class=\"fa fa-eye\"></i><span>View</span></span></a>';\n })\n ->editColumn('status', function ($ticket) use($url) {\n if($ticket->status == 'opened'){\n return '<label class=\"m-badge m-badge--default m-badge--wide\">Opened</label>';\n }else{\n return '<label class=\"m-badge m-badge--success m-badge--wide\">Closed</label>';\n }\n })\n ->editColumn('client', function ($ticket) use($url) {\n if($ticket->client_id != null){\n return $ticket->client->first_name . ' ' . $ticket->client->last_name;\n }else{\n return '--';\n }\n })\n ->editColumn('provider', function ($ticket) use($url) {\n if($ticket->provider_id != null){\n return $ticket->provider->first_name . ' ' . $ticket->provider->last_name;\n }else{\n return '--';\n }\n })\n ->rawColumns(['action', 'status'])\n ->make(true);\n }", "title": "" }, { "docid": "c1eee1f074d8a2c1c01aa15953a87a1f", "score": "0.58602065", "text": "public function datatable_setor_tunai_tabungan()\n\t{\n\t\t$aColumns = array( 'c.cif_no','c.nama','a.account_saving_no','a.amount','a.trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"AND (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"AND \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_setor_tunai_tabungan($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_setor_tunai_tabungan($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_setor_tunai_tabungan(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['account_saving_no'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['amount'],0,',','.').',-</div>';\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" class=\"btn red mini\" trx_detail_id=\"'.$aRow['trx_detail_id'].'\" account_saving_no=\"'.$aRow['account_saving_no'].'\" nama=\"'.$aRow['nama'].'\" id=\"link-delete\">Delete</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "title": "" }, { "docid": "a4a28699cd15f15b6f51f324bdad8613", "score": "0.58597684", "text": "public function trashedTreaty()\n {\n //dd(Treaty::query());\n return Datatables::of(Treaty::onlyTrashed()->select('id', 'judul','kode','treaty_jenis_id','published_at','status'))\n ->addColumn('treaty_jenis', function ($treaty)\n { //change over here \n $treatyjenisxsim=TreatyJenis::find($treaty->treaty_jenis_id);\n $jenis = $treatyjenisxsim->judul;\n return $jenis;\n })\n ->editColumn('published_at', function ($treaty) \n { //change over here \n return date('d M Y', strtotime($treaty->published_at) );\n })\n ->make(true);\n }", "title": "" }, { "docid": "78ad3850ec0c872efaf79f65469b36fc", "score": "0.5848672", "text": "public function getIndex()\n {\n return view('admin.data_table');\n }", "title": "" }, { "docid": "f49a5aa8c14f15b9a1095a31518a3a0e", "score": "0.58434004", "text": "public function getData()\n {\n\n $users = DB::table('users')\n ->leftjoin('assigned_roles', 'assigned_roles.user_id', '=', 'users.id')\n ->leftjoin('roles', 'roles.id', '=', 'assigned_roles.role_id')\n ->select(DB::raw('users.id, users.username, users.email, GROUP_CONCAT(DISTINCT roles.name) as rolename, users.confirmed, users.created_at as created_at'))\n ->groupBy('users.username');\n\n $actions = $this->getActions(array(self::EDIT_ACTION, self::DELETE_ACTION));\n\n return Datatables::of($users)\n // ->edit_column('created_at','{{{ Carbon::now()->diffForHumans(Carbon::createFromFormat(\\'Y-m-d H\\', $test)) }}}')\n ->edit_column('confirmed', '{{ DataTableHelper::prepareBooleanColumn($confirmed) }}')\n ->add_column('actions', $actions)\n ->remove_column('id')\n ->make();\n }", "title": "" }, { "docid": "a120b153934da537e1de3dde8416e07f", "score": "0.583984", "text": "public function render()\n {\n return view('components.data-table');\n }", "title": "" }, { "docid": "e82291336681be640efa9791700d9584", "score": "0.5835677", "text": "public function index()\n {\n return datatables()->eloquent(Sector::with('voters','leaders','zone'))\n ->addColumn('votantes',function (Sector $sector){\n return count($sector->voters);\n })->addColumn('lideres',function (Sector $sector){\n return count($sector->leaders);\n })->toJson();\n }", "title": "" }, { "docid": "dac1c0c5904dfc1010ceea366a682cf1", "score": "0.5832951", "text": "public function getData()\n {\n $model = Empresa::where('estatus',1)->get();\n\n return DataTables::of($model)\n ->editColumn('estatus',function ($model)\n {\n switch ($model->estatus) {\n case 1:\n return '<span class=\"badge badge-pill badge-info\">'.__('messages.activo').'</span>';\n break;\n case 2:\n return '<span class=\"badge badge-pill badge-warning\">'.__('messages.pausado').'</span>';\n break;\n case 3:\n return '<span class=\"badge badge-pill badge-success\">'.__('messages.terminado').'</span>';\n break;\n default:\n return '<span class=\"badge badge-pill badge-primary\">'.__('messages.espera').'</span>';\n break;\n }\n })\n ->addColumn('acciones',function ($model)\n {\n return '\n <div class=\"btn-group\" role=\"group\" aria-label=\"Basic example\">\n <a href=\"'.route('empresas.show',['id' => $model->id]).'\" class=\"btn btn-icon btn-cmetal \"><i class=\"bx bxs-show\"></i></a>\n <a href=\"'.route('empresas.edit',['id' => $model->id]).'\" class=\"btn btn-icon btn-light-cmetal\"><i class=\"bx bxs-pencil\"></i></a>\n \n </div>\n ';\n // if (Auth::user()->tipo == 1 ) {\n // }else{\n // return '\n // <a href=\"'.route('proyectos.show',['id' => $model->id]).'\" class=\"btn btn-icon btn-cmetal \"><i class=\"bx bxs-show\"></i></a>\n \n // ';\n // }\n }) \n ->rawColumns(['action'])\n ->escapeColumns([])\n ->toJson();\n }", "title": "" }, { "docid": "c087d061ed8447b5893911f92f8b5afc", "score": "0.5824696", "text": "public function datatablesUnitOfMeasurement()\n { \n DB::statement(DB::raw('set @rownum=0'));\n $tblUnitOfMeasurement = TblUnitOfMeasurement::select([DB::raw('@rownum := @rownum + 1 AS rownum'),\n 'id','unit4','unit3','unit2','description','eng_definition','ind_definition','created_at']);\n return Datatables::of($tblUnitOfMeasurement)\n ->addColumn('action', function ($tblUnitOfMeasurement) {\n return '<span class=\"pull-right\"><kbd class=\"kbd-primary cpointer edit-uom\" data-id=\"'.$tblUnitOfMeasurement->id.'\">EDIT</kbd>&nbsp;&nbsp;<kbd class=\"kbd-danger cpointer delete-uom\" data-id=\"'.$tblUnitOfMeasurement->id.'\">DELETE</kbd></span>';\n })\n ->setRowId('id')\n ->make(true);\n }", "title": "" }, { "docid": "817cebc24edacc3316e95e6ef68ada6d", "score": "0.5821605", "text": "public function getData2()\n {\n $videos = Video::select(array('videos.id', 'videos.link', 'videos.description', 'videos.user' , 'videos.moderated', 'videos.created_at'));\n return Datatables::of($videos)\n\n ->edit_column('moderated','@if($moderated)\n Да\n @else\n Нет\n @endif')\n ->add_column('actions', '<a href=\"{{{ URL::to(\\'admin/videos/\\' . $id . \\'/edit\\' ) }}}\" class=\"btn btn-default btn-xs iframe\" >{{{ Lang::get(\\'button.edit\\') }}}</a>')\n\n ->remove_column('id')\n\n ->make();\n }", "title": "" }, { "docid": "211e9c8bf2ea9a85f56c1d7a0ec892f0", "score": "0.5816468", "text": "public function getDataUmum()\n {\n return DataTables::of(DataUmum::with(['Kecamatan'])->select(['id', 'kecamatan_id', 'tipologi', 'luas_wilayah', 'jumlah_penduduk','bts_wil_utara','bts_wil_timur','bts_wil_selatan','bts_wil_barat'])->get())\n ->addColumn( 'action', function ( $data ) {\n $edit_url = route('data.data-umum.edit', $data->id );\n\n $data['edit_url'] = $edit_url;\n\n return view('forms.action', $data);\n })\n ->make();\n }", "title": "" }, { "docid": "ec9a71191a43922ec65a39db58208bf5", "score": "0.5812009", "text": "public function getAffiliateDatatable(){\n $this->datatables->select('id,user_name,email,phone_no,company_name,url,limit_user,status,monitoring_status');\n $this->datatables->from(TABLE_USER);\n $this->datatables->where('type','3');\n $result = $this->datatables->generate();\n $records = (array) json_decode($result);\n \n $j = 0;\n for ($i = 0; $i < count($records['data']); $i++) {\n $j++;\n $id = $this->utility->encode($records[\"data\"][$i][0]);\n \n if ($records[\"data\"][$i][8] == '0') {\n $monitoringStatus = 'Stop';\n } else if ($records[\"data\"][$i][8] == '1') {\n $monitoringStatus = 'Start';\n }\n \n if ($records[\"data\"][$i][7] == '0' || $records[\"data\"][$i][7] == '2') {\n $status = 'Deactive';\n } else if ($records[\"data\"][$i][7] == '1') {\n $status = 'Active';\n }\n \n $url = admin_url().'affiliate/overview/'. $id;\n \n $records[\"data\"][$i][0] = $j;\n $records[\"data\"][$i][7] = '<a href=\"javascript:;\" data-tooltip=\"Affiliate status\" class=\"affiliateStatus '.$status.'\" data-id=\"'.$id.'\" data-status=\"'.$status.'\"><i class=\"fa fa-circle action_icons\"></i></a>\n <a href=\"javascript:;\" data-tooltip=\"Monitoring status\" class=\"monitoringStatus '.$monitoringStatus.'\" data-id=\"'.$id.'\" data-status=\"'.$monitoringStatus.'\"><i class=\"fa fa-circle action_icons\"></i></a>\n <a href=\"'.$url.'\" class=\"btn btn-icon-only blue\"><i class=\"fa fa-eye\"></i></a>';\n }\n \n return $records;\n }", "title": "" }, { "docid": "9a735aed220081ed3c8e80c855528efe", "score": "0.58093184", "text": "public function getUserDatatable(){\n $this->datatables->select('u.monitoring_status,u.user_name,u.email,u.phone_no,u.user_pin,d.device_name,u.id,u.app_setting');\n $this->datatables->from(TABLE_USER.' u');\n $this->datatables->join(TABLE_DEVICE.' as d','u.id = d.user_id','left');\n $this->datatables->where('u.type','2');\n $this->datatables->where('u.parent_id', $this->userId);\n $result = $this->datatables->generate();\n $records = (array) json_decode($result);\n \n $j = 0;\n for ($i = 0; $i < count($records['data']); $i++) {\n $j++;\n $id = $this->utility->encode($records[\"data\"][$i][6]);\n if ($records[\"data\"][$i][0] == '0') {\n $status = 'Stop';\n } else if ($records[\"data\"][$i][0] == '1') {\n $status = 'Start';\n }\n \n if ($records[\"data\"][$i][7] == 'hide') {\n $appStatus = 'hide';\n $appClass = 'label-danger';\n } else if ($records[\"data\"][$i][7] == 'show') {\n $appStatus = 'show';\n $appClass = 'label-info';\n }\n \n $url = affiliate_url().'user/overview/'. $id;\n $records[\"data\"][$i][0] = $j;\n $records[\"data\"][$i][6] = '<a href=\"javascript:;\" data-tooltip=\"Status\" class=\"updateStatus '.$status.'\" data-id=\"'.$id.'\" data-status=\"'.$status.'\"><i class=\"fa fa-circle action_icons\"></i></a>\n <a href=\"javascript:;\" data-tooltip=\"Application Setting\" class=\"updateAppStatus\" data-id=\"'.$id.'\" data-status=\"'.$appStatus.'\"><span class=\"label '.$appClass.'\">'.ucfirst($appStatus).'</span></a>&nbsp;\n <a href=\"'.$url.'\" class=\"btn btn-sm blue\"><i class=\"fa fa-eye\"></i></a>';\n }\n \n return $records;\n }", "title": "" }, { "docid": "3d2bd919bfd5fa81b964d2f47311d09d", "score": "0.58036387", "text": "public function json(){\n $servis = Servis::all();\n return Datatables::of($servis)\n ->addColumn('action', function ($servis) {\n $status=$servis->status;\n if($status==1){\n $status='<center><b style=\"color:blue;\">Aktif</b></center>';\n }else{\n $status='<center><b style=\"color:red;\">Tidak Aktif</b></center>';\n }\n return \n '<span>'.$status.'</span>';\n }\n )\n ->addIndexColumn()\n ->make(true);\n }", "title": "" }, { "docid": "61f1ea4a23789fa88435db8f00635752", "score": "0.5800172", "text": "public function table()\n\t{\n\t\t$sql = '\n\t\t\tselect \n\t\t\t\tid, \n\t\t\t\tname, \n\t\t\t\tenable \n\t\t\tfrom \n\t\t\t\tfile \n\t\t\twhere \n\t\t\t\tuser = ?';\n\n\t\t$results = DB::select($sql, [Auth::id()]);\n\n\t\treturn Datatable::collection(new Collection($results))\n\t\t\t->showColumns('name')\n\t\t\t->addColumn('enable', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/edit&ID=\".$model->id.\"&EN=\".$model->enable).'\">'.$model->enable.'</a>';\n\t\t\t})\n\t\t\t->addColumn('remove', function($model) \n\t\t\t{\n\t\t\t\treturn '<a href=\"'.url(\"/file/delete&ID=\".$model->id).'\"><i class=\"fa fa-times\"></i></a>';\n\t\t\t})\n ->searchColumns('name')\n ->orderColumns('enable', 'name')\n ->make();\n\t}", "title": "" }, { "docid": "ddd9742e3e2ff20c2559b225fb4f7633", "score": "0.5799058", "text": "public function ajax()\n {\n return $this->datatables->eloquent($this->query())// ->addColumn('action', 'path.to.action.view')\n ->editColumn('asset_id', function ($data) {\n\n return '<a href=' . route('samples.show', $data->asset_id) . '>' . $data->asset_id . '</a>';\n })\n ->editColumn('dealer.name', function ($data) {\n\n return '<a href=' . route('samples.out.dsr', $data->dealer_id) . '>' . $data->dealer->name . '</a>';\n })\n ->editColumn('user.name', function ($data) {\n\n return '<a href=' . route('samples.out.rep', $data->user_id) . '>' . $data->user->name . '</a>';\n })\n ->editColumn('created_at', function ($data) {\n\n return $data->created_at ? with(new Carbon($data->created_at))->format('m/d/Y') : '';\n })\n ->editColumn('expected_return_date', function ($data) {\n\n return $data->expected_return_date ? with(new Carbon($data->expected_return_date))->format('m/d/Y') : '';\n })->make(true);\n }", "title": "" }, { "docid": "05f025e088c1e60c8364483c2f107926", "score": "0.57963526", "text": "function get_all_skema() {\n $this->datatables->select('skema_id, skema_nama,count(proposal_skema_id) as jumlah_skema');\n $this->datatables->from('skema');\n $this->datatables->join('proposal', 'proposal_skema_id=skema_id', 'LEFT');\n $this->datatables->group_by('skema_id');\n $this->datatables->add_column('view', '<a href=\"javascript:void(0);\" class=\"edit_record btn btn-info btn-xs\" data-id=\"$1\" data-nama=\"$2\">Edit</a> <a href=\"javascript:void(0);\" class=\"hapus_record btn btn-danger btn-xs\" data-id=\"$1\">Hapus</a>','skema_id,skema_nama');\n return $this->datatables->generate();\n }", "title": "" }, { "docid": "cb96c8172e2d358914b1fd8e3edeb1d5", "score": "0.57761043", "text": "public function getTableContent() {\n\t\treturn \"<tr><td>\" . $this -> getWorldId() . \"</td><td>\" . $this -> getPlayers() . \"</td><td>\" . $this -> getIp() .\"</td><td>\" . Utils::time_elapsed_string(strtotime($this -> getLastResponse())) . \" ago</tr>\";\t\n\t}", "title": "" }, { "docid": "230433f6381b0377a6d6a228f6bac941", "score": "0.5753552", "text": "public function datatable_penarikan_tunai_tabungan()\n\t{\n\t\t$aColumns = array( 'c.cif_no','c.nama','a.account_saving_no','a.amount','a.trx_date','');\n\t\t\t\t\n\t\t/* \n\t\t * Paging\n\t\t */\n\t\t$sLimit = \"\";\n\t\tif ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )\n\t\t{\n\t\t\t$sLimit = \" OFFSET \".intval( $_GET['iDisplayStart'] ).\" LIMIT \".\n\t\t\t\tintval( $_GET['iDisplayLength'] );\n\t\t}\n\t\t\n\t\t/*\n\t\t * Ordering\n\t\t */\n\t\t$sOrder = \"\";\n\t\tif ( isset( $_GET['iSortCol_0'] ) )\n\t\t{\n\t\t\t$sOrder = \"ORDER BY \";\n\t\t\tfor ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == \"true\" )\n\t\t\t\t{\n\t\t\t\t\t$sOrder .= \"\".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ].\" \".\n\t\t\t\t\t\t($_GET['sSortDir_'.$i]==='asc' ? 'asc' : 'desc') .\", \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sOrder = substr_replace( $sOrder, \"\", -2 );\n\t\t\tif ( $sOrder == \"ORDER BY\" )\n\t\t\t{\n\t\t\t\t$sOrder = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* \n\t\t * Filtering\n\t\t */\n\t\t$sWhere = \"\";\n\t\tif ( isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" )\n\t\t{\n\t\t\t$sWhere = \"AND (\";\n\t\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t\t{\n\t\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower( $_GET['sSearch'] ).\"%' OR \";\n\t\t\t}\n\t\t\t$sWhere = substr_replace( $sWhere, \"\", -3 );\n\t\t\t$sWhere .= ')';\n\t\t}\n\t\t\n\t\t/* Individual column filtering */\n\t\tfor ( $i=0 ; $i<count($aColumns) ; $i++ )\n\t\t{\n\t\t\tif ( $aColumns[$i] != '' )\n\t\t\t{\n\t\t\t\tif ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == \"true\" && $_GET['sSearch_'.$i] != '' )\n\t\t\t\t{\n\t\t\t\t\tif ( $sWhere == \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\t$sWhere = \"AND \";\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$sWhere .= \" AND \";\n\t\t\t\t\t}\n\t\t\t\t\t$sWhere .= \"LOWER(CAST(\".$aColumns[$i].\" AS VARCHAR)) LIKE '%\".strtolower($_GET['sSearch_'.$i]).\"%' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$rResult \t\t\t= $this->model_transaction->datatable_penarikan_tunai_tabungan($sWhere,$sOrder,$sLimit); // query get data to view\n\t\t$rResultFilterTotal = $this->model_transaction->datatable_penarikan_tunai_tabungan($sWhere); // get number of filtered data\n\t\t$iFilteredTotal \t= count($rResultFilterTotal); \n\t\t$rResultTotal \t\t= $this->model_transaction->datatable_penarikan_tunai_tabungan(); // get number of all data\n\t\t$iTotal \t\t\t= count($rResultTotal);\t\n\t\t\n\t\t/*\n\t\t * Output\n\t\t */\n\t\t$output = array(\n\t\t\t\"sEcho\" => intval($_GET['sEcho']),\n\t\t\t\"iTotalRecords\" => $iTotal,\n\t\t\t\"iTotalDisplayRecords\" => $iFilteredTotal,\n\t\t\t\"aaData\" => array()\n\t\t);\n\t\t\n\t\tforeach($rResult as $aRow)\n\t\t{\n\t\t\t$row = array();\n\t\t\t$row[] = $aRow['cif_no'];\n\t\t\t$row[] = $aRow['nama'];\n\t\t\t$row[] = $aRow['account_saving_no'];\n\t\t\t$row[] = '<div align=\"right\">Rp '.number_format($aRow['amount'],0,',','.').',-</div>';\n\t\t\t$row[] = $this->format_date_detail($aRow['trx_date'],'id',false,'/');\n\t\t\t$row[] = '<div align=\"center\"><a href=\"javascript:;\" class=\"btn mini red\" trx_detail_id=\"'.$aRow['trx_detail_id'].'\" nama=\"'.$aRow['nama'].'\" account_saving_no=\"'.$aRow['account_saving_no'].'\" id=\"link-delete\">Delete</a></div>';\n\n\t\t\t$output['aaData'][] = $row;\n\t\t}\n\t\t\n\t\techo json_encode( $output );\n\t}", "title": "" }, { "docid": "a04a5a9b21d7cca578e071e3384fd21f", "score": "0.5745033", "text": "function updateControl()\r\n {\r\n if (($this->ControlState & csDesigning)!=csDesigning)\r\n {\r\n //Ensure there is a valid datasource\r\n $this->setDataSource($this->_datasource);\r\n\r\n if (is_object($this->_datasource))\r\n {\r\n $ds=$this->_datasource->DataSet;\r\n\r\n if ($ds->Active)\r\n {\r\n $ds->first();\r\n $fields=$ds->Fields;\r\n?>\r\n var <?php echo $this->Name; ?>_tableModel=<?php echo $this->owner->Name.\".\".$this->Name; ?>_tableModel;\r\n <?php echo $this->Name; ?>_tableModel.setColumns([\r\n<?php\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n $i=0;\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $fname=$val['Fieldname'];\r\n if ($fname!=\"\")\r\n {\r\n $props=$this->_datasource->DataSet->readFieldProperties($fname);\r\n }\r\n $dlabel=$val['Caption'];\r\n\r\n if ($props)\r\n {\r\n if (array_key_exists('displaylabel',$props))\r\n {\r\n $dlabel=$props['displaylabel'][0];\r\n }\r\n }\r\n\r\n if ($i>0) echo \",\";\r\n echo '\"'.$dlabel.'\"';\r\n $i++;\r\n\r\n }\r\n }\r\n else if (is_array($fields))\r\n {\r\n reset($fields);\r\n $i=0;\r\n while(list($fname, $value)=each($fields))\r\n {\r\n $props=$this->_datasource->DataSet->readFieldProperties($fname);\r\n $dlabel=$fname;\r\n\r\n if ($props)\r\n {\r\n if (array_key_exists('displaylabel',$props))\r\n {\r\n $dlabel=$props['displaylabel'][0];\r\n }\r\n }\r\n\r\n if ($i>0) echo \",\";\r\n echo '\"'.$dlabel.'\"';\r\n $i++;\r\n }\r\n }\r\n?>\r\n ]);\r\n\r\n\r\n <?php echo $this->Name; ?>_tableModel.ColumnNames=new Array(\r\n<?php\r\n $cnames=$ds->Fields;\r\n if (count($this->_columns))\r\n {\r\n $cnames=array();\r\n reset($this->_columns);\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $cnames[$val['Fieldname']]='1';\r\n }\r\n }\r\n\r\n if (is_array($cnames))\r\n {\r\n reset($cnames);\r\n $i=0;\r\n while(list($fname, $value)=each($cnames))\r\n {\r\n if ($i>0) echo \",\";\r\n echo '\"'.$fname.'\"';\r\n $i++;\r\n }\r\n }\r\n?>\r\n);\r\n\r\n\r\n\r\n var rowData = [];\r\n var oData = [];\r\n<?php\r\n $colvalues=array();\r\n\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n while(list($key, $val)=each($this->_columns))\r\n {\r\n $colvalues[$val['Fieldname']]=1;\r\n }\r\n\r\n }\r\n\r\n $ds->first();\r\n while (!$ds->EOF)\r\n {\r\n $rvalues=$ds->Fields;\r\n\r\n if (count($colvalues)>=1)\r\n {\r\n $avalues=array();\r\n reset($colvalues);\r\n while(list($key, $val)=each($colvalues))\r\n {\r\n $avalues[$key]=$rvalues[$key];\r\n }\r\n $rvalues=$avalues;\r\n }\r\n?>\r\n rowData.push([\r\n <?php\r\n reset($rvalues);\r\n $i=0;\r\n while (list($k,$v)=each($rvalues))\r\n {\r\n\r\n $v=str_replace(\"\\n\\r\",'\\n',$v);\r\n $v=str_replace(\"\\n\",'\\n',$v);\r\n $v=str_replace(\"\\r\",'',$v);\r\n $v=str_replace('\"','\\\"',$v);\r\n $v=str_replace(\"\\\\\",'\\\\',$v);\r\n $v=str_replace('<','\\<',$v);\r\n $v=str_replace('>','\\>',$v);\r\n if ($i>0) echo \",\";\r\n\r\n $numeric=false;\r\n if (count($this->_columns)>=1)\r\n {\r\n $sorttype=$this->_columns[$i]['SortType'];\r\n if ($sorttype=='stNumeric')\r\n {\r\n $numeric=true;\r\n }\r\n }\r\n if (!$numeric) echo '\"'.$v.'\"';\r\n else echo $v;\r\n\r\n $i++;\r\n\r\n }\r\n ?>\r\n ]);\r\n oData.push([\r\n <?php\r\n reset($rvalues);\r\n $i=0;\r\n while (list($k,$v)=each($rvalues))\r\n {\r\n if (count($colvalues)>=1)\r\n {\r\n if (!array_key_exists($k,$colvalues)) continue;\r\n }\r\n\r\n $v=str_replace(\"\\n\\r\",'\\n',$v);\r\n $v=str_replace(\"\\n\",'\\n',$v);\r\n $v=str_replace(\"\\r\",'',$v);\r\n $v=str_replace('\"','\\\"',$v);\r\n $v=str_replace(\"\\\\\",'\\\\',$v);\r\n $v=str_replace('<','\\<',$v);\r\n $v=str_replace('>','\\>',$v);\r\n// $v=htmlentities($v);\r\n if ($i>0) echo \",\";\r\n echo '\"'.$v.'\"';\r\n $i++;\r\n\r\n }\r\n ?>\r\n ]);\r\n <?php\r\n $ds->next();\r\n }\r\n $ds->first();\r\n\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.originalData=oData;\r\n <?php echo $this->Name; ?>_tableModel.setData(rowData);\r\n<?php\r\n $this->_latestheader=$fields;\r\n\r\n if (count($this->_columns)>=1)\r\n {\r\n reset($this->_columns);\r\n $i=0;\r\n while(list($key, $value)=each($this->_columns))\r\n {\r\n $editable='true';\r\n if ($value['ReadOnly']=='true') $editable='false';\r\n\r\n if ($this->_readonly) $editable='false';\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.setColumnEditable(<?php echo $i; ?>, <?php echo $editable; ?>);\r\n<?php\r\n $i++;\r\n }\r\n\r\n }\r\n else if (is_array($fields))\r\n {\r\n reset($fields);\r\n $i=0;\r\n while(list($fname, $value)=each($fields))\r\n {\r\n $editable='true';\r\n if ($this->_readonly) $editable='false';\r\n?>\r\n <?php echo $this->Name; ?>_tableModel.setColumnEditable(<?php echo $i; ?>, <?php echo $editable; ?>);\r\n<?php\r\n $i++;\r\n }\r\n\r\n\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f4f225c0f01b76afd6d171dc7767b094", "score": "0.5744505", "text": "public function datatable()\n\t{\n\t\t$c = 'd.id as id,d.ref as ref,(case when d.type = 1 \n THEN\n \"Rent\"\n ELSE\n \"Sale\" \n END) as type,d.status as status,crm_sub_status.sub_status as sub_status,d.tenant_buyer_name as tenant_buyer_name,d.landlord_seller_name as landlord_seller_name,c.name as region_id,\n crm_location.loc_name as area_location_id,crm_subloc.sub_sub_loc as sub_area_location_id,d.price,d.price,d.deposit,d.deal_date,d.deal_estimated_date,d.renewal_date,\n CONCAT(u.first_name, \" \", u.last_name) as agent_1_id,d.agent_1_commission,d.agent_2_id,d.agent_2_commission,d.agent_3_id,d.agent_3_commission,d.listings_ref,\n d.listings_beds,d.listings_street_no,d.listings_floor_no,d.listings_floor_no,d.created_by_name,d.listings_unit,d.commission,d.dateupdated';\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t$this->datatables->select($c)\n\t\t\t ->unset_column('d.id')//this means if you want to include in columns or search\n\t\t\t\t->from('crm_deals d');\n\t\t\t\t$this->datatables->join('crm_users as u', 'u.id = d.agent_id', 'left');\n\t\t\t\t$this->datatables->join('crm_city as c', 'c.id = d.region_id', 'left');\n\t\t\t\t$this->datatables->join('crm_location', 'crm_location.loc_id = d.area_location_id', 'left');\n\t\t\t\t$this->datatables->join('crm_subloc', 'crm_subloc.sub_loc_id = d.sub_area_location_id', 'left');\n\t\t\t\t$this->datatables->join('crm_sub_status', 'crm_sub_status.id = d.sub_status', 'left');\n\t\t\t\t\n\t\t\t\t$this->datatables ->where('d.is_active', 1); \n\t\t\t\t\n\t \t\t/***********************where conditions starts here *******/\n\t\t\t\tif($this->input->post('listing_type'))\n\t\t\t\t{\n\t\t\t\t\tif($this->input->post('listing_type') == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$where = \"d.type = 1\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('listing_type') == 2){\n\t\t\t\t\t\t$this->datatables ->where('d.type',2);\n\t\t\t\t\t}elseif($this->input->post('status') == 100){\n\t\t\t\t\t\t$where = \"YEAR(deal_estimated_date) = YEAR(Now()) AND type=1\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('status') == 101){\n\t\t\t\t\t\t$where = \"YEAR(deal_estimated_date) = YEAR(Now()) AND type=2\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('status') == 102){\n\t\t\t\t\t\t$where = \"status=1 AND type=1\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('status') == 103){\n\t\t\t\t\t\t$where = \"status=1 AND type=2\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('status') == 104){\n\t\t\t\t\t\t$where = \"WHERE YEAR(deal_estimated_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)\n\t\tAND MONTH(deal_estimated_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)\n\t\tAND status=2 AND type=1\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}elseif($this->input->post('status') == 105){\n\t\t\t\t\t\t$where = \"WHERE YEAR(deal_estimated_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)\n\t\tAND MONTH(deal_estimated_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)\n\t\tAND status=2 AND type=2\";\n\t\t\t\t\t\t$this->datatables ->where($where);\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t/**********************where ends here*********************/\n\t\t\t\n\t\t\treturn $this->datatables->generate();\n }", "title": "" }, { "docid": "ff8df580c62d83121e86e2c3c7c0671b", "score": "0.57408893", "text": "public function payment_methods_datatable()\n\t\t{\n\t\t\t$list = $this->Payment_methods->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t$last_login = '';\n\t\t\tforeach ($list as $method) {\n\t\t\t\t\n\t\t\t\t$no++;\n\t\t\t\t\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$method->id.'\"><label for=\"cb\"></label></div><div style=\"margin-left: 20%; margin-right: 20%;\">'.ucwords($method->method_name).'</div>';\n\t\t\t\t\n\t\t\t\t//$row[] = $method->id;\n\t\t\t\t\n\t\t\t\t//$row[] = ucwords($method->method_name);\n\t\t\t\t\n\t\t\t\t//$row[] = date(\"F j, Y\", strtotime($portfolio->date_added));\n\t\t\t\t\n\t\t\t\t$model = 'payment_methods';\n\t\t\t\t\n\t\t\t\t$url = 'admin/payment_method_details';\n\t\t\t\t\n\t\t\t\t//prepare buttons\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#editPaymentMethodModal\" class=\"btn btn-primary btn-xs\" title=\"Edit '.ucwords($method->method_name).'\" onclick=\"editPaymentMethod('.$method->id.',\\''.$url.'\\')\"><i class=\"fa fa-edit\"></i> Edit</a>\n\t\t\t\t';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Payment_methods->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Payment_methods->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "title": "" }, { "docid": "3cae276e2c5db8464cbdbe16dc428713", "score": "0.57388234", "text": "public function admin_view(){\n echo Modules::run('template/load_admin', 'View Users', $this->load->view('users/users_view', '', TRUE),'','',array('themes/admin/vendor/datatable/jquery.dataTables.min.js', 'themes/admin/vendor/datatable/dataTables.bootstrap.js'));\n }", "title": "" }, { "docid": "6b1359a9cc05b779c647001fd13e1842", "score": "0.5737659", "text": "public function views_data() {\n $data = parent::views_data();\n //dsm($data);\n $data['tincan_statement']['stored'] = array(\n 'title' => t('Stored'),\n 'help' => t('Stored date value, the date the statement was stored'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n $data['tincan_statement']['timestamp'] = array(\n 'title' => t('Timestamp'),\n 'help' => t('Timestamp of the statement'),\n 'field' => array(\n 'handler' => 'tincan_lrs_handler_field_datetime',\n 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'tincan_lrs_handler_sort_date',\n ),\n 'filter' => array(\n 'handler' => 'tincan_lrs_handler_filter_datetime',\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument_tincanlrs_fulldate',\n ),\n );\n return $data;\n }", "title": "" }, { "docid": "f0933937eb73199574c595734f2a9912", "score": "0.5730495", "text": "public function getDatatable() {\n $es = Family::select('id', 'family_name', 'description', 'created_at', 'updated_at');\n return Datatables::of($es)->make();\n }", "title": "" }, { "docid": "8c94bb501671cf82e9b3397335b5de09", "score": "0.57281363", "text": "public function getTableContent() {\n\t\treturn \"<tr data-key='\" . $this -> getKey() . \"'><td>\" . $this -> key . \"</td><td contenteditable='true'>\" . $this -> value . \"</td><td>\" . $this -> dataType . \"</td></tr>\";\n\t}", "title": "" }, { "docid": "c1792cbb20f0c3bc5e96efaa29d3b23e", "score": "0.57234484", "text": "private function _display_all_records_full_view(){\n\t\t\t/*------------------------------*/\n\t\t\t\n\t\t\t$this->class_settings[ 'html' ] = array( 'html-files/templates-1/'.$this->table_name.'/display-all-records-full-view' );\n\t\t\t\n\t\t\t$datatable = $this->_display_data_table();\n\t\t\t$form = $this->_generate_new_data_capture_form();\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['data_entry_form'] = $form['html'];\n\t\t\t$this->class_settings[ 'data' ]['html'] = $datatable['html'];\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['title'] = \"Manage Countries\";\n\t\t\t$this->class_settings[ 'data' ]['hide_main_title'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['hide_clear_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_details_tab'] = 1;\n\t\t\t$this->class_settings[ 'data' ]['hide_reports_tab'] = 1;\n\t\t\t\n\t\t\t$this->class_settings[ 'data' ]['col_1'] = 3;\n\t\t\t$this->class_settings[ 'data' ]['col_2'] = 9;\n\t\t\t\n\t\t\t$returning_html_data = $this->_get_html_view();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'html' => $returning_html_data,\n\t\t\t\t'method_executed' => $this->class_settings['action_to_perform'],\n\t\t\t\t'status' => 'new-status',\n\t\t\t\t'javascript_functions' => array( 'recreateDataTables', 'set_function_click_event', 'update_column_view_state', 'prepare_new_record_form_new' ) \n\t\t\t);\n\t\t}", "title": "" }, { "docid": "b12a8a768ba2537d93c93e8a951c8d8a", "score": "0.5723261", "text": "public function data()\n {\n $objecttypes = Object::getTypes()\n ->select(array('id', 'title', 'status', 'created_at' ));// ObjectType::select(array('object_types.id','object_types.name','object_types.display_name', 'object_types.created_at'));\n\n return Datatables::of($objecttypes)\n ->add_column('actions', '@if ($id>\"4\")<a href=\"{{{ URL::to(\\'admin/object-types/\\' . $id . \\'/edit\\' ) }}}\" class=\"btn btn-success btn-sm\" ><span class=\"glyphicon glyphicon-pencil\"></span> {{ trans(\"admin/modal.edit\") }}</a>\n <a href=\"{{{ URL::to(\\'admin/object-types/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-sm btn-danger\"><span class=\"glyphicon glyphicon-trash\"></span> {{ trans(\"admin/modal.delete\") }}</a>\n <a href=\"{{{ URL::to(\\'admin/object-types/\\' . $id . \\'/export?format=excel\\' ) }}}\" class=\"btn btn-sm btn-primary\"><span class=\"glyphicon glyphicon-export\"></span> {{ trans(\"admin/admin.export\") }}</a>\n @endif')\n ->remove_column('id')\n\n ->make();\n\n\n// $objecttypes = ObjectType::select(array('object_types.id','object_types.name','object_types.display_name', 'object_types.created_at'));\n//\n// return Datatables::of($objecttypes)\n// ->add_column('actions', '@if ($id>\"4\")<a href=\"{{{ URL::to(\\'admin/object-types/\\' . $id . \\'/edit\\' ) }}}\" class=\"btn btn-success btn-sm\" ><span class=\"glyphicon glyphicon-pencil\"></span> {{ trans(\"admin/modal.edit\") }}</a>\n// <a href=\"{{{ URL::to(\\'admin/object-types/\\' . $id . \\'/delete\\' ) }}}\" class=\"btn btn-sm btn-danger\"><span class=\"glyphicon glyphicon-trash\"></span> {{ trans(\"admin/modal.delete\") }}</a>\n// @endif')\n// ->remove_column('id')\n//\n// ->make();\n }", "title": "" }, { "docid": "b990306a8535a7c3079fd5352e296d1e", "score": "0.5696825", "text": "public function getDataSourceView();", "title": "" }, { "docid": "c59f0b21309a9aae36f3161fb620b085", "score": "0.5695387", "text": "public function data()\n {\n $prodi = $this\n ->prodiRepo\n ->getAllData();\n\n return DataTables::of($prodi)\n ->addColumn('action', function($prodi){\n return '<center><a href=\"/dasbor/pengguna/prodi/form-ubah/'.$prodi->id.'\" class=\"btn btn-warning btn-xs\"><i class=\"fa fa-pencil\"></i></a> <a href=\"#hapus\" onclick=\"destroy('.$prodi->id.')\" class=\"btn btn-xs btn-danger\"><i class=\"fa fa-times\"></i></a></center>';\n })\n ->rawColumns(['action'])\n ->make(true);\n }", "title": "" }, { "docid": "2fde248bd05b4960b90f3498a596901b", "score": "0.5681494", "text": "public function datatables()\n {\n $data = numrows(Menu::all());\n return DataTables::of($data)\n ->addColumn('action', function ($data) {\n return\n '<a href=\"'.route('user.show', $data->id).'\" class=\"btn btn-primary btn-circle btn-sm \"><i class=\"fas fa-search\"></i></a>\n <a href=\"'.route('user.edit', $data->id).'\" class=\"btn btn-success btn-circle btn-sm\"><i class=\"fas fa-edit\"></i></a>\n <a href=\"'.route('user.delete', $data->id).'\" class=\"btn btn-danger btn-circle btn-sm \"><i class=\"fas fa-trash\"></i></a>';\n })\n ->make(true);\n\n }", "title": "" }, { "docid": "03e18b2666ca12d29e023f31a32fdeb9", "score": "0.56709045", "text": "public function data()\n {\n $provine_city = $this->provine_city->all();\n return Datatables::of($provine_city)\n ->addIndexColumn()\n ->addColumn('actions', function ($provine_city) {\n $actions = '';\n if ($this->user->canAccess('dhcd.administration.provine-city.log')) {\n $actions .= '<a href=' . route('dhcd.administration.provine-city.log', ['type' => 'provine-city', 'id' => $provine_city->provine_city_id]) . ' data-toggle=\"modal\" data-target=\"#log\"><i class=\"livicon\" data-name=\"info\" data-size=\"18\" data-loop=\"true\" data-c=\"#F99928\" data-hc=\"#F99928\" title=\"log provine-city\"></i></a>';\n }\n if ($this->user->canAccess('dhcd.administration.provine-city.show')) {\n $actions .= '<a href=' . route('dhcd.administration.provine-city.show', ['provine_city_id' => $provine_city->provine_city_id]) . '><i class=\"livicon\" data-name=\"edit\" data-size=\"18\" data-loop=\"true\" data-c=\"#428BCA\" data-hc=\"#428BCA\" title=\"update provine-city\"></i></a>';\n }\n if ($this->user->canAccess('dhcd.administration.provine-city.confirm-delete')) {\n $actions .= '<a href=' . route('dhcd.administration.provine-city.confirm-delete', ['provine_city_id' => $provine_city->provine_city_id]) . ' data-toggle=\"modal\" data-target=\"#delete_confirm\"><i class=\"livicon\" data-name=\"trash\" data-size=\"18\" data-loop=\"true\" data-c=\"#f56954\" data-hc=\"#f56954\" title=\"delete provine-city\"></i></a>';\n }\n return $actions;\n })\n ->rawColumns(['actions'])\n ->make();\n }", "title": "" }, { "docid": "9251683732973efcd0afa29a27d830a1", "score": "0.56664073", "text": "public function data()\n {\n $keteranganBedaIdentitas = KeteranganBedaIdentitas::with('penduduk')\n ->orderBy('created_at', 'desc')\n ->get();\n\n $datatablesKeteranganBedaIdentitas = DataTables($keteranganBedaIdentitas)\n ->addColumn('action', function($keteranganBedaIdentitas){\n return '\n <center>\n <a\n href=\"/master/penduduk/form-ubah/'.$keteranganBedaIdentitas->id.'\"\n class=\"btn btn-sm btn-social btn-warning\"\n >\n <i class=\"fa fa-pencil\"></i> Ubah\n </a>\n <a\n href=\"/dasbor/kaur-pemerintahan/keterangan-beda-identitas/surat/'.$keteranganBedaIdentitas->id.'\"\n class=\"btn btn-sm btn-social btn-success\"\n target=\"_blank\"\n >\n <i class=\"fa fa-file-pdf-o\"></i> Cetak\n </a>\n </center>\n ';\n })\n ->rawColumns(['action'])\n ->toJson();\n\n return $datatablesKeteranganBedaIdentitas;\n }", "title": "" }, { "docid": "e3d3279903c0266f8fcd73f60ca47ac9", "score": "0.5656538", "text": "public function contact_us_datatable()\n\t\t{\n\t\t\t\n\t\t\t$delete = $this->Contact_us->delete_old_records();\n\t\t\t\n\t\t\t$list = $this->Contact_us->get_datatables();\n\t\t\t$data = array();\n\t\t\t$no = $_POST['start'];\n\t\t\t$last_login = '';\n\t\t\tforeach ($list as $contact_us) {\n\t\t\t\t$no++;\n\t\t\t\t$row = array();\n\t\t\t\t\n\t\t\t\t//$row[] = '<div class=\"checkbox checkbox-primary\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$contact_us->id.'\"></div>';\n\t\t\t\t\n\t\t\t\t$row[] = '<div class=\"checkbox checkbox-primary pull-left\"><input type=\"checkbox\" name=\"cb[]\" class=\"cb\" onclick=\"enableButton(this)\" value=\"'.$contact_us->id.'\"><label for=\"cb\"></label></div><div style=\"margin-left: 40%; margin-right: 40%;\">'.$no.'</div>';\n\t\t\t\t\n\t\t\t\t$textWeight = '';\n\t\t\t\t$opened = $contact_us->opened;\n\t\t\t\t\n\t\t\t\t//check if message has been read\n\t\t\t\tif($opened == '0'){ \n\t\t\t\t\t$textWeight = 'msgDefault';\n\t\t\t\t\t$opened = '<strong>Not Read</strong>'; \n\t\t\t\t\t\n\t\t\t\t}else{ \n\t\t\t\t\t$textWeight = 'msgRead';\n\t\t\t\t\t$opened = 'Read'; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.$contact_us->contact_name.'</span>';\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.$contact_us->contact_company.'</span>';\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.$contact_us->contact_telephone.'</span>';\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.$contact_us->contact_email.'</span>';\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.$contact_us->ip_details.'</span>';\n\t\t\t\t$row[] = '<span class=\"'.$textWeight.'\">'.date(\"F j, Y\", strtotime($contact_us->contact_us_date)).'</span>';\n\t\t\t\t\n\t\t\t\t$url = 'admin/contact_us_details';\n\t\t\t\t\n\t\t\t\t//prepare buttons\n\t\t\t\t$row[] = '<a data-toggle=\"modal\" data-target=\"#viewModal\" class=\"btn btn-info btn-xs\" id=\"'.$contact_us->id.'\" title=\"Click to View\" onclick=\"viewContactMessage('.$contact_us->id.', \\''.$url.'\\')\"><i class=\"fa fa-search\"></i> View</a>';\n\t\t\t\t\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t \n\t\t\t$output = array(\n\t\t\t\t\n\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\"recordsTotal\" => $this->Contact_us->count_all(),\n\t\t\t\t\"recordsFiltered\" => $this->Contact_us->count_filtered(),\n\t\t\t\t\"data\" => $data,\n\t\t\t);\n\t\t\t//output to json format\n\t\t\techo json_encode($output);\n\t\t}", "title": "" }, { "docid": "62ec4b83d2389e06629cd01edf2f87c6", "score": "0.56557214", "text": "public function index()\n {\n\n Gate::authorize('haveaccess','user.index');\n\n //$users = User::orderBy('id','Asc')->paginate(8);\n\n //return view('user.index',compact('users'));\n\n //$users = User::all();\n\n return datatables()\n ->eloquent(User::query())\n //->eloquent($users)\n ->addColumn('accion', 'user.adicionales' )\n ->rawColumns(['accion'])\n ->toJson();\n\n }", "title": "" } ]
b89bb37b3e675cd45564fae58444a6f7
Creation of a hub
[ { "docid": "e2c37e000c0bf83d739d839e37cafc23", "score": "0.6730009", "text": "function createHub($p_oPort, $agent_id) {\n global $DB;\n\n $Netport = new NetworkPort();\n $nn = new NetworkPort_NetworkPort();\n //$PluginFusionInventoryAgentsProcesses = new PluginFusionInventoryAgentsProcesses;\n\n // Find in the mac connected to the if they are in hub without link port connected\n foreach ($p_oPort->getMacsToConnect() as $ifmac) {\n $a_ports = $Netport->find(\"`mac`='\".$ifmac.\"'\");\n foreach ($a_ports as $data) {\n if ($ID = $nn->getOppositeContact($p_oPort->getValue('id'))) {\n $Netport->getFromDB($ID);\n if ($Netport->fields[\"itemtype\"] == $this->getType()) {\n if ($this->fields[\"hub\"] == \"1\") {\n $a_portLink = $Netport->find(\"`name`='Link'\n AND `items_id`='\".$this->fields['id'].\"'\n AND `itemtype`='\".$this->getType().\"'\");\n foreach ($a_portLink as $dataLink) {\n if ($nn->getOppositeContact($dataLink['id'])) {\n\n } else {\n // We have founded a hub orphelin\n if ($nn->add(array('networkports_id_1'=> $p_oPort->getValue('id'), 'networkports_id_2' => portLink_id))) {\n// $PluginFusionInventoryAgentsProcesses->updateProcess($_SESSION['glpi_plugin_fusioninventory_processnumber'],\n// array('query_nb_connections_created' => '1'));\n// plugin_fusioninventory_addLogConnection(\"make\",$p_oPort->getValue('ID'));\n }\n $this->releaseHub($this->fields['id'], $p_oPort);\n return $this->fields['id'];\n }\n }\n }\n }\n }\n }\n }\n // Not founded, creation hub and link port\n $input = array();\n $input['hub'] = \"1\";\n $input['name'] = \"hub\";\n if (isset($_SESSION[\"plugin_fusinvinventory_entity\"])) {\n $input['entities_id'] = $_SESSION[\"plugin_fusinvinventory_entity\"];\n }\n// $input[\"plugin_fusioninventory_agents_id\"] = $agent_id;\n // get source entity :\n// $datas = $Netport->getDeviceData($p_oPort->getValue(\"items_id\"),$p_oPort->getValue(\"itemtype\"));\n// if (isset($Netport->entities_id)) {\n// $input['entities_id'] = $Netport->entities_id;\n// }\n $hub_id = $this->add($input);\n\n $input = array();\n $input[\"items_id\"] = $hub_id;\n $input[\"itemtype\"] = $this->getType();\n $input[\"name\"] = \"Link\";\n $port_id = $Netport->add($input);\n $this->disconnectDB($p_oPort->getValue('id'));\n $this->disconnectDB($port_id);\n if ($nn->add(array('networkports_id_1'=> $p_oPort->getValue('id'), 'networkports_id_2' => $port_id))) {\n// $PluginFusionInventoryAgentsProcesses->updateProcess($_SESSION['glpi_plugin_fusioninventory_processnumber'],\n// array('query_nb_connections_created' => '1'));\n// plugin_fusioninventory_addLogConnection(\"make\",$p_oPort->getValue('ID'));\n }\n return $hub_id;\n }", "title": "" } ]
[ { "docid": "4fb926269612be3f8421d9a7b4218148", "score": "0.6368963", "text": "public function create() {\n return view('hub.create');\n }", "title": "" }, { "docid": "99aaab1f507ec767edca89f5e22b28e9", "score": "0.62076145", "text": "public function Create()\n\t\t{\n\t\t\tparent::Create();\n\n\t\t\t$this->ConnectParent(\"{CFDFE5FC-C6AE-F6EB-D449-89A2A1F25794}\");\n\t\t}", "title": "" }, { "docid": "c6f5898bf015c066c9a51b0a86df553f", "score": "0.6095794", "text": "public function store()\n\t{\n return $this->hub->create();\n\t}", "title": "" }, { "docid": "321afbc6a1b381f87a3dd811054834df", "score": "0.60484105", "text": "public function create(Request $request)\n\t{\n\t\t// response\n\t\t$data = [\n\t\t\t'hub' => new Hub,\n\t\t\t'form_action' => 'Master\\HubController@store'\n\t\t];\n\t\treturn view('master.hub.create', $data);\n\t}", "title": "" }, { "docid": "de34af38048328e75585f095cea69ca0", "score": "0.60268366", "text": "public function create () {\n\t\t//\n\t}", "title": "" }, { "docid": "6bb7a2e8662d95efefd5d7ea09f46eb2", "score": "0.59994787", "text": "public function createHub($userId, $worldId, $name) {\n $userId = $this->sanitize($userId);\n $worldId = $this->sanitize($worldId);\n $name = $this->sanitize($name);\n\n $q=$this->db->query(\"INSERT into hubs (user_id, world_id, name)\n VALUES ('$userId', '$worldId', '$name')\");\n\n if ($q !== false) {\n $insertId = $this->db->insert_id;\n $userQ = $this->db->query(\"SELECT * FROM hubs\n WHERE id='$insertId'\");\n return $this->fetchAll($userQ)[0];\n } else {\n return [$this->db->error]; //error\n }\n }", "title": "" }, { "docid": "3c5469107f9ae44eeddc1700e7cd2b2f", "score": "0.5993329", "text": "public function getHubUUID();", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5984097", "text": "public function create() {}", "title": "" }, { "docid": "08797652e4f428e6b9e56decf83af1a6", "score": "0.59792924", "text": "public function Create() {\n parent::Create();\n $this->ConnectParent(\"{86C2DE8C-FB21-44B3-937A-9B09BB66FB76}\");\n //Anzahl die in der Konfirgurationsform angezeigt wird - Hier Standard auf 1\n $this->RegisterPropertyInteger(\"Anzahl\",1);\n //99 Geräte können pro Konfirgurationsform angelegt werden\n for($count = 1; $count -1 < 99; $count++) {\n $DeviceName = \"DeviceName{$count}\";\n $SwitchID = \"SwitchID{$count}\";\n $VariableState = \"VariableState{$count}\";\n $SwitchDummyOptional = \"SwitchDummyOptional{$count}\";\n $this->RegisterPropertyString($DeviceName, \"\");\n $this->RegisterPropertyInteger($SwitchID, 0);\n $this->RegisterPropertyInteger($VariableState, 0);\n $this->RegisterPropertyBoolean($SwitchDummyOptional, false);\n }\n }", "title": "" }, { "docid": "652a1adeba97cfc87599ba0957349f1d", "score": "0.59481895", "text": "public function create() {\n\n\t}", "title": "" }, { "docid": "a95169db6fb6626244875d7565843dba", "score": "0.593991", "text": "public function getHub() {\n if ($this->hub === null) {\n $this->setHub(self::DEFAULT_HUB);\n if (defined('HUB')) {\n $this->setHub(HUB);\n }\n }\n return $this->hub;\n }", "title": "" }, { "docid": "9a462ab3f38fdd99844e3e9d78c166e3", "score": "0.59153855", "text": "public function create() {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.59096944", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.59096944", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.59096944", "text": "public function create(){}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "5609c1ee238893ec070ea6e9ac5b80bd", "score": "0.5893744", "text": "public function create() {\n\t\t//\n\t}", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5890025", "text": "public function create();", "title": "" }, { "docid": "c4223ab52e776ba704d5c36eeace8455", "score": "0.5888533", "text": "function createInServer() {\n\n }", "title": "" }, { "docid": "4a878c61858d97d50963cf02c7e16dd3", "score": "0.5860728", "text": "public function create()\n\t{\n\t\n\t}", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.58147204", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.58147204", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.58147204", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e498c1dfd291b1e26942278d34a9a3ba", "score": "0.58147204", "text": "public function create() {\n \n }", "title": "" }, { "docid": "e4b9b8faa8ac9d9579590382659dc1b4", "score": "0.5800126", "text": "public static function create();", "title": "" }, { "docid": "cf5956d060b3cd6791e40d4fbe4cf572", "score": "0.5796881", "text": "public static function create() {\n\n }", "title": "" }, { "docid": "3cda09a7d8b8446680caa10771a6aabf", "score": "0.578137", "text": "function create ()\n {\n \n }", "title": "" }, { "docid": "8aebf7876748ba839719ba3d59c31dd6", "score": "0.57749456", "text": "public function create ()\n {\n //\n }", "title": "" }, { "docid": "476a9f747ac18934c941b85df8ad93ee", "score": "0.57744086", "text": "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "476a9f747ac18934c941b85df8ad93ee", "score": "0.57744086", "text": "public function create()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "4fe4fc33cc045310ce3be49cc4104663", "score": "0.57728076", "text": "public function _construct()\n {\n $accessTokens = Mage::helper('wombat')->getXHubTokens();\n if($accessTokens['store'] && $accessTokens['access']) {\n // Initialize the http client\n $this->_client = new Varien_Http_Client($this->_pushURL);\n $this->_client->setMethod(Varien_Http_Client::POST);\n\n $this->_client->setHeaders('X-Hub-Store', $accessTokens['store']);\n $this->_client->setHeaders('X-Hub-Access-Token', $accessTokens['access']);\n\n $this->_requestObjects = new stdClass();\n }\n }", "title": "" }, { "docid": "c018d53e40a81d78b5b32b6ea36a937f", "score": "0.5751097", "text": "public function create()\n\t{\n\t\t$this->createStorage();\n\t\t$this->createPhpFpm();\n\t\t$this->createNginx();\n\t\t$this->createXvfbPool();\n\t}", "title": "" }, { "docid": "e02d0de3361413906ab1d27c61b4abe6", "score": "0.5749827", "text": "function create()\n {\n }", "title": "" }, { "docid": "e90370ec4bd14791e36ff8fca52aa9bc", "score": "0.5748718", "text": "protected function _construct()\n {\n $this->_init('hubco_channels/channel');\n }", "title": "" }, { "docid": "ecb220065ad1d1d1a2550ca7cc43f307", "score": "0.5744158", "text": "public function create()\n\t\t{\n\t\t\t\t//\n\t\t}", "title": "" }, { "docid": "8555d4f6bb0abb8a09d1c1ac4e098fd0", "score": "0.574156", "text": "public abstract function create();", "title": "" }, { "docid": "cbda69a95bb881bfbf010e87de5d6044", "score": "0.5736066", "text": "public function create()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.5735799", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.5735799", "text": "public function create() {\n }", "title": "" }, { "docid": "698542d4ce60131eb64c9360254a8772", "score": "0.57253623", "text": "public function create() {\n\n\n\n\t\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.5715952", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "292dce0fb25f89abb8c64bf979c1cafd", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n }", "title": "" } ]
[ { "docid": "173dfa3d2c43c121d2999bbac59bd02a", "score": "0.80462193", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:controller', array_filter([\n 'module' => $this->getModule()['key'],\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $this->argument('name') : null,\n '--api' => $this->option('api'),\n '--querybuilder' => $this->option('querybuilder')\n ]));\n }", "title": "" }, { "docid": "271ca9b8e926903001f4cddda1e8934b", "score": "0.7937227", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('mappweb:make-controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "title": "" }, { "docid": "8de597aaa0579156990513f6c3f4f014", "score": "0.78758895", "text": "protected function createController()\r\n {\r\n $this->geamGenerate('controller');\r\n }", "title": "" }, { "docid": "f8b7b5a53a5586d72cc281608b889e4b", "score": "0.7837234", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('module:controller', [\n 'name' => $controller,\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "fcf4ffc7382d9986feb1910b5bc82392", "score": "0.78074765", "text": "protected function createController()\n {\n $controller = studly_case(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('gen:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--overwrite' => $this->option('overwrite')\n ]);\n }", "title": "" }, { "docid": "f51695fb6049452a2fef7c0ab718ba95", "score": "0.7781493", "text": "protected function createController(): void\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n '--container' => $this->option('container')\n ]));\n }", "title": "" }, { "docid": "15d5429e9249d1a3ab48a87d16d5b6a2", "score": "0.76958287", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "4e344abafb3daad1c379c51f89ef784d", "score": "0.7432941", "text": "protected function makeController()\n {\n $this->handleMeta();\n\n if ($this->filesystem->exists($path = $this->getPath($this->meta['class']))) {\n $confirm = $this->ask('you want to replace your controller ? [y] /', 'N');\n if($confirm == 'y')\n {\n $this->filesystem->delete($path);\n } else {\n return $this->error($this->meta['name'] . ' ' . $this->type . ' is aborded!');\n }\n }\n\n $this->makeDirectory($path);\n\n $this->filesystem->put($path, $this->compileControllerStub());\n\n $this->phpCsFixer->fix($path);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "108dd1a993b29c33d7de679603ad3238", "score": "0.72959983", "text": "protected function createController(): self\n {\n $path = app_path(\"Http/Controllers/{$this->moduleClass}/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/controller');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model controller created');\n\n return $this;\n }", "title": "" }, { "docid": "21f25ba6b5e1b2f9e06f3264d3c16587", "score": "0.7200859", "text": "public function createController(){ if (class_exists($this->controller)){\n $parents = class_parents($this->controller);\n //does the class extend the controller class?\n if (in_array(\"BaseController\", $parents)){\n //does the class contain the requested method?\n if (method_exists($this->controller, $this->action)){\n return new $this->controller($this->action,$this->url_values);\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid action');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid controller');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Controller not existing!');\n }\n }", "title": "" }, { "docid": "78fb141452c021e73d6621a668ecd153", "score": "0.7194267", "text": "protected function makeController() {\n\t\t$cg = new ControllerGenerator($this->files, $this->command);\n\t\t$cg->generate($this->name, $this->schema);\n\t}", "title": "" }, { "docid": "7e5eb92dd3c86131232d7d3ec2291dcf", "score": "0.7039595", "text": "protected function createController()\n {\n $controller = new GuideControllerMock('guide', Yii::$app);\n $controller->interactive = false;\n\n return $controller;\n }", "title": "" }, { "docid": "042b88947ba6fbb7faac82b75f84f463", "score": "0.70082414", "text": "public function getInstance() {\n\n\t\t$class = 'controllers\\\\'.$this->defaultController;\n\n\t\t$this->controllerInstance = Factory::createInstance($class, $this->model);\n\t}", "title": "" }, { "docid": "9b2339223d9d4e08b5a5fdc48a931f54", "score": "0.69759357", "text": "public function createController(){\n\n\t\t\t/**\n\t\t\t * Check if controller class exists\n\t\t\t */\n\n\t\tif(class_exists($this->controller)){\n\t\t\t\n\t\t\t/**\n\t\t\t * Assign an array with the name of the parent classes of the given class.\n\t\t\t */\n\t\t\t\n\t\t\t $parents = class_parents($this->controller);\n\t\t\t \n\t\t\t/**\n\t\t\t * Check if class in question extends controller class\n\t\t\t */\n\n\t\t\tif(in_array(\"Controller\", $parents)){\n\n\t\t\t\t/**\n\t\t\t\t * Check if a controller or action method exists within class \n\t\t\t\t */\n\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * @return object Return a new controller object \n\t\t\t\t\t * @param string The second parameter in the URL\n\t\t\t\t\t * @param array Stores the controller, action and id based on the URL \n\t\t\t\t\t */\n\n\t\t\t\t\treturn new $this->controller($this->action, $this->request,$this->id);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Summary\n\t\t\t\t\t * Method does not exist\n\t\t\t\t\t * \n\t\t\t\t\t * Description\n\t\t\t\t\t * Redirects users to the 404 page if there is no corrosponding method to be called \n\t\t\t\t\t */\n\n\t\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Summary \n\t\t\t\t * Base controller does not exist\n\t\t\t\t * \n\t\t\t\t * Description\n\t\t\t\t * Redirects users to the 404 page if the corrosponding controller does not exist\n\t\t\t\t */\n\n\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t}\n\t\t} else {\n\t\t\n\t\t\t/**\n\t\t\t * Summary\n\t\t\t * Controller class does not exist\n\t\t\t * \n\t\t\t * Description\n\t\t\t * Redirects users to the 404 page if corresponding class does not exist\n\t\t\t */\n\n\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t}\n\t}", "title": "" }, { "docid": "dc15096626e56d54e0cb62f9bc7d69f5", "score": "0.6845808", "text": "public static function create($controllerName)\n {\n $fileName = ucfirst($controllerName) . 'Controller.php';\n $className = \"app\\controllers\\\\\" . ucfirst($controllerName) . 'Controller';\n $filePath = './app/controllers/' . $fileName;\n require_once($filePath);\n if (!class_exists($className)) {\n throw new Exception(\"Class $className not founded!\");\n }\n return new $className();\n }", "title": "" }, { "docid": "89733bc05db4f3c92b8f4c437e9c1340", "score": "0.68361187", "text": "function &createInstance($controller)\n\t{\n\t\tatkdebug(\"atkcontroller::createInstance() \".$controller);\n\t\t//First check if another controller is active. If so make sure this\n\t\t//controller will use atkOutput to return output\n\t\t$currentController = atkController::getInstance();\n\t\tif(is_object($currentController))\n\t\t$currentController->setReturnOutput(true);\n\n\t\t//Now create new controller\n\t\t$controller = &atkController::_instance($controller, true);\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "92898f69b4c66915e6304c974764d7ea", "score": "0.68149567", "text": "public function useController()\n {\n // Require the controller\n require_once('../app/controllers/' . $this->currentController . '.php');\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n }", "title": "" }, { "docid": "9b33775ef28976a2b27da340b07a1696", "score": "0.67380685", "text": "public static function make()\n {\n return new ControllerRequest();\n }", "title": "" }, { "docid": "cdaabb3243a1bb88c50cae3e7294116f", "score": "0.67047995", "text": "public function create()\n {\n // Estou utilizando uma outra tela de seleção ou cliente ou colaborador em AuxController\n }", "title": "" }, { "docid": "04479fb63153ae993154803f188d897b", "score": "0.66272587", "text": "private function setController(){\n $this->controller = new \\PlaceToPay\\Http\\Controllers\\TypePersonController;\n }", "title": "" }, { "docid": "0898017955242f243f6c338b98925715", "score": "0.6617061", "text": "public static function instanceController(string $contoller) : object\n {\n $objContoller = \"App\\\\Controllers\\\\\" . $contoller;\n\n return new $objContoller;\n }", "title": "" }, { "docid": "0488e0fc3eb4fd3d3976b169952b3afe", "score": "0.65683293", "text": "public function loadController()\n {\n //create Crontroler name\n $name = $this->request->controller . \"Controller\";\n $file = ROOT . 'Controllers/' . $name . '.php';\n\n if (!file_exists($file)) {\n header(\"HTTP/1.1 404 Not Found\");\n exit();\n }\n\n //require class\n require($file);\n\n //initiate class\n $controller = new $name();\n\n return $controller;\n }", "title": "" }, { "docid": "1c558ee9e298d7548b802de6c1fa2ed3", "score": "0.65385497", "text": "protected function createController($params)\n {\n $currentPath = $this->container->get('app.context')->getModules($this->module);\n $modulesPath = $this->container->get('app.context')->getModulesPath();\n $namespace = substr($currentPath, strlen($modulesPath));\n //creo el nombre del controlador con el sufijo Controller\n $controllerName = $this->contShortName . 'Controller';\n //uno el namespace y el nombre del controlador.\n $controllerClass = str_replace('/', '\\\\', $namespace . 'Controller/') . $controllerName;\n\n try {\n $reflectionClass = new ReflectionClass($controllerClass);\n } catch (\\Exception $e) {\n throw new NotFoundException(sprintf(\"No exite el controlador \\\"%s\\\" en el Módulo \\\"%sController/\\\"\", $controllerName, $currentPath), 404);\n }\n\n $this->controller = $reflectionClass->newInstanceArgs(array($this->container));\n $this->setViewDefault($this->action);\n\n return array($this->controller, $this->action, $params);\n }", "title": "" }, { "docid": "287e73ab51ae5f5ed5433fe3f9e9dcff", "score": "0.6526465", "text": "public function getController() {\n $page = $this->getPage();\n switch ($page) {\n case \"overview\":\n return new OverviewController();\n \n case \"addDummy\":\n default:\n return new OverviewController();\n \n }\n \n \n }", "title": "" }, { "docid": "1636e8507ca192826ee2c865e5e860a8", "score": "0.64963824", "text": "protected function createApiController(): self\n {\n $path = app_path(\"Http/Controllers/Api/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/apiController');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model API controller created');\n\n return $this;\n }", "title": "" }, { "docid": "ab6766860342aa37180e4292ff6e8cfa", "score": "0.6486022", "text": "protected function createController( $controllerName ) {\n\t\t$factory = $this->getFactory();\n\n\t\treturn $factory->createController(\n\t\t\t$controllerName,\n\t\t\t$this->getRequest(),\n\t\t\t$this->getResponse(),\n\t\t\t$this->renderer,\n\t\t\t$this->context\n\t\t);\n\t}", "title": "" }, { "docid": "ea3d1242a35f89fa036c9d15fc71bee1", "score": "0.6478574", "text": "private function generateController()\n {\n // Figure out the naming\n $controller = Str::plural(ucfirst($this->argument('model')));\n $path = 'app/Http/Controllers/Admin/'.$controller.'.php';\n $file = base_path().'/'.$path;\n\n // Copy the stub over\n if (!file_exists(dirname($file))) {\n mkdir(dirname($file), 0744, true);\n }\n if (file_exists($file)) {\n return $this->comment('Controller already exists: '.$path);\n }\n file_put_contents($file, str_replace('{{controller}}', $controller, file_get_contents($this->stubs.'/controller.stub')));\n $this->info('Controller created: '.$path);\n }", "title": "" }, { "docid": "c88508a31c4f7137cb1f32863e76ff2f", "score": "0.64593387", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n\n $organizationId = $GLOBALS['DS_CONFIG']['organization_id'];\n\n // Call the worker method\n $results = CreateNewUserService::addActiveUser(\n $organizationId,\n $this->args[\"envelope_args\"],\n $this->clientService);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new user\",\n \"Admin API data response output:\",\n \"Results from Users:createUser:\",\n json_encode(($results->__toString()))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "97aa4f9f04258807de5b92717b3203a6", "score": "0.6453595", "text": "public function testCreateController()\n {\n $router = new Route('stdclass', 'stdClass');\n\n $controllerClass = $router->createController();\n\n $this->assertEquals('stdClass', get_class($controllerClass));\n }", "title": "" }, { "docid": "da43cde9358641e0b19a7ba29a51735d", "score": "0.6391873", "text": "private function getController()\n {\n return $this->buildMockedController(ConsoleController::class, [$this->config]);\n }", "title": "" }, { "docid": "94707d8abdcdfd2ec282538b44f008c7", "score": "0.6383847", "text": "private function getControllerInstance()\r\n {\r\n if (!class_exists($this->request->getClass()))\r\n {\r\n throw new NotFoundException('404 Not Found!');\r\n }\r\n $class = $this->request->getClass();\r\n return new $class($this->request, $this->response);\r\n }", "title": "" }, { "docid": "d4dd9e84a5f86fc7490df8e54abdd41b", "score": "0.63834715", "text": "protected function getControllerInstance($controllerClassName, Trace $trace)\n\t{\n\t\treturn new $controllerClassName;\n\t}", "title": "" }, { "docid": "16c77d99cc459739e4bbd5af7508ae2b", "score": "0.6378039", "text": "public function __construct() {\n $module = routing::getModule();\n $action = routing::getAction();\n\n // Require controller class\n require_once \"controller/${module}.php\";\n\n $controllerName = $module . 'Controller';\n if (empty($action))\n $action = $controllerName::$defaultAction;\n\n $actionName = $action . 'Action';\n\n $controller = new $controllerName();\n $controller->$actionName();\n }", "title": "" }, { "docid": "e32b447ea14c9d53dbcf5806204eb746", "score": "0.6364178", "text": "public function initController()\n {\n $controllerNamespace = $this->buildControllerNamespace();\n $this->setParam('namespace', $controllerNamespace);\n\n // throw exception if no controller class found\n if (!class_exists($controllerNamespace)) {\n throw new \\RuntimeException(sprintf('Controller [%s] not found.', $controllerNamespace), 404);\n }\n\n // check if controller class has parent controller\n if (!isset(class_parents($controllerNamespace)[Controller::class])) {\n throw new \\RuntimeException('Controller must be extending the base controller!', 400);\n }\n\n return new $controllerNamespace($this->app);\n }", "title": "" }, { "docid": "517474f51db4ded3ec6a0be8664dbfec", "score": "0.63458043", "text": "public function create(ServerRequestInterface $request): Controller\n {\n $className = $this->getControllerClass($request);\n if ($className === null) {\n throw $this->missingController($request);\n }\n\n $reflection = new ReflectionClass($className);\n if ($reflection->isAbstract()) {\n throw $this->missingController($request);\n }\n\n // If the controller has a container definition\n // add the request as a service.\n if ($this->container->has($className)) {\n $this->container->add(ServerRequest::class, $request);\n $controller = $this->container->get($className);\n } else {\n $controller = $reflection->newInstance($request);\n }\n\n return $controller;\n }", "title": "" }, { "docid": "2100d1d61085d0aef23e02de10164076", "score": "0.6302885", "text": "public static function &instance() {\n\t\tif(self::$instance === nil) {\n\t\t\t// Routing has been completed\n\t\t\tEvent::run('system.post_routing');\n\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Log the current routing state for debugging purposes\n\t\t\tEight::log('debug', 'Routing \"'.Router::$current_uri.'\" using the \"'.Router::$current_route.'\" route, '.Router::$controller.'::'.Router::$method);\n\n\t\t\ttry {\n\t\t\t\t// Start validation of the controller\n\t\t\t\t$class = new ReflectionClass('Controller_'.ucfirst(Router::$controller));\n\t\t\t} catch(ReflectionException $e) {\n\t\t\t\t// Controller does not exist\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\n\t\t\tif($class->isAbstract() OR (IN_PRODUCTION AND $class->getConstant('ALLOW_PRODUCTION') == FALSE)) {\n\t\t\t\t// Controller is not allowed to run in production\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\t\t\t// Run system.pre_controller\n\t\t\tEvent::run('system.pre_controller');\n\n\t\t\t// Create a new controller instance\n\t\t\t$controller = $class->newInstance();\n\n\t\t\t// Controller constructor has been executed\n\t\t\tEvent::run('system.post_controller_constructor');\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Load the controller method\n\t\t\t\t$method = $class->getMethod(Router::$method);\n\n\t\t\t\t// Method exists\n\t\t\t\tif(Router::$method[0] === '_') {\n\t\t\t\t\t// Do not allow access to hidden methods\n\t\t\t\t\tEvent::run('system.404');\n\t\t\t\t}\n\n\t\t\t\tif($method->isProtected() or $method->isPrivate()) {\n\t\t\t\t\t// Do not attempt to invoke protected or private methods\n\t\t\t\t\tthrow new ReflectionException('protected controller method');\n\t\t\t\t}\n\n\t\t\t\t// Default arguments\n\t\t\t\t$arguments = Router::$arguments;\n\t\t\t} catch (ReflectionException $e) {\n\t\t\t\t// Use __call instead\n\t\t\t\t$method = $class->getMethod('__call');\n\n\t\t\t\t// Use arguments in __call format\n\t\t\t\t$arguments = array(Router::$method, Router::$arguments);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// Stop the controller setup benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Start the controller execution benchmark\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t\t\n\t\t\t// We MAY want to prevent a method from running sometimes\n\t\t\tif(Eight::$run_method) {\n\t\t\t\t// Execute the controller method\n\t\t\t\t$method->invokeArgs($controller, $arguments);\n\t\t\t}\n\t\t\t\n\t\t\t// Controller method has been executed\n\t\t\tEvent::run('system.post_controller');\n\n\t\t\t// Stop the controller execution benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t}\n\n\t\treturn Eight::$instance;\n\t}", "title": "" }, { "docid": "387dfa2364e9a29d5cddaf3d655d83da", "score": "0.6294272", "text": "static function create_controller($controller, $action){\n\n\t\t$application = Router::get_active_app();\n\n\t\t$interactive_message = \"Est&aacute; tratando de acceder a un controlador que no existe.\n\t\tKumbia puede codificarlo por usted:\n\t\t<form action='\".KUMBIA_PATH.\"$application/builder/create_controller/$controller/$action' method='post'>\n\t\t <table>\n\t\t \";\n\t\t\t$db = db::raw_connect();\n\t\t\tif($db->table_exists($controller)){\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' checked name='kind' value='standardform'></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t} else {\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='applicationcontroller'></td>\n\t\t\t\t<td>Deseo crear un controlador ApplicationController</td>\n\t\t\t\t</tr>\";\n\t\t\t\t$interactive_message.=\"\n\t\t\t\t<tr>\n\t\t\t\t<td><input type='radio' name='kind' value='standardform'/></td>\n\t\t\t\t<td>Deseo crear un controlador StandardForm de la tabla '$controller'</td>\n\t\t\t\t</tr>\";\n\t\t\t}\n\n\t\t$interactive_message.=\"</table>\n\t\t\".submit_tag(\"Aceptar\").\"\n\t\t<a href='#' onclick='this.parentNode.style.display=\\\"\\\"; return false'>Cancelar</a>\n\t\t</form>\";\n\t\tFlash::interactive($interactive_message);\n\t}", "title": "" }, { "docid": "d5ceecf6fad8f2ccff9081ad1d56ae16", "score": "0.6285556", "text": "function loadController(){\n\t\t$name = ucfirst($this->request->controller).'Controller';\n\t\t//inclure le controller\n\t\t$file = ROOT.DS.'controller'.DS.$name.'.php';\n\t\trequire $file;\n\t\treturn new $name($this->request);\n\t}", "title": "" }, { "docid": "5c05f088152db433195daf3c030a54d1", "score": "0.62818384", "text": "public function getController() {\r\n $sController = ucfirst(strtolower((string) $this->_aRequest['controller']));\r\n\r\n try {\r\n # Are extensions for existing controllers available? If yes, use them.\r\n if (EXTENSION_CHECK && file_exists(PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n # There are no extensions, so we use the default controllers\r\n elseif (file_exists(PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Core\\controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n else {\r\n # Bugfix: Fix exceptions when upload file is missing\r\n if($sController && substr(strtolower($sController), 0, 6) !== 'upload')\r\n throw new AdvancedException('Controller not found:' . PATH_STANDARD .\r\n '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php');\r\n }\r\n }\r\n catch (AdvancedException $e) {\r\n AdvancedException::reportBoth($e->getMessage());\r\n Helper::redirectTo('/errors/404');\r\n }\r\n\r\n $this->oController->__init();\r\n return $this->oController;\r\n }", "title": "" }, { "docid": "3fcfa161f92f28bd234dcec8544a9fec", "score": "0.62801427", "text": "public function controller()\n {\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && !class_exists($this->controller)\n ) {\n throw new Exception\\InvalidControllerException(sprintf(\n 'Invalid controller specified: \"%s\"',\n $this->controller\n ));\n }\n\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && class_exists($this->controller)\n ) {\n $controller = $this->controller;\n $this->controller = new $controller;\n }\n\n if (!is_callable($this->controller)) {\n $controller = $this->controller;\n if (is_array($controller)) {\n $method = array_pop($controller);\n $controller = array_pop($controller);\n\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n\n $controller .= '::' . $method;\n }\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n throw new Exception\\InvalidControllerException(sprintf(\n 'Controller \"%s\" is not callable',\n $controller\n ));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "0a49ceeeb394c1f64b577a12ec7b92c1", "score": "0.6273928", "text": "public function createController($pi, array $params)\n {\n $depends = include __DIR__ . '/depends.php';\n $container = new \\phpList\\plugin\\Common\\Container($depends);\n $page = isset($params['page']) ? $params['page'] : $params['p'];\n $class = 'phpList\\plugin\\\\' . $pi . '\\\\Controller\\\\' . ucfirst($page);\n\n return $container->get($class);\n }", "title": "" }, { "docid": "e671f00890c8be49fcae1a0780c34135", "score": "0.62208194", "text": "public function __construct() {\n $url = $this->getUrl();\n //Check if file controller exists based on the URL from the controllers directory\n if ( file_exists('../app/controllers/' . ucwords($url[0]) . '.php') ) {\n //If controller exists, update the currentController \n $this->currentController = ucwords($url[0]); \n //unset $url[0] - Controller Name\n unset($url[0]);\n }\n // else {\n // die(\"Invalid Controller!\");\n // }\n\n //Require the controller file\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n //Instantiate a New Controller Class\n $this->currentController = new $this->currentController;\n\n //Check for the second parameter/part of the URL (i.e. the method name)\n if ( isset($url[1]) ) {\n //Check if the method exists in the controller class\n if ( method_exists($this->currentController, $url[1]) ) {\n $this->currentMethod = $url[1];\n //unset the $url[1] - Method Name\n unset($url[1]);\n }\n }\n\n //Retrieve the remaining parameters/parts of the URL\n $this->params = $url ? array_values($url) : []; \n \n //Call a callback method with parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "b81aded60c440070a5eb67bf0591100f", "score": "0.6218608", "text": "private function setController()\n {\n // Create controller object\n $this->controller = new Controller($this->app);\n\n // Sitewide feed\n $this->app->match('/spaceapi/spacestate.json', array($this->controller, 'spaceapifeed'));\n\n $this->app->match('/spaceapi/spacestate', array($this->controller, 'spaceState'));\n \n $this->app->match('/spaceapi/togglestate', array($this->controller, 'toggleState'));\n \n }", "title": "" }, { "docid": "98c9023bfaf44016718eadd203b5f0e0", "score": "0.61966085", "text": "public function useController()\n {\n $args = func_get_args();\n \n // First args is always used as Controller\n $controller = $args[0];\n $real_controller = explode('@', $controller);\n \n // Other args\n $other_args = [];\n for($i = 1; $i < count($args); $i++) {\n array_push($other_args, $args[$i]);\n }\n\n $class = '\\App\\Controller\\\\' . $real_controller[0];\n $object = new $class();\n $method = $real_controller[1];\n \n if(is_array($other_args)) {\n if(count($other_args) > 0) {\n $object->$method($other_args[0]);\n } else {\n $object->$method();\n }\n }\n }", "title": "" }, { "docid": "731ac4c132b25d11301cccf4581844c3", "score": "0.6176733", "text": "public static function create($router): Controller\n {\n /*\n * --------------------------------------------------------------\n * Ensure the controller file exists and import it.\n * --------------------------------------------------------------\n */\n if (file_exists($router->controllerFile)) {\n require_once $router->controllerFile;\n } else {\n $errMsg = \"Error:: No such controller {$router->controllerFile}\";\n \n throw new InvalidControllerException($errMsg);\n }\n\n // Create and return the instance of the controller class.\n return new $router->controllerClass();\n }", "title": "" }, { "docid": "8c7cfdeefe313f21055cc79a19287760", "score": "0.6144564", "text": "public function controller($controller, $namespace = 'kake', $new = true)\r\n {\r\n if (!strpos($controller, 'Controller')) {\r\n $controller = Helper::underToCamel($controller, false, '-') . 'Controller';\r\n }\r\n $class = '\\service\\controllers\\\\' . $namespace . '\\\\' . $controller;\r\n\r\n if (!$new) {\r\n return $class;\r\n }\r\n\r\n return Helper::singleton(\r\n $class,\r\n function () use ($class) {\r\n return new $class($this->id, $this->module);\r\n }\r\n );\r\n }", "title": "" }, { "docid": "cb84ae4c83e83c46d1d108dcf04a24ce", "score": "0.61302066", "text": "public function __construct(){\n // print_r($this->getUrl());\n\n $url = $this->getUrl();\n\n // Look in controllers for the first value.\n // Checks the controller folder for a php file corresponding to\n // the first parameter.\n // Using ucwords to ensure the file is uppercase, as is standard.\n if(file_exists('../app/controllers/' . ucwords($url[0]) . '.php')){\n\n // If there is such a controller, make it the current one.\n $this->currentController = ucwords($url[0]);\n // After it becomes the new current controller, remove it from the url array.\n unset($url[0]);\n }\n\n // Require the controller.\n // This will be the pages controller or the controller specified through\n // url parameters.\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n // Instantiate controller.\n $this->currentController = new $this->currentController;\n\n // Check for second part of url.\n if(isset($url[1])){\n // Check to see that the second part of the url corresponds to an existing method.\n if(method_exists($this->currentController, $url[1])){\n // If it does exist, make it the current method.\n // If it doesn't, the default is set to index.\n $this->currentMethod = $url[1];\n\n // After it becomes the current method, unset it from url.\n unset($url[1]);\n }\n }\n\n // Grab all url parameters.\n // If url is set / truthy, make params an array consisting of\n // the values of the url array; if it isn't, make it an empty array.\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of params.\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "2442b08fad23aff7f41270d840a240d2", "score": "0.605339", "text": "public function create()\n {\n \n return view(\"lib.class.create\");\n }", "title": "" }, { "docid": "8fbb13394eda19ac9d0420040ddd7d75", "score": "0.6047089", "text": "public function getController(string $name, string $file):object\n {\n require($file);\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "c8b8280d386722b5546abb5d71a512d6", "score": "0.6044492", "text": "function Controller()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "0a59aa930ba57fab18dfc2dff054e452", "score": "0.60213554", "text": "protected function instantiateController($controllerName)\n {\n $reflection = new \\ReflectionClass($controllerName);\n $construct = $reflection->getConstructor();\n\n if (! $construct) {\n return $reflection->newInstance();\n }\n\n $parameters = $construct->getParameters();\n $list = $this->createArgumentList($parameters);\n\n return $reflection->newInstanceArgs($list);\n }", "title": "" }, { "docid": "9481f13fa63b576059207e8eaf51880d", "score": "0.5999503", "text": "private function getControllerInstance(array $getVariables): AbstractController\n {\n if (!isset($getVariables[\"controller\"])) {\n $this->redirectToNotFoundPage();\n }\n\n $controllerName = sprintf('App\\Controller\\%sController', ucfirst($getVariables[\"controller\"]));\n\n if (!class_exists($controllerName)) {\n $this->redirectToNotFoundPage();\n }\n\n return new $controllerName();\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "d8c829809cbdf130ab92e281f35b25eb", "score": "0.5979808", "text": "public function __construct() {\n\t\t$url = $this->_parseUrl();\n\n\t\n\t\t// load new controller\n\t\tif (isset($url[0])) {\n\t\t\tif (file_exists('app/controllers/' . $url[0]. '.class.php')) {\n\t\t\t\t$this->_controller = $url[0];\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequire_once('app/controllers/' . $this->_controller. '.class.php');\n\t\t// load new method\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->_controller, $url[1])) {\n\t\t\t\t$this->_method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\n\t\t// $this->_params\n\t\tcall_user_func_array([new $this->_controller, $this->_method], $this->_params);\n\t}", "title": "" }, { "docid": "65828625ca45d10e3909226e85865d56", "score": "0.5975392", "text": "public static function build($type, $domain, $api_key) {\n $base_url = sprintf('https://%s.chargify.com', $domain);\n\n // Set the response format through the header.\n $header = array(\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json'\n );\n\n // Add the same basic authentication to all requests.\n $basicAuth = new CurlAuthPlugin($api_key, 'x');\n\n $client = new Client($base_url);\n $client->addSubscriber($basicAuth);\n $client->setDefaultHeaders($header);\n\n $class_name = 'Chargify\\\\Controller\\\\' . ucfirst($type);\n\n if (class_exists($class_name)) {\n return new $class_name($client);\n }\n else {\n throw new Exception(\"Invalid controller type given.\");\n }\n }", "title": "" }, { "docid": "eb638069425c512d39710e5206dcf272", "score": "0.59658927", "text": "public static function Factory($requireLogin=true) {\n\t\t$router = RouteParser::Instance();\n\t\tif($router->Dispatch('controller') !== null) {\n\t\t\t$classname=ucfirst(strtolower($router->Dispatch('controller'))).'Controller';\n\t\t\tif(class_exists($classname)) {\n\t\t\t\t$controller=$classname;\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\n\t\t$controller = 'IndexController';\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "647393b5810a52045e873d92c1fe2379", "score": "0.59586406", "text": "public function __construct(\\KubernetesController\\Controller $controller)\n {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "3b3aaf093f2d48490ac4d219b2f6dc6e", "score": "0.59431434", "text": "public function testMakingAControllerWithoutModulesInitialised () : void\n {\n $controller = \"NewController\";\n $this->artisan(\"make:controller\", [\"name\" => $controller]);\n\n // I should have a controller in my app dir\n $this->assertTrue(class_exists(\"App\\\\Http\\\\Controllers\\\\$controller\"));\n $this->assertTrue(is_file(app_path(\"Http/Controllers/$controller.php\")));\n unlink(app_path(\"Http/Controllers/$controller.php\"));\n }", "title": "" }, { "docid": "1316384d618ee7fabd2c40454d82a9d3", "score": "0.5938563", "text": "public function __construct()\n {\n $this->controller = $this->controllersPath . $this->controller;\n }", "title": "" }, { "docid": "c58c3789f04ea2a11ec8577816069a98", "score": "0.5936409", "text": "protected function getSymfonyCmfCreate_Rest_ControllerService()\n {\n return $this->services['symfony_cmf_create.rest.controller'] = new \\Symfony\\Cmf\\Bundle\\CreateBundle\\Controller\\RestController($this->get('fos_rest.view_handler'), $this->get('symfony_cmf_create.object_mapper'), $this->get('symfony_cmf_create.rdf_type_factory'), $this->get('symfony_cmf_create.rest.handler'), 'IS_AUTHENTICATED_ANONYMOUSLY', NULL);\n }", "title": "" }, { "docid": "23422a0a7a4de2549e5b09a4170de8e5", "score": "0.5921801", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "059426939ad1ae81474d9e1d3537741c", "score": "0.59128374", "text": "function __construct(){\n\t\t$url = $this->url();\n\n\t\t//[0] => 'Controller'\n\t\t//[1] => 'Method'\n\t\t//[2~] => 'Param'\n\t\tif (!empty($url)) {\n\t\t\tif (file_exists(ROOT_CONTROLLER_FOLDER . $url[0] . \".php\")) {\n\t\t\t\t$this->controller = ucwords($url[0]);\n\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\tdie(\"Controller \" . $url[0] . \" is not found on \" . ROOT_CONTROLLER_FOLDER);\n\t\t\t}\n\t\t}\n\t\t// @Include controller file\n\t\trequire_once ROOT_CONTROLLER_FOLDER . $this->controller . \".php\";\n\n\t\t$this->controller = new $this->controller;\n\t\t\n\n\t\t/**\n\t\t * Check method availability.\n\t\t */\n\t\tif (isset($url[1]) && !empty($url[1]) ) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}else {\n\t\t\t\tdie(\"Method is not found\");\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check Parameters availability.\n\t\t */\n\t\tif (isset($url)) {\n\t\t\t$this->param = $url;\n\t\t} else {\n\t\t\t$this->param = [];\n\t\t}\n\n\t\tcall_user_func_array([\n\t\t\t$this->controller,\n\t\t\t$this->method\n\t\t], $this->param);\n\n\n\t}", "title": "" }, { "docid": "d46a35c396e6b6a6b021a81aa51a8db7", "score": "0.59083337", "text": "static private function _getInstanceController()\n {\n if (!isset($_GET['controller'])) {\n $rout[0] = 'default';\n } else {\n $rout = explode('_', $_GET['controller']);\n }\n\n if (count($rout) == 1) {\n $rout[1] = 'index';\n }\n\n $controllerName = self::getConfig('controllers/' . $rout[0]);\n\n $controllerPuth = self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR .\n $controllerName . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . ucfirst($rout[1]) . 'Controller.php';\n\n if (!file_exists($controllerPuth)) {\n throw new Exception(sprintf('Controller %s not found', $controllerPuth));\n }\n\n require_once $controllerPuth;\n\n self::$autoloader->loadClassModule(self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $controllerName);\n\n $classController = $controllerName . '_Controller_' . ucfirst($rout[1]) . 'Controller';\n\n if (!class_exists($classController)) {\n throw new Exception(sprintf('File has been loaded but class %s not found', $classController));\n }\n\n new $classController;\n\n return true;\n }", "title": "" }, { "docid": "5830efbd2e7f9bdbe6c206569736bbaa", "score": "0.5871468", "text": "function get_instance() {\n return NX_framework\\NX_core\\Controller\\Controller::$instance;\n}", "title": "" }, { "docid": "628c659bcc4935d910c129eddf186721", "score": "0.586621", "text": "public function controller() {\n\t\t// starting session\n\t\tsession_cache_limiter(false);\n\t\tsession_start();\n\n\t\t// load configs\t\t\n\t\trequire_once 'config/envconfig.php';\n\t\t$this->salt = $salt;\n\n\t\t// set timezone\n\t\tdate_default_timezone_set($timezone);\n\t\t\n\t\t// composer autoload\n\t\trequire 'vendor/autoload.php';\n\n\t\t// blade parameter\n\t\trequire 'lib/MyBlade.php';\n\t\t$this->blade = new \\Lib\\MyBlade('view', 'cache');\n\t\t$blade =& $this->blade;\n\n\t\t$this->app = new \\Slim\\Slim(\n\t\t\tarray(\n\t\t\t\t'debug'\t=> $debug\n\t\t\t)\n\t\t);\n\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// custom 404\n\t\t$this->app->notFound(function() {\n\t\t\tprint $this->load_view('404', array('request' => $_SERVER['REQUEST_URI']));\n\t\t});\n\t\t$this->app->error(function($e) {\n\t\t\tprint $this->load_view('500', array('message' => 'Something went WRONG!'));\n\t\t});\n \n\t\t\n\t\t// auto load library\n\t\tspl_autoload_register(function($class) {\n\t\t\t$file = 'lib/' . str_replace('Lib\\\\', '', $class) . '.php';\n\t\t\tif (is_file($file)) {\n\t\t\t\trequire_once $file;\n\t\t\t\tclearstatcache();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// load semua controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file)) {\n\t\t\t\trequire('controller/' . $file);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "dcb3eebd33f194cf731d832d0b9ffcde", "score": "0.5861673", "text": "public function __construct ()\n\t{\n\t\t$this->_controller = new \\Game\\Controller\\CLI();\n\n\t\treturn parent::__construct();\n\t}", "title": "" }, { "docid": "a89295eabd6a2a5d5c1031a0c3e9f486", "score": "0.5857453", "text": "public function createAction() {\n echo \"create action called in IndexController!\";\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5853714", "text": "public function create() {}", "title": "" }, { "docid": "cf5956d060b3cd6791e40d4fbe4cf572", "score": "0.5840165", "text": "public static function create() {\n\n }", "title": "" }, { "docid": "f142db9abeddee3cfd3e6581465a3581", "score": "0.5839", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\sigridjonsson\\Controller\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "d87d1c2be0687b35dfeabfeb797b84b3", "score": "0.58357793", "text": "public function controllerFactory($sType)\n {\n $sDriver = Controller::driver($sType);\n\n if (!isset(self::$hControllerList[$sDriver]))\n {\n self::$hControllerList[$sDriver] = Controller::factory($sType, $this);\n }\n\n return self::$hControllerList[$sDriver];\n }", "title": "" }, { "docid": "5677ae0bc9a4abce52974f59f8374f0a", "score": "0.5831372", "text": "private static function get_controller(string $controller_name): controller {\n // Sanity check on input\n if (!preg_match('#^[a-z_]+$#', $controller_name)) {\n throw new \\Exception('Invalid controller name');\n }\n\n // Work out what the namespace should be\n $namespace = substr(controller::class, 0, strrpos(controller::class, '\\\\'));\n\n // Class name should then be this\n $controller_class = \"{$namespace}\\\\{$controller_name}\";\n\n if (!class_exists($controller_class)) {\n throw new \\Exception('Controller not found');\n }\n\n return new $controller_class();\n }", "title": "" }, { "docid": "8ef61d4368a4fd8ac2a169e035ea54fc", "score": "0.58311236", "text": "public function __construct()\n {\n $uri = Helpers::parseURI();\n\n // Provera da li postoji datoteka sa prosleđenim imenom kontrolera\n $controllerName = isset($uri[0]) ? ucwords($uri[0]) . 'Controller' : '';\n if (isset($uri[0]) && !empty($uri[0]) && file_exists('./app/Controllers/' . $controllerName . '.php')) {\n $this->controller = 'Controllers\\\\' . $controllerName;\n unset($uri[0]);\n }\n\n\n $this->controller = new $this->controller();\n\n // klasa kontrolera prošla metod akcije\n if (isset($uri[1])) {\n $actionName = $uri[1] . 'Action';\n if (method_exists($this->controller, $actionName)) {\n $this->method = $actionName;\n unset($uri[1]);\n }\n }\n\n // Ostali URI parametri\n if ($uri) {\n $this->params = array_values($uri);\n }\n\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "e52216e4b015f524478ae0d0925abb91", "score": "0.5827566", "text": "function controller($params) {\n\t\tinclude \"controllers/\". $params[0] .\".php\";\n\t\tif(!class_exists($params[0], false))\n\t\t\texit(\"Class $params[0] not found\");\n\t\t$controller = new $params[0];\n\t\t// Getting and checking a method\n\t\tif(!method_exists($controller, $params[1]))\n\t\t\texit(\"Method $params[1] not found\");\n\t\t$method = (string)$params[1];\n\t\t// Method call\n\t\treturn $controller->$method();\n\t}", "title": "" }, { "docid": "cf9fb0175486f049acbbeacb66ba609d", "score": "0.58206075", "text": "public function create()\n {\n return view('create_class');\n }", "title": "" }, { "docid": "1e3942d1624faaef51ef5898f15c256f", "score": "0.5820016", "text": "protected function createControllerContext(): ControllerContext\n {\n $httpRequest = new ServerRequest('POST', 'http://localhost');\n $request = ActionRequest::fromHttpRequest($httpRequest);\n $response = new ActionResponse();\n $arguments = new Arguments([]);\n $uriBuilder = new UriBuilder();\n $uriBuilder->setRequest($request);\n\n return new ControllerContext($request, $response, $arguments, $uriBuilder);\n }", "title": "" }, { "docid": "d2d2ffec2eda0b4360fd77907456cea6", "score": "0.58197916", "text": "public function getController($actionConfig = [])\n {\n return new TestController('test', Yii::$app, ['layout' => false, 'actionConfig' => $actionConfig]);\n }", "title": "" }, { "docid": "e01af9b3b9b704e2fbe81830282d9589", "score": "0.58087105", "text": "public function __construct($controller)\n {\n $this->controller = $controller;\n }", "title": "" }, { "docid": "ed4af23c1232a43dcdd34336637d19ab", "score": "0.58060294", "text": "public static function getControllerInstance($class, $request, $response, array $invokeArgs = array())\n {\n return new $class($request, $response, $invokeArgs);\n }", "title": "" }, { "docid": "6a79d5243c6c93538391cd7ed64b2424", "score": "0.5803797", "text": "public function __loadController($_controllerName)\n\t{\n\t\t$_controllerName\t=\tstr_replace(\"/\", \"\", \"\\controllers\\/\".strtolower($_controllerName));\n\t\treturn\tnew $_controllerName();\n\t}", "title": "" }, { "docid": "519c12b1c73f4a2e417d7f14eb7d9e74", "score": "0.5801946", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "ae788f542c25e47565ab4df20b8d09e3", "score": "0.5787671", "text": "private function _loadExistingController() {\n\n $file = $this->_controllerPath . $this->_url[0] . '.php';\n\n if( file_exists( $file ) ) {\n\n include $file;\n\n $this->_controller = new $this->_url[0]();\n\n } else {\n\n $this->_error();\n\n return false;\n\n }\n\n return $this;\n\n }", "title": "" }, { "docid": "fcf52de01d6330d2148d874e7010d4e3", "score": "0.57817113", "text": "function __construct() {\r\n\r\n $url = rtrim($_GET['url'], '/');\r\n $url = explode('/', $url);\r\n $counter = 0;\r\n $indexer = 0;\r\n $args = null;\r\n foreach ($url as $index) {\r\n if ($counter > 1) {\r\n $args[$indexer] = $index;\r\n $indexer++;\r\n }\r\n $counter++;\r\n }\r\n\r\n /*\r\n * Checking if any controller request has been made through the url[0] or not. if not\r\n * then the default controller will be excuted.\r\n * \r\n */\r\n\r\n if (isset($url[0])) {\r\n \r\n $file = 'controllers/' . $url[0] . '.php';\r\n if (file_exists($file)) {\r\n require $file;\r\n $app = new $url[0]();\r\n if (isset($url[1])) {\r\n if (method_exists($app, $url[1])) {\r\n $app->{$url[1]}($args);\r\n } else {\r\n error::error_handler(\"No such Method found\");\r\n }\r\n } else {\r\n if (method_exists($app, 'index')) {\r\n $app->index();\r\n }\r\n }\r\n } else {\r\n error::error_handler(\"No such controller\");\r\n \r\n }\r\n \r\n } else {\r\n echo \"Default controller\";\r\n }\r\n }", "title": "" }, { "docid": "ba64e44da499c249386142425288e474", "score": "0.577916", "text": "private function &__getController() {\n\n require_once('app/app_controller.php');\n\n\n $controller = false;\n $ctrlClass = $this->__loadController($this->params);\n if (!$ctrlClass) {\n return $controller;\n }\n $ctrlClass .= 'Controller';\n if (class_exists($ctrlClass)) {\n $controller = new $ctrlClass();\n }\n return $controller;\n }", "title": "" }, { "docid": "0b02ccf0e48ffb267e5e87f286be0016", "score": "0.5778011", "text": "public function __construct() {\n\t\t$url = $this->parseUrl();\n\n\t\tif (file_exists('../app/controllers/'. @$url[0] .'_controller.php')) {\n\t\t\t$this->controller = $url[0];\n\t\t}\n\t\tunset($url[0]);\n\t\trequire_once '../app/controllers/'. $this->controller .'_controller.php';\n\n\t\t$this->controller = new $this->controller;\n//Se verifica si hay una url en la primera pocision del arreglo\n\t\tif (isset($url[1])) {\n\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t}\n\t\t}\n//Una vez usada, se suelta para poder usarla luego nuevamente\n\t\tunset($url[1]);\n\t\t$this->params = $url ? array_values($url) : [];\n\t\tarray_unshift($this->params);\n\n\t\tcall_user_func_array([$this->controller, $this->method], $this->params);\n\t}", "title": "" }, { "docid": "aaf481233643e0c7b6db695f2066b7d3", "score": "0.577622", "text": "public function newInstance($file)\n {\n if (! isset($this->map[$file])) {\n throw new NoClassForController($file);\n }\n\n $class = $this->map[$file];\n return $this->forge->newInstance($class);\n }", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "63608fb0a8185f0dba4738b591092a72", "score": "0.5768055", "text": "public function makeController($controllerName)\n {\n if (is_object($controllerName)) {\n if ($controllerName instanceof Controller) return $controllerName;\n\n throw new InvalidArgumentException($controllerName);\n }\n\n $controller = mezzo()->make($this->controllerClass($controllerName));\n\n if (!($controller instanceof Controller))\n throw new ModuleControllerException('Not a valid module controller.');\n\n return $controller;\n }", "title": "" }, { "docid": "a4cb0faec86988f6db72238544d87fb4", "score": "0.5766777", "text": "public function create()\n {\n return view('fill_in_the_blanks_controllers.create');\n }", "title": "" }, { "docid": "1d605b4e094471a3e951aac2e0125269", "score": "0.57497156", "text": "public function create()\n {\n // create is into HomeController.php -> index-method\n }", "title": "" }, { "docid": "9bdbfd06d3768808b2075f3429c0cc24", "score": "0.5746798", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Kimchi\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "751c588a56325765a0304a2f958fbc66", "score": "0.5738778", "text": "private function useController($controller, $action)\n {\n $controller = ucfirst($controller);\n $controllerName = $controller . 'Controller';\n $controllerObj = new $controllerName($controller, $action);\n }", "title": "" }, { "docid": "b12b6200d5e060e7bd7b86f69f552b8a", "score": "0.57282233", "text": "public static function controller($name) {\n\t\t\t$class_name = Inflector::classify($name);\n\t\t\t$path_name = FileUtils::join(NIMBLE_ROOT, 'app', 'controller', $class_name . 'Controller.php');\n\t\t\t$view_path = FileUtils::join(NIMBLE_ROOT, 'app', 'view', strtolower(Inflector::underscore($class_name)));\n\t\t\tFileUtils::mkdir_p($view_path);\n\t\t\t$string = \"<?php \\n\";\n\t\t\t$string .= \"\t/**\\n\t* @package controller\\n\t*\t*/\\n\";\n\t\t\t$string .= \" class {$class_name}Controller extends Controller { \\n\";\n\t\t\t$string .= self::create_view_functions($view_path);\n\t\t\t$string .= \" }\\n\";\n\t\t\t$string .= \"?>\";\n\t\n\t\t\t$db = fopen($path_name, \"w\");\n\t\t\tfwrite($db, $string);\n\t\t\tfclose($db);\n\t\t}", "title": "" }, { "docid": "8f2c0b2ff8df98756a4bc02976fbb7bb", "score": "0.57256204", "text": "public function create()\n {\n \\Log::info(__FUNCTION__);\n return view('create');\n }", "title": "" }, { "docid": "35c65899b291d521a7b01d096634c798", "score": "0.57226366", "text": "public function __construct()\n {\n // Get root directory and set paths where controllers and views are located.\n $this->root_dir = App::getInstance()->getRootDir();\n $this->controller_path = $this->root_dir.'/app/classes/controllers';\n $this->view_path = $this->root_dir.'/app/views';\n\n /*\n * Reads the controller directory and files and creates a list of controllers with all their public functions\n * and variables.\n */\n $this->loadControllers();\n\n /*\n * Collect class names, public functions, variables, current view and query string from the current route.\n * For example of current URL is http://localhost/my_projects/tests/questions/1/2/?ref=abc the controller is\n * \"tests\", the function is \"questions\", variables is an array [1,2] and query string is \"?ref=abc\". The view\n * is determined by controller, view and path. In this case the view is full path\n * \"/httpdocs/app/views/Tests/questions.php\".\n */\n [$controller, $function, $variables, $view, $query_string] = $this->getRoute();\n\n // Check if the called controller actually exists in the controller list we created before.\n $this->validateController($controller);\n\n // If controller exists, initialize the controller class.\n $this->controller = new $controller();\n\n // Check if the called controller funcion is in the list of the current controller funtions.\n $this->validateFunction($controller, $function);\n\n // If everything was OK, set the other parameters of the current controller.\n $this->function = $function;\n $this->variables = $variables;\n $this->view = $view;\n $this->query_string = $query_string;\n }", "title": "" }, { "docid": "45f768145816fc230db1a31cb6c45e50", "score": "0.57209027", "text": "function loadController()\n {\n /*(FR) On fait passer la première lettre du contrôleur en majuscule\n (EN) We pass the first letter of the controller in capital letters */\n $name = ucfirst($this->request->controller) . 'Controller';\n\n /*(FR) On stocke le PHP de notre contrôleur dans la variable file\n (EN) We store the PHP of our controller in the variable file */\n $file = ROOT . DS . 'controller' . DS . $name . '.php';\n\n /*(FR) On vérifie si le fichier PHP existe et que ce n'est pas un admin prefixe\n (EN) We check if the PHP file exists and that it is not an admin prefix */\n if(!file_exists($file) && $this->request->controller != conf::$admin_prefixe && $this->request->controller !='admin'){\n\n $this->error('Le controller '.$this->request->controller.' n\\'existe pas');\n } \n /*(FR) Si il existe on le charge\n (EN) If it exists we charge it */\n require $file;\n\n /*(FR) On initialise le contrôleur et on lui passe la variable request \n (EN) Initialize the controller and pass it the request variable */\n $controller = new $name($this->request);\n\n /*(FR) Et on retourne notre contrôleur\n (EN) And we return our controller */\n return $controller;\n }", "title": "" }, { "docid": "ea3ca86b2bf105c904277968058737bb", "score": "0.5718793", "text": "public function testNewFrontControllerInstance()\n {\n $this->assertInstanceOf(FrontController::class, new FrontController($this->model, $this->view, $this->controller, '', []));\n }", "title": "" }, { "docid": "73a4152afb1d1664966de39acfa0061e", "score": "0.5715404", "text": "function __construct()\n {\n tmvc::instance($this,'controller');\n \n /* instantiate load library */\n $this->load = new iMVC_Load; \n\n /* instantiate view library */\n $this->view = new iMVC_View;\n }", "title": "" }, { "docid": "b49f42691b054ac525f308cb7c389471", "score": "0.5711729", "text": "protected function bakeController()\n {\n $controllerName = $this->option('controller') ?: $this->argument('name');\n\n $controller = Str::studly(class_basename($controllerName));\n\n $this->call('bake:controller', [\n 'name' => \"{$controller}Controller\",\n ]);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "68f3fa80257f85b02954ae4ca8745d5f", "score": "0.6422112", "text": "public function store(Request $request)\n {\n $req = $request->all();\n if (Validator::make($req,\n [\n 'new_dir' => 'required',\n ])->fails()) return $this->failed(400000);\n if (Validator::make($req,\n [\n 'new_dir' => 'string',\n ])->fails()) return $this->failed(400001);\n\n $resource = new Resource();\n $resource->resource_name = $req['new_dir'];\n $resource->file = false;\n if ($req['current_path']) $resource->path = $req['current_path'];\n if (!$resource->save()) return $this->failed(500001);\n $request->user()->resource()->attach($resource->id);\n return response()->json($resource);\n }", "title": "" } ]
[ { "docid": "d2d5025c41b1d2624f860d8ceab9e2ab", "score": "0.7168782", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->redirect('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "d98a4fb282f0c755f010ee2f5ed4571d", "score": "0.7077314", "text": "protected function save()\n {\n $this->em->persist($this->resource);\n $this->em->flush();\n }", "title": "" }, { "docid": "57d765bdde5c5951746b777b6533d048", "score": "0.69856346", "text": "public function store(StoreResource $request)\n {\n $input = $request->all();\n \n $resource = new Resource;\n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n \n return redirect('resources');\n }", "title": "" }, { "docid": "d952c501b2ff80d2bf8bb35cd4b5c7f7", "score": "0.6660094", "text": "public function store(StoreResource $request)\n {\n $data = request(['title', 'type', 'description', 'link', 'markdown', 'code']);\n \n $user = JWTAuth::parseToken()->authenticate();\n \n $resource = Resource::create([\n 'title' => $data['title'],\n 'type' => $data['type'],\n 'link' => $data['link'],\n 'code' => $data['code'],\n 'markdown' => $data['markdown'],\n 'user_id' => $user['id'],\n ]);\n \n return $resource;\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.66155946", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "de5fc2070d9e5322839836dc750f4b80", "score": "0.6569558", "text": "public function store(StoragesStoreRequest $request)\n {\n $by_id = Auth::user()->id;\n\n $new_storage = Storage::create([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'updated_by' => $by_id,\n 'created_by' => $by_id,\n ]);\n\n return redirect()->route('storages.show', $new_storage->id)->with('information', 'レコードを作成しました。');\n }", "title": "" }, { "docid": "3fbbbe537a186e3aba9885c042be89ee", "score": "0.6486008", "text": "public function create_storage();", "title": "" }, { "docid": "5bfca839729027de5944143fb0dca04f", "score": "0.64471614", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'abstract' => 'required',\n 'content' => 'required',\n 'categories' => 'required|array',\n 'image' => 'required',\n ]);\n\n $resource = Resource::create([\n 'title' => $request->title,\n 'abstract' => $request->abstract,\n 'content' => $request->content,\n 'status' => $request->status,\n 'user_id' => auth()->user()->id,\n ]);\n $resource->categories()->sync($request->categories);\n\n $path = $request->image;\n $image = File::where('file_path', $path)->first();\n $resource->image()->sync($image->id);\n\n $request->session()->flash('flash.banner', 'Recurso creado exitosamente');\n\n return redirect()->route('resource.edit', $resource);\n }", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "634b03751c156f72e00ba740b789cf98", "score": "0.6369132", "text": "public function store()\n\t{\n\t\t//\n\n\n\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
9688be7ea097660965be470f7efe6ce0
Get the resource model file.
[ { "docid": "061dba9143ab9687b12d7f3ca499546c", "score": "0.79268557", "text": "protected function getResourceModelFile() : string\n {\n return $this->getResourceModelDirectory(). DIRECTORY_SEPARATOR . $this->data['class_name'] .'.php';\n }", "title": "" } ]
[ { "docid": "a9232a5405d454d6ef5112d765815311", "score": "0.7421231", "text": "public function getModelFile()\n {\n if (file_exists($this->getFolder() . '/model.php')) {\n return $this->getFolder() . '/model.php';\n }\n return null;\n }", "title": "" }, { "docid": "e067c5f9142133ac3c78f1b913b43357", "score": "0.6984469", "text": "public function getResourceKey(): string\n {\n return 'model';\n }", "title": "" }, { "docid": "731bb804af198e4b3ab0a5237504eff5", "score": "0.6962788", "text": "protected function getResource()\n {\n if (is_resource($this->path)) {\n return $this->path;\n }\n\n if (!$this->isRemoteFile() && !is_readable($this->path)) {\n throw new TelegramSDKException('Failed to create InputFile entity. Unable to read resource: '.$this->path.'.');\n }\n\n return Psr7\\Utils::tryFopen($this->path, 'rb');\n }", "title": "" }, { "docid": "84ee0f77d35dee08710ff078d2afce45", "score": "0.69562083", "text": "public function getResource(): string\n {\n return $this->resource;\n }", "title": "" }, { "docid": "84ee0f77d35dee08710ff078d2afce45", "score": "0.69562083", "text": "public function getResource(): string\n {\n return $this->resource;\n }", "title": "" }, { "docid": "f7d193773dea8aaea5c00a90dfaaad54", "score": "0.68441164", "text": "public function getResource()\n {\n return $this->resource ?: parent::getResource();\n }", "title": "" }, { "docid": "b1db2dd087c8be8c9c8196874e59a1c9", "score": "0.6839394", "text": "public function getResource()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "b1db2dd087c8be8c9c8196874e59a1c9", "score": "0.6839394", "text": "public function getResource()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "b1db2dd087c8be8c9c8196874e59a1c9", "score": "0.6839394", "text": "public function getResource()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "b1db2dd087c8be8c9c8196874e59a1c9", "score": "0.6839394", "text": "public function getResource()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "1e8009c1ed8df8757c31e6c2121a1c94", "score": "0.6815215", "text": "public function getResource()\n {\n return $this->_resource;\n }", "title": "" }, { "docid": "a8cdb5900aed77853155ba1861662621", "score": "0.6727543", "text": "function getResource()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "bdaaf50cf27670fc440c40f9e2a1a586", "score": "0.67119735", "text": "public function getResource(){\n return $this->resource;\n }", "title": "" }, { "docid": "1fd07041dc53c90d77af209e17cf53be", "score": "0.6676103", "text": "protected function getResourceModelTemplate() : string\n {\n return static::TEMPLATE_RESOURCE_MODEL_TEMPLATE_SOURCE;\n }", "title": "" }, { "docid": "e3c1fc60ee75eb693b0090ab8fb943ad", "score": "0.66656387", "text": "public function get_resource();", "title": "" }, { "docid": "def3d0649e464df6001dba681ed8c5c3", "score": "0.6619174", "text": "public function get_resource() : string\n {\n return $this->resource;\n }", "title": "" }, { "docid": "b4ba9224b5bc600acc239fa2f1afef2f", "score": "0.6598362", "text": "public function getModelFile()\n {\n return 'citas';\n }", "title": "" }, { "docid": "93f1a48daee6173236f0277e81e51610", "score": "0.65713733", "text": "public function getResource() {}", "title": "" }, { "docid": "e4c79941f4dd372ec72d3ba45a25740e", "score": "0.6545759", "text": "public function resource() : Resource\n {\n return Resources::forName($this->resource);\n }", "title": "" }, { "docid": "e9e31d4fb365ae45d11fec4a08472e9a", "score": "0.65398824", "text": "public function model()\n {\n return $this->resource;\n }", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "7612725263cc35dc76f6e6845e7ab8ac", "score": "0.6530515", "text": "public function getResource();", "title": "" }, { "docid": "33f39d92c7f346f93c2bdf28f26f5eb9", "score": "0.6460498", "text": "public function getModelFile()\n {\n return 'Detail/122_aexperiences';\n }", "title": "" }, { "docid": "6e0b672d6a07877572663b37a3ebb819", "score": "0.6443824", "text": "public function getModel()\n\t{\n\t\treturn $this->resource->name;\n\t}", "title": "" }, { "docid": "f5ca5b199e74e2040d0d7ca972d91eab", "score": "0.6432528", "text": "public function getResource(): ?string\n {\n return $this->resource ?? Str::snake(Str::pluralStudly(class_basename($this)));\n }", "title": "" }, { "docid": "e9d38559ed9ae23ab194d7b651871c01", "score": "0.6368328", "text": "protected function _getResource()\n {\n $resourceName = $this->_engine->getResourceName();\n if ($resourceName) {\n $this->_resourceName = $resourceName;\n }\n return parent::_getResource();\n }", "title": "" }, { "docid": "50065e48c5cd2a2ea8de405d89c28ce4", "score": "0.6363006", "text": "public function getResource()\n\t{\n\t\t$this->connectInternal();\n\t\treturn $this->resource;\n\t}", "title": "" }, { "docid": "aed838a594b36cfc9d4044584ff28267", "score": "0.6362238", "text": "public function getFilePath(): string\n {\n return oas_path(\n $this->version . '/components/schemas/' . $this->getFileName() . '.json'\n );\n }", "title": "" }, { "docid": "23a5d9caefd739ad82e39f0076a63a58", "score": "0.63503665", "text": "function getFile() {\n\t\treturn ArtifactStorage::instance()->get($this->getID());\n\t}", "title": "" }, { "docid": "73eaeeac7ce73ff22b80e302fe86d548", "score": "0.63244796", "text": "protected function getResourceEntity()\n\t{\n\t\treturn $this->arguments->getArgument(static::$RESOURCE_ARGUMENT_NAME)->getValue();\n\t}", "title": "" }, { "docid": "aafe3930a4786703f393b5d68fe023c7", "score": "0.6271557", "text": "function getFSResource()\n {\n return $this->_c_givenResource;\n }", "title": "" }, { "docid": "17c4f5453570766b77bed6184d38bbd3", "score": "0.62248206", "text": "public function getResource()\n {\n $path = $this->getPath();\n $query = isset($this->urlParts['query']) ? '?' . $this->urlParts['query'] : '';\n\n return $path . $query;\n }", "title": "" }, { "docid": "449e7039efe9d809f6517935db059bb9", "score": "0.62075216", "text": "public function getResource()\n {\n\n if ($this->is_collection)\n {\n return null;\n }\n\n if ($this->isError())\n {\n return null;\n }\n\n $class = $this->getResourceClass();\n return new $class($this->data);\n }", "title": "" }, { "docid": "526c86986dc756959fc06bd0ce91c14b", "score": "0.61974216", "text": "public function get_file()\n {\n return $this->file;\n }", "title": "" }, { "docid": "988e92210e3de0b4e1fdc8ed7fdd8b0a", "score": "0.61890197", "text": "public function get_file() {\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "b5de986356f812e4701e50dc4d081ba2", "score": "0.618479", "text": "public function getFile() {\n\n return $this->file;\n }", "title": "" }, { "docid": "c1781464fd9dc23bfe3f7162ef5ec15c", "score": "0.6173044", "text": "function get_file()\n\t{\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.61728114", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "daff6585d6ede2d669e9651a2c64b5e4", "score": "0.6171197", "text": "public function getFile() {\n return $this->file;\n }", "title": "" }, { "docid": "daff6585d6ede2d669e9651a2c64b5e4", "score": "0.6171197", "text": "public function getFile() {\n return $this->file;\n }", "title": "" }, { "docid": "9e47d20b6f5054d663882388757411e3", "score": "0.6159977", "text": "public function getResource() {\n $resource = false;\n if (isset($this->_resource)) {\n $resource = $this->_resource;\n }\n\n return $resource;\n }", "title": "" }, { "docid": "cf6d4032d55dcfd1aa5706dfdf3cd6d6", "score": "0.61494815", "text": "function __getModelFile($modelId)\n {\n $modelDir = dirname(dirname(dirname(__FILE__))) . DS . 'models';\n return $modelDir . DS . $modelId . '_service.php';\n }", "title": "" }, { "docid": "d0a49472a6439183d813ae656302cf1d", "score": "0.6129848", "text": "public function readFileTemplate(): string\n {\n $template = resource_path('templates/EnumModel.txt');\n\n if (!file_exists($template) || !is_readable($template)) {\n throw new Exception(sprintf('The path \"%s\" is not a file or not readable', $template));\n }\n $search = [\"/\", \"app\"];\n $replace = [\"\\\\\", \"App\"];\n $namespace = str_replace($search, $replace, $this->path);\n\n $values = [\n '$className' => $this->className,\n '$content' => $this->content,\n '$namespace' => $namespace\n ];\n\n return strtr(file_get_contents($template), $values);\n }", "title": "" }, { "docid": "44208251818acf5a98c8f4e2a8e53ce8", "score": "0.6127598", "text": "public function getResourceName()\n { \n switch ($this->type){\n case 'project': \n return Project::find($this->resourse); \n break;\n \n case 'estimate': \n return Estimate::find($this->resourse); \n break;\n \n default :\n return null;\n break;\n } \n }", "title": "" }, { "docid": "c9ef394677e99d6f89638ce5d75e4893", "score": "0.61130375", "text": "public function getTemplateFile();", "title": "" }, { "docid": "0ab01072a0b2fd61b8e12ab7d000d1da", "score": "0.61071634", "text": "public function getFile(): string\n {\n return $this->file;\n }", "title": "" }, { "docid": "1592e9550ebf07ca188079b26472067a", "score": "0.60994375", "text": "public function getResource()\n\t{\n\t\tif($this->resource === null) {\n\t\t\t$this->connect();\n\t\t}\n\n\t\treturn $this->resource;\n\t}", "title": "" }, { "docid": "c9ca65c438eef2420e6c167fa8c8de80", "score": "0.6081482", "text": "public function getFile()\n\t{\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "c9ca65c438eef2420e6c167fa8c8de80", "score": "0.6081482", "text": "public function getFile()\n\t{\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "bf0377cdd4e260afdd91ea975e2c7a28", "score": "0.6079043", "text": "public function getPredictableDeviceFile()\n {\n return $this->getDeviceFile();\n }", "title": "" }, { "docid": "1267218664b1828282b7f19f254f406e", "score": "0.60533094", "text": "public function getModelFile()\n {\n return 'tipo_indicadores';\n }", "title": "" }, { "docid": "d1ea8556ac61d705c4624afca7757d1c", "score": "0.60364574", "text": "public function getResourcePath();", "title": "" }, { "docid": "9ce7fc4061880edc48f8880203ede496", "score": "0.6028928", "text": "public function getFile():string {\n\t\t\treturn $this->file;\n\t\t}", "title": "" }, { "docid": "537e3fa8e8e5fef87d58542e276f6ff5", "score": "0.6026029", "text": "public function modelPath()\n {\n return config('maxolex.config.model').'/'.ucfirst($this->parser->singular()).'.php';\n }", "title": "" }, { "docid": "cbf3554633991e5d2655bba194ed1ee4", "score": "0.60230285", "text": "public function getFile() {\n\t\treturn $this->data['file'];\n\t}", "title": "" }, { "docid": "d03ba727f7a8e264132a279b229601e1", "score": "0.6014244", "text": "private function _file()\n {\n return Html::getAttributeValue($this->model, $this->attribute);\n }", "title": "" }, { "docid": "348eab74eaeb643b80edd87168db2b8b", "score": "0.59958327", "text": "public function getFile()\n {\n return $this->_File;\n }", "title": "" }, { "docid": "0cf7d0dc8fcea236b38ebc7522429eb6", "score": "0.5975448", "text": "public function getOriginalFileResource() {\n\t\treturn $this->originalFileResource;\n\t}", "title": "" }, { "docid": "d431691182070fc088a145b9dec7e38c", "score": "0.59714687", "text": "public static function getFile(){\n\t\t$file_name = base_path().\"/resources/views/DURC/durc_html.mustache\";\n\t\treturn($file_name);\n\t}", "title": "" }, { "docid": "2e4eb9f3f2b13249883ceddd041d3bec", "score": "0.59650797", "text": "public function file()\n {\n return $this->file;\n }", "title": "" }, { "docid": "89eb2e08cfc6106d3fb757dcf82c9f97", "score": "0.5954059", "text": "public function file() {\n return $this->file;\n }", "title": "" }, { "docid": "566de9bd62e23592c696ab0b863c02ed", "score": "0.59538275", "text": "protected function _getResource()\n {\n return parent::_getResource();\n }", "title": "" }, { "docid": "566de9bd62e23592c696ab0b863c02ed", "score": "0.59538275", "text": "protected function _getResource()\n {\n return parent::_getResource();\n }", "title": "" }, { "docid": "566de9bd62e23592c696ab0b863c02ed", "score": "0.59538275", "text": "protected function _getResource()\n {\n return parent::_getResource();\n }", "title": "" }, { "docid": "3b45f29ad47ae10f0f91981ce32b0ade", "score": "0.595111", "text": "public function getResourceSpec()\n {\n return $this->resource_spec;\n }", "title": "" }, { "docid": "458aaf76233e02b9f751952e72403ee2", "score": "0.5929831", "text": "public function getFile()\n\t{\n\t\treturn $this->file; \n\n\t}", "title": "" }, { "docid": "823e451b98643531f57e4448a5a092c3", "score": "0.5920253", "text": "public function GetSourceResource()\n {\n return $this->_sourceResource;\n }", "title": "" }, { "docid": "f12199c87d872d005906107791ba1a2e", "score": "0.59160393", "text": "public function getFile()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "6b56d2dc9fe8823bf659511921db9e13", "score": "0.58870584", "text": "public function get()\n {\n $file_path = $this->path();\n\n if (Storage::exists($file_path)) {\n\n return Storage::get($file_path);\n\n }\n }", "title": "" }, { "docid": "80dd766f9b2fc692a820f82b8cdc4cfd", "score": "0.58729887", "text": "public function getImageResource()\n {\n return $this->image;\n }", "title": "" }, { "docid": "370b04849c8fcd1fe45a0ec72d024be1", "score": "0.5858626", "text": "protected function getModelTemplatePath()\n {\n return __DIR__.'/../Generators/templates/scaffold/model.txt';\n }", "title": "" }, { "docid": "8db4a3b7c59be2e03dd6b33e73106490", "score": "0.58569765", "text": "public function getFile() {\n return $this->getFiles()->getFirst();\n }", "title": "" }, { "docid": "72209d0d6cc79e748b39c06b03a0b5a3", "score": "0.5853525", "text": "public function get()\n {\n return static::getContents($this->getPathname());\n }", "title": "" }, { "docid": "eb7434cab4481aad5ef023e8ca68cd16", "score": "0.58475095", "text": "private function loadModel() {\n // name as requested resource.\n $name = $this->name.'Model';\n $path = str_replace(kPlaceholder, $this->version, kModelsFolder);\n $path = $path . $name . \".php\";\n // If it does not exist, go with\n // the default Model class.\n if (!file_exists($path)) {\n return new Model();\n } else {\n if (!class_exists($name)) {\n include $path;\n }\n\n return new $name();\n }\n }", "title": "" }, { "docid": "083b4d95e9aea29b14413b170e7f47a8", "score": "0.58441424", "text": "public function getModelFile()\n {\n return 'runeTypes';\n }", "title": "" }, { "docid": "b7780bd4c5fc60eaae1035a800561dcc", "score": "0.5832321", "text": "protected function getImageResource () {\n $extension = strtolower( strrchr ( $this->source, '.' ) );\n\n // Convert image to resource object according to its type.\n switch ( $extension ) {\n case '.jpg':\n case '.jpeg':\n $img = @imagecreatefromjpeg( $this->source );\n break;\n case '.gif':\n $img = @imagecreatefromgif( $this->source );\n break;\n case '.png':\n $img = @imagecreatefrompng( $this->source );\n break;\n default:\n $img = false;\n break;\n }\n return $img;\n }", "title": "" }, { "docid": "3038d771d8fba158ebf38c9e2220140e", "score": "0.582279", "text": "abstract public function getTemplateFile();", "title": "" }, { "docid": "10f65abb80db97995aa0c26ecd0610aa", "score": "0.5803832", "text": "static function resource($resource) {\n\t\treturn self::_getLoader()->resource($resource);\n\t}", "title": "" }, { "docid": "e0a0c04ddec13bf92982e8cb8d5ec984", "score": "0.5801967", "text": "function getFile(): object {\n return $this->file;\n }", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.57983005", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.57983005", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.57983005", "text": "public function getFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.57983005", "text": "public function getFilePath();", "title": "" }, { "docid": "c27fa57b016dddfc1942332ae91ca5e8", "score": "0.5798284", "text": "public function getFileInstance()\n {\n return $this->file;\n }", "title": "" }, { "docid": "fdbd5f5cf605697b38e732f45c8c44aa", "score": "0.5798198", "text": "protected function _getTemplateModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Template');\n\t}", "title": "" }, { "docid": "c7fd9a555c395c1811fa287f66182984", "score": "0.5788657", "text": "public function getResourceName()\n {\n return $this->_resourceName;\n }", "title": "" } ]
b40d2414fbd928c76d4834a850c9f20e
Create request for operation 'getArticleById'
[ { "docid": "a891b45fed014d0e3e3dbc191e5e6dea", "score": "0.7522548", "text": "public function getArticleByIdRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling getArticleById'\n );\n }\n if ($id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$id\" when calling ArticlesApi.getArticleById, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/articles/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "693c1f9eda870418f8892457b9bd44bd", "score": "0.7185317", "text": "protected function getArticleByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::getArticleByIdRequest().');\n }\n \n\n $resourcePath = '/articles/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "909a1263c0c15bbb1bb66f06c041cd00", "score": "0.67033386", "text": "public function getArticle($id) \n\t{\n\t\n\t}", "title": "" }, { "docid": "720c3232345c2612c75827197fe341d0", "score": "0.63356596", "text": "public function getArticleById(int $articleId) : ArticleInterface;", "title": "" }, { "docid": "a004e43e74083a11ea007c7745dbc666", "score": "0.62801015", "text": "public function show($id)\n {\n $article = $this->articleRepository->find($id);\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "4797ad04b10dbed76515758b6952b467", "score": "0.6266381", "text": "public function createArticleRequest($articleCreate = null)\n {\n\n $resourcePath = '/articles';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($articleCreate)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($articleCreate));\n } else {\n $httpBody = $articleCreate;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3224e3f62a81efcf7bbe168d4022c06e", "score": "0.6264839", "text": "public function show(int $id) : ArticleResource\n {\n return $this->adapter->byId($id);\n }", "title": "" }, { "docid": "92ee2dd95af69d3842ada82bbdab316f", "score": "0.6195449", "text": "public function show($id)\n {\n $article = Article::findOrFail($id);\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "7b0918eb3ea74df51b8182094b0715b1", "score": "0.61679256", "text": "protected function deleteArticleByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::deleteArticleByIdRequest().');\n }\n \n\n $resourcePath = '/articles/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "87885d8819400184af424c1b6d385a72", "score": "0.611547", "text": "public function show(Request $request, $id)\n {\n // Get article\n //$id = $request->id;\n $article = Article::findOrFail($id);\n\n // Return single article as a resource\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "de1a875ce74df0c3bcca243ff2e8a6f8", "score": "0.60287946", "text": "public function articleWithId($id)\n {\n return $this->em->getRepository(self::APP_HTTP_ENTITY_ARTICLE)->findOneBy([\n 'id' => $id\n ]);\n }", "title": "" }, { "docid": "8467c37a532ecc2cd36af0ac7dedf97b", "score": "0.6008273", "text": "protected function getNewsByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::getNewsByIdRequest().');\n }\n \n\n $resourcePath = '/news/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "849dd3d594d2c68b6b6102f6a316e4b0", "score": "0.59781766", "text": "public function show($id)\n {\n\n return new articresource($article);\n }", "title": "" }, { "docid": "bb95632dd1b7fe9ce6c393f9c7ffcb3a", "score": "0.59768766", "text": "protected function getArticleCategoryByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::getArticleCategoryByIdRequest().');\n }\n \n\n $resourcePath = '/article_categories/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "0e8fdfc0d26d1e6b49b8759bfbfecf50", "score": "0.5949997", "text": "protected function getArticleCommentByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::getArticleCommentByIdRequest().');\n }\n \n\n $resourcePath = '/article_comments/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "33eae45b1ad3a9dd460a9732fc3c2524", "score": "0.5930781", "text": "public function show($id) {\n if (!$id) {\n throw new HttpException(400, \"Invalid id\");\n }\n\n $article = Article::find($id);\n\n return response()->json([\n $article,\n ], 200);\n }", "title": "" }, { "docid": "07ca0ff7e4ec7b015f5c17cbbb941148", "score": "0.5925144", "text": "public function show($id) //for individual resource\n {\n // //model\n $article = EmpleadoModel::findOrFail($id);\n\n return $article; //return new empleadoresource(article) missing\n }", "title": "" }, { "docid": "808635a414a0cf1d35c7d8dfcbe130c9", "score": "0.59006345", "text": "public function show(Article $article)\n {\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "808635a414a0cf1d35c7d8dfcbe130c9", "score": "0.59006345", "text": "public function show(Article $article)\n {\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "53930df4a21feb2efc80cd4841071209", "score": "0.5882343", "text": "public function show($id) //for individual resource\n {\n // //model\n $article = Empleado::findOrFail($id);\n\n return $article; //return new empleadoresource(article) missing\n }", "title": "" }, { "docid": "67a0617ded6384f630858530f562459d", "score": "0.5816043", "text": "public function show($id) //for individual resource\n {\n // //model\n $article = ex::findOrFail($id);\n\n return response()->json([\n 'status' => 'success',\n 'mensaje' => 'Examen obtenido con èxito',\n 'data' => $article\n ]);\n //return $article; //return new empleadoresource(article) missing\n }", "title": "" }, { "docid": "3fc344cd5f05d5b347652a8804c96126", "score": "0.5813464", "text": "public function show($id)\n {\n return Article::find($id);\n }", "title": "" }, { "docid": "3c63bb3e1a0697d9b4302926d244d061", "score": "0.5771691", "text": "protected function getArticlePendingCreateByIdRequest($id)\n {\n if (empty($id)) {\n throw new \\InvalidArgumentException('Missing parameter \"$id\" in ContentApi::getArticlePendingCreateByIdRequest().');\n }\n \n\n $resourcePath = '/article_pending_creates/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($id !== null) {\n $id = ObjectSerializer::toQueryValue($id);\n }\n \n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "85b665d35bc6b3c6ffab80de5ca250f1", "score": "0.57386327", "text": "public function show($id, Request $request)\n {\n $user_id = $request->user()->id;\n $article = Article::where([\n ['user_id','=', $user_id],\n ['article_id', '=', $id]\n ])->first();\n\n if (is_null($article)) {\n return $this->sendError('Article not found');\n }\n\n return $this->sendResponse($article, 'Datos traidos exitosamente');\n }", "title": "" }, { "docid": "98fe76b561b51a1789839a373d9b1538", "score": "0.5731519", "text": "public function get()\n {\n $idArticle = (int)$idArticle;\n\n\t $sql = $this->_bdd->query('SELECT * FROM Article WHERE id = '.$idArticle);\n\t $donnees = $sql->fetch(PDO::FETCH_ASSOC);\n\n\t return new Article($donnees);\n }", "title": "" }, { "docid": "8a2c1feea708fa7c3c6396155dad2870", "score": "0.5722071", "text": "public function show($id) {\n\t\t//\n\t\t$service = new ArticleService();\n\t\t$obj = $service->getById($id);\n\t\tif ($obj) {\n\t\t\t$this->setJsonResult(1, \"查找数据成功\", $obj);\n\t\t} else {\n\t\t\t$this->setJsonResult(0, $service->getMessage());\n\t\t}\n\n\t\treturn $this->getJsonResult();\n\t}", "title": "" }, { "docid": "5b5144a0b1f782b1bb70727c8b187c21", "score": "0.5713183", "text": "public function getSingle($entity, array $params = []);", "title": "" }, { "docid": "1576ad79607a111de5f35491def71f49", "score": "0.5709582", "text": "public function getArticle($id){\n\n return $this->articleDat()->where('id', $id)->fetch();\n }", "title": "" }, { "docid": "ead29c23c49d90501f66b7940f93ea8f", "score": "0.56703454", "text": "public function show($id)\n {\n return Article::find($id);\n }", "title": "" }, { "docid": "21965ac85441f9a3e80eabba54e6e279", "score": "0.5667239", "text": "public function show($id)\n {\n return Article::find($id);\n\t}", "title": "" }, { "docid": "56e238c3a7491c038e7c4827d10e0c24", "score": "0.56645393", "text": "public function findArticleById(int $id)\n {\n return $this->article::with('user')->findOrFail($id);\n }", "title": "" }, { "docid": "c865db8b75f9adc9354c869cdfd0eb10", "score": "0.56567967", "text": "public function getDetail(Request $request, $id): Model;", "title": "" }, { "docid": "aa3e0047c109943c416b33650c72ed1c", "score": "0.5637623", "text": "public function edit($id)\n {\n $article = Article::findOrFail($id);\n return response()->json($article,201);\n }", "title": "" }, { "docid": "fdfa159ca52d60d566ab71cca8438155", "score": "0.5628737", "text": "public function show(Article $article)\n {\n $article = new ArticleResource($article->load(['comments','category','author']));\n return $this->sendResponse($article, 'Article Retreved Successfuly');\n }", "title": "" }, { "docid": "dea66baecc1037669ef4162eda6a2d53", "score": "0.56165576", "text": "function getArticle($id){\n \n $params = [':id'=> $id];\n $sql = \"SELECT * FROM articles WHERE id= :id AND published = 1\";\n $sth = $this->dbh-> prepare($sql);\n $sth->execute($params);\n \n return $sth->fetch(PDO::FETCH_ASSOC);\n \n }", "title": "" }, { "docid": "35e9a14ac2ee4bfa104b244c24454a46", "score": "0.56120807", "text": "public function updateArticleRequest($id, $articleUpdate = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling updateArticle'\n );\n }\n if ($id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$id\" when calling ArticlesApi.updateArticle, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/articles/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($articleUpdate)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($articleUpdate));\n } else {\n $httpBody = $articleUpdate;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "5b279b541e80699252771ea86f355682", "score": "0.5595272", "text": "public function show(FetchesArticle $fetcher, Request $request, int $id): JsonResponse\n {\n return ArticleResource::make(\n $fetcher->fetch($id, $request->all())\n )\n ->response()\n ->setStatusCode(JsonResponse::HTTP_OK);\n }", "title": "" }, { "docid": "9aeb22e3f88118c7fd67bb94c6bb469d", "score": "0.55939716", "text": "public function showByArticleId($id)\n {\n $details = Detail::where('articles_id', $id)->get();\n\n if ($details == null) {\n return response()->json(['result' => 'details '.$id.' not found']);\n } else {\n return response()->json(['result' => 'details_'.$id , 'details' => $details]);\n }\n }", "title": "" }, { "docid": "a8f9bb72dcb466da5c70bdc98ab4cf7d", "score": "0.5568278", "text": "public static function find($id_article) {\n $conn = ConnexionDB::get_connexion();\n\n $sql = 'SELECT id_article, title, body, img_path, date FROM article WHERE id_article = ' . $id_article;\n mysqli_select_db($conn, 'e_mtiyaz_group');\n $retval = mysqli_query( $conn, $sql );\n \n if(! $retval ) {\n die('Could not get data: ' . mysqli_connect_error());\n }\n\n $article = null;\n \n if($row = mysqli_fetch_array($retval, MYSQLI_ASSOC)) {\n $row_array['id_article'] = $row['id_article'];\n $row_array['title'] = $row['title'];\n $row_array['body'] = $row['body'];\n $row_array['img_path'] = $row['img_path'];\n $row_array['date'] = $row['date'];\n\n $article = new Article($row_array['id_article'], $row_array['title'], $row_array['body'], $row_array['img_path'], $row_array['date']);\n } \n\n mysqli_free_result($retval);\n ConnexionDB::close_connexion();\n\n return $article ? $article : null;\n }", "title": "" }, { "docid": "1394495cf74e621857f20036ede9bce2", "score": "0.5565233", "text": "public function read($id)\n\t{\n\t\t\n\t\t\n\t\t/* Define some vars\n\t\t */\n\t\t\n\t\t$article = new ArticleModel();\n\t\t\n\t\t\n\t\t/* Get articles\n\t\t */\n\t\t\n\t\tif ($data = $article->find($id))\n\t\t{\n\t\t\t// Connvert DateAdd\n\t\t\t$date = new \\DateTime($data['date_add']);\n\t\t\t$data['date_add'] = $date->format('d/m/Y H:i');\n\t\t}\n\t\t\n\t\t// Article not found > redirect to the 404\n\t\telse return $this->redirect('/Ooops');\n\t\t\n \n\t\t/* Response\n\t\t */\n\t\t\n\t\t$this->show('articles/read', array(\n\t\t\t\"data\" => $data\n\t\t));\n\t}", "title": "" }, { "docid": "a4a077d193065dd9e57d57c5dfc78523", "score": "0.55558103", "text": "private function _getArticle($id)\n {\n $association = new ArticleAssociation($id);\n $association->setLocale(\\Webvaloa\\Webvaloa::getLocale());\n if ($associatedID = $association->getAssociatedId()) {\n $id = $associatedID;\n }\n\n $articleHelper = new ArticleHelper($id);\n $article = $articleHelper->article;\n\n return $article;\n }", "title": "" }, { "docid": "79ef44351b936a6e32ba8b9449942661", "score": "0.555541", "text": "public function edit($id)\n {\n $article = Article::findOrFail($id, ['id', 'title', 'content', 'status', 'date', 'featured', 'category_id as category']);\n\n return response()->json($article);\n }", "title": "" }, { "docid": "5b7be1b844317ea68f58e03e2d4a0718", "score": "0.5521746", "text": "function post()\r\n{\r\n $article = getArticle($_GET['id']); \r\n}", "title": "" }, { "docid": "596cab3155a7e598dd54671ddd9dcba6", "score": "0.55019784", "text": "public static function readOneArticle()\n {\n // On se connecte à la base de donnée\n $db = DbConnexion::openConnexion();\n // Après avoir tout sélectionné selectionné dans la table article\n // On le stoocke dans un tableau\n $articlesList = [];\n\n $request = \"SELECT * FROM article LEFT JOIN commentaire ON article.id = commentaire.article_id WHERE article.id =:id\";\n \n\n // On prépare et exécute la requête\n $stmt = $db->prepare($request);\n \n $params= array(\"id\"=>$_GET['id']);\n \n $stmt->execute($params);\n\n $articleFromDb = $stmt->fetch();\n \n // On instancie un nouvel article\n $article = new Article($articleFromDb['title'], $articleFromDb['content'], $articleFromDb['image'], $articleFromDb['ref_page']);\n $article->setId($articleFromDb['id']);\n $article->setCreationDate($articleFromDb['creation_date']);\n $article->setUpdateDate($articleFromDb['update_date']);\n var_dump($articleFromDb );\n die();\n // foreach ( $articleFromDb as $message => $comment) {\n // // On instancie Commentaire\n // $comment = new Comment($commentsFromDb['user_pseudo'],$commentsFromDb['content'],$commentsFromDb['article_id']);\n // $comment->setId($commentsFromDb['id']);\n // $comment->setCreationDate($commentsFromDb['creation_date']);\n // $comment->setUpdateDate($commentsFromDb['update_date']);\n \n // $commentsList [] = $comment;\n // }\n $articlesList [] = $article;\n \n $db = DbConnexion::closeConnexion();\n\n return $article;\n }", "title": "" }, { "docid": "2d4398aae118f796918fa51051536bec", "score": "0.5487839", "text": "public function show($id)\n {\n /* if (Article::where('id', $id)->exists()) {\n $student = Article::where('id', $id)->get();\n return response()->json($student);\n } \n else {\n return response()->json([\n \"message\" => \"article not found\"\n ], 404);\n } */\n $article = Article::findOrFail($id);\n return response()->json($article);\n }", "title": "" }, { "docid": "f917a6816b9caa8fcce9e4f70ca99cba", "score": "0.5483618", "text": "protected function notesGetByIdRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling notesGetById'\n );\n }\n\n $resourcePath = '/api/Notes/byid/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "308d4d98f4658c395ed444b8573a7ca5", "score": "0.5467004", "text": "public function getArticleByPathRequest($username, $slug)\n {\n // verify the required parameter 'username' is set\n if ($username === null || (is_array($username) && count($username) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $username when calling getArticleByPath'\n );\n }\n // verify the required parameter 'slug' is set\n if ($slug === null || (is_array($slug) && count($slug) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $slug when calling getArticleByPath'\n );\n }\n\n $resourcePath = '/articles/{username}/{slug}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($username !== null) {\n $resourcePath = str_replace(\n '{' . 'username' . '}',\n ObjectSerializer::toPathValue($username),\n $resourcePath\n );\n }\n // path params\n if ($slug !== null) {\n $resourcePath = str_replace(\n '{' . 'slug' . '}',\n ObjectSerializer::toPathValue($slug),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7fb394181932a65bdb36c2326d02cd80", "score": "0.5454744", "text": "public function get($entity, array $params = []);", "title": "" }, { "docid": "787ecd4b964faeaa810e76913baf84f4", "score": "0.54462034", "text": "public function getArticle($article_id)\r\n {\r\n $sql = 'SELECT article.id AS id, title, content, summary, pseudo as author, \r\n DATE_FORMAT(article.creation_date, \"%d/%m/%y à %H:%i:%s\") AS formatted_date \r\n FROM article INNER JOIN member ON article.author_id = member.id \r\n WHERE article.id = :id';\r\n $article = $this->getPDO()->prepare($sql);\r\n $article->bindParam('id', $article_id); // Liaison des paramètres\r\n $article->execute();\r\n if ($article->rowCount() == 1)\r\n return $article->fetch(); // Accès à la première ligne de résultat\r\n else\r\n throw new Exception(\"Aucun article ne correspond à l'identifiant '$article_id'\"); // Gestion d'erreur\r\n }", "title": "" }, { "docid": "eba8bf84aec9dc3a06402071d387d42a", "score": "0.54455936", "text": "public static function getArticleById(int $id = 0)\n {\n return static::find()->where(['id' => $id])->one();\n }", "title": "" }, { "docid": "9322075dd82cd1a9ee97343d84134f12", "score": "0.54326427", "text": "public function getArticle($id){\n\t\t\t\t\t$sql = \"SELECT * FROM article WHERE article.id = \".$id.\" \";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetch();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "title": "" }, { "docid": "497d3fb7ad5f7015ab70c9c2bf75cc9d", "score": "0.5388734", "text": "public function show(Request $request, $id)\n {\n if (!$request->user()->is_admin) {\n return Article::mine($request->user()->id)->findOrFail($id);\n }\n\n return Article::findOrFail($id);\n }", "title": "" }, { "docid": "b282be8551acd9093d54bc357dad28c8", "score": "0.5370786", "text": "public function getById()\n {\n }", "title": "" }, { "docid": "b282be8551acd9093d54bc357dad28c8", "score": "0.5370786", "text": "public function getById()\n {\n }", "title": "" }, { "docid": "63de1cb086aa73d2116b31df5b8a47dc", "score": "0.53665364", "text": "public function GetById($id);", "title": "" }, { "docid": "4ca3dcb54a26cad64eac3f1555b75ad5", "score": "0.5362107", "text": "public function show($id)\n {\n $ArticleTag = ArticleTag::find($id);\n if ($ArticleTag) {\n return new ArticlesTagResource($ArticleTag);\n }\n return \"ArticleTag Not found\"; \n }", "title": "" }, { "docid": "a61d3ceb3de579cb23c24d7fb245d852", "score": "0.53552115", "text": "public function get(int $id): ApiModel1;", "title": "" }, { "docid": "2ea832c9447622e3979178b4f9dba562", "score": "0.5348405", "text": "public function setArticleId(string $id)\n {\n $this->params['i'] = $id;\n\n return $this;\n }", "title": "" }, { "docid": "39b1c7dab308acf1e166cc8bcf991cd5", "score": "0.5346943", "text": "public static function detailArticle() {\r\n $id = $_GET['id'];\r\n $id_article = $_GET['id'];\r\n $article = new modeleArticle();\r\n $article = $article->getArticle($id);\r\n\r\n //Permet d'afficher les commentaires pour l'article selectionné\r\n $commentaires = new modeleCommentaire();\r\n $commentaires = $commentaires->getCommentaires($id_article);\r\n\r\n require './Vue/detail.php';\r\n }", "title": "" }, { "docid": "404fca6d64dd6ec7e322585af2c5bc76", "score": "0.53438425", "text": "function getArticle($id)\n{\n require ('config/connect.php');\n // prepare la requete pour selectionner tous les article \n $req = $bdd->prepare('SELECT * FROM arcticles WHERE id =?');\n // on va mettre la valeur de l'id\n $req->execute(array($id));\n // si ily'a une correspendance \n if($req->rowCount() == 1)\n {\n $data = $req->fetch(PDO::FETCH_OBJ);\n return $data;\n }\n else \n header('Location: blog.php');\n $req->closeCursor(); \n\n}", "title": "" }, { "docid": "125c5057a3d200d292f664ecba11b9a5", "score": "0.5330897", "text": "abstract public function get($id);", "title": "" }, { "docid": "9b07d30cf70f1e5ae5931dcaaa975f7e", "score": "0.5327404", "text": "public function getArticle()\n {\n return $this->hasOne(Article::class, ['id' => 'article_id']);\n }", "title": "" }, { "docid": "a9ee08980b187c206bba818f4154c84a", "score": "0.5323968", "text": "abstract public function get( $id );", "title": "" }, { "docid": "cb0f8f50dbf11def5d341a8653747eca", "score": "0.53198665", "text": "public function getOneById($em, $id) {\n return $em->getRepository(\"\\Spa\\SpaBundle\\Entity\\Articles\")->find($id);\n }", "title": "" }, { "docid": "b6944119f39179f7480f31cf7d016d22", "score": "0.5309324", "text": "public function getUserArticlesRequest($page = 1, $perPage = 30)\n {\n if ($page !== null && $page < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$page\" when calling ArticlesApi.getUserArticles, must be bigger than or equal to 1.');\n }\n\n if ($perPage !== null && $perPage > 1000) {\n throw new \\InvalidArgumentException('invalid value for \"$perPage\" when calling ArticlesApi.getUserArticles, must be smaller than or equal to 1000.');\n }\n if ($perPage !== null && $perPage < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$perPage\" when calling ArticlesApi.getUserArticles, must be bigger than or equal to 1.');\n }\n\n\n $resourcePath = '/articles/me';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($page !== null) {\n if('form' === 'form' && is_array($page)) {\n foreach($page as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['page'] = $page;\n }\n }\n // query params\n if ($perPage !== null) {\n if('form' === 'form' && is_array($perPage)) {\n foreach($perPage as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams['per_page'] = $perPage;\n }\n }\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c031db501ac8717509c705ff03f0dfc7", "score": "0.53080785", "text": "public function get($id) {}", "title": "" }, { "docid": "5932744cb1148147c8be6df6b883bb4b", "score": "0.53036875", "text": "public function run($article_id = '')\n\t{\n\t\tApiAccess::allow(\"GET\");\n\n\t\tif (empty($article_id)) {\n\t\t\tthrow new Exception(null, 400);\n\t\t}\n\n\t\tYii::import('api_app.modules.articles.models.APIZoneArticle');\n\t\t$key = Yii::app()->request->getParam('key', 'id');\n\t\t$article = APIZoneArticle::model()->findByKey(IDHelper::uuidToBinary($article_id), $key);\n\t\tif (empty($article)) {\n\t\t\tthrow new Exception(null, 400);\n\t\t}\n\n\t\t//process output\n\t\t$strId = IDHelper::uuidFromBinary($article->id, true);\n\t\t$object_id = null;\n\t\t$object_type = null;\n\t\t$user = ZoneUser::model()->getUserInfo($article->author->holder_id);\n\t\tif (!$article->namespace) {\n\t\t\t$object_id = IDHelper::uuidFromBinary($article->author->holder_id, true);\n\t\t\t$object_type = 'user';\n\t\t} else {\n\t\t\t$object_id = IDHelper::uuidFromBinary($article->namespace->holder_id, true);\n\n\t\t\tif (!$user->isGuest) {\n\t\t\t\t$object_type = 'user';\n\t\t\t} else {\n\t\t\t\t$object_type = 'topic';\n\t\t\t}\n\t\t}\n\t\t$userInfo = ZoneApiResourceFormat::formatData('user', $user->toArray(true));\n\t\tunset($userInfo['email']);\n\t\tunset($userInfo['location']);\n\t\tunset($userInfo['stats']);\n\t\tunset($userInfo['birthday']);\n\t\t$arrArticles = array(\n\t\t\t'id'\t\t\t=> $strId,\n\t\t\t'title'\t\t\t=> $article->title,\n\t\t\t'alias'\t\t\t=> $article->alias,\n\t\t\t'content' \t\t=> $article->content,\n\t\t\t'description'\t=> $article->description,\n\t\t\t'object_id'\t\t=> $object_id,\n\t\t\t'object_type'\t=> $object_type,\n\t\t\t'created'\t\t=> date(DATE_ISO8601, strtotime($article->created)),\n\t\t\t'likes'\t\t\t=> LikeStatistic::countLike($strId),\n\t\t\t'comments'\t\t=> ZoneComment::model()->countComments($strId),\n\t\t\t'user'\t\t\t=> $userInfo,\n\t\t);\n\n\t\t//response\n\t\t$out = array(\n\t\t\t'article' => $arrArticles,\n\t\t);\n\t\tYii::app()->response->send(200, $out, \"\");\n\t}", "title": "" }, { "docid": "e7d62138a93b42091de17762f051e4b2", "score": "0.5281144", "text": "public function edit($articleId)\n {\n }", "title": "" }, { "docid": "87daf3c6e7c8b88d1d18fc38caa7351c", "score": "0.5277505", "text": "public function show(int $articleId, ArticleViewService $service): object\n {\n $article = $service->showArticleAndRegisterArticleView($articleId);\n\n return new ArticleResource($article);\n }", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "2121d4d6eb276156e4cb7dc9c4d63843", "score": "0.52656996", "text": "public function getById($id);", "title": "" }, { "docid": "451d333d8935e0f7a5c8fe73e4cef291", "score": "0.52632517", "text": "public function show($id,Request $request)\n {\n $article = Article::findOrFail($id);\n $article->author;\n // $article->author_reward_adid = $article->author->reward_adid;\n // $article->author_banner_adid = $article->author->banner_adid;\n\n // $article->video = '';\n $share = $article->share;\n $article->share_title = $share?$share->oneTitle:'';\n $article->share_cover = $share?$share->oneCover:'';\n $article->userlikearticle = $request->user()->hasLiked($article);\n $article->userrewardarticle = $request->user()->hasSubscribed($article); // 用户已经激励该文章\n $encode_qrcode = Hashids::encode( $request->get('appid'), $request->user()->id, $article->id, date(\"ymdHi\") );\n $article->qrcode = $encode_qrcode;\n $article->qrcode_url = url('/qrcode/article/'.$article->qrcode);\n return response()->json($article);\n }", "title": "" }, { "docid": "d99fd26d0393eb1524b413e6384cf07f", "score": "0.52616584", "text": "public function show($id)\n {\n $post = Article::findOrFail($id);\n return $post;\n }", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" }, { "docid": "54c38a9dc9d80ab13aa5c23a0b0deeff", "score": "0.52497476", "text": "public function get($id);", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "e36b48f1a1ca63326a2a719ef1c7a354", "score": "0.0", "text": "public function run()\n {\n DB::table('medias')->delete();\n DB::table('service_request_medias')->delete();\n \n $medias = array(\n\n array(\n 'client_id' => 5,\n 'original_name' => 'maxresdefault.jpeg',\n 'unique_name' => 'd1d256a2-08f3-4788-a1cc-16e83fcef660.jpeg',\n 'created_at' => '2020-12-14 13:39:55',\n ),\n array(\n 'client_id' => 5,\n 'original_name' => '20190919_122724.jpeg',\n 'unique_name' => 'ab9eac54-1da0-4104-9104-fe7f43e2b833.jpeg',\n 'created_at' => '2020-12-15 09:11:14',\n ),\n array(\n 'client_id' => 5,\n 'original_name' => 'CZEuI.jpeg',\n 'unique_name' => 'f66653c3-bcea-4e38-bd58-44db5c6d4145.jpeg',\n 'created_at' => '2020-12-15 10:51:29',\n ),\n array(\n 'client_id' => 5,\n 'original_name' => 'IMG_00210.jpeg',\n 'unique_name' => '689c2ab1-391f-4875-ac72-1fffb9224390.jpeg',\n 'created_at' => '2020-12-16 10:51:29',\n ),\n array(\n 'client_id' => 5,\n 'original_name' => '012505114021_install.pdf',\n 'unique_name' => '20b3e1e2-9e76-4a37-9268-06433ad3ea00.pdf',\n 'created_at' => '2020-12-17 14:22:50',\n )\n );\n\n $serviceRequestMedias = array(\n array(\n 'media_id' => 1,\n 'service_request_id' => 1,\n 'created_at' => '2020-12-14 13:39:55',\n ),\n array(\n 'media_id' => 2,\n 'service_request_id' => 1,\n 'created_at' => '2020-12-15 09:11:14',\n ),\n array(\n 'media_id' => 3,\n 'service_request_id' => 2,\n 'created_at' => '2020-12-15 10:51:29',\n ),\n array(\n 'media_id' => 4,\n 'service_request_id' => 2,\n 'created_at' => '2020-12-16 10:51:29',\n ),\n array(\n 'media_id' => 5,\n 'service_request_id' => 2,\n 'created_at' => '2020-12-17 14:22:50',\n )\n );\n\n DB::table('medias')->insert($medias);\n DB::table('service_request_medias')->insert($serviceRequestMedias);\n }", "title": "" } ]
[ { "docid": "71c6796615a8344ad02f1c59309a8195", "score": "0.810222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $roles = ['superadmin', 'admin', 'user'];\n for ($i=0; $i<count($roles); $i++)\n {\n \\App\\Role::create([\n 'name' => $roles[$i]\n ]);\n }\n\n factory(\\App\\User::class, 10)->create();\n factory(\\App\\Category::class, 5)->create();\n factory(\\App\\Product::class, 20)->create();\n\n $prod_id = \\App\\Product::pluck('id');\n $prod_count = count($prod_id);\n\n foreach ($users = \\App\\User::all() as $user)\n {\n for ($i=0; $i<rand(0, $prod_count); $i++)\n {\n $id = $prod_id[$i];\n $user->favorites()->attach($id);\n }\n }\n factory(\\App\\Review::class, 20)->create();\n }", "title": "" }, { "docid": "da4e361a9e2ff83579cb0561d63b82c2", "score": "0.7990817", "text": "public function run()\n {\n\n DB::table('users')->insert([\n [\n 'name' => \"admin\",\n 'email' => \"[email protected]\",\n 'phone' => \"082181189178\",\n 'role' => \"admin\",\n 'password' => bcrypt('admin')\n ],\n ]);\n\n DB::table('categories')->insert([\n [\n 'name' => \"Beach\",\n ],\n [\n 'name' => 'Mountain',\n ]\n ]);\n\n DB::table('articles')->insert([\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai Kuta Bali',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b1.jpeg',\n ],\n [\n 'user_id' => 4,\n 'categories_id' => 1,\n 'title' => 'Pantai',\n 'description' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi repellat',\n 'image' => 'b2.jpeg',\n ]\n ]);\n\n\n // $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "9be7037c6bd7f61f2f9bfe3d1ad6aa33", "score": "0.7957593", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 20)->create();\n factory('App\\Company', 20)->create();\n factory('App\\Property', 20)->create();\n\n $categories = [\n 'Sold',\n 'Under Offer',\n 'Sold STC',\n 'For Sale'\n ];\n foreach ($categories as $category){\n Category::create(['name'=>$category]);\n }\n\n $propertytypes = [\n 'House',\n 'Bungalow',\n 'Flat'\n ];\n foreach ($propertytypes as $proptype){\n PropertyType::create(['name'=>$proptype]);\n }\n }", "title": "" }, { "docid": "643ca4b2b0a3350305279ecc21004f82", "score": "0.7939023", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // 30 tag\n $tags = factory(App\\Tag::class, 30)->create();\n\n // 10 categorie\n $categories = factory(App\\Category::class, 10)->create();\n\n // 10 utenti\n $users = factory(App\\User::class, 10)->create();\n\n foreach ($users as $user) {\n // 15 post per utente\n $posts = factory(App\\Post::class, 15)->create([\n 'user_id' => $user->id,\n // 1 categoria random fra quelle create\n 'category_id' => $categories->random()->id,\n ]);\n // 3 tag random fra quelli create\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3));\n }\n }\n }", "title": "" }, { "docid": "65835db97635cc435cdea4358f845df1", "score": "0.7937348", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Role::create([\n 'name' => 'Administrator'\n ]);\n Role::create([\n 'name' => 'Member'\n ]);\n\n Status::create([\n 'name' => 'Active'\n ]);\n Status::create([\n 'name' => 'Inactive'\n ]);\n\n Site::create([\n 'name' => 'T&D Jogja'\n ]);\n\n User::create([\n 'site_id' => 1,\n 'role_id' => 1,\n 'name' => 'Admin',\n 'last_name' => 'Jogja',\n 'email' => '[email protected]',\n 'password' => Hash::make('password')\n ]);\n }", "title": "" }, { "docid": "ea5361a7636055f6a2ac45f40d6f9660", "score": "0.7930582", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n factory(App\\Category::class, 10)->create();\n factory(App\\Publisher::class, 20)->create();\n factory(App\\Author::class, 30)->create();\n factory(App\\Book::class, 100)->create()->each(function ($book) {\n\n $id_a = rand(1,30);\n $book->authors()->attach($id_a);\n });\n factory(App\\User::class, 100)->create()->each(function ($user){\n $rating = rand(1,10);\n $fav = rand(0,1);\n $books = \\App\\Book::inRandomOrder()->first();\n\n\n $user->books()->attach($books->isbn,[\n 'rating' => $rating,\n 'favourite' => $fav]);\n });\n }", "title": "" }, { "docid": "4b00078ab9a8de5ccf3ec46c08be4992", "score": "0.79253244", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Super Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('tester'),\n ]);\n\n DB::table('tags')->insert([\n 'tag' => 'Romance'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'AniManga'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Light Novel'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'News'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Entertainment'\n ]);\n\n DB::table('categories')->insert([\n 'category' => 'Celebrity'\n ]);\n }", "title": "" }, { "docid": "a19ba6eedf512446a4ff6a821f942a7f", "score": "0.78956264", "text": "public function run()\n {\n // $this->call(ArticlesTableSeeder::class);\n factory(App\\Article::class, 30)->create();\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n $statuses = ['Waiting for approval', 'Approved', 'In progress'];\n foreach (range(1, 400) as $index) {\n \\DB::table('projects')->insert([\n 'status' => $statuses[shuffle($statuses)],\n 'deadline' => $faker->dateTimeBetween('+1 month', '+2 month'),\n 'budget' => rand(10000, 500000),\n ]);\n }\n }", "title": "" }, { "docid": "7c0e5f0f3d9257d2cc92932318f34df1", "score": "0.7893241", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'German Middi',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456')\n ]);\n\n\n App\\Models\\Category::create([\n 'title' => 'Agenda',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Borrador',\n ]);\n \n App\\Models\\PostStatu::create([\n 'status_txt' => 'Publicado',\n ]);\n\n App\\Models\\PostStatu::create([\n 'status_txt' => 'Oculta',\n ]);\n \n App\\Models\\Post::create([\n 'user_id' => 1,\n 'title' => 'Primer Post',\n 'body' => 'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Reiciendis deserunt quisquam dolore iusto impedit repellendus quam odio porro laborum harum facilis non accusantium ducimus, est dolores amet ab temporibus numquam.',\n 'category_id' => 1,\n 'status_id' => 1\n ]);\n\n\n\n\n //factory(App\\Models\\Category::class, 8)->create();\n // factory(App\\Models\\Post::class, 24)->create();\n \n }", "title": "" }, { "docid": "9ba09b0cd477f6bcc7e404fb53ae0298", "score": "0.7893209", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Category::insert([\n ['name' => 'Computer'],\n ['name' => 'Cellphone'],\n ['name' => 'Watch'],\n ['name' => 'Headphone']\n ]);\n Subcategory::insert([\n ['name' => 'Laptop', 'category_id' => '1'],\n ['name' => 'Desktop', 'category_id' => '1'],\n ['name' => 'Iphone', 'category_id' => '2'],\n ['name' => 'Wrist', 'category_id' => '3'],\n ['name' => 'Wired', 'category_id' => '4']\n ]);\n }", "title": "" }, { "docid": "ca98272f756ed2422862b346c61bd5a3", "score": "0.7889463", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Professional::factory(20)->create();\n \\App\\Models\\MedicalCenter::factory(12)->create();\n \\App\\Models\\Affiliate::factory(200)->create();\n\n $this->SeedSpecializations();\n $this->SeedProfessionalSpecializations();\n $this->SeedAvailability();\n }", "title": "" }, { "docid": "efa9a59b6fcaad178163e02ca6c3670b", "score": "0.78812075", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('books')->truncate();\n // Only seed if not in production environment\n if (!App::environment('production')) {\n $payload = [\n ['Php In Use', 'thanhnt'],\n ['Advance Java', 'tuvd'],\n ['Html5 practical', 'vidm'],\n ];\n foreach ($payload as $book) {\n Book::create([\n 'title' => $book[0],\n 'author' => $book[1],\n ]);\n }\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "b4aa656fb085f9b1b9a13c6a767fa97e", "score": "0.78684664", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n factory(App\\User::class, 20)->create()->each(function ($users) {\n // Seed the relation with one address\n $songs = factory(App\\Songs::class)->make();\n $users->songs()->save($songs);\n \n }); \n\n }", "title": "" }, { "docid": "b64e1978db418d4451b3ed7886d2c896", "score": "0.7867829", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n // DB::table('advisors')->delete();\n\n $advisors = [\n ['id' => '0001111', 'first_name' => 'Hassan', 'last_name' => 'Reza', 'email' => '[email protected]'],\n ['id' => '0002222', 'first_name' => 'Travis', 'last_name' => 'Desell', 'email' => '[email protected]'],\n ];\n\n // Uncomment the below to run the seeder\n DB::table('advisors')->insert($advisors);\n }", "title": "" }, { "docid": "83806ba52791ac39317a9e97fdf5a167", "score": "0.78631747", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Post::class, 10)->create();\n factory(User::class, 10)->create();\n factory(Catagory::class, 10)->create();\n }", "title": "" }, { "docid": "ab431e20cc3d00876d3107671e71dfce", "score": "0.7857198", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n DB::table('rols')->insert([\n 'nombre'=>'Administradores',\n 'estado' =>1\n ]);\n\n\n DB::table('personas')->insert([\n 'nombre'=>'admin',\n 'idRol' => 1,\n 'estado' =>1\n ]);\n\n\n DB::table('usuarios')->insert([\n 'nombre'=>'admin',\n 'password' => 'admin',\n 'idPersona' => 1,\n 'estado' => 1\n ]);\n\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Bodeguero',\n 'estado' =>1\n ]);\n\n\n DB::table('rols')->insert([\n 'nombre'=>'Empleados',\n 'estado' =>1\n ]);\n\n }", "title": "" }, { "docid": "60ca7f756e4476d50cae23404adff94e", "score": "0.7848712", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\User::class, 'admin', 1)->create();\n factory(App\\Event::class, 10)->create();\n factory(App\\Vacation::class, 10)->create();\n factory(App\\UserActivites::class, 10)->create();\n \n\n for ($i = 1; $i <= 10; $i++ ) {\n DB::table('user_vacation')->insert([\n 'user_id' => rand(1, 10),\n 'vacation_id' => rand(1, 10)\n ]);\n }\n DB::table('roles')->insert([\n [\n 'role_name' => \"admin\",\n ],\n [\n 'role_name' => \"manager\",\n ],\n [\n 'role_name' => \"employee\",\n ],\n ]);\n }", "title": "" }, { "docid": "87e9177da05f4ca3502f77df8e5593ef", "score": "0.78444487", "text": "public function run()\n {\n // DB::table('users')->truncate();\n // factory(User::class)->create(\n // [\n // \"email\"=>\"[email protected]\",\n // \"password\"=>Hash::make(App::environment(\"DB_PASSWORD\"))\n // ]\n // );\n $this->call(CategorySeeder::class);\n \n $this->call(DiscountSeeder::class);\n\n }", "title": "" }, { "docid": "9b678da2216c7ad2d5530677c1dba41e", "score": "0.7829541", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\App\\Sport::truncate();\n \t$sports = [\n \t\t[\n \t\t\t'name' => 'Basquete',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Volei',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Futebol',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Canoagem',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Tênis de mesa',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Bets',\n \t\t],\n \t\t[\n \t\t\t'name' => 'Pipa',\n \t\t],\n \t];\n \t\n \t\n \t\\App\\Sport::insert($sports);\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }", "title": "" }, { "docid": "2d62531f18a91512d0a3f0505f4ef886", "score": "0.78210163", "text": "public function run()\n {\n\n $faker= Faker::create();\n\n foreach (range(1,100) as $index){\n Article::create([\n 'title'=>$faker->sentence(6),\n 'description'=>$faker->paragraph(1),\n ]);\n }\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "08a77e0fbb8703933812bc2c29d383da", "score": "0.78156805", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Langage::class, 5)\n ->create()\n ->each(function($lang) {\n $lang->translations()->saveMany(factory(App\\Translation::class,\n rand(2, 4))->make());\n });\n }", "title": "" }, { "docid": "a6e889f662490d03076345e00e725d10", "score": "0.7809831", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('events')->insert([\n 'name' => 'sport',\n 'description' => 'football match ',\n 'address' => 'alex gleem '\n ]);\n DB::table('events')->insert([\n 'name' => 'art',\n 'description' => 'draw ',\n 'address' => 'alex sedy gaber '\n ]);\n DB::table('events')->insert([\n 'name' => 'running',\n 'description' => 'running ',\n 'address' => 'alex mandara '\n ]);\n }", "title": "" }, { "docid": "6dca1a129907a23e6374ee008363cb13", "score": "0.7809656", "text": "public function run()\n {\n // La creación de datos de roles debe ejecutarse primero\n $this->call(RoleTableSeeder::class);\n\n // Los usuarios necesitarán los roles previamente generados\n $this->call(UserTableSeeder::class);\n \n DB::table('places')->insert(['place'=>'Depósito']);\n DB::table('places')->insert(['place'=>'Showroom']);\n \n DB::table('img_categories')->insert(['category'=>'previewA']);\n DB::table('img_categories')->insert(['category'=>'previewB']);\n DB::table('img_categories')->insert(['category'=>'previewLarge']);\n DB::table('img_categories')->insert(['category'=>'imgCatalog']);\n \n DB::table('shoe_categories')->insert(['name'=>'Boots']);\n DB::table('shoe_categories')->insert(['name'=>'Sandals']);\n DB::table('shoe_categories')->insert(['name'=>'Stilettos']);\n DB::table('shoe_categories')->insert(['name'=>'Flats']);\n DB::table('shoe_categories')->insert(['name'=>'Tango']);\n \n /* factory(Shoe::class)->times(6)->create(); */\n\n DB::table('addresses')->insert([\n 'user_id'=> 1,\n 'name'=> 'Showroom',\n 'surname'=>'Laila Frank',\n 'street'=>'3 de Febreo',\n 'number'=>'1390',\n 'floor'=>'floor',\n 'apartment'=>'Planta baja E',\n 'city'=>'Capital Federal',\n 'state'=>'Buenos Aires',\n 'post_code' =>'C1428AHD',\n 'country'=>'Argentina'\n ]);\n }", "title": "" }, { "docid": "42022b50cf9926c784f4e79e0feacbdb", "score": "0.78001225", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Event::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 Event::create([\n 'image' => $faker->image(),\n 'name' => $faker->name(),\n 'date_time' => $faker->date(),\n 'venue' => $faker->address,\n 'phone' => $faker->phoneNumber,\n 'u_id' => $faker->numberBetween($min=1,$max=11), \n 'o_id' => $faker->numberBetween($min=1,$max=11)\n ]);\n }\n }", "title": "" }, { "docid": "f875ec63b40623c53ead81b3a234fea0", "score": "0.7794292", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => \"root\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('phones')->insert([\n 'user_id' => 1,\n 'number' => \"593101010\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My first comment\",\n ]);\n\n DB::table('comments')->insert([\n 'user_id' => 1,\n 'text' => \"My second comment\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"customer\",\n ]);\n\n DB::table('roles')->insert([\n 'name' => \"admin\",\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1,\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 2,\n 'user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "afa07ed6bd16bbdeb1f41cb52db0a467", "score": "0.7788638", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Yuri Ramos Canário Campos',\n 'password' => 'root',\n 'email' => '[email protected]'\n ]);\n \n DB::table('languages')->insert(['name' => 'english']);\n DB::table('languages')->insert(['name' => 'portuguese']);\n DB::table('languages')->insert(['name' => 'spanish']);\n DB::table('knowledges')->insert(['title' => 'Javascript']);\n DB::table('knowledges')->insert(['title' => 'Laravel']);\n DB::table('knowledges')->insert(['title' => 'PHP']);\n DB::table('knowledges')->insert(['title' => 'Delphi']);\n DB::table('courses')->insert(['title' => 'Javascript para Idiotas','emissor' => 'Colégio Dona Bimbinha']);\n DB::table('courses')->insert(['title' => 'Laramassa','emissor' => 'Robertinho Cursos']);\n DB::table('formations')->insert([\n 'title' => 'Analista de Sistemas',\n 'level' => 'Superior'\n ]);\n DB::table('curriculums')\n ->insert(['address'=> 'Coronel Elysio Pereira, 71','phone' => '3422-5194', 'cellphone' => '98535-7065', 'id_user' => 1]);\n }", "title": "" }, { "docid": "e877ab72f0de79c5f54deb3654d66410", "score": "0.7775003", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(\\App\\Model\\User::class, 5)->create();\n //factory(\\App\\Model\\News::class, 150)->create();\n //factory(\\App\\Model\\BookCategory::class, 10)->create();\n //factory(\\App\\Model\\Books::class, 100)->create();\n // factory(\\App\\Model\\Ticket::class, 20)->create();\n //factory(\\App\\Model\\Forum::class, 10)->create();\n //factory(\\App\\Model\\ForumAnswer::class, 40)->create();\n //factory(\\App\\Model\\Community::class, 30)->create();\n //factory(\\App\\Model\\CommunityPost::class, 90)->create();\n //factory(\\App\\Model\\Elon::class, 90)->create();\n //factory(\\App\\Model\\VideoCourse::class, 50)->create();\n //factory(\\App\\Model\\VideoCourseGallery::class, 150)->create();\n //factory(\\App\\Model\\FaqCategory::class, 10)->create();\n //factory(\\App\\Model\\Faq::class, 100)->create();\n// factory(\\App\\Model\\PoolResult::class, 50)->create();\n// factory(\\App\\Model\\Notice::class, 50)->create();\n\n }", "title": "" }, { "docid": "7784ebb5b249a5db796b6f9983ce71ff", "score": "0.77745116", "text": "public function run()\n {\n $user = App\\User::all()->pluck('id')->toArray();\n $faker = Faker::create();\n\n DB::table('posts')->insert([\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to use a lightsaber efficiently',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to deal with an distant father',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n [\n 'user_id' =>Arr::random($user),\n 'title' => 'How to lose a holochess game to a Wookie',\n 'body' => $faker->text($maxNbChars = 2000),\n ],\n ]);\n }", "title": "" }, { "docid": "05d569ef8b55f0987f197ee527ce3d09", "score": "0.77744925", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\User::class, 20)->create();\n factory(App\\Models\\Location::class, 20)->create();\n factory(App\\Models\\Category::class, 10)->create();\n factory(App\\Models\\Course::class, 20)->create();\n factory(App\\Models\\Tutor::class, 20)->create();\n factory(App\\Models\\Role::class, 3)->create();\n \n }", "title": "" }, { "docid": "27fc74dfbd1c11bbbe2e4767b9aef069", "score": "0.77672327", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n\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// \\App\\User::create([\n// 'name' => $faker->sentence,\n// 'email' => $faker->email,\n// 'password' => $faker->password(8, 15),\n// 'api_token' => $faker->name('Jll7q0BSijLOrzaOSm5Dr5hW9cJRZAJKOzvDlxjKCXepwAeZ7JR6YP5zQqnw')\n// ]);\n// }\n for ($i = 0; $i < 50; $i++) {\n \\App\\Job::create([\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'organization' => $faker->sentence,\n 'type' => $faker->word('U'),\n 'salary' => $faker->numberBetween(10000,50000),\n 'date' => $faker->date('1996-08-26')\n ]);\n }\n }", "title": "" }, { "docid": "e81d2ef647926f3ba5603be994a414ca", "score": "0.7765724", "text": "public function run()\n {\n // users table seeds\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'user_type' => 1,\n 'status' => 1,\n ]);\n\n // users table seeds\n DB::table('roles')->insert([\n 'name' => 'admin',\n 'display_name' => 'Administrator',\n 'description' => 'administrator can access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'instructor',\n 'display_name' => 'Instructor',\n 'description' => 'instructor can not access admin panel',\n ]);\n\n DB::table('roles')->insert([\n 'name' => 'student',\n 'display_name' => 'Student',\n 'description' => 'student can not access admin panel',\n ]);\n\n // permissions table seeds\n DB::table('permissions')->insert([\n 'name' => 'question',\n 'display_name' => 'question',\n 'description' => 'question',\n ]);\n\n DB::table('permissions')->insert([\n 'name' => 'exam',\n 'display_name' => 'exam',\n 'description' => 'exam',\n ]);\n }", "title": "" }, { "docid": "e21ba40d9f1a7c1c807e323e4659bf00", "score": "0.7761533", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \\App\\User::truncate();\n \\App\\Profile::truncate();\n \\App\\Group::truncate();\n \\App\\GroupUser::truncate();\n\n $user = factory('App\\User')->create([\n 'email' => '[email protected]',\n 'password' => bcrypt(123123),\n 'is_confirmed' => true\n ]);\n\n factory('App\\Profile')->create(['user_id' => $user->id]);\n\n $users = factory('App\\User', 100)->create();\n\n $groups = factory('App\\Group', 20)->create();\n\n $users->each(function ($user) {\n factory('App\\Profile')->create(['user_id' => $user->id]);\n });\n\n $groups->each(function ($group) {\n factory('App\\GroupUser', 5)->create(['group_id' => $group->id]);\n });\n\n }", "title": "" }, { "docid": "ddcf0166e4683fc6ddd3a15c1619f33f", "score": "0.7761254", "text": "public function run()\n {\n $categories = ['Bollywood','Hollywood','Sports','Politics','Health','Tips','Local'];\n foreach($categories as $category){\n DB::table('categories')->insert([\n 'title' => $category\n ]);\n }\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Category::class, 10)->create();\n // factory(App\\User::class, 10)->create();\n }", "title": "" }, { "docid": "2a91b06c48e8a30771182a29303f45e7", "score": "0.77577376", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n $this->call(GenreSeeder::class);\n $this->call(FollowSeeder::class);\n factory(App\\Shelf::class,4)->create();\n $this->call(reviewSeeder::class);\n //factory(App\\Review::class,1)->create();\n /*factory(App\\User::class, 50)->create();\n factory(App\\Author::class, 20)->create();\n factory(App\\Book::class, 50)->create();\n factory(App\\Review::class,50)->create();\n factory(App\\Genre::class, 20)->create();\n factory(App\\Comment::class,30)->create();\n factory(App\\Likes::class,30)->create();\n factory(App\\Shelf::class,20)->create();\n factory(App\\Following::class,15)->create();*/\n\n }", "title": "" }, { "docid": "7ceb2ba0b5921e33483bce90bd4dcff8", "score": "0.7755898", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::table('items')->delete();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few items in our database:\n for ($i = 0; $i < 50; $i++) {\n $item_create = Item::create([\n 'name' => $faker->name,\n 'qnt' => $faker->numberBetween(1, 200),\n 'value' => $faker->numberBetween(1, 1264),\n 'category' => $faker->word,\n 'subcategory' => $faker->word,\n 'collection_id' => $faker->numberBetween(0, 1264),\n 'tags' => $faker->shuffleArray([\"porsche\", \"design\"]),\n ]);\n $item_create -> orders() -> attach(Order::all()->random());\n }\n }", "title": "" }, { "docid": "9844485296efb745821003e46a8eb05f", "score": "0.7749864", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Calling Category Table Seeder\n // $this->call(CategoryTableSeeder::class);\n\n factory(Category::class,100)->create();\n factory(Person::class,100)->create();\n factory(Post::class,100)->create();\n }", "title": "" }, { "docid": "57c330d48459442abbc71684fe360201", "score": "0.77471614", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 4)->create();\n// factory(\\App\\Post::class, 15)->create();\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserRolesTableSeeder::class);\n $this->call(AttributeGroupsSeeder::class);\n $this->call(AttributeProductsSeeder::class);\n $this->call(AttributeValuesSeeder::class);\n $this->call(BrandsSeeder::class);\n $this->call(CategoriesSeeder::class);\n $this->call(CurrenciesSeeder::class);\n $this->call(GalleriesSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(RelatedProductsSeeder::class);\n $this->call(OrdersSeeder::class);\n $this->call(AdminOrderProductsSeeder::class);\n }", "title": "" }, { "docid": "70d62fecb535e08b51a51e4932b4b2b3", "score": "0.77444977", "text": "public function run()\n {\n //\\App\\Models\\User::factory(1)->create();\n\n //Category::factory(3)->create();\n \n Tag::factory(10)->create();\n\n /*$this->call([\n PostsTableSeeder::class\n ]);*/\n }", "title": "" }, { "docid": "c76cc6eac7d476133144a0afc9b69d55", "score": "0.7744303", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Category::class,5)->create();\n factory(Question::class,5)->create();\n factory(Reply::class,50)->create()->each(function($reply){\n return $reply->like()->save(factory(Likes::class)->make());\n });\n User::create([\n 'name' => 'hamdi',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678')\n ]);\n }", "title": "" }, { "docid": "6260cdf97e46414c2a70f26808235789", "score": "0.77442646", "text": "public function run()\n {\n $this->cleanDatabase();\n \n Model::unguard();\n\n factory('App\\User',10)->create();\n factory('App\\Candidate', 10)->create();\n factory('App\\CandidateReview', 20)->create();\n\n // factory('App\\Candidate',10)->create()->each(function($candidate) use ($faker){\n\n // factory('App\\Review', 2)->create([ \n // 'user_id' => 1,\n // 'candidate_id' => $candidate->id,\n // 'review' => $faker->paragraph\n // ]);\n\n // });\n\n\n Model::reguard();\n }", "title": "" }, { "docid": "8044f6e9d8f8fc34aeb7da3559bef600", "score": "0.7743904", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//quitar validaciones de llaves foeranas\n \tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //truncaremos la tablas para eliminar datos existentes\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n //Ejecutamos factoris\n\n $CantidadUsuarios = 200;\n $CantidadCategorias = 70;\n $CantidadProductos = 2500;\n $CantidadTransaciones = 1650;\n\n\n factory(User::class, $CantidadUsuarios)->create();\n\n factory(Category::class, $CantidadCategorias)->create();\n\n factory(Product::class, $CantidadProductos)->create()->each(\n\n \t function ($producto)\n \t{\n \t\t$categorias = Category::all()->random(mt_rand(1, 5))->pluck('id');\n \t\t$producto->categories()->attach($categorias);\n \t}\n );\n\n factory(Transaction::class, $CantidadTransaciones)->create();\n }", "title": "" }, { "docid": "764c005a9562e9bdd683c2a6a7fbc498", "score": "0.7740468", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // insert Fake data to table\n\n\n DB::table('companies')->insert(['name' => \"Company 1\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 2\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 3\", 'created_at' => now()]);\n DB::table('companies')->insert(['name' => \"Company 4\", 'created_at' => now()]);\n\n\n DB::table('specialties')->insert(['name' => \"IT\", 'created_at' => now()]);\n DB::table('specialties')->insert(['name' => \"DT\", 'created_at' => now()]);\n\n\n DB::table('users')->insert([\n \"name\" => \"abd\",\n \"email\" => \"abd@haboub\",\n \"password\" => '$2y$10$F6qgEnGfdKncSgldWYchRerE4HjeI6lm1Zg7u8QPRFrsJSmk70Ava',\n \"role\" => 0,\n ]);\n }", "title": "" }, { "docid": "c6bb2cf6f8efd0afe02972619083aff6", "score": "0.7738983", "text": "public function run()\n {\n // Seed database with sample data\n $this->call(RolesTableSeeder::class);\n $this->call(OrganizationTypesTableSeeder::class);\n $this->call(MemberTypesTableSeeder::class);\n $this->call(OrganizationsTableSeeder::class);\n $this->call(MembersTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ShowTypesSeeder::class);\n $this->call(ShowsTableSeeder::class);\n $this->call(PaymentMethodsTableSeeder::class);\n $this->call(EventTypesSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(TicketTypesTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTypeTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(RolesAccessControlSeeder::class);\n $this->call(GradesSeeder::class);\n $this->call(PositionsTableSeeder::class);\n\n }", "title": "" }, { "docid": "7b3e6bbb4a66db96f151afdc65f1835a", "score": "0.77370405", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n UsersTableSeeder::class,\n RoleUserTableSeeder::class,\n TeamTableSeeder::class,\n TeamUserTableSeeder::class,\n CategorySeeder::class,\n ]);\n\n Blog::factory(5)->create(); // Create 5 blogs\n Tag::factory(2)->create(); // Create 8 tags\n\n foreach(Blog::all() as $blog){ // loop through all posts \n $random_tags = Tag::all()->random(rand(1, 2))->pluck('id')->toArray();\n // Insert random blog tag\n foreach ($random_tags as $tag) {\n DB::table('blog_tag')->insert([\n 'blog_id' => $blog->id,\n 'tag_id' => $tag,\n 'blog_tag_type' => \"blogs\",\n ]);\n }\n }\n }", "title": "" }, { "docid": "93c52e20cd594fea79bf6e21cba5bf0b", "score": "0.7736773", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Role::truncate();\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Role::flushEventListeners();\n\n\n $this->call([\n RoleSeeder::class\n ]);\n\n $usersQuantity = 100;\n $categoriesQuantity = 30;\n $productsQuantity = 100;\n\n User::factory()\n ->count($usersQuantity)\n ->create();\n\n Category::factory()\n ->count($categoriesQuantity)\n ->create();\n\n Product::factory()\n ->count($productsQuantity)\n ->create()\n ->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n\n $product->categories()->attach($categories);\n });\n }", "title": "" }, { "docid": "bfa9e61d9a3e49e7b926d240b764afaa", "score": "0.77351654", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('superadmin_account')->insert([\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('admin')\n // ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'Administrator',\n 'level' => 'Admin',\n 'description' => 'Role for administrator'\n ]);\n\n DB::table('tm_role')->insert([\n 'name' => 'User',\n 'level' => 'User',\n 'description' => 'Role for user'\n ]);\n\n $this->call([\n UserSeeder::class,\n ]);\n\n $this->call([\n ModuleSeeder::class,\n ]);\n\n $this->call([\n MenuSeeder::class,\n ]);\n\n $this->call([\n AccessSeeder::class,\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ]);\n }", "title": "" }, { "docid": "4dcbd25935917c2d381dccc8d7ded3ad", "score": "0.7734701", "text": "public function run()\n {\n City::factory(config('serempre.seeds.cities'))\n ->hasClients(config('serempre.seeds.clients'))\n ->create();\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n User::factory(config('serempre.seeds.users'))\n ->create();\n }", "title": "" }, { "docid": "32ccd27e79a39d71880d591a0a9f0bfc", "score": "0.7732237", "text": "public function run()\n {\n //to insert data into my DB table using seed class and call this seeder class inside DatabseSeeder\n // DB::table('posts')->insert([\n\n // 'title' => 'First Post Title',\n // 'body' => 'First Post Body',\n\n //to insert a second record just change this and run the seed commad.\n\n // 'title' => 'Second Post Title',\n // 'body' => 'Second Post Body',\n // ]);\n //to insert a multiple record at a time use Faker packege and write the below code\n\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence(5),\n 'body' => $faker->paragraph(4),\n ]);\n }\n }", "title": "" }, { "docid": "d681f120866ba260ce624d8f848b39d2", "score": "0.7730474", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n DB::table('posts')->insert([\n 'content' => \"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts of database records. First, review the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>1\n ]);\n DB::table('posts')->insert([\n 'content' =>\"Of course, manually specifying the attributes for each model seed is cumbersome. Instead, you can use model factories to conveniently generate large amounts the model factory documentation to learn how to define your factories. Once you have defined your factories, you may use the factory helper function to insert records into your database.\",\n 'user_id'=>2\n ]);\n }", "title": "" }, { "docid": "5f5815401e74483805353b02311e2841", "score": "0.7728041", "text": "public function run()\n {\n //faker 实例\n $faker=app(Faker\\Generator::class);\n //获取用户ID\n $users=User::all()->pluck(\"id\")->toArray();\n $posts=factory(Post::class)->times(100)->make()->each(function($post,$index) use ($users,$faker){\n $post->user_id=$faker->randomElement($users);\n });\n Post::insert($posts->toArray());\n }", "title": "" }, { "docid": "29b7b2d4d9390099d2c10f37ea147499", "score": "0.7719431", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(LocationSeeder::class);\n Library::factory(1)->create();\n Book::factory(20)->create();\n Category::factory(15)->create();\n rating::factory(20)->create();\n Blog::factory(20)->create();\n }", "title": "" }, { "docid": "bacac0bd28ab92bcc4f659047ceea4f7", "score": "0.7717704", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Tobias de Vargas',\n 'email' =>'[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n DB::table('accs')->insert([\n 'nome' => 'Estágios',\n 'limiteHoras' =>'100',\n 'horas' => '180',\n 'user_id' => '1'\n ]);\n\n }", "title": "" }, { "docid": "752c92fd7013ac44464dfe6590becae6", "score": "0.7717582", "text": "public function run()\n {\n \\DB::table('positions')->delete();\n \\DB::table('divisions')->delete();\n \\DB::table('jabatans')->delete();\n \\DB::table('periodes')->delete();\n\n\n Jabatan::create(['name'=>'Founder']);\n Jabatan::create(['name'=>'Director']);\n Jabatan::create(['name'=>'Manager']);\n Jabatan::create(['name'=>'Staff']);\n\n Periode::create(['name'=>'1.0']);\n Periode::create(['name'=>'2.0']);\n Periode::create(['name'=>'3.0']);\n\n Division::factory(10)->create()->each(function($d) {\n $d->positions()\n ->saveMany(\n Position::factory(rand(4, 8))->make());\n }); \n }", "title": "" }, { "docid": "b8c4b74fe31609e49896f56f36110008", "score": "0.7716862", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n DB::table('users')->insert([\n 'first_name' => 'Администратор',\n 'email' => '[email protected]',\n 'password' => bcrypt('adminadmin'),\n ]);\n\n DB::table('post_statuses')->insert([\n [ 'name' => 'Неопубликован' ],\n [ 'name' => 'На модерации' ],\n [ 'name' => 'Опубликован' ],\n ]);\n\n DB::table('menuitem_types')->insert([\n [ 'name' => 'Внутренняя ссылка' ],\n [ 'name' => 'Внешняя ссылка' ],\n [ 'name' => 'Маркер' ],\n [ 'name' => 'Группа маркеров' ],\n ]);\n\n\n DB::table('administrators')->insert([\n\n 'username' => 'admin',\n 'password' => bcrypt('adminadmin'),\n 'name' => 'Администратор'\n ]);\n\n DB::table('marker_groups')->insert([\n\n [ 'name' => 'Кухня' ],\n [ 'name' => 'Блюдо' ],\n [ 'name' => 'Дневной рацион' ],\n ]);\n\n Model::reguard();\n }", "title": "" }, { "docid": "1412b7a500fe55705ba8cc8539e01d88", "score": "0.77126175", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $productQty = 200;\n $categoryQty = 20;\n $userQty = 10;\n $transactionQty = 100;\n\n factory(User::class, $userQty)->create();\n factory(Category::class, $categoryQty)->create();\n factory(Product::class, $productQty)->create()->each(function($product){\n \t$categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n \t$product->categories()->attach($categories);\n });\n factory(Transaction::class, $transactionQty)->create();\n\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "5269eca04d3ed6025e05fdb9504e19a7", "score": "0.7711065", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,50)->create();\n // factory(App\\Category::class,50)->create();\n\n $category=new App\\Category();\n $category->title = \"Features\";\n $category->slug = \"features\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Food\";\n $category->slug = \"food\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Travel\";\n $category->slug = \"travel\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Recipe\";\n $category->slug = \"recipe\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Bread\";\n $category->slug = \"bread\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Breakfast\";\n $category->slug = \"breakfast\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Meat\";\n $category->slug = \"meat\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Fastfood\";\n $category->slug = \"fastfood\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Salad\";\n $category->slug = \"salad\";\n $category->save();\n\n $category=new App\\Category();\n $category->title = \"Soup\";\n $category->slug = \"soup\";\n $category->save();\n }", "title": "" }, { "docid": "0f6e15864469f10a25811c4b5ffceae1", "score": "0.77107096", "text": "public function run()\n {\n /*\n $l=12;\n $faker = Faker\\Factory::create();\n for ($i=1; $i <=$l ; $i++) {\n DB::table('posts')->insert([\n 'title' => 'Titulo'.$i,\n 'description' => $faker->text(),\n 'date' => $faker->date(),\n 'image' => \"58b969a711b739.97759974.png\",\n ]);\n DB::table('tags')->insert([\n 'name' => 'tag'.$i\n ]);\n \t}\n\n for ($i=1; $i <=$l ; $i++) {\n DB::table('post_tag')->insert([\n 'tag_id' => random_int(1, $l),\n 'post_id' => random_int(1, $l)\n ]);\n }\n */\n }", "title": "" }, { "docid": "c201b766accf1049c723381225596164", "score": "0.77106935", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(TagsTableSeeder::class); \n \n\n // $roles = App\\Role::all();\n // // Populate the pivot table\n // App\\User::all()->each(function ($user) use ($roles) { \n // $user->roles()->attach(\n // $roles->random(rand(1, 3))->pluck('id')->toArray()\n // ); \n // });\n }", "title": "" }, { "docid": "8a6f5e3e9c04d0e7d353bd8388559963", "score": "0.77106106", "text": "public function run()\n\t{\n\t\t// Safety measure\n\t\tif(App::environment() == 'production')\n\t\t{\n\t\t\texit('No seeding allowed on production!');\n\t\t}\n\n\t\tEloquent::unguard();\n\n\t $this->insertDefaultUsers();\n\n $this->insertGroups();\n\n $this->addGroupToAdmin();\n\n $this->insertExamplePost();\n \t\t\n\t}", "title": "" }, { "docid": "cccf46daff53fc4f07d90d32ee0a1341", "score": "0.77092713", "text": "public function run()\n {\n $this->call(AdminsTableSeeder::class);\n\n \\App\\Models\\Teacher::factory(100)->create();\n \\App\\Models\\Student::factory(200)->create();\n\n $classes = \\App\\Models\\ClassModel::factory(300)->create();\n ClassModel::chunk(300, function ($classes) {\n foreach ($classes as $class) {\n $student = Student::whereDoesntHave('classes', function($query) use ($class) {\n $query->where('classes.id', $class->id);\n })->get()->random();\n \n ClassStudent::factory()->create(['class_id' => $class->id, 'student_id' => $student->id]);\n }\n });\n\n \\App\\Models\\Mark::factory(700)->create();\n }", "title": "" }, { "docid": "38f2e7532c266522e1d0527e4e080cd3", "score": "0.7709134", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n App\\User::truncate();\n App\\Article::truncate();\n App\\ArticlePage::truncate();\n App\\Comment::truncate();\n\n factory(App\\User::class)->states('myself')->create();\n factory(App\\ArticlePage::class, 20)->create();\n \n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "6173f7ee7635dd924f5ec4c33ab9966a", "score": "0.7703554", "text": "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=> $row->id,\n\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'slug'\t\t\t=> $row->slug,\n\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "title": "" }, { "docid": "3517e76e1d8f527e81c70605de01d848", "score": "0.77019715", "text": "public function run()\n {\n $this->seed([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 1\n ]);\n\n $this->seed([\n 'name' => 'user1',\n 'email' => '[email protected]',\n 'password' => bcrypt(000000),\n 'group_id' => 3,\n 'district_id' => 35\n ]);\n\n }", "title": "" }, { "docid": "f69ae85a098afc8ab68302edd3f0490e", "score": "0.7698164", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('category_models')->insert([\n 'category' => 'cat',\n ]);\n DB::table('category_models')->insert([\n 'category' => 'dog',\n ]);\n }", "title": "" }, { "docid": "09a708b4e0b52ad5f5689964fc70b6d0", "score": "0.7697185", "text": "public function run()\n {\n //\\App\\Models\\User::factory(50)->create();\n //\\App\\Models\\Skupina::factory(10)->create();\n //\\App\\Models\\Vlakno::factory(50)->create();\n //\\App\\Models\\Prispevek::factory(250)->create();\n //\\App\\Models\\Zadost::factory(10)->create();\n //\\App\\Models\\Clen::factory(100)->create();\n //\\App\\Models\\Hodnotil::factory(1000)->create();\n //\\App\\Models\\Moderator::factory(20)->create();\n $this->call(TestUserSeeder::class);\n $this->call(TestGroupSeeder::class);\n }", "title": "" }, { "docid": "f9448f6133c6e8b37b6532dad95839af", "score": "0.7694687", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1, 100) as $i) {\n\n \t$year = Year::orderByRaw('RANDOM()')->first();\n \t$school = School::orderByRaw('RANDOM()')->first();\n\n \tClasse::create([\n \t\t'name' => $faker->words(3, true),\n\t\t\t\t'number' => $faker->randomNumber(2,false),\n\t\t\t\t'year_id' => $year->id,\n\t\t\t\t'school_id' => $school->id\n \t]);\n }\n\n }", "title": "" }, { "docid": "eac5616aa00d523969bc5322c2c0dff6", "score": "0.7694383", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n factory(App\\Models\\Setting::class,1)->create();\n //factory(App\\Models\\Customer::class,1)->create();\n \n //factory(App\\Models\\Category::class,10)->create();\n //factory(App\\Models\\Sub_category::class,10)->create();\n //factory(App\\Models\\ChildTag::class,10)->create();\n //factory(App\\Models\\Pro_model::class,10)->create();\n //factory(App\\Models\\Brand::class,10)->create();\n\n factory(App\\Models\\Invoice_setting::class,1)->create();\n }", "title": "" }, { "docid": "b9cff682d2526f461ce57526e042f677", "score": "0.76934123", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Classroom::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few classrooms in our database:\n for ($i = 0; $i < 10; $i++) {\n Classroom::create([\n 'name' => $faker->word, \n ]);\n }\n }", "title": "" }, { "docid": "b7ef246494fe8d88b196c2b7221af528", "score": "0.7691815", "text": "public function run()\n {\n //Users Seeder factory & Books\n factory(App\\User::class, 10)->create()->each(function ($user)\n {\n $user->books()->saveMany(factory(App\\Models\\Book::class, 2)->make());\n });\n\n //Reviews\n factory(App\\Models\\Review::class, 60)->create();\n }", "title": "" }, { "docid": "f61b7d83aa13c60fe3627733a07ab15f", "score": "0.76914847", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n// $this->call(CurrencySeeder::class);\n// $this->call(PermissionsTableSeeder::class);\n// DB::table('users')->insert([\n// 'surname' => 'MR',\n// 'first_name' => 'Imtiaz',\n// 'last_name' => 'ahmed',\n// 'username' => 'admin',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('admin1234'),\n// ]);\n\n// DB::table('business')->insert([\n// 'name' => 'Xyz',\n// 'currency_id' => Currency::first()->id,\n// 'owner_id' => User::first()->id\n// ]);\n// $user = User::first();\n// $user->business_id = Business::first()->id;\n// $user->save();\n }", "title": "" }, { "docid": "4aca49de13fcd4b5b6824cedd323b42a", "score": "0.76904124", "text": "public function run()\n {\n $this->call(EventSpeakerSeeder::class);\n $this->call(EventTypeSeeder::class);\n \n factory(Event::class,10)->create();\n\n factory(Participant::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) {\n factory(EventParticipant::class)->create(['participant_id'=> random_int(1, Participant::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n \n factory(Budget::class,10)->create();\n for ($i=0; $i < Event::count(); $i++) { \n \tfactory(EventBudget::class)->create(['budget_id'=> random_int(1, Budget::count()), 'event_id'=> random_int(1, Event::count())]);\n }\n\n $employee = factory(Employee::class)\n ->create([\n 'email' => '[email protected]',\n 'first_name' => 'Jade',\n 'last_name' => 'Doe',\n 'contact_number' => '09358711471']);\n\n factory(User::class)->create([\n 'email' => $employee->email,\n 'password' => Hash::make('secret'),\n ]);\n }", "title": "" }, { "docid": "d46ce473aff191c97b929677db1af6c9", "score": "0.7689183", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Student',40)->create();\n\n $subjects =['Bangla','English','Math'];\n\n foreach ($subjects as $subject) {\n \\App\\Subject::create(['subName' => $subject]);\n }\n }", "title": "" }, { "docid": "1901f179a21e06626c23a8832671e91a", "score": "0.7688056", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('users')->insert([\n // 'name' => 'John Doe',\n // 'email' => '[email protected]',\n // 'email_verified_at' => now(),\n // 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n // 'remember_token' => Str::random(10)\n // ]);\n\n //factory(App\\User::class, 20)->create();\n\n /*\n $doe=factory(App\\User::class)->states('john-doe')->create();\n $other=factory(App\\User::class, 20)->create();\n $users=$other->concat([$doe]);\n //dd($users->count());\n\n $posts=factory(App\\BlogPost::class, 50)->make()->each(function($post) use ($users) {\n $post->user_id=$users->random()->id;\n $post->save();\n });\n\n $comments=factory(App\\Comment::class, 150)->make()->each(function($comment) use ($posts) {\n $comment->blog_post_id=$posts->random()->id;\n $comment->save();\n });\n */\n\n if($this->command->confirm('Do you want to refresh the database?', true)) {\n $this->command->call('migrate:refresh');\n $this->command->info('Database was refreshed');\n } else {\n return;\n }\n\n $this->call([\n UsersTableSeeder::class,\n BlogPostsTableSeeder::class,\n CommentsTableSeeder::class,\n TagsTableSeeder::class,\n BlogPostTagTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "fedf5ccdccb089bfacd42517c1914214", "score": "0.7686136", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(PostSeeder::class);\n\n // foreach( range(1, 100) as $i) {\n // DB::table('posts')->insert([\n // 'title' => 'First Post',\n // 'content' => 'This is content'\n // ]);\n // }\n\n }", "title": "" }, { "docid": "5f8e1ca4aaa356dde12e347615adf7eb", "score": "0.7683458", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(DepartamentSeeder::class);\n $this->call(TownshipSeeder::class);\n \n User::Create([\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'gender'=>'masculino',\n 'birthdate'=>'2000-12-12',\n 'address'=>'direccion del usuario',\n 'number'=>'18007878',\n 'condition'=>1,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$rq5oCT9eD1szjfUsTn5E8uJWCMCvFRjUsrq85t/pz1Qy9CRxoDADu', // password asd.123456\n 'township_id' => rand(1,200),\n 'profile_photo_path' => 'profile-photos/user.png'\n ])->assignRole('Administrador');\n\n User::factory(20)->create();\n $this->call(UserTypeSeeder::class);\n $this->call(UserStatusSeeder::class);\n $this->call(CategorySeeder::class);\n Subscription::factory(90)->Create();\n $this->call(AdvertStatusSeeder::class);\n\n Advert::factory(90)->create();\n $this->call(CurrencySeeder::class);\n Product::factory(90)->create();\n AdvertComment::factory(10)->create();\n $this->call(AdvertPhotoSeeder::class);\n\n \n \n\n }", "title": "" }, { "docid": "4675f99b4c0549cf01a20835acd2fc30", "score": "0.7682812", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order_Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $usersIDs = DB::table('users')->pluck('id');\n $fruitsIDs = DB::table('users')->pluck('id');\n\n for ($i = 1; $i <= 20; $i++) {\n Order_Fruit::create([\n 'user_id' => $faker->randomElement($usersIDs),\n 'fruit_id' => $faker->randomElement($fruitsIDs),\n 'quantity' => mt_rand(1, 10000)\n ]);\n }\n }", "title": "" }, { "docid": "9ba73b432cc500f657e338ec268d734b", "score": "0.76766217", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $insertUser = [\n 'name' => 'Admin',\n\n 'email' => '[email protected]',\n\n 'email_verified_at' => now(),\n\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\n 'remember_token' => 1\n ];\n\n User::create($insertUser);\n\n //Tipos\n Tipo::create(['nome'=>'Projetor']);\n Tipo::create(['nome'=>'Caixa de Som']);\n Tipo::create(['nome'=>'Cadeira']);\n Tipo::create(['nome'=>'Microfone']);\n //Equipamentos\n Equipamento::create([\n 'nome'=>'Projetor Sala 2',\n 'tombamento'=>520,\n 'tipo_id' =>'1'\n ]);\n Equipamento::create([\n 'nome'=>'Caixa de Som Sala 2',\n 'tombamento'=>420,\n 'tipo_id' =>'2'\n ]);\n Equipamento::create([\n 'nome'=>'Cadeira do L2',\n 'tombamento'=>320,\n 'tipo_id' =>'3'\n ]);\n Equipamento::create([\n 'nome'=>'Microfone da DAEE',\n 'tombamento'=>220,\n 'tipo_id' =>'4'\n ]);\n \n }", "title": "" }, { "docid": "42fc2a1b8f646134de8caf8efc3e3085", "score": "0.7676048", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('colaboradores')->insert([\n \t'nome' => 'Thiago Hofmeister',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99401-7101',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('540120'),\n \t'status' => '1'\n ]);\n DB::table('colaboradores')->insert([\n \t'nome' => 'Tiago Silveira',\n \t'email' => '[email protected]',\n \t'telefone' => '(51) 99366-4639',\n \t'data_nascimento' => '1997-04-25',\n \t'password' => Hash::make('456123'),\n \t'status' => '1'\n ]);\n }", "title": "" }, { "docid": "afbaaf086b3f79ed1f806e9a33187158", "score": "0.7675129", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory('App\\User', 50)->create;\n\n //Model::unguard();\n factory('App\\Estado', 5)->create();\n factory('App\\Municipio', 3)->create();\n factory('App\\Parroquia', 5)->create();\n factory('App\\Filial', 5)->create();\n factory('App\\Nomina', 5)->create();\n //factory('App\\User', 10)->create();\n //factory('App\\Trabajador', 1)->create();\n //factory('App\\Docente', 1)->create();\n factory('App\\Materia', 1)->create();\n //factory('App\\Responsable', 1)->create();\n \n factory('App\\Talla', 4)->create();\n //factory('App\\Institucion', 1)->create();\n //factory('App\\Ruta', 1)->create();\n //factory('App\\Alumno', 1)->create();\n //Model::reguard();\n\n }", "title": "" }, { "docid": "bd0a031dbbd471e642fb795f1cb5d045", "score": "0.7674316", "text": "public function run()\n {\n\n $this->call(\\Database\\Seeders\\RolesSeeder::class);\n $this->call(\\Database\\Seeders\\AdminsSeeder::class);\n \\App\\Models\\Users::factory(4)->create();\n $this->call(\\Database\\Seeders\\CoursesSeeder::class);\n \\App\\Models\\CourseItems::factory(4)->create();\n \\App\\Models\\Assignments::factory(4)->create();\n\n }", "title": "" }, { "docid": "d16b4c245ec59889dc57494208c09493", "score": "0.76738137", "text": "public function run()\n {\n // You can run this seeder after create a db\n // This function can create some fake data\n // sequel pro-test\n\n //need set database as nullable\n // ...->commant()->nullable();\n\n $newResume = new Resume();\n $newResume->name = \"Russell\";\n $newResume->phoneNumber = \"0900000999\";\n $newResume->birthday = \"19960131\";\n $newResume->address = \"home\";\n $newResume->resume = 'hello world';\n //$newResume->resumetyp = 'english';\n $newResume->save();\n }", "title": "" }, { "docid": "7c0b282beba065f3cb3881f8cb6483e6", "score": "0.76734626", "text": "public function run()\n {\n $faker = Factory::create();\n\n factory(User::class, 5)\n ->create()\n ->each(function ($user) use ($faker) {\n factory(Post::class, $faker->numberBetween(2, 20))\n ->create([\n 'user_id' => $user->id\n ])\n ->each(function ($post) use ($faker) {\n factory(Comment::class, $faker->numberBetween(10, 60))\n ->create([\n 'body' => $faker->paragraph,\n 'approved' => mt_rand(1, 2),\n 'type' => mt_rand(1, 10),\n 'commentable_type' => 'App\\Model\\Post',\n 'commentable_id' => $post->id\n ]);\n });\n });\n\n factory(NewsletterSubscription::class, $faker->numberBetween(5, 10))->create();\n //factory(DB::table('post_categories'), $faker->numberBetween(1, 63))->create();\n }", "title": "" }, { "docid": "770a2fa12b33357de3190927264ee1af", "score": "0.76730675", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,20)->create();\n Topic::create(['name'=>'Featured sitest','slug' => 'featured']);\n Topic::create(['name'=>'Useful links','slug' => 'Links']);\n Topic::create(['name'=>'Guides Tutorials','slug' => 'Tutorials']);\n\n factory(Post::class,20)->create();\n\n }", "title": "" }, { "docid": "719751addae7f27742c307b2982b7fd6", "score": "0.76726", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(AdminSeeder::class);\n $this->call(SettingSeeder::class);\n $this->call(AboutSeeder::class);\n $this->call(CounterSeeder::class);\n $this->call(SeoSeeder::class);\n // \\App\\Models\\Slider::factory(5)->create();\n // \\App\\Models\\Customer::factory(15)->create();\n // \\App\\Models\\Course::factory(30)->create();\n // \\App\\Models\\Gallary::factory(50)->create();\n // \\App\\Models\\Bolg::factory(30)->create();\n // \\App\\Models\\Advert::factory(30)->create();\n \n }", "title": "" }, { "docid": "ec09ea32933a15c9ae1def22c2a6e32b", "score": "0.767247", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// $this->call(ThanhVienTableSeeder::class);\n factory(App\\Product::class,50)->create();\n factory(App\\Review::class,300)->create();\n\n }", "title": "" }, { "docid": "da277d77f5d75049f332088792d9a23e", "score": "0.76693535", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n foreach(range(1,10) as $value){\n \tApp\\Models\\Survey::create([\n \t\t'name' => $faker->name,\n \t\t'description' => $faker->text,\n \t\t'user_id' => 1,\n \t\t'category_id' => rand(1,10),\n \t]);\n }\n }", "title": "" }, { "docid": "ed928faf974c57003bc826bb9ccb457a", "score": "0.76690495", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n /*DB::table('posts')->insert([\n 'title' => Str::random(30),\n 'body' => Str::random(500),\n 'slug' => Str::random(20)\n ]);*/\n \n \n \n DB::table('comments')->insert([\n 'comment'=>Str::random(40),\n 'user_id'=>1,\n 'post_id'=>1\n ]);\n //$this->call(RolesTableSeeder::class);\n //$this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "9a06a265677a0b9239626227aead02d5", "score": "0.76680243", "text": "public function run()\n {\n DB::table('patients')->delete();\n $faker = Faker::create();\n echo \"[Seed] Table 'patients'\\n\";\n foreach(range(1, 80) as $i) {\n Patient::create([\n 'name' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'jobtitle' => $faker->jobTitle,\n 'cep' => $faker->numerify('#####-###'),\n 'street' => $faker->streetName,\n 'number' => $faker->buildingNumber(),\n 'district' => $faker->word,\n 'state' => $faker->state,\n 'city' => $faker->city,\n 'cellphone' => $faker->numerify('(##) #####-####'),\n 'phone' => $faker->numerify('(##) ####-####'),\n 'email' => $faker->companyEmail\n ]);\n }\n }", "title": "" }, { "docid": "b1db1834572e6aa1aec44e257c716b76", "score": "0.76651335", "text": "public function run()\n {\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n User::truncate();\n $usersData = [\n ['first_name'=>'Admin', 'last_name'=>'Admin','email'=>'[email protected]' ,'password' => Hash::make('admin123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Prajakta', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('prajakta123'),'contact_no' => '9821258699',\n 'role_id'=>'2','created_at' => Carbon::now(),\n\n ],\n ['first_name'=>'Praju', 'last_name'=>'Sisale','email'=>'[email protected]' ,'password' => Hash::make('praju123'),'contact_no' => '9821258677',\n 'role_id'=>'5','created_at' => Carbon::now(),\n ]\n\n ];\n\n\n DB::table(\"users\")->insert($usersData);\n }", "title": "" }, { "docid": "7de5c832894871b9776743baacb6f84b", "score": "0.7661534", "text": "public function run()\n {\n // $this->call(my_seeds::class)\n //gets unix timestamp\n\t\t$date = new DateTime();\n\t\t$time_now = $date->format('Y-m-d H:i:s');\n\n DB::table('users')->insert([\n 'fname' => \"Ebrahim\",\n 'sname' => \"Ravat\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]);\n\n DB::table('users')->insert([\n 'fname' => \"Bob\",\n 'sname' => \"The Builder\",\n 'email' => \"[email protected]\",\n 'password' => bcrypt('test123')\n ]); \n\n $faker = Faker::create('en_GB');\n $num_of_users = 10;\n $num_of_posts = 25;\n\n foreach (range(1,$num_of_users) as $index) {\n $name = $faker->firstName();\n DB::table('users')->insert([\n 'fname' => $name,\n 'sname' => $faker->lastname(),\n 'email' => $name.\"@\".$faker->domainName,\n 'password' => bcrypt('test123')\n ]);\n } \n\n foreach (range(1,$num_of_posts) as $index) {\n DB::table('rental')->insert([\n 'user_id' => $faker->numberBetween(1,$num_of_users),\n 'title' => $faker->word.\" \".$faker->word,\n 'description' => $faker->paragraph,\n 'make' => $this->randomCarType(),\n 'model' => $faker->word,\n 'avail' => $faker->numberBetween(0,1)\n ]);\n } \n }", "title": "" }, { "docid": "44cb8c34219fda585acb1f8ff6dd4ea1", "score": "0.76614374", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n $faker = \\Faker\\Factory::create();\n\t\tfor ($i=0; $i < 10; $i++) {\n $name = $faker->lastName();\n $firstname = $faker->firstName();\n DB::table('users')->insert([\n 'mail' => $name.'.'.$firstname.'@gmail.com', \n 'password' => md5($name.'.'.$firstname),\n 'nom' => $name,\n 'prenom' => $firstname,\n 'ville' => $faker->address,\n 'login' => $name.'.'.$firstname,\n 'magasin_id' => $faker->numberBetween($min = 1, $max = 10),\n 'created_at' => Now(),\n 'updated_at' => Now(),\n\t\t ]);\n\t\t}\n }", "title": "" }, { "docid": "15bceb499e4f961c56e4636cd137b2e9", "score": "0.76613784", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(VotesTableSeeder::class);\n\n $user = new \\App\\User();\n $user->name = 'Andrey';\n $user->email = '[email protected]';\n $user->password = md5('[email protected]');\n $user->remember_token = md5(time() . '[email protected]');\n $user->id_permission = 1;\n $user->save();\n\n for ($i = 1; $i < 10; $i++) {\n\n $user = new \\App\\User();\n $user->name = 'Andrey' . $i;\n $user->email = $i . '[email protected]';\n $user->password = md5($i . '[email protected]');\n $user->remember_token = md5(time() . '[email protected]' . $i);\n $user->id_permission = 1;\n $user->save();\n }\n\n for ($i = 1; $i < 5; $i++) {\n\n $rand = (int)rand(0, 5);\n\n for ($j = 1; $j < $rand; $j++) {\n $cq = new \\App\\ClosedQuestion();\n $cq->id_votes = $i;\n $cq->id_users = $j;\n $cq->value = (bool)(round(rand()));\n $cq->save();\n }\n }\n }", "title": "" }, { "docid": "0f13bc8606fe11499f6c86ae6956a222", "score": "0.76611", "text": "public function run()\n {\n $faker = Factory::create();\n\n $users = User::all()->pluck('id')->toArray();\n\n for ($i = 1;$i < 20;$i++) {\n $sentence = $faker->sentence(10);\n DB::table('postsenUS')->insert([\n 'title' => $sentence,\n 'user_id' => $faker->randomElement($users),\n 'slug' => $faker->slug,\n 'content' => $faker->text()\n ]);\n }\n }", "title": "" }, { "docid": "1216b563a7d5d0b82da21dc42d8e3a86", "score": "0.7660163", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class)->times(150)->create();\n\n $brands = factory(App\\Brand::class)->times(10)->create();\n $categories = factory(App\\Category::class)->times(9)->create();\n $colors = factory(App\\Color::class)->times(9)->create();\n $sizes = factory(App\\Size::class)->times(7)->create();\n $states = factory(App\\State::class)->times(3)->create();\n $subcategories = factory(App\\Subcategory::class)->times(2)->create();\n $products = factory(App\\Product::class)->times(50)->create();\n \t\t$users = factory(App\\User::class)->times(150)->create();\n \n\n\n\n foreach ($products as $oneProduct) {\n \t\t\t$oneProduct->brand()->associate($brands->random(1)->first()->id);\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n \t\t\t$oneProduct->user()->associate($users->random(1)->first()->id); \n \t\t\t$oneProduct->save();\n\n \t\t\t$oneProduct->colors()->sync($colors->random(3));\n $oneProduct->sizes()->sync($sizes->random(3));\n\n \t\t}\n\n // foreach ($categories as $oneCategory) {\n // $oneCategory->subcategories()->attach($subcategories->random(1)->first()->id);\n // $oneCategory->save();\n // }\n\n\n\n foreach ($categories as $oneCategory) {\n $oneCategory->subcategories()->sync($subcategories->random(2));\n }\n\n\n }", "title": "" }, { "docid": "d4f7e3eb2b114563e335340a50429db0", "score": "0.7659646", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \n $user = new User(\n array(\n 'name' => 'Super Usuario',\n 'email'=> '[email protected]',\n 'password' => bcrypt('rootroot')\n )\n );\n \n $user->save();\n\n $role_admin = new Role(array(\n 'name'=>'admin'\n ));\n $role_admin->save();\n\n $role_user = new Role(array(\n 'name'=>'user'\n ));\n $role_user->save();\n\n $user->roles()->save($role_admin);\n\n $category = new Category(\n array(\n 'name'=>'Todos'\n )\n );\n $category->save();\n\n\n\n }", "title": "" }, { "docid": "9369a1d55f720edc3a33b247d343235e", "score": "0.76572263", "text": "public function run()\n {\n User::factory(3)->create();\n\n User::create([\n 'name' => 'Rizky Kurniawan',\n 'username' => 'rizky',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n Category::create([\n 'name' => 'Web Programming',\n 'slug' => 'web-programming',\n ]);\n\n Category::create([\n 'name' => 'Web Design',\n 'slug' => 'web-design',\n ]);\n\n Category::create([\n 'name' => 'Personal',\n 'slug' => 'personal',\n ]);\n\n Post::factory(20)->create();\n }", "title": "" }, { "docid": "d2fbae49d0c021aff4c1bfc9c0a66c82", "score": "0.76558894", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Comment::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 Comment::create([\n 'post_id' => random_int(1, 50),\n 'user_id' => random_int(1, 14),\n 'content' => $faker->sentence,\n ]);\n }\n }", "title": "" }, { "docid": "4445947d1e55eb937e648f6e94fd1d65", "score": "0.7655459", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'admin',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('1234'),\n 'role'=>'Administrador',\n ]);\n\n DB::table('roles')->insert([\n 'name'=>'admin',\n 'display_name'=>'Administrator',\n 'description'=>'User is allowed to manage and edit other users'\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'edit',\n 'display_name'=>'Edit Users',\n 'description'=>'edit existing users'\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Guanare',\n ]);\n DB::table('cities')->insert([\n 'name'=>'Acarigua',\n ]);\n\n DB::table('cities')->insert([\n 'name'=>'Barquisimeto',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Editar',\n 'description'=>'Editar usuarios y planes',\n ]);\n\n DB::table('permissions')->insert([\n 'name'=>'Eliminar',\n 'description'=>'Eliminar usuarios y planes',\n ]);\n\n }", "title": "" }, { "docid": "dd7cde5dc611b9f3b4a33844e23265fd", "score": "0.7654757", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n $user = factory(User::class)->create([\n 'name' => 'Toko 1',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n factory(Product::class, 20)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "aef72117062b88a29f397c729bb74ff7", "score": "0.7654305", "text": "public function run()\n {\n DB::table('articles')->delete();\n \n $articles = array(\n ['id' => 1, 'title' => 'Project 1', 'body' => 'project-1', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n \n );\n \n // Uncomment the below to run the seeder\n DB::table('articles')->insert($articles);\n }", "title": "" }, { "docid": "829de54450e151544dc6fdd3c107be13", "score": "0.7651256", "text": "public function run()\n {\n DB::table('facl_relations')->delete();\n $projects = array(\n ['cid' => '2', 'fid' => '4'],\n ['cid' => '3', 'fid' => '5'],\n\n );\n // Uncomment the below to run the seeder\n DB::table('facl_relations')->insert($projects);\n }", "title": "" } ]
5285a8acad5df8494b37dfdfce5d611b
Register the application services.
[ { "docid": "3a239677d5bf39422d95c11ca6845fa5", "score": "0.0", "text": "public function register()\n {\n //\n }", "title": "" } ]
[ { "docid": "f307ddae4c4a26c99ca308a131e9f60e", "score": "0.72218496", "text": "public function register()\n {\n $this->registerServices();\n\n\n }", "title": "" }, { "docid": "301f9966b4f7ffddc947257fc37b51bb", "score": "0.7124708", "text": "public function register()\n {\n // $this->app->bind(\n // 'App\\Service\\VueServiceInterface',\n // 'App\\Service\\VueService'\n // );\n \n // $this->app->bind(\n // 'App\\Service\\Seguranca\\PermissaoServiceInterface',\n // 'App\\Service\\Seguranca\\PermissaoService'\n // );\n\n // $this->app->bind(\n // 'App\\Service\\Seguranca\\PerfilServiceInterface',\n // 'App\\Service\\Seguranca\\PerfilService'\n // );\n\n // $this->app->bind(\n // 'App\\Service\\Seguranca\\UsuarioServiceInterface',\n // 'App\\Service\\Seguranca\\UsuarioService'\n // );\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\DisciplinaServiceInterface',\n // 'App\\Service\\Administrador\\DisciplinaService'\n // );\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\AssuntoServiceInterface',\n // 'App\\Service\\Administrador\\AssuntoService'\n // );\n\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\TentativaServiceInterface',\n // 'App\\Service\\Administrador\\TentativaService'\n // );\n\n\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\PerguntaServiceInterface',\n // 'App\\Service\\Administrador\\PerguntaService'\n // );\n\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\RespostaServiceInterface',\n // 'App\\Service\\Administrador\\RespostaService'\n // );\n\n\n // $this->app->bind(\n // 'App\\Service\\Administrador\\ComentarioPerguntaServiceInterface',\n // 'App\\Service\\Administrador\\ComentarioPerguntaService'\n // );\n\n\n\n\n }", "title": "" }, { "docid": "5f5bb1db3172780f250f06634fa8bb56", "score": "0.70303166", "text": "public function register()\n {\n $this->registerConfig();\n $this->registerServices();\n }", "title": "" }, { "docid": "bd56771e24421953e9bb98b8b1614210", "score": "0.69608516", "text": "public function register()\n {\n $this->registerServices();\n\n $this->registerAlias();\n }", "title": "" }, { "docid": "980db177146f5a0e5ba9390526fac2a6", "score": "0.6921294", "text": "public function register()\n {\n $config_path = __DIR__.'/../config/epochta.php';\n\n $this->mergeConfigFrom($config_path, 'epochta');\n\n $this->app->singleton('epochta', function () {\n return new Epochta();\n });\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.69191223", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "bcb2aadafe2d39ccc77424890a46b83b", "score": "0.68816775", "text": "public function register()\n {\n //$this->app->register(TelescopeServiceProvider::class);\n }", "title": "" }, { "docid": "558720872d61b46d11b7f9138d436c98", "score": "0.6874482", "text": "public function register()\n {\n $this->registerConnectionServices();\n }", "title": "" }, { "docid": "72470e8d6271ff475034144ac5564329", "score": "0.68660575", "text": "public function register()\n\t {\n\t\t//I\t\tnjeta na dependência o serviço CategoriaRepositoryEloquent \n\t\t //s\t\tempre que chamar o CategoriaRepository\n\t\t $this->app->bind(\n\t\t 'AgendaWeb\\Repositories\\CategoriaRepository',\n\t\t 'AgendaWeb\\Repositories\\CategoriaRepositoryEloquent'\n\t\t );\n\t\t\n\t\t$this->app->bind(\n\t\t 'AgendaWeb\\Repositories\\EstandeRepository',\n\t\t 'AgendaWeb\\Repositories\\EstandeRepositoryEloquent'\n\t\t );\n\t\t\n\t\t$this->app->bind(\n\t\t 'AgendaWeb\\Repositories\\ParticipanteRepository',\n\t\t 'AgendaWeb\\Repositories\\ParticipanteRepositoryEloquent'\n\t\t );\n\t\t\n\t\t$this->app->bind(\n\t\t 'AgendaWeb\\Repositories\\UserRepository',\n\t\t 'AgendaWeb\\Repositories\\UserRepositoryEloquent'\n\t\t );\n\t}", "title": "" }, { "docid": "f4bce7ab24b860b65455405e7af802e6", "score": "0.6861503", "text": "public function register(): void\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "95f1cddef38dcfe40dcefc3292674748", "score": "0.68514854", "text": "public function register()\n {\n $this->registerPackageServices();\n\n $this->registerLibServices();\n\n $this->registerAppServices();\n\n $this->registerApiV1Services();\n }", "title": "" }, { "docid": "ca8a577d06c7d86353f884b25e318489", "score": "0.6844436", "text": "public function register()\n {\n //\n $this->app->bind(AppointmentInterface::class,AppointmentRepository::class);\n }", "title": "" }, { "docid": "0eab40ee4463b27e065403f9d272b64a", "score": "0.68402004", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/amazon-advertising-api.php', 'amazon-advertising-api');\n // Console commands\n $this->commands([\n AmazonAdvertisingApiTokenCommand::class,\n ]);\n\n // Register the service the package provides.\n $this->app->singleton('amazonadvertisingapi', function ($app) {\n return new AmazonAdvertisingApi;\n });\n }", "title": "" }, { "docid": "52070e4650e9cb66bfd479a3a633de99", "score": "0.6832257", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../configs/resova-api.php', 'resova-api'\n );\n\n $this->app->bind(ResovaApiClient::class);\n }", "title": "" }, { "docid": "b1f9dbae40a499cd6cf42a70ab1ac587", "score": "0.68257815", "text": "public function register()\n {\n $this->registerLogs();\n $this->registerFacade();\n }", "title": "" }, { "docid": "5c6eb4a56144bf9641cd2ef511172a77", "score": "0.6816835", "text": "public function register()\n {\n $this->registerClient();\n $this->registerService();\n $this->commands([SearchBuildIndexCommand::class]);\n }", "title": "" }, { "docid": "dd03781b5d123076e4ad0aa2842782ab", "score": "0.67992765", "text": "public function register()\n {\n $this->registerStorage();\n $this->registerBoardService();\n $this->registerRegistrationService();\n }", "title": "" }, { "docid": "580fde13e7b578469b1f06e177d7c974", "score": "0.67932147", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\PautaRepositoryInterface', 'App\\Repositories\\PautaRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\VotacaoRepositoryInterface', 'App\\Repositories\\VotacaoRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\VotoRepositoryInterface', 'App\\Repositories\\VotoRepository'\n );\n }", "title": "" }, { "docid": "124d6193c86ee045d75316292cf25401", "score": "0.67928123", "text": "public function register()\n {\n $this->registerStatisticsService();\n }", "title": "" }, { "docid": "72956349391884daaef7f5a1802fc3c4", "score": "0.67894924", "text": "public function register()\n {\n $this->app->make('fashiostreet\\seller\\Tabs\\TabsRepository');\n $this->app->make('fashiostreet\\seller\\Shops\\ShopsRepository');\n $this->app->make('fashiostreet\\seller\\Response\\ResponseController');\n $this->app->make('fashiostreet\\seller\\Orders\\OrdersRepository');\n $this->app->make('fashiostreet\\seller\\Common\\CommonController');\n //Response facade binding\n App::bind('FS_Response',function (){\n return new \\fashiostreet\\seller\\Response\\ResponseController;\n });\n\n //image facade binding\n App::bind('FS_Image',function (){\n return new \\fashiostreet\\seller\\Image\\ImageRepository;\n });\n }", "title": "" }, { "docid": "0c148808717fe0b6c637a89f1295a80f", "score": "0.67886496", "text": "public function register()\n {\n // Merge config of simple cms package\n $this->mergeConfigFrom(__DIR__.'/../../config/simplestorage.php', 'simplestorage');\n\n // Register the service the package provides.\n $this->app->bind(SimpleStorageService::class, function() {\n return new SimpleStorageService(\n app('em'),\n Storage::disk('archivos')\n );\n });\n }", "title": "" }, { "docid": "6f8e33132553c2fc9558ca51bf42fccf", "score": "0.67826176", "text": "public function register()\n {\n $this->app->singleton(Epicuros::class, function () {\n return new Epicuros(\n config('epicuros.signing_key.identifier'),\n config('epicuros.signing_key.key'),\n config('epicuros.signing_key.algorithm'),\n config('epicuros.verifying_keys', []),\n [\n 'expire' => config('epicuros.tokens_expire', 60),\n ]\n );\n });\n\n $this->app->alias(Epicuros::class, 'epicuros');\n }", "title": "" }, { "docid": "2022ad1b27ef150c5145128f6dce5afd", "score": "0.6780085", "text": "public function register()\n {\n $this->app->bind(\n 'pizzaexpress\\Repositories\\CategoryRepository',\n 'pizzaexpress\\Repositories\\CategoryRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\ClientRepository',\n 'pizzaexpress\\Repositories\\ClientRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\OrderItemRepository',\n 'pizzaexpress\\Repositories\\OrderItemRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\OrderRepository',\n 'pizzaexpress\\Repositories\\OrderRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\ProductRepository',\n 'pizzaexpress\\Repositories\\ProductRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\UserRepository',\n 'pizzaexpress\\Repositories\\UserRepositoryEloquent'\n );\n $this->app->bind(\n 'pizzaexpress\\Repositories\\CupomRepository',\n 'pizzaexpress\\Repositories\\CupomRepositoryEloquent'\n );\n }", "title": "" }, { "docid": "dd4b3ed8b6e96a8be6c0ca634cf4f422", "score": "0.6775506", "text": "public function register()\n {\n $this->app->bind(\\Textil\\Repositories\\ContatosRepository::class, \\Textil\\Repositories\\ContatosRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\CalendarsRepository::class, \\Textil\\Repositories\\CalendarsRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\HorariosRepository::class, \\Textil\\Repositories\\HorariosRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\CalendarRepository::class, \\Textil\\Repositories\\CalendarRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\PessoasRepository::class, \\Textil\\Repositories\\PessoasRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\ServicosRepository::class, \\Textil\\Repositories\\ServicosRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\ServicoSublimacaoMetroCorridoRepository::class, \\Textil\\Repositories\\ServicoSublimacaoMetroCorridoRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\ServicoSublimacaoLocalizadaFullPrintRepository::class, \\Textil\\Repositories\\ServicoSublimacaoLocalizadaFullPrintRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\ServicoSilkDigitalDtgKornitRepository::class, \\Textil\\Repositories\\ServicoSilkDigitalDtgKornitRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\ServicoWebLogisticaRepository::class, \\Textil\\Repositories\\ServicoWebLogisticaRepositoryEloquent::class);\n $this->app->bind(\\Textil\\Repositories\\FaqRepository::class, \\Textil\\Repositories\\FaqRepositoryEloquent::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "b3ad86e66e942c09bdf8b19b5b312487", "score": "0.67700154", "text": "public function register()\n {\n //cargar helper dentro del servicio:\n require_once app_path().'/Helpers/JwtAuth.php';\n }", "title": "" }, { "docid": "2b360903a4a448588ae925b55da1c9f8", "score": "0.6765497", "text": "public function register()\n {\n //$this->app->make('Sitebill\\Sitebill');\n $this->app->register('Sitebill\\Sitebill');\n\n /*\n $this->app->make('Sitebill\\Http\\Controllers\\SitebillGridController');\n $this->app->register('Sitebill\\Http\\Controllers\\SitebillGridController');\n\n\n $this->app->register(VoyagerEventServiceProvider::class);\n $this->app->register(ImageServiceProvider::class);\n $this->app->register(VoyagerDummyServiceProvider::class);\n $this->app->register(VoyagerHooksServiceProvider::class);\n $this->app->register(DoctrineSupportServiceProvider::class);\n\n $loader = AliasLoader::getInstance();\n $loader->alias('Voyager', VoyagerFacade::class);\n\n $this->app->singleton('voyager', function () {\n return new Voyager();\n });\n\n $this->app->singleton('VoyagerGuard', function () {\n return config('auth.defaults.guard', 'web');\n });\n\n $this->loadHelpers();\n\n $this->registerAlertComponents();\n $this->registerFormFields();\n\n $this->registerConfigs();\n\n if ($this->app->runningInConsole()) {\n $this->registerPublishableResources();\n $this->registerConsoleCommands();\n }\n\n if (!$this->app->runningInConsole() || config('app.env') == 'testing') {\n $this->registerAppCommands();\n }\n */\n }", "title": "" }, { "docid": "09bf8e044843683b5080a9a66720266e", "score": "0.6758991", "text": "public function register()\n {\n $configPath = __DIR__.'/../config/graphiql.php';\n $this->mergeConfigFrom($configPath, 'graphiql');\n if ($this->app->runningInConsole()) {\n $this->commands([\n PublishCommand::class\n ]);\n }\n }", "title": "" }, { "docid": "d5491f1ef0f6621a1cab1eda2c84d4b3", "score": "0.6751095", "text": "public function register()\n {\n// $this->mergeConfigFrom(__DIR__.'/../config/laravellogger.php', 'laravellogger');\n\n // Register the service the package provides.\n// $this->app->singleton('laravellogger', function ($app) {\n// return new LaravelLogger;\n// });\n $this->app->bind('LaravelLogger', function () {\n $request = app(\\Illuminate\\Http\\Request::class);\n\n return app(LaravelLogger::class, [$request->foo]);\n });\n\n// $this->app->make(\"\");\n $this->mergeConfig();\n }", "title": "" }, { "docid": "7044f30d4e8a162389ed24f8c0285395", "score": "0.67463577", "text": "public function register()\n {\n\n $this->app->bind(\n 'App\\Services\\Contracts\\AuthServiceContract',\n 'App\\Services\\AuthService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\RegisterServiceContract',\n 'App\\Services\\RegisterService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\MailServiceContract',\n 'App\\Services\\MailService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\ReminderServiceContract',\n 'App\\Services\\ReminderService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\ScrapeServiceContract',\n 'App\\Services\\ScrapeService'\n );\n\n\n $this->app->bind(\n 'App\\Services\\Contracts\\PinServiceContract',\n 'App\\Services\\PinService'\n );\n }", "title": "" }, { "docid": "b86f609d81c4d6d31d149bdbe0f3477a", "score": "0.6736942", "text": "public function register()\n {\n\n $this->app->bind(\n 'App\\Interfaces\\ProductCategory\\ProductCategoryAttribute\\WattRepositoryInterface','App\\Repositories\\ProductCategory\\ProductCategoryAttribute\\WattRepository');\n $this->app->bind( 'App\\Interfaces\\ProductCategory\\ProductCategoryAttribute\\VoltageRepositoryInterface','App\\Repositories\\ProductCategory\\ProductCategoryAttribute\\VoltageRepository');\n $this->app->bind( 'App\\Interfaces\\ProductCategory\\ProductCategoryAttribute\\CCTRepositoryInterface','App\\Repositories\\ProductCategory\\ProductCategoryAttribute\\CCTRepository');\n $this->app->bind( 'App\\Interfaces\\Quotation\\QuotationRepositoryInterface','App\\Repositories\\Quotation\\QuotationRepository');\n $this->app->bind( 'App\\Interfaces\\Quotation\\QuVerificationRepositoryInterface','App\\Repositories\\Quotation\\QuVerificationRepository');\n $this->app->bind('App\\Interfaces\\Product\\ProductConfigure\\ProductConfigureRepositoryInterface','App\\Repositories\\Product\\ProductConfigure\\ProductConfigureRepository');\n\n }", "title": "" }, { "docid": "035e173320d6073285511847988ee65f", "score": "0.6725", "text": "public function register()\n {\n $this->registerGetResponseService();\n\n if ($this->app->runningInConsole()) {\n $this->registerResources();\n }\n }", "title": "" }, { "docid": "060f750ada72c7fb57fa40d06bdbc030", "score": "0.67223746", "text": "public function register()\n {\n $this->app->bind('AdminLTE', function () {\n return new \\Telegramapp\\Telegram\\AdminPanel\\AdminLTE();\n });\n\n $this->registerManager($this->app);\n $this->registerBindings($this->app);\n // $this->loadViewsFrom(__DIR__.'/Laravel/Resources/views', 'telegram');\n // include __DIR__.'\\Laravel\\routes\\web.php';\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\AdminController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\TeacherController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\StudentsController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\TelegramController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\DashboardController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\RegistrationController');\n $this->app->make('Telegramapp\\Telegram\\Laravel\\Controllers\\LoginController');\n\n $this->clearCompiled();\n \n }", "title": "" }, { "docid": "17bd6a6ec3fedbd73eb7fc07d2d6d09f", "score": "0.67218", "text": "public function register()\n {\n $this->app->singleton(ThirdPartyAuthService::class, function ($app) {\n return new ThirdPartyAuthService(config('settings.authentication_services'), $app['Laravel\\Socialite\\Contracts\\Factory'], $app['Illuminate\\Contracts\\Auth\\Factory'], $app['App\\Services\\RegistrationService'], $app['App\\Repositories\\UserRepository']);\n });\n\n $this->app->singleton(ImageService::class, function ($app) {\n return new ImageService(config('settings.image.max_width'), config('settings.image.max_height'), config('settings.image.folder'), $app['Illuminate\\Contracts\\Filesystem\\Factory']);\n });\n\n $this->app->singleton(RandomWordService::class, function ($app) {\n return new RandomWordService($app['App\\Repositories\\WordRepository'], $app['Illuminate\\Session\\SessionManager'], config('settings.number_of_words_to_remember'));\n });\n\n $this->app->singleton(WordRepository::class, function ($app) {\n return new WordRepository(config('settings.min_number_of_chars_per_one_mistake_in_search'));\n });\n\n $this->app->singleton(CheckAnswerService::class, function ($app) {\n return new CheckAnswerService($app['Illuminate\\Session\\SessionManager'], config('settings.min_number_of_chars_per_one_mistake'));\n });\n }", "title": "" }, { "docid": "741ef1b24290a635967563302542ba13", "score": "0.67181104", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/config/api.php', 'semok.api.amazonproduct');\n\n // Register the service the package provides.\n $this->app->singleton('semok.api.amazonproduct', function ($app) {\n return new AmazonProduct;\n });\n }", "title": "" }, { "docid": "ac69424695766c310c6ed519f9a59460", "score": "0.670965", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n //$this->registerEloquentFactoriesFrom(__DIR__.'/../Database/Factories');\n }", "title": "" }, { "docid": "8761d42f104a8dec94706a5ed55630bd", "score": "0.6707971", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/harvest.php', 'harvest');\n\n $this->app->bind('harvest', ApiManager::class);\n }", "title": "" }, { "docid": "bd3cb9c86a97beb3891b69fc2856a378", "score": "0.6707712", "text": "public function register()\n {\n $this->app->bind(\n 'Illuminate\\Contracts\\Auth\\Registrar', 'App\\Services\\Registrar'\n );\n\n $this->registerFileServices();\n $this->registerEmailService();\n $this->registerUserService();\n $this->registerPaypalService();\n $this->registerTpvService();\n\n $this->registerCartService();\n $this->registerEcommerceService();\n }", "title": "" }, { "docid": "c160b7cd83bb9b1cae5cfb89b791ecfc", "score": "0.6704332", "text": "public function register()\n {\n $configPath = __DIR__.'/../config/report-generator.php';\n $this->mergeConfigFrom($configPath, 'report-generator');\n\n $this->app->bind('pdf.report.generator', function ($app) {\n return new PdfReport ($app);\n });\n $this->app->bind('excel.report.generator', function ($app) {\n return new ExcelReport ($app);\n });\n $this->app->bind('csv.report.generator', function ($app) {\n return new CSVReport ($app);\n });\n $this->app->register('Maatwebsite\\Excel\\ExcelServiceProvider');\n\n $this->registerAliases();\n }", "title": "" }, { "docid": "58cd928f587fb07acfce32641dbbf2f6", "score": "0.6702162", "text": "public function register(): void\n {\n $this->mergeConfigFrom(__DIR__.'/../config/agweria.mpesa.php', 'agweria.mpesa');\n\n $this->commands([\n CreateAppCommand::class,\n RegisterUrl::class,\n ]);\n\n // Register the service the package provides.\n $this->app->singleton('mpesa', function ($app) {\n return new Mpesa;\n });\n }", "title": "" }, { "docid": "5660595c80f4a84087bfaa75679a777d", "score": "0.6701792", "text": "public function register()\n {\n //\n $this->app->bind(\n 'PunkApiService', function () {\n return new PunkApiService(new \\GuzzleHttp\\Client());\n }\n );\n\n $this->app->bind(\n 'FilterProductService', function () {\n return new FilterProductService();\n }\n );\n }", "title": "" }, { "docid": "90768c9208d65da0814db2c49f23eb4a", "score": "0.6694202", "text": "public function register()\n {\n //分类\n $this->app->singleton('App\\Services\\Ifs\\Admin\\CatServices',function(){\n return new CatServicesImpl();\n });\n //属性\n $this->app->singleton('App\\Services\\Ifs\\Admin\\AttrServices',function(){\n return new AttrServicesImpl();\n });\n //商品\n $this->app->singleton('App\\Services\\Ifs\\Admin\\GoodsServices',function(){\n return new GoodsServicesImpl();\n });\n\n }", "title": "" }, { "docid": "b4eb2bedd38286adeeec14fb2d9bc982", "score": "0.6693502", "text": "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n $this->app->register(RepositoryServiceProvider::class);\n\n }", "title": "" }, { "docid": "6401367c01c852ec9813fc970582d947", "score": "0.6692276", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/json_schema_validator.php',\n 'json_schema_validator'\n );\n }", "title": "" }, { "docid": "5f6c02ddab8b65a4482bf4474b71fdbc", "score": "0.6690276", "text": "public function register()\n {\n /*\n |--------------------------------------------------------------\n | Registration Application's Services\n |--------------------------------------------------------------\n |\n | All registration of application's services happen here, stuff\n | that's kinda hard to explain...okay, they are namespace\n | changes made to the namespace of your services so\n | that you could shorthand them, really cool stuff\n |\n */\n\n $this->app->bind(\n 'ProcessImage',\n 'App\\Services\\ProcessImage'\n );\n\n $this->app->bind(\n 'App\\Repositories\\User\\UserRepository',\n 'App\\Repositories\\User\\EloquentUserRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Status\\StatusCommendRepository',\n 'App\\Repositories\\Status\\EloquentStatusCommendRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Messages\\MessageRepository',\n 'App\\Repositories\\Messages\\EloquentMessageRepository'\n );\n\n $this->app->bind(\n 'App\\Repositories\\Profiles\\ProfilesRepository',\n 'App\\Repositories\\Profiles\\EloquentProfilesRepository'\n );\n\n }", "title": "" }, { "docid": "c8ac0a3c44f82468e9a306e6265b20da", "score": "0.66872185", "text": "public function register()\n {\n // Register Services\n $this->app->bind(CurrencyQuotationInterface::class, CurrencyQuotation::class);\n\n // Register Repositories\n }", "title": "" }, { "docid": "3a53e385c976a971cb12c7611af2e6e1", "score": "0.66864026", "text": "public function register()\n {\n $this->app->make('Patricmutwiri\\Pesapal\\PesapalController');\n $this->loadViewsFrom(__DIR__.'/views', 'pesapal');\n $this->mergeConfigFrom(\n __DIR__.'/config/pesapal.php', 'pesapal'\n );\n }", "title": "" }, { "docid": "4d00864e56b3cf85a7a7ca0ed011292a", "score": "0.6685223", "text": "public function register() {\n $this->app->bind(INoticiaRepository::class, NoticiaRepository::class);\n\n }", "title": "" }, { "docid": "a25f30273a5d3291dfb62f8b071429ad", "score": "0.66850334", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/authority.php', 'authority');\n\n $this->app->singleton('authority', function () {\n return new Manager();\n });\n $this->app->booting(function () {\n AliasLoader::getInstance()->alias('Authority', Facade::class);\n });\n app('router')->aliasMiddleware('role', \\Minhbang\\Authority\\Middleware\\Role::class);\n }", "title": "" }, { "docid": "01d500496e6985b45b502f37730d6988", "score": "0.66848856", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'introspection-client');\n }", "title": "" }, { "docid": "72da4a65739f05dc9ebc9a549ac5ddce", "score": "0.668159", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../Config/ServiceDescription.php', 'billomat-service-description'\n );\n\n $this->mergeConfigFrom(\n __DIR__.'/../Config/Config.php', 'billomat'\n );\n }", "title": "" }, { "docid": "475424e2341320c174eaa97085ee0541", "score": "0.66797686", "text": "public function register()\n {\n $this->app->bind(\n ContaRepository::class,\n ContaRepositoryEloquent::class\n );\n\n }", "title": "" }, { "docid": "28ad8e04fd0d5312eba6e80e954dac85", "score": "0.66782236", "text": "public function register()\n {\n $this->registerFormPermissionsCommand();\n\n $this->registerVueApplication();\n }", "title": "" }, { "docid": "f0fa37583ceab0cca3cbe8bce18ec01c", "score": "0.6677289", "text": "public function register(){\n //\n\t\t$this->app->make('KrishnaKodoth\\LogEditor\\LogEditorController');\n\t\t$this->loadViewsFrom(__DIR__.'/views', 'log-view');\n }", "title": "" }, { "docid": "7fc364d5119f1d1abb1ef3f9186daf1b", "score": "0.6675765", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/config/mailpreview.php',\n 'mailpreview'\n );\n\n $this->app->register(MailProvider::class);\n }", "title": "" }, { "docid": "393f8865e85f92c68243979f4b53d9a9", "score": "0.66692835", "text": "public function register()\n {\n $this->app->bind(\n \\App\\Model\\DeletedEventsRecordings\\Repository\\IDeletedEventsRecordingsRepository::class,\n \\App\\Model\\DeletedEventsRecordings\\Repository\\DeletedEventsRecordingsRepository::class\n );\n }", "title": "" }, { "docid": "64ca182f113ae3f3198f88f93abca43e", "score": "0.66656", "text": "public function register()\r\n\t{\r\n\t\tinclude __DIR__ .'/routes.php';\r\n\r\n\t\t// $this->app['tweetcompare'] = $this->app->share(function($app)\r\n\t\t// {\r\n\t\t// \treturn new Tweetcompare;\r\n\t\t// });\r\n\r\n\t\t$this->app->bind('Kcahir\\Tweetcompare\\Repositories\\ServiceRepositoryInterface', 'Kcahir\\Tweetcompare\\Repositories\\TweetsRepository');\r\n\t}", "title": "" }, { "docid": "ed598147f22a87ed51988add6b9a72f3", "score": "0.6665073", "text": "public function register()\n {\n $this->app->bind('App\\Interfaces\\PipeDriveHttpClientInterface','App\\Services\\PipeDriveHttpClient');\n }", "title": "" }, { "docid": "244ad927f58584038eaf5bf3d6344324", "score": "0.66644263", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/config/form.php', 'form');\n\n $this->app->singleton('formservice', function () {\n return new FormService;\n });\n }", "title": "" }, { "docid": "146ac6804c5e3cf7a77461afca8d3cab", "score": "0.6662574", "text": "public function register()\n {\n //\n $this->registerRepositoryMapping();\n }", "title": "" }, { "docid": "e183b3effa645f2f06b0174f38ee2a97", "score": "0.66601837", "text": "public function register()\n {\n\t $this->app->make('Bymega\\Timezones\\TimezonesController');\n }", "title": "" }, { "docid": "d8efcc79794f067e809d4ac2cd0eb2c4", "score": "0.6660145", "text": "public function register()\n {\n $this\n ->registerModels()\n ->registerRepositories()\n ->registerModelFactories()\n ->registerServices()\n ->registerMiddlewares();\n }", "title": "" }, { "docid": "21c43df210804ea9025eaf0f90ad29ac", "score": "0.66600484", "text": "public function register()\r\n\t{\r\n\t\t$this->app->bind(LexiconRepositoryContract::class, LexiconRepository::class);\r\n\t}", "title": "" }, { "docid": "765725ef941c62d3e04d0506fe1bf31d", "score": "0.6658363", "text": "public function register()\n {\n //文章\n $this->app->singleton('App\\Services\\Ifs\\Admin\\ArticleServices',function(){\n return new ArticleServicesImpl();\n });\n //分类\n $this->app->singleton('App\\Services\\Ifs\\Admin\\CatServices',function(){\n return new CatServicesImpl();\n });\n //标签\n $this->app->singleton('App\\Services\\Ifs\\Admin\\TagServices',function(){\n return new TagServicesImpl();\n });\n //评论\n $this->app->singleton('App\\Services\\Ifs\\Admin\\CommentsServices',function(){\n return new CommentsServicesImpl();\n });\n\n }", "title": "" }, { "docid": "c404b06688de10839da765628fc19e7b", "score": "0.66563946", "text": "public function register()\n {\n // Register the app\n $this->registerApp();\n\n // Register Commands\n $this->registerCommands();\n }", "title": "" }, { "docid": "25cc4feee9141eb9c391ed2d1a8f1f05", "score": "0.6653188", "text": "public function register()\n {\n include __DIR__ . '/routes/admin.php';\n include __DIR__ . '/helpers/helpers.php';\n $this->app->register(ImageServiceProvider::class);\n $this->app->register(EntrustServiceProvider::class);\n $this->app->register(DataTablesServiceProvider::class);\n // $this->app->make('Featherwebs\\Mari\\Controllers');\n }", "title": "" }, { "docid": "464b08f5c3e5f741b68d2f062fdbfcb7", "score": "0.6652659", "text": "public function register()\n {\n $this->registerGlide();\n $this->registerUrlBuilder();\n }", "title": "" }, { "docid": "31c6829cc1633e786ff7b9b51674026b", "score": "0.66523135", "text": "public function register()\r\n {\r\n $this->mergeConfigFrom(\r\n __DIR__.'/../../config/swaggervel.php', 'swaggervel'\r\n );\r\n\r\n require_once __DIR__ .'/routes.php';\r\n }", "title": "" }, { "docid": "272b729d45b00004273ce573898c6602", "score": "0.6650265", "text": "public function register() {\n\n\t\t// \\App\\Services\\Empire\n\t\t$this->app->singleton(\\App\\Services\\Empire::class, function($app) {\n\t\t\t$empire = new \\App\\Services\\Empire();\n\t\t\t$empire->setVersion(config('empire.version'));\n\t\t\t$empire->setName(config('empire.name'));\n\n\t\t\treturn $empire;\n\t\t});\n\n\t\t// \\App\\Services\\Game\n\t\t$this->app->singleton(\\App\\Services\\Game::class, function($app) {\n\t\t\t$game = new \\App\\Services\\Game();\n\n\t\t\treturn $game;\n\t\t});\n\t}", "title": "" }, { "docid": "2461c32eba25a087fca5c6a2b36d6e26", "score": "0.6649903", "text": "public function register()\n {\n $this->files = new Filesystem;\n\n // Register the controllers\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Whatsapp\\WhatsappController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Api\\NotificationController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Blacklists\\AdminBlacklistsController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Notifications\\AdminNotificationsController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Notifications\\AdminNotificationsGroupController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\Plantillas\\AdminPlantillasController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\BounceTypes\\AdminBounceTypesController');\n $this->app->make('Clavel\\NotificationBroker\\Controllers\\BouncedEmails\\AdminBouncedEmailsController');\n }", "title": "" }, { "docid": "72eb2bd66eb1dc87f4f72aa24eb3940e", "score": "0.66496354", "text": "public function register()\n\t{\n\t\t$this->registerServiceProviders();\n\n\t\t$this->registerCommands();\n\t}", "title": "" }, { "docid": "eea6896350e4b8ea635d2f0a6922af28", "score": "0.664948", "text": "public function register()\n {\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n// // can bind something into service container here\n// $this->app->singleton(Twitter::class, function (){\n// return new Twitter('api-key'); // remember put api-key into your env file\n// });\n\n $this->app->bind(\n \\App\\Repositories\\UserRepository::class,\n \\App\\Repositories\\DbUserRepository::class\n );\n }", "title": "" }, { "docid": "f5ab7c93387226ccf5ec5ded938f19d3", "score": "0.66491634", "text": "public function register()\n {\n // Register Controllers\n //$this->app->make('Nonoesp\\Folio\\Controllers\\Controller');\n //$this->app->make('Nonoesp\\Folio\\Controllers\\FolioController');\n\n // Merge Config\n $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'folio');\n\n include __DIR__.'/routes.php';\n\n // Create alias\n $this->app->booting(function()\n {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Folio', 'Nonoesp\\Folio\\Facades\\Folio');\n });\n\n $this->app->singleton('folio', function (Container $app) {\n return new Folio();\n });\n $this->app->alias('folio', Folio::class);\n\n }", "title": "" }, { "docid": "7a6d117964f4136c456fecc9d89b9223", "score": "0.664904", "text": "public function register()\n {\n $this->app->bind('App\\Services\\Crawler\\ICrawlerManga', 'App\\Services\\Crawler\\TruyenTranhDotNet');\n }", "title": "" }, { "docid": "8f92377f27c22b2f3e044ad4fb2a32b1", "score": "0.66486496", "text": "public function register()\r\n {\r\n $this->registerServiceProviders();\r\n $this->registerAliases();\r\n $this->registerBladeDirectives();\r\n $this->registerPublishableResources();\r\n $this->registerConfigs();\r\n\r\n $this->app->singleton('mnara', function($app) {\r\n $auth = $app->make('Illuminate\\Contracts\\Auth\\Guard');\r\n return new Mnara($auth);\r\n });\r\n\r\n if ($this->app->runningInConsole()) {\r\n $this->registerPublishableResources();\r\n $this->registerConsoleCommands();\r\n }\r\n }", "title": "" }, { "docid": "e663a2ffc498adb19e41265f53af0736", "score": "0.664815", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../../config/bifrost.php', 'bifrost'\n );\n\n $this->app->register(Config::get('bifrost.app.service_provider', AppServiceProvider::class));\n $this->app->register(Config::get('bifrost.auth.service_provider', AuthServiceProvider::class));\n $this->app->register(Config::get('bifrost.http.service_provider', RouteServiceProvider::class));\n $this->app->register(Config::get('bifrost.event.service_provider', EventServiceProvider::class));\n// $this->app->register(Config::get('bifrost.broadcast.service_provider', BroadcastServiceProvider::class));\n $this->app->register(CorsServiceProvider::class);\n\n if (Config::get('bifrost.http.api.serializer', JsonApiSerializer::class) === JsonApiSerializer::class) {\n $this->app->extend(ValidationFactory::class, function ($service, $app) {\n return new \\Bifrost\\Validation\\Factory($service->getTranslator(), $app);\n });\n }\n\n $this->commands([\n ProjectPermissionsCommand::class,\n ]);\n }", "title": "" }, { "docid": "d4130b87c127ea7a876a413ac5174413", "score": "0.66481185", "text": "public function register()\n\t{\n\t\t$this->mergeConfigFrom(\n\t\t __DIR__.'/../config/themes.php', 'themes'\n\t\t);\n\n\t\t$this->app->register(HelperServiceProvider::class);\n\n\t\t$this->commands(\n 'pierresilva\\Themes\\Console\\Generators\\GenerateThemeCommand'\n );\n\n\t\t$this->registerServices();\n\t}", "title": "" }, { "docid": "f028a24e6f5940e18e88e9143c65bed8", "score": "0.664664", "text": "public function register ()\n {\n $this->app->register(RouteServiceProvider::class);\n\n }", "title": "" }, { "docid": "0fa02fdc0a145856470047ae16084ad5", "score": "0.66462487", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n /*$this->citizenRegister();*/\n }", "title": "" }, { "docid": "4ee2df04c0e35bf0726f23d4c65a2590", "score": "0.66415983", "text": "public function register()\n {\n /*\n * =============== REPOSITORY ===============\n * */\n $this->app->bind(\n 'App\\Repositories\\ProductTypeRepositoryInterface',\n 'App\\Repositories\\Eloquent\\ProductTypeEloquentRepository'\n );\n\n /*\n * =============== SERVICE ===============\n * */\n $this->app->bind(\n 'App\\Services\\ProductTypeServiceInterface',\n 'App\\Services\\Implement\\ProductTypeService'\n );\n }", "title": "" }, { "docid": "e2e8101c066b8a4f374921d6eddc2024", "score": "0.66415757", "text": "public function register()\n {\n $this->registerUserRepository();\n $this->registerRoleRepository();\n $this->registerPermissionRepository();\n $this->registerDepartRepository();\n $this->registerDataruleRepository();\n }", "title": "" }, { "docid": "edbf22e632e1cbf64351bf0c2554842f", "score": "0.6640764", "text": "public function register()\n {\n //菜单表的注册服务类\n $this->app->singleton(\"AdminMenuRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminMenuRepository();\n });\n\n //菜单角色表的注册服务类\n $this->app->singleton(\"AdminMenuRoleRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminMenuRoleRepository();\n });\n\n //权限表的注册服务类\n $this->app->singleton(\"AdminPermissionRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminPermissionRepository();\n });\n\n //角色表的注册服务类\n $this->app->singleton(\"AdminRoleRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminRoleRepository();\n });\n\n //角色权限表的注册服务类\n $this->app->singleton(\"AdminRolePermissionRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminRolePermissionRepository();\n });\n\n //用户表的注册服务类\n $this->app->singleton(\"AdminUserRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminUserRepository();\n });\n\n //用户角色表的注册服务类\n $this->app->singleton(\"AdminUserRoleRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\AdminUserRoleRepository();\n });\n\n //系统配置信息的注册服务类\n $this->app->singleton(\"SystemConfigRepository\", function ($app) {\n return new \\App\\Http\\Common\\Repository\\SystemConfigRepository();\n });\n }", "title": "" }, { "docid": "f9dc3403afa564e04ed20f25699ae9fe", "score": "0.6639667", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\ArticleInterface',\n 'App\\Services\\ArticleService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserInterface',\n 'App\\Services\\UserService'\n );\n $this->app->bind(\n 'App\\Contracts\\YoutubeInerface',\n 'App\\Services\\YoutubeService'\n );\n $this->app->bind(\n 'App\\Contracts\\GalleryInterface',\n 'App\\Services\\GalleryService'\n );\n $this->app->bind(\n 'App\\Contracts\\SubMenuInterface',\n 'App\\Services\\SubMenuService'\n );\n $this->app->bind(\n 'App\\Contracts\\LanguageInterface',\n 'App\\Services\\LanguageService'\n );\n $this->app->bind(\n 'App\\Contracts\\NewsInterface',\n 'App\\Services\\NewsService'\n );\n $this->app->bind(\n 'App\\Contracts\\PageGalleryServiceInterface',\n 'App\\Services\\PageGalleryService'\n );\n $this->app->bind(\n 'App\\Contracts\\SportInterface',\n 'App\\Services\\SportService'\n );\n $this->app->bind(\n 'App\\Contracts\\GamePageInterface',\n 'App\\Services\\GamePageService'\n );\n $this->app->bind(\n 'App\\Contracts\\GameCategoryInterface',\n 'App\\Services\\GameCategoryService'\n );\n $this->app->bind(\n 'App\\Contracts\\InteresInterface',\n 'App\\Services\\InteresService'\n );\n $this->app->bind(\n 'App\\Contracts\\SubscripeInterface',\n 'App\\Services\\SubscripeService'\n );\n $this->app->bind(\n 'App\\Contracts\\RatingInterface',\n 'App\\Services\\RatingService'\n );\n $this->app->bind(\n 'App\\Contracts\\CommentInterface',\n 'App\\Services\\CommentService'\n );\n }", "title": "" }, { "docid": "527e22bc0be8193c36fdd3556e78148a", "score": "0.6639576", "text": "public function register()\n {\n // Register ServiceProviders\n App::register('Maknz\\Slack\\Laravel\\ServiceProvider');\n // Register aliases\n $alias = AliasLoader::getInstance();\n $alias->alias('Slack', 'Maknz\\Slack\\Laravel\\Facade');\n }", "title": "" }, { "docid": "4eeaeccf03c7f97ce1f9a3ddac49ba8e", "score": "0.66385174", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Contracts\\ArticleInterface',\n 'App\\Services\\ArticleService'\n );\n $this->app->bind(\n 'App\\Contracts\\UserInterface',\n 'App\\Services\\UserService'\n );\n $this->app->bind(\n 'App\\Contracts\\YoutubeInerface',\n 'App\\Services\\YoutubeService'\n );\n $this->app->bind(\n 'App\\Contracts\\GalleryInterface',\n 'App\\Services\\GalleryService'\n );\n $this->app->bind(\n 'App\\Contracts\\PageInterface',\n 'App\\Services\\PageService'\n );\n $this->app->bind(\n 'App\\Contracts\\SubMenuInterface',\n 'App\\Services\\SubMenuService'\n );\n $this->app->bind(\n 'App\\Contracts\\LanguageInterface',\n 'App\\Services\\LanguageService'\n );\n }", "title": "" }, { "docid": "1c8b4a84d90704e08be3d0a09019ddcc", "score": "0.6636018", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Services\\CartServiceInterface', \n 'App\\Services\\CartService'\n );\n\n $this->app->bind(\n 'App\\Repositories\\ProductRepositoryInterface', \n 'App\\Repositories\\ProductRepository'\n );\n }", "title": "" }, { "docid": "d5d0b40dcd87ad8fa65d770e80c78a38", "score": "0.66311824", "text": "public function register()\n {\n $this->app->singleton('main.tools.option', Tools\\Option\\OptionService::class);\n $this->app->singleton('main.tools.uploader', Tools\\Uploader\\UploaderService::class);\n $this->app->singleton('main.tools.formatter', Tools\\Formatter\\FormatterService::class);\n }", "title": "" }, { "docid": "65275222c138c1cd154533609dd05371", "score": "0.6628083", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/larapie.php', 'larapie');\n }", "title": "" }, { "docid": "f68a658d6627fb5c8c5edc272a1c7555", "score": "0.6628053", "text": "public function register()\n {\n include dirname(__DIR__).'/routes.php';\n // Add more controllers here as necessary\n\n $this->app->make('bbec\\Shop\\Http\\Controllers\\CategoriesController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\ProductsController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\PhotosController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\ShopController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\CartController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\MeritsController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\OrdersController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\CouponsController');\n $this->app->make('bbec\\Shop\\Http\\Controllers\\UsersController');\n }", "title": "" }, { "docid": "04bc4512be28ab1fa6ddde580df51841", "score": "0.66265535", "text": "public function register()\n {\n //\n $this->app->bind('App\\Services\\GeoServices', function ($app) {\n return new GeoServices();\n });\n }", "title": "" }, { "docid": "ff39e1e494620a5a00426ea7949c4059", "score": "0.66263634", "text": "public function register()\n {\n $this->app->make(\\VicoErv\\Locme\\Controllers\\HomeController::class);\n \n $this->mergeConfigFrom(\n __DIR__.'/config/locme.php', 'locme'\n );\n }", "title": "" }, { "docid": "1ccd8376d6471bf4cd9ba5273fd9745a", "score": "0.6618218", "text": "public function register()\n {\n //\n $this->mergeConfigFrom(\n __DIR__.'/../config/dbdump.php', 'dbdump'\n );\n\n $this->app->singleton('command.ijiabao.dbdump', function ($app) {\n return new DbDumpCommand();\n });\n\n $this->app->singleton('ijiabao.dbdump', function($app){\n return new DbDump($app);\n });\n\n $this->commands('command.ijiabao.dbdump');\n }", "title": "" }, { "docid": "247099718589c21a0eefff8853001085", "score": "0.6613876", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__.'/../config/eventstore.php', 'eventstore');\n }", "title": "" }, { "docid": "bc18885253b6dec8eaa80cc583bbc368", "score": "0.6613449", "text": "public function register()\n {\n $this->app->bind(IRegistrarseServicio::class, RegistrarseServicio::class);\n $this->app->bind(IRepositorioUsuario::class, RepositorioUsuario::class);\n $this->app->bind(IUsuarioServicio::class, UsuarioServicio::class);\n $this->app->bind(IRepositorioRol::class, RepositorioRol::class);\n $this->app->bind(IReporteServicio::class,ReporteServicio::class);\n $this->app->bind(IReportes::class,Reportes::class);\n $this->app->bind(IReporteServicioP::class,ReporteServicioP::class);\n $this->app->bind(IRepositorioTipoProyecto::class,RepositorioTipoProyecto::class);\n $this->app->bind(IProyectoServicio::class,ProyectoServicio::class);\n $this->app->bind(IRepositorioProyecto::class,RepositorioProyecto::class);\n $this->app->bind(IRepositorioDocumento::class,RepositorioDocumento::class);\n $this->app->bind(IRepositorioUsuarioHasProyecto::class,RepositorioUsuarioHasProyecto::class);\n $this->app->bind(IRepositorioNivel::class,RepositorioNivel::class);\n $this->app->bind(IDatosGeneralesServicio::class,DatosGeneralesServicio::class);\n $this->app->bind(IRepositorioInforme::class,RepositorioInforme::class);\n $this->app->bind(IInformeServicio::class,InformeServicio::class);\n $this->app->bind(IRepositorioArchivoInforme::class,RepositorioArchivoInforme::class);\n $this->app->bind(IDatosPersonalesServicio::class,DatosPersonalesServicio::class);\n $this->app->bind(IRepositorioTelefono::class,RepositorioTelefono::class);\n $this->app->bind(IFormacionIdiomasServicio::class,FormacionIdiomasServicio::class);\n $this->app->bind(IRepositorioFormacionIdioma::class,RepositorioFormacionIdioma::class);\n $this->app->bind(IRepositorioIdioma::class,RepositorioIdioma::class);\n $this->app->bind(IFormacionAcademicaServicio::class,FormacionAcademicaServicio::class);\n $this->app->bind(IRepositorioFormacionAcademica::class,RepositorioFormacionAcademica::class);\n $this->app->bind(IRepositorioInstitucion::class,RepositorioInstitucion::class);\n $this->app->bind(IAutenticacionServicio::class,AutenticacionServicio::class);\n $this->app->bind(ISemilleroServicio::class,SemilleroServicio::class);\n $this->app->bind(IRepositorioSemillero::class,RepositorioSemillero::class);\n $this->app->bind(IRepositorioUsuarioHasSemillero::class,RepositorioUsuarioHasSemillero::class);\n $this->app->bind(IRepositorioActividad::class,RepositorioActividad::class);\n $this->app->bind(IRepositorioArchivoEntrega::class,RepositorioArchivoEntrega::class);\n $this->app->bind(IRepositorioEntrega::class,RepositorioEntrega::class);\n }", "title": "" }, { "docid": "c6003afda5dd38e1f95713cc0f4ef7ec", "score": "0.66131794", "text": "public function register()\n {\n // Automatically apply the package configuration\n $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'laravel-code-generator-swagger');\n }", "title": "" }, { "docid": "8687c8dec150a8f0d068e1367b11851c", "score": "0.66127354", "text": "public function register()\n {\n // Config\n $this->mergeConfigFrom( __DIR__.'/Config/database_manager.php', 'database_manager');\n \n // View\n $this->loadViewsFrom(__DIR__ . '/Views', 'database');\n \n // This will create a facade\n // laravel service container can find it and initiate our class\n $this->app->bind('joydip-database', function(){\n \n return new Database();\n \n });\n }", "title": "" }, { "docid": "6603199e242991db6b5a2ba1c6cfcbec", "score": "0.66102415", "text": "public function register()\n {\n //Repositories\n\n $this->app->bind(ISubscriberRepo::class, SubscriberEloquentRepository::class);\n $this->app->bind(ISubscriptionRepo::class, SubscriptionEloquentRepository::class);\n $this->app->bind(ITopicRepo::class, TopicEloquentRepository::class);\n }", "title": "" }, { "docid": "c3e9605703ca9299c1dc2571bf21df9f", "score": "0.6607557", "text": "public function register()\n {\n $this->mergeConfigFrom(\n __DIR__.'/../config/nova-permissions.php',\n 'nova-permissions'\n );\n }", "title": "" }, { "docid": "7650c26fbe2c8acaab8b9fe58c485ae9", "score": "0.66071045", "text": "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "title": "" }, { "docid": "7650c26fbe2c8acaab8b9fe58c485ae9", "score": "0.66071045", "text": "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "title": "" }, { "docid": "7650c26fbe2c8acaab8b9fe58c485ae9", "score": "0.66071045", "text": "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "title": "" }, { "docid": "7650c26fbe2c8acaab8b9fe58c485ae9", "score": "0.66071045", "text": "public function register()\n {\n $this->app->register(RouterServiceProvider::class);\n }", "title": "" } ]
a2c39c1fe6e6edf99c4b546ceaa89325
/ finish add_cart functions /// / finish getRealIpUser functions ///
[ { "docid": "c1bf29110b161d33faffdd9eda5759be", "score": "0.0", "text": "function getPro(){\n global $db;\n \n $get_products = \"select * from items order by 1 DESC LIMIT 0,8\";\n \n $run_products = mysqli_query($db, $get_products);\n \n while($row_products=mysqli_fetch_array($run_products)){\n \n $Item_id = $row_products['Item_id'];\n \n $Item_name = $row_products['Item_name'];\n \n $Min_bid = $row_products['Min_bid'];\n \n $Item_img1 = $row_products['Item_img1'];\n\n $get_current=\"select * from item_current where item_id='$Item_id'\";\n\n $run_current = mysqli_query($db,$get_current);\n\n $row_current=mysqli_fetch_array($run_current);\n\n $pro_price = $row_current['current_bid'];\n \n echo \"\n \n <div class='col-md-4 col-sm-6 single'>\n \n <div class='product'>\n \n <a href='details.php?Item_id=$Item_id'>\n \n <img class='img-responsive' src='admin_area/product-images/$Item_img1'>\n \n </a>\n \n <div class='text'>\n \n <h3>\n \n <a href='details.php?Item_id=$Item_id'>\n\n $Item_name\n\n </a>\n \n </h3>\n \n <p class='price'>\n \n $ $pro_price\n \n </p>\n \n <p class='button'>\n \n <a class='btn btn-default' href='details.php?Item_id=$Item_id'>\n\n Details\n\n </a>\n \n <a class='btn btn-primary' href='details.php?Item_id=$Item_id'>\n\n Bid Now\n\n </a>\n \n </p>\n \n </div>\n \n </div>\n \n </div>\n \n \";\n \n }\n\n}", "title": "" } ]
[ { "docid": "96fd9e0961410c3ca78de43a2f9faaba", "score": "0.6723586", "text": "function cart()\n\t{\n\t\tglobal $con;\n\t\t\n\t\tif(isset($_GET['add_cart']))\n\t\t{\n\t\t\t$pro_id=$_GET['add_cart'];\n\t\t\t\n\t\t\t//creating or using cookie \n\t\t\tif(isset($_COOKIE[\"ipUserEcommerce\"]))\n\t\t\t{\n\t\t\t\t$ip\t= $_COOKIE[\"ipUserEcommerce\"];\n\t\t\t}else{\n\t\t\t\t$ip=getIp();\n\t\t\t\tsetcookie('ipUserEcommerce',$ip,time()+1206900);\n\t\t\t}\n\t\t\t\n\t\t\t$check_pro=\"select * from cart where p_id='$pro_id' AND ip_add='$ip' \";\n\t\t\t$run_check=@mysqli_query($con,$check_pro);\n\t\t\tif(@mysqli_num_rows($run_check)>0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$insert_pro=\"insert into cart (p_id,ip_add,qty)values('$pro_id','$ip',1)\";\n\t\t\t\t$run_insert_pro=@mysqli_query($con,$insert_pro);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "82589e4435b35e3c96a3fd666a719886", "score": "0.66489613", "text": "function cart()\n {\n \tif (isset($_GET['add_cart'])) {\n\n \t\tglobal $db;\n\n \t\t$ip_add = getRealIpAddr();\n\n \t\t$p_id = $_GET['add_cart'];\n\n \t\t$check_pro = \"SELECT * FROM cart where ip_add='$ip_add' AND p_id='$p_id'\";\n\n \t\t$run_check = mysqli_query($db,$check_pro);\n\n \t\tif(mysqli_num_rows($run_check)>0)\n \t\t{\n \t\t\techo \"\";\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$q = \"insert into cart (p_id,ip_add,qty) values ('$p_id','$ip_add','1')\";\n\n \t\t\t$run_q = mysqli_query($db,$q);\n\n \t\t\techo \"<script> window.open('index.php','_self')</script>\";\n \t\t}\n \t}\n }", "title": "" }, { "docid": "74aab0233d76bb2fa7ecf78d30d9bc2e", "score": "0.6273801", "text": "function getTotalPrice(){\n // function to get total price for all item in cart\n global $con;\n $ip_address = getRealIpUser();\n if(isset($_SESSION['user_name'])){\n $user_id = $_SESSION['user_id'];\n }\n else{\n $user_id = 0;\n }\n /* connection to database cart table \n / check if user have product print price of all product\n / else print 0\n */\n $get_item = $con->prepare(\"SELECT * FROM cart where user_id = ? AND ip_address = ?\");\n $get_item->execute([$user_id,$ip_address]);\n $count = $get_item->rowCount();\n if($count == 0)\n echo 0;\n else {\n $total_price = 0;\n while($result = $get_item->fetch(PDO::FETCH_ASSOC))\n {\n $product_id = $result['product_id'];\n $product_quantity = $result['product_quantity'];\n $get_product = $con->prepare(\"SELECT * FROM products where product_id = $product_id\");\n $get_product->execute();\n $result = $get_product->fetch(PDO::FETCH_ASSOC);\n $product_price = $result['product_price'];\n $product_price_cut = $result['product_price_cut'];\n if($product_price_cut > 0)\n $total_price = $total_price + ($product_price_cut * $product_quantity);\n else\n $total_price = $total_price + ($product_price * $product_quantity);\n }\n echo $total_price;\n }\n }", "title": "" }, { "docid": "640783d0dc0698a02cc11ae24d65cdbd", "score": "0.6255438", "text": "static function cart()\n {\n//\\DBG::log(\"Shop::cart(): Entered\");\n Cart::init();\n if (!empty($_POST['countryId2'])) {\n $_SESSION['shop']['countryId2'] = intval($_POST['countryId2']);\n }\n if (empty($_GET['remoteJs'])) {\n//\\DBG::log(\"Shop::cart(): Receiving POST\");\n Cart::receive_post();\n } else {\n//\\DBG::log(\"Shop::cart(): Receiving JSON\");\n Cart::receive_json();\n }\n Cart::update_quantity();\n if (!Cart::update(self::$objCustomer)) {\n// TODO: Handle this properly!\ndie(\"Failed to update the Cart!\");\n }\n // Apply VAT and discounts\n Shop::update_session();\n // *MUST NOT* return if continue is set\n self::_gotoLoginPage();\n if (empty($_GET['remoteJs'])) {\n self::view_cart();\n } else {\n//\\DBG::log(\"cart(): Sending JSON\");\n Cart::send_json();\n }\n }", "title": "" }, { "docid": "dc3d67b73286e9d277805c2cefc8a5f5", "score": "0.61585313", "text": "function cart(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(isset($_GET['add_cart'])){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tglobal $con;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tglobal $total;\n\n\t\t\t\t\t\t\t\t\t\t$ip = getIp();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$pro_id = $_GET['add_cart'];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$check_pro = \"SELECT * FROM carts WHERE ip_add ='$ip' AND p_id ='$pro_id'\";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$run_check = mysqli_query($con, $check_pro);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (mysqli_num_rows($run_check)>0){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo \"\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t$insert_pro = \"INSERT INTO carts(p_id, ip_add, qty) VALUES ('$pro_id','$ip','')\";\n\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t$run_pro = mysqli_query($con, $insert_pro);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\techo\"<script>windows.open('index.php','_self')</script>\";\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "711cd28f5c979384f4689ad41dca3fd9", "score": "0.61269736", "text": "function total_items()\n\t\n\t{\n\t\t\n\t\tif(isset($_GET['add_cart']))\n\t\t{\t\n\t\t\tglobal $con;\n\t\t\t//<span style=\"background-color: #ff0000;\" data-mce-style=\"background-color: #ff0000;\">\n\t\t\t//creating or using cookie \n\t\t\tif(isset($_COOKIE[\"ipUserEcommerce\"]))\n\t\t\t{\n\t\t\t\t$ip\t= $_COOKIE[\"ipUserEcommerce\"];\n\t\t\t}else{\n\t\t\t\t$ip=getIp();\n\t\t\t\tsetcookie('ipUserEcommerce',$ip,time()+1206900);\n\t\t\t}//</span>\n\t\t\n\t\t\t\n\t\t\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t\t\t\n\t\t\t$run_items=@mysqli_query($con,$get_items);\n\t\t\t\n\t\t\t$count_items=@mysqli_num_rows($run_items);\n\t\t\n\t\t}else\n\t\t{\t\n\t\t\n\t\t\tglobal $con;\n\t\t\t//<span style=\"background-color: #ff0000;\" data-mce-style=\"background-color: #ff0000;\">\n\t\t\t//creating or using cookie \n\t\t\tif(isset($_COOKIE[\"ipUserEcommerce\"]))\n\t\t\t{\n\t\t\t\t$ip\t= $_COOKIE[\"ipUserEcommerce\"];\n\t\t\t}else{\n\t\t\t\t$ip=getIp();\n\t\t\t\tsetcookie('ipUserEcommerce',$ip,time()+1206900);\n\t\t\t}\n//</span>\t\t\t\n\t\t\t$get_items = \"select * from cart where ip_add='$ip'\";\n\t\t\t\n\t\t\t$run_items =@mysqli_query($con,$get_items);\n\t\t\t\n\t\t\t$count_items =@mysqli_num_rows($run_items);\n\t\t}\n\t\t\n\t\techo $count_items;\n\t\n\t}", "title": "" }, { "docid": "5d6b0c95833c2852917ead0540b9237e", "score": "0.6014419", "text": "function cart(){\n\tif(isset($_GET['add_cart'])){\n\t\tglobal $con; \n\t\t$ip = getIp();\n\t\t$pro_id = $_GET['add_cart'];\n\t\t$check_pro = \"select * from cart where ip_add='$ip' AND p_id='$pro_id'\";\n\t\t$run_check = mysqli_query($con, $check_pro); \n\t\t\n\t\t$quant = 1;\n\t\tif(mysqli_num_rows($run_check)>0){\n\t\techo \"\";\n\t\t}\n\t\telse {\n\t\t$insert_pro = \"insert into cart (p_id,ip_add,qty) values ('$pro_id','$ip','$quant')\";\n\t\t$run_pro = mysqli_query($con, $insert_pro); \n\t\techo \"<script>alert('Successfully added to cart!')</script>\";\n\t\techo \"<script>window.open('index.php','_self')</script>\";\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "4f926764035d212bac5d913935607281", "score": "0.6006163", "text": "function check_if_added_to_cart($num)\n\t{\n \t$con=mysqli_connect(\"ec2-23-20-129-146.compute-1.amazonaws.com\",\"qmihdzhyolwyau\",\"6e3493f5e5a03cadef0d1b349ea41da70fe359f681353a7c5185b18b6413b2c7\n\t\t\",\"store\");\n\tif(isset($_SESSION['user_id']))\n\t{\n\t$user_id=$_SESSION['user_id'];\n\t$item_id=$num;\n\t$query = \"select * from users_item where item_id='$item_id' && user_id='$user_id' && status='Added to cart'\" ;\n\t$result=mysqli_query($con,$query);\n\t$row=mysqli_num_rows($result);\n\tif($row>=1)\n\t{\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n }\n}", "title": "" }, { "docid": "41e11b73ea5327a4ee49b30a51c1e7be", "score": "0.59849596", "text": "function item(){\n\n \tif(isset($_GET['add_cart'])){\n\n \t\tglobal $db;\n\n \t\t$ip_add = getRealIpAddr();\n\n \t\t$get_items = \"SELECT * FROM cart where ip_add='$ip_add'\";\n\n \t\t$run_items = mysqli_query($db,$get_items);\n\n \t\t$count_items = mysqli_num_rows($run_items);\n\n \t}\n\n \telse\n \t{\n \t\tglobal $db;\n \t\t\n \t\t$ip_add = getRealIpAddr();\n\n \t\t$get_items = \"SELECT * FROM cart where ip_add='$ip_add'\";\n\n \t\t$run_items = mysqli_query($db,$get_items);\n\n \t\t$count_items = mysqli_num_rows($run_items);\n \t}\n\n \techo $count_items;\n }", "title": "" }, { "docid": "ab2a3940d1cfcd6f32c3a7cef4d285d0", "score": "0.5972503", "text": "function getAllItem(){\n // function to get all user item which added to his cart\n /* connection to database cart table \n / check if user have product print it\n / else print 0\n */\n global $con;\n $ip_address = getRealIpUser();\n if(isset($_SESSION['user_name'])){\n $user_id = $_SESSION['user_id'];\n }\n else{\n $user_id = 0;\n }\n $get_item = $con->prepare(\"SELECT * FROM cart where user_id = ? AND ip_address = ?\");\n $get_item->execute([$user_id,$ip_address]);\n $count = $get_item->rowCount();\n echo $count;\n }", "title": "" }, { "docid": "91e0fa6f4fdbe89a6d22dfab46ab4f41", "score": "0.59722376", "text": "function display_shoppingcart($jcart)\r\n\t\t{\r\n\t\t// JCART ARRAY HOLDS USER CONFIG SETTINGS\r\n\t\textract($jcart);\r\n\t\t\r\n\t\t// ASSIGN USER CONFIG VALUES TO POST VARS\r\n\t\t// VALUES ARE HTML NAME ATTRIBUTES FROM THE ADD-TO-CART FORM\r\n\t\t@$item_id = $_POST[$item_id];\r\n\t\t@$item_qty = ltrim($_POST[$item_qty], '-'); // PREVENT QTY FROM BEING NEGATIVE\r\n\t\t@$item_price = ltrim($_POST[$item_price], '-'); // PREVENT PRICE FROM BEING NEGATIVE\r\n\t\t@$item_name = $_POST[$item_name];\r\n\r\n\t\t// ADD ITEM\r\n\t\tif(@$_POST[$item_add])\r\n\t\t\t{\r\n\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\t\t\t$valid_item_qty = filter_var($item_qty, FILTER_VALIDATE_INT);\r\n\t\t\t$valid_item_price = filter_var($item_price, FILTER_VALIDATE_FLOAT);\r\n\t\t\t$sanitized_item_name = filter_var($item_name, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t// VALIDATION\r\n\t\t\tif (!$valid_item_qty)\r\n\t\t\t\t{\r\n\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t}\r\n\t\t\telse if (!$valid_item_price)\r\n\t\t\t\t{\r\n\t\t\t\t\t//[CUSTOM]\r\n\t\t\t\t\tif(empty($valid_item_price))\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"This is a Free Item.\");</script>';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = $text['price_error'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/*//[CUSTOM]\r\n\t\t\t\t\t// check if catalog has documents\r\n\t\t\t\t\t$tblRelatedItem = new Kutu_Core_Orm_Table_RelatedItem();\r\n\t\t\t\t\t$where = \"relatedGuid='$sanitized_item_id' AND relateAs='RELATED_FILE'\";\r\n\t\t\t\t\t$rowsetRelatedItem = $tblRelatedItem->fetchAll($where);\r\n\t\t\t\t\tif(count($rowsetRelatedItem) > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check if the physical FILE is available in uploads directory.\r\n\t\t\t\t\t\t$flagFileFound = true;\r\n\r\n\t\t\t\t\t\tforeach($rowsetRelatedItem as $rowRelatedItem)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$tblCatalog = new Kutu_Core_Orm_Table_Catalog();\r\n\t\t\t\t\t \t$rowsetCatalog = $tblCatalog->find($rowRelatedItem->itemGuid);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t$rowCatalog = $rowsetCatalog->current();\r\n\t\t\t\t \t\t$rowsetCatAtt = $rowCatalog->findDependentRowsetCatalogAttribute();\r\n\r\n\t\t\t\t\t \t$contentType = $rowsetCatAtt->findByAttributeGuid('docMimeType')->value;\r\n\t\t\t\t\t\t\t$systemname = $rowsetCatAtt->findByAttributeGuid('docSystemName')->value;\r\n\t\t\t\t\t\t\t$filename = $rowsetCatAtt->findByAttributeGuid('docOriginalName')->value;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$parentGuid = $rowRelatedItem->relatedGuid;\r\n\t\t\t\t\t\t\t\t$sDir1 = KUTU_ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$systemname;\r\n\t\t\t\t\t\t\t\t$sDir2 = KUTU_ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$parentGuid.DIRECTORY_SEPARATOR.$systemname;\r\n\r\n\t\t\t\t\t\t\t\tif(file_exists($sDir1))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t//$flagFileFound = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tif(file_exists($sDir2))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t//$flagFileFound = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flagFileFound = false;\r\n\t\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}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//echo \"punya file kok\";\r\n\t\t\t\t\t\t//$error_message = '<script>alert(\"\");</script>';\r\n\t\t\t\t\t\t// ADD THE ITEM\r\n\t\t\t\t\t\tif($flagFileFound)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$auth = Zend_Auth::getInstance();\r\n\t\t\t\t\t\t\t$hasBought = false;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($auth->hasIdentity())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$bpm = new Kutu_Core_Bpm_Catalog();\r\n\t\t\t\t\t\t\t\t$hasBought = $bpm->isBoughtByUser($sanitized_item_id, $auth->getIdentity()->guid);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($hasBought)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$error_message = '<script>alert(\"You have bought this Item before. Please check your account.\");</script>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$this->add_item($sanitized_item_id, $valid_item_qty, $valid_item_price, $sanitized_item_name);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$error_message = '<script>alert(\"We are Sorry. The document(s) you are requesting is still not complete. Please check back later.\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"We are Sorry. The document(s) you are requesting is still under review. Please check back later.\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\trequire_once('Pandamp/Core/Hol/Catalog.php');\r\n\t\t\t\t\t$bpmCatalog = new Pandamp_Core_Hol_Catalog();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$aReturn = $bpmCatalog->jCartIsItemSellable($sanitized_item_id);\r\n\t\t\t\t\tif($aReturn['isError'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"'.$aReturn['message'].'\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->add_item($sanitized_item_id, $valid_item_qty, $valid_item_price, $sanitized_item_name);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// REMOVE ITEM\r\n\t\t/*\r\n\t\tGET VAR COMES FROM A LINK, WITH THE ITEM ID TO BE REMOVED IN ITS QUERY STRING\r\n\t\tAFTER AN ITEM IS REMOVED ITS ID STAYS SET IN THE QUERY STRING, PREVENTING THE SAME ITEM FROM BEING ADDED BACK TO THE CART\r\n\t\tSO WE CHECK TO MAKE SURE ONLY THE GET VAR IS SET, AND NOT THE POST VARS\r\n\r\n\t\tUSING POST VARS TO REMOVE ITEMS DOESN'T WORK BECAUSE WE HAVE TO PASS THE ID OF THE ITEM TO BE REMOVED AS THE VALUE OF THE BUTTON\r\n\t\tIF USING AN INPUT WITH TYPE SUBMIT, ALL BROWSERS DISPLAY THE ITEM ID, INSTEAD OF ALLOWING FOR USER FRIENDLY TEXT SUCH AS 'remove'\r\n\t\tIF USING AN INPUT WITH TYPE IMAGE, INTERNET EXPLORER DOES NOT SUBMIT THE VALUE, ONLY X AND Y COORDINATES WHERE BUTTON WAS CLICKED\r\n\t\tCAN'T USE A HIDDEN INPUT EITHER SINCE THE CART FORM HAS TO ENCOMPASS ALL ITEMS TO RECALCULATE TOTAL WHEN A QUANTITY IS CHANGED, WHICH MEANS THERE ARE MULTIPLE REMOVE BUTTONS AND NO WAY TO ASSOCIATE THEM WITH THE CORRECT HIDDEN INPUT\r\n\t\t*/\r\n\t\tif(@$_GET['jcart_remove'] && @!$_POST[$item_add] && @!$_POST['jcart_update_cart'] && @!$_POST['jcart_check_out'])\r\n\t\t\t{\r\n\t\t\t// ENSURE THE VALUE IS AN INTEGER\r\n\t\t\t//$rid = intval($_GET['jcart_remove']);\r\n\t\t\t$rid = $_GET['jcart_remove'];\r\n\t\t\t// REMOVE THE ITEM\r\n\t\t\t//die($rid);\r\n\t\t\t$this->del_item($rid);\r\n\t\t\t}\r\n\r\n\t\t// EMPTY CART\r\n\t\tif(@$_POST['jcart_empty'])\r\n\t\t\t{\r\n\t\t\t$this->empty_cart();\r\n\t\t\t}\r\n\r\n\t\t// UPDATE ALL ITEMS IN CART SINCE VISITOR MAY UPDATE MULTIPLE FIELDS BEFORE CLICKING UPDATE\r\n\t\t// ONLY USED WHEN JAVASCRIPT IS DISABLED\r\n\t\t// WHEN JAVASCRIPT IS ENABLED, THE CART IS UPDATED WHEN AN ITEM QTY IS CHANGED\r\n\t\tif(@$_POST['jcart_update_cart'])\r\n\t\t\t{\r\n\t\t\t// POST VALUE IS AN ARRAY OF ALL ITEM IDs IN THE CART\r\n\t\t\t$item_ids = $_POST['jcart_item_id'];\r\n\r\n\t\t\t// IF NO ITEM IDs, THE CART IS EMPTY\r\n\t\t\tif ($item_ids)\r\n\t\t\t\t{\r\n\t\t\t\t// POST VALUE IS AN ARRAY OF ALL ITEM QUANTITIES IN THE CART\r\n\t\t\t\t// TREAT VALUES AS A STRING FOR VALIDATION\r\n\t\t\t\t$item_qtys = implode($_POST['jcart_item_qty']);\r\n\r\n\t\t\t\t$valid_item_qtys = filter_var($item_qtys, FILTER_VALIDATE_INT);\r\n\r\n\t\t\t\t// VALIDATION\r\n\t\t\t\t// ITEM QTY CAN ONLY BE AN INTEGER OR ZERO\r\n\t\t\t\tif (!$valid_item_qtys && $item_qtys !== '0')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// UPDATE ITEMS\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t// THE INDEX OF THE ITEM AND ITS QUANTITY IN THEIR RESPECTIVE ARRAYS\r\n\t\t\t\t\t$count = 0;\r\n\r\n\t\t\t\t\t// FOR EACH ITEM IN THE CART\r\n\t\t\t\t\tforeach ($item_ids as $item_id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t// SANITIZE THE ITEM ID\r\n\t\t\t\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t\t\t\t// GET THE ITEM QTY AND DOUBLE-CHECK THAT THE VALUE IS AN INTEGER\r\n\t\t\t\t\t\t$update_item_qty = intval($_POST['jcart_item_qty'][$count]);\r\n\r\n\t\t\t\t\t\t// UPDATE THE ITEM\r\n\t\t\t\t\t\t$this->edit_item($sanitized_item_id, $update_item_qty);\r\n\r\n\t\t\t\t\t\t// INCREMENT INDEX FOR THE NEXT ITEM\r\n\t\t\t\t\t\t$count++;\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\r\n\r\n\t\t// CHECKING POST VALUE AGAINST $text ARRAY FAILS??\r\n\t\t// HAVE TO CHECK AGAINST $jcart ARRAY\r\n\t\tif (@$_POST['jcart_update_item'] == $jcart['text']['update_button'])\r\n\t\t\t{\r\n\t\t\t// SANITIZE THE ITEM ID\r\n\t\t\t$item_id = $_POST['item_id'];\r\n\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t// GET THE ITEM QTY AND CHECK THAT THE VALUE IS AN INTEGER\r\n\t\t\t$item_qty = $_POST['item_qty'];\r\n\t\t\t$valid_item_qty = filter_var($item_qty, FILTER_VALIDATE_INT);\r\n\r\n\t\t\t// VALIDATION\r\n\t\t\t// ITEM QTY CAN ONLY BE AN INTEGER, OR ZERO, OR EMPTY\r\n\t\t\tif (!$valid_item_qty && $item_qty !== '0' && $item_qty !== '')\r\n\t\t\t\t{\r\n\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t// UPDATE THE ITEM\r\n\t\t\t\t$this->edit_item($sanitized_item_id, $valid_item_qty);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t// OUTPUT THE CART\r\n\r\n\t\t// DETERMINE WHICH TEXT TO USE FOR THE NUMBER OF ITEMS IN THE CART\r\n\t\tif ($this->itemcount >= 0)\r\n\t\t\t{\r\n\t\t\t$text['items_in_cart'] = $text['multiple_items'];\r\n\t\t\t}\r\n\t\tif ($this->itemcount == 1)\r\n\t\t\t{\r\n\t\t\t$text['items_in_cart'] = $text['single_item'];\r\n\t\t\t}\r\n\r\n\t\t// IF THERE'S AN ERROR MESSAGE WRAP IT IN SOME HTML\r\n\t\tif (@$error_message)\r\n\t\t\t$error_message = \"<p class='jcart-error'>$error_message</p>\";\r\n\r\n\t\t// DISPLAY THE CART HEADER\r\n\t\techo \"<!-- BEGIN JCART -->\\n<div id='jcartshop'>\\n\";\r\n\t\techo \"<img src='\" . ROOT_URL . \"/resources/images/shopping_cart_hukumonline.png' />\\n\";\r\n\t\techo \"<div style='padding-top:5px;'></div>\\n\";\r\n\t\techo \"<h4>Anda mempunyai <span style='color:#EE1625;'>\" . $this->itemcount . \"</span>&nbsp;barang di dalam keranjang belanja Anda</h4>\\n\";\r\n\t\techo \"<p>Berbelanja di hukumonline.com adalah aman. Pesanan Anda akan diproses melalui server yang aman.</p>\\n\";\r\n\t\techo \"<h5>Lihat Pesanan &raquo; <a href='\" . ROOT_URL . \"/store/payment/list'>sebelumnya</a></h5>\\n\";\r\n\t\techo \"<div style='padding-top:15px;'></div>\\n\";\r\n\t\techo @$error_message . \"\\n\";\r\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $coupon = null;\r\n if (!isset($coupon) && isset($_REQUEST['coupon_code']))\r\n {\r\n $coupon=$_REQUEST['coupon_code'];\r\n require_once APPLICATION_PATH . '/models/Db/Table/Promotion.php';\r\n $promo = new App_Model_Db_Table_Promotion();\r\n $rowPromo = $promo->find($coupon)->current();\r\n if (isset($rowPromo))\r\n {\r\n $disc = $rowPromo->discount;\r\n }\r\n else\r\n {\r\n $err = \"\r\n <div class='box box-error'>\r\n Kode Promosi tidak ditemukan\r\n </div>\r\n \";\r\n\r\n echo $err . \"\\n\";\r\n }\r\n }\r\n }\r\n\t\techo \"<form method='post' action='\" . ROOT_URL . \"/store/confirmorder'>\\n\\n\";\r\n\t\techo \"<table cellspacing='0' border='0' cellpadding='0' id='shopping-cart-table' class='data-table box-table shopping-cart'>\\n\";\r\n\t\techo \"<thead>\\n\";\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<th rowspan='1' colspan='2' class='a-left' style='padding-left:23px;border-left: 1px solid #cacaca;'>Product Name</th>\\n\";\r\n\t\techo \"<th class='a-center' colspan='1'>Price</th>\\n\";\r\n\t\techo \"<th rowspan='1' class='a-center'>Quantity</th>\\n\";\r\n\t\techo \"<th class='a-center last' colspan='1'>Total</th>\\n\";\r\n\t\techo \"</tr></thead>\". \"\\n\";\r\n\r\n\t\techo \"<tbody>\\n\";\r\n\t\t\r\n\t\t// IF ANY ITEMS IN THE CART\r\n\t\tif($this->itemcount > 0)\r\n\t\t\t{\r\n\t\t\t// DISPLAY LINE ITEMS\r\n\t\t\tforeach($this->get_contents() as $item)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sDir = ROOT_URL.'/uploads/images';\r\n\t\t\t\t\t$thumb = \"\";\r\n\r\n require_once APPLICATION_PATH . '/models/Db/Table/RelatedItem.php';\r\n $modelRelatedItem = new App_Model_Db_Table_RelatedItem();\r\n $rowsetRelatedItem = $modelRelatedItem->fetchRow(\"relatedGuid='\".$item['id'].\"' AND relateAs='RELATED_IMAGE'\");\r\n//\t\t\t\t\t$rowsetRelatedItem = App_Model_Show_RelatedItem::show()->getDocumentById($item['id'],'RELATED_IMAGE');\r\n\t\t\t\t\t$itemGuid = (isset($rowsetRelatedItem['itemGuid']))? $rowsetRelatedItem['itemGuid'] : '';\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (Pandamp_Lib_Formater::thumb_exists($sDir .\"/\". $itemGuid . \".jpg\")) \t{ $thumb = $sDir .\"/\". $itemGuid . \".jpg\"; \t}\r\n\t\t\t\t\tif (Pandamp_Lib_Formater::thumb_exists($sDir .\"/\". $itemGuid . \".gif\")) \t{ $thumb = $sDir .\"/\". $itemGuid . \".gif\"; \t}\r\n\t\t\t\t\tif (Pandamp_Lib_Formater::thumb_exists($sDir .\"/\". $itemGuid . \".png\")) \t{ $thumb = $sDir .\"/\". $itemGuid . \".png\"; \t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($thumb == \"\") { $thumb = \"resources/images/nothumb.jpg\"; }\r\n\t\t\t\t\t\r\n\t\t\t\t\t$screenshot = \"<img src=\\\"\".$thumb.\"\\\" width=\\\"125\\\" />\";\r\n\t\t\t\r\n\t\t\t\t\techo \"<tr>\\n\";\r\n\t\t\t\t// ADD THE ITEM ID AS THE INPUT ID ATTRIBUTE\r\n\t\t\t\t// THIS ALLOWS US TO ACCESS THE ITEM ID VIA JAVASCRIPT ON QTY CHANGE, AND THEREFORE UPDATE THE CORRECT ITEM\r\n\t\t\t\t// NOTE THAT THE ITEM ID IS ALSO PASSED AS A SEPARATE FIELD FOR PROCESSING VIA PHP\r\n\t\t\t\t\r\n\t\t\t\tif ($thumb == \"\") { $screenshot = \"\"; } else {\r\n\t\t\t \techo \"<td><a href=''>$screenshot</a></td>\\n\";\r\n\t\t\t }\r\n\r\n require_once APPLICATION_PATH . '/models/Db/Table/Catalog.php';\r\n $modelCatalog = new App_Model_Db_Table_Catalog();\r\n $row = $modelCatalog->fetchRow(\"guid='\".$item['id'].\"'\");\r\n\t\t\t\t//$row = App_Model_Show_Catalog::show()->getCatalogByGuid($item['id']);\r\n\t\t\t\t\r\n\t\t\t\techo \"<td class='attributes-col'>\\n\";\r\n\t\t\t\techo \"<h5 class='title' style='margin-bottom:5px;'><a href=''>\" . $item['info'] . \"</a></h5><span style='font-size:11px;'><a href='?jcart_remove=\" . $item['id'] . \"'>\" . $text['remove_link'] . \"</a></span><input type='hidden' name='jcart_item_info[ ]' value='\" . $item['info'] . \"' /><input type='hidden' name='jcart_item_display' value='1' />\\n\";\r\n\t\t\t\techo \"<input type='hidden' name='jcart_item_id[ ]' value='\" . $item['id'] . \"' />\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"<td class='a-right'><div class='cart-price'><span class='price'>\\n\";\r\n\t\t\t\techo $text['currency_symbol'] . number_format($row['price'],2) . \"</span></div><input type='hidden' name='jcart_item_price[ ]' value='\" . $item['price'] . \"' />\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"<td class='a-center'>\\n\";\r\n\t\t\t\techo \"<input type='text' size='2' id='jcart-item-id-\" . $item['id'] . \"' name='jcart_item_qty[ ]' value='\" . $item['qty'] . \"' style='width:30px;font-size:11px;text-align:center;' />\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"<td class='a-right last'>\\n\";\r\n\t\t\t\techo \"<div class='cart-price'>\\n\";\r\n\t\t\t\techo \"<span class='price'>\". $text['currency_symbol'] . number_format($item['subtotal'],2) .\"</span>\\n\";\r\n\t\t\t\techo \"</div>\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"</tr>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// THE CART IS EMPTY\r\n\t\telse\r\n\t\t\t{\r\n\t\t\techo \"<tr><th colspan='5' class='empty'>\" . $text['empty_message'] . \"</th></tr>\\n\";\r\n\t\t\t}\r\n\t\t\r\n\t\techo \"</tbody></table>\\n\";\r\n\t\techo \"</form>\\n\";\r\n\t\t\t\r\n\t\t// DISPLAY THE CART FOOTER\r\n\t\techo \"<table style='width:100%;'>\\n\";\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<td valign='top'>\\n\";\r\n\t\techo \"<div class='shopping-cart-totals'>\\n\";\r\n\t\techo \"<table style='border: 1px solid rgb(202, 202, 202); border-width: 0pt 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(202, 202, 202) rgb(202, 202, 202); width:100%;'>\\n\";\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<td colspan='2' style='height: 10px;'>\\n\";\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n\t\techo \"<tr>\\n\";\r\n echo \"<td style='padding: 0px 0px 0px 10px;' valign='top'>\\n\";\r\n echo \"<div class='shopping-cart-collaterals'>\\n\";\r\n echo \"<div class='discount-codes boxs'>\";\r\n echo \"<form method='post' action='\" . ROOT_URL . \"/store/checkout'>\";\r\n echo \"<h5>Kode Promosi</h5><p>[optional]</p>\";\r\n echo \"<div class='align-left' style='padding-bottom: 5px;'><input type='text' id='coupon_code' name='coupon_code' value='\".$coupon.\"'/></div>\";\r\n echo \"<div class='align-left'>&nbsp;<input class='form-button-alt' type='submit' value='Apply Coupon' /></div>\";\r\n echo \"<div class='clean'></div>\";\r\n echo \"</form>\";\r\n echo \"</div>\";\r\n echo \"</div>\";\r\n\t\techo \"</td>\\n\";\r\n echo \"<td valign='top' style='width:100%;'>\\n\";\r\n echo \"<div class='shopping-cart-totals'>\";\r\n echo \"<table id='shopping-cart-totals-table'>\";\r\n echo \"<tfoot>\";\r\n echo \"<tr class='grand-total'>\";\r\n echo \"<td style='color: rgb(68, 68, 68); text-transform: uppercase;' colspan='2' align='right' valign='middle'><strong>Grand Total</strong></td>\";\r\n echo \"<td>:</td>\";\r\n if (isset($disc))\r\n {\r\n $grandTotal = ($this->total - ($disc/100 * $this->total));\r\n }\r\n else\r\n {\r\n $grandTotal = $this->total;\r\n }\r\n echo \"<td class='ta-right'><strong>\" . $text['currency_symbol'] . number_format($grandTotal,2) . \"</strong></td>\";\r\n echo \"</tr>\";\r\n echo \"</tfoot>\";\r\n echo \"<tbody><tr>\";\r\n echo \"<td style='color: rgb(68, 68, 68); text-transform: uppercase;' colspan='2' align='right' valign='middle'>\" . $text['subtotal'] . \"</td>\";\r\n echo \"<td>:</td>\";\r\n echo \"<td class='ta-right'><span class='price'>\" . $text['currency_symbol'] . number_format($this->total,2) . \"</span></td>\";\r\n echo \"</tr>\";\r\n if (isset($disc))\r\n {\r\n echo \"<tr>\";\r\n echo \"<td style='color: rgb(68, 68, 68); text-transform: uppercase;' colspan='2' align='right' valign='middle'>Disc</td>\";\r\n echo \"<td>:</td>\";\r\n echo \"<td class='ta-right'><span class='price'>\" . $disc . \"%</span></td>\";\r\n echo \"</tr>\";\r\n }\r\n echo \"</tbody></table>\";\r\n echo \"</div>\";\r\n echo \"</td>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n echo \"<tr>\\n\";\r\n\t\techo \"<td valign='top'><input type='submit' value='Continue Shopping' class='btn btn-green big' style='margin-left: 10px;' /></td>\\n\";\r\n\t\techo \"<td valign='top' style='padding-left:19em;'><input type='submit' value='Proceed to Checkout' class='btn btn-blue big' /></td>\\n\";\r\n echo \"</tr>\\n\";\r\n echo \"<tr>\\n\";\r\n echo \"<td colspan='2' class='ta-right' style='padding: 30px 10px 10px 10px;'>\\n\";\r\n echo \"<div style='margin-bottom: 20px;'><a href='\" . ROOT_URL . \"/customer-service/shipping'>Shipping and Returns Policy</a> &nbsp; | &nbsp; <a href='\" . ROOT_URL . \"/customer-service/privacy-policy'>Privacy Policy</a></div>\\n\";\r\n echo \"<div style='font-weight: bold; margin-bottom: 8px;'>Ada pertanyaan? Pilih order melalui telepon atau faks?<br>Hubungi kami di 0800-140-7890 dan kami akan dengan senang hati membantu Anda</div>\\n\";\r\n echo \"atau <a href='\" . ROOT_URL . \"/contacts'>Email tim Customer Service hukumonline.com</a>\\n\";\r\n echo \"</td>\";\r\n echo \"</tr>\\n\";\r\n\t\techo \"</table>\\n\";\r\n\t\techo \"</div>\\n\";\r\n echo \"<div class='clean'></div>\";\r\n\t\techo \"</td>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n\t\techo \"</table>\\n\\n\";\r\n\t\techo \"<div class='jcart-hide'>\\n\";\r\n\t\techo \"<input type='submit' name='jcart_update_cart' value='\" . $text['update_button'] . \"' class='jcart-button' />\\n\";\r\n\t\techo \"<input type='submit' name='jcart_empty' value='\" . $text['empty_button'] . \"' class='jcart-button' />\\n\";\r\n\t\techo \"</div>\\n\";\r\n\t\techo \"</div>\\n<!-- END JCART -->\\n\";\r\n\t\t}", "title": "" }, { "docid": "57d721bbc76cc97e17376348aaecd684", "score": "0.5943622", "text": "function item(){\n\tglobal $db;\n\t$ip_add=getRealIPAddr();\n\tif(isset($_GET['add_cart'])){\n\t\tglobal $db;\n\t\t$ip_add=getRealIPAddr();\n\t\t$get_items=\"select * from cart where ip_add='$ip_add'\";\n\t\t$run_items=mysqli_query($db,$get_items);\n\t\t$count_items=mysqli_num_rows($run_items);\n\n\t}else{\n\t\t$ip_add=getRealIPAddr();\n\t\t$get_items=\"select * from cart where ip_add='$ip_add'\";\n\t\t$run_items=mysqli_query($db,$get_items);\n\t\t$count_items=mysqli_num_rows($run_items);\n\t}\n\techo $count_items;\t\n}", "title": "" }, { "docid": "95ed550b0ab08465a4cac621881b3daa", "score": "0.5926838", "text": "function dynamo_support_user_register_price($user_id, $ip) {\n\tglobal $support_options;\n\t$products_purchased = MWX__GetListOfProductsForUser ($user_id);\n\tif (is_array($products_purchased) && count($products_purchased)) {\n\t\tforeach ($products_purchased as $idx => $product) {\n\t\t\t$id = $product['product_id'];\n\t\t\t$price = $support_options['price'][$id];\n\t\t\t$user_prices[$id] = $price;\n\t\t\tupdate_user_meta($user_id,'dynamo_support_value',$user_prices);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "cf992b77905292134d3f82ddf9780117", "score": "0.59230363", "text": "function addtomojagcart($stripe,$items,$orderinfo)\n\t{\n\t\t//get a session from Mojagcart. You can get his any time you want so it may be good to check first.\n\t\t$session = file_get_contents(\"http://www.mojagcart.com/index.php?/rest/session\");\n\t\t$session2 = json_decode($session);\n\t\t$session2 = str_replace('{\"guid\":\"', '', $session2);\n\t\t$session2 = str_replace('\"}', '', $session2);\n\t\t\n\t\t\n\t\t//create a var for storing the items.\n\t\t$itemsc='';\n\t\t//get all the items\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t\n\t\t\t$name = $item['name'];\n\t\t\t$price = $item['price'];\n\t\t\t$price=$price*100;\n\t\t\t$quantity = $item['quantity'];\n\t\t\t$name=urlencode($name);\n\t\t\t\t$itemsc = $itemsc.\"$name|$price|$quantity;\";\t\n\n\t\t}\n\n\t\t//billing details\n\t\t$billingname = urlencode($orderinfo['billingname']);\n\t\t$billingemail = $orderinfo['billingemail'];\n\t\t$billingaddress1 = urlencode($orderinfo['billingaddress1']);\n\t\t$billingaddress2 = urlencode($orderinfo['billingaddress2']);\n\t\t$billingaddress3 = urlencode($orderinfo['billingaddress3']);\n\t\t$billingaddress4 = urlencode($orderinfo['billingaddress4']);\n\t\t$billingaddress5 = urlencode($orderinfo['billingaddress5']);\n\n\t\t//shipping details\n\t\t$shippingname = urlencode($orderinfo['shippingname']);\t\t\t\n\t\t$shippingemail = urlencode($orderinfo['shippingemail']);\t\t\t\n\t\t$shippingaddress1 = urlencode($orderinfo['shippingaddress1']);\n\t\t$shippingaddress2 = urlencode($orderinfo['shippingaddress2']);\n\t\t$shippingaddress3 = urlencode($orderinfo['shippingaddress3']);\n\t\t$shippingaddress4 = urlencode($orderinfo['shippingaddress4']);\n\t\t$shippingaddress5 = urlencode($orderinfo['shippingaddress5']);\n\t\t$snotes = urlencode($orderinfo['shippingnotes']);\t\n\t\tif (isset($orderinfo['notes']))\t\n\t\t\t$notes = urlencode($orderinfo['notes']);\t\n\t\telse {\n\t\t\t$notes = '';\n\t\t}\t\n\n\t\t//get the totals\n\t\t$ordertotal =$orderinfo['cost'];\n\t\t$finshipping =$orderinfo['shippingcost'];\n\n\t\t\n\t\t//connect to Mojag Cart to store the order.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->orderurl); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, '3');\n\n\t\t// Set request method to POST\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t\t// Set query data here with CURLOPT_POSTFIELDS\n\t \t curl_setopt($ch, CURLOPT_POSTFIELDS, array('giftbox' => '',\n\t \t 'items'=>$itemsc,\n 'notes' => $notes,\n 'companyid' => $this->companyid,\n 'samedeliveryaddress' => \"0\",\n 'paymentReference' => $stripe,\t\t\t\t\t\t\t\t\t\t\t\n 'ordertotal' => $ordertotal,\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'sesid' => $session2,\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'inputName' => $billingname,\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'inputEmail' => $billingemail,\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'inputStreet' => $shippingaddress1,\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'inputTown' => $shippingaddress2,\t\n\t\t 'inputCity' => $shippingaddress3,\t\n\t\t 'inputTelephone' => '',\t\n\t\t 'inputPostcode' => $shippingaddress4,\t\n\t\t 'inputCountry' => $shippingaddress5,\n\t\t 'billingaddress1' => $billingaddress1,\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t 'billingaddress2' => $billingaddress2,\t\n\t\t\t'billingaddress3' => $billingaddress3,\t\n\t\t\t'billingaddress4' => $billingaddress4,\n\t\t\t'billingaddress5' => $billingaddress5,\t\n\t\t\t 'sname' => $shippingname,\n\t\t 'semail' => $shippingemail,\n\t\t 'snotes' => $snotes,\n\t\t\t'shippingcost' => $finshipping\t\t\t\t\n\t\t\t));\n\t\n\t\t$content = trim(curl_exec($ch));\n\t\tcurl_close($ch);\n\t\t//\tprint_r($content);\n\t\t//\texit;\n\t\t$oi = array('shippingcost'=>$finshipping,'notes'=>$notes,'companyid'=>91,'samedeliveryaddress'=>0,'paymentReference'=>$stripe,'ordertotal'=>$ordertotal,'sesid'=>$session2,'inputStreet'=>$shippingaddress1,'inputTown'=>$shippingaddress2,'inputTelephone'=>'','inputCity'=>$shippingaddress3,'inputPostcode'=>$shippingaddress4,'inputCountry'=>$shippingaddress5,'billingaddress1'=>$billingaddress1,'billingaddress2'=>$billingaddress2,'billingaddress3'=>$billingaddress3,'billingaddress4'=>$billingaddress4,'billingaddress5'=>$billingaddress5,'sname'=>$shippingname,'semail'=>$shippingemail,'snotes'=>$snotes);\n\t\t$so = array('orderinfo'=>$oi,'items'=>$itemsc);\n\t\t$this->set($billingemail,$so);\n\t}", "title": "" }, { "docid": "83d08b91377405aee50c80e2d31e8900", "score": "0.5922639", "text": "function getShippingAddressDetails(){\n global $user;\n $shippingEqualsBilling=true;\n $query=db_query(\"SELECT * FROM twotap_user_shipping_details WHERE user_id='{$user->uid}'\");\n\n if(!db_result($query)):\n $insert=\"INSERT INTO twotap_user_shipping_details SET user_id='{$user->uid}'\";\n db_query($insert);\n endif;\n \n $query=db_query(\"SELECT * FROM twotap_user_shipping_details WHERE user_id='{$user->uid}'\");\n while($rec=db_fetch_object($query)):\n if($rec->shipping_address and $rec->billing_address):\n $_SESSION['twoTapCart']['billing_address']=unserialize(base64_decode($rec->billing_address));\n $_SESSION['twoTapCart']['shipping_address']=unserialize(base64_decode($rec->shipping_address));\n break;\n endif;\n endwhile;\n\n\n return $shippingEqualsBilling;\n}", "title": "" }, { "docid": "e8439cca9d93285ea867579788cb7f17", "score": "0.5906466", "text": "function addCart(){\n // this function to add product to cart table in database\n if(isset($_POST['add_cart']))\n {\n global $con;\n $ip_address = getRealIpUser();\n $product_id = $_GET['product_id'];\n $p_cat_id = $_GET['p_cat'];\n $product_quantity = $_POST['product-quantity'];\n if(isset($_SESSION['user_name'])){\n $user_id = $_SESSION['user_id'];\n $check_product = $con->prepare(\"SELECT * FROM cart where product_id = $product_id AND user_id = ? AND ip_address = ?\");\n $check_product->execute([$user_id,$ip_address]);\n $row_number = $check_product->rowCount();\n if($row_number > 0)\n {\n echo \"<script>alert(This Product has already added to cart);</script>\";\n echo \"<script>window.open('details.php?p_cat=$p_cat_id&product_id=$product_id','_self');</script>\";\n }\n else\n {\n \n $add_to_cart = \"INSERT INTO cart (product_id,user_id,ip_address,product_quantity) VALUES ('$product_id','$user_id','$ip_address','$product_quantity')\";\n $con->exec($add_to_cart);\n echo \"<script>window.open('details.php?p_cat=$p_cat_id&product_id=$product_id','_self');</script>\";\n \n }\n }\n else{\n echo \"<script>window.open('login.php','_self');</script>\";\n }\n \n }\n }", "title": "" }, { "docid": "8cbe6429d563653d04870873424e4632", "score": "0.5889509", "text": "function display_cart($jcart)\r\n\t\t{\r\n\t\t// JCART ARRAY HOLDS USER CONFIG SETTINGS\r\n\t\textract($jcart);\r\n\t\t\r\n\t\t// ASSIGN USER CONFIG VALUES TO POST VARS\r\n\t\t// VALUES ARE HTML NAME ATTRIBUTES FROM THE ADD-TO-CART FORM\r\n\t\t@$item_id = $_POST[$item_id];\r\n\t\t@$item_qty = ltrim($_POST[$item_qty], '-'); // PREVENT QTY FROM BEING NEGATIVE\r\n\t\t@$item_price = ltrim($_POST[$item_price], '-'); // PREVENT PRICE FROM BEING NEGATIVE\r\n\t\t@$item_name = $_POST[$item_name];\r\n\r\n\t\t// ADD ITEM\r\n\t\tif(@$_POST[$item_add])\r\n\t\t\t{\r\n\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\t\t\t$valid_item_qty = filter_var($item_qty, FILTER_VALIDATE_INT);\r\n\t\t\t$valid_item_price = filter_var($item_price, FILTER_VALIDATE_FLOAT);\r\n\t\t\t$sanitized_item_name = filter_var($item_name, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t// VALIDATION\r\n\t\t\tif (!$valid_item_qty)\r\n\t\t\t\t{\r\n\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t}\r\n\t\t\telse if (!$valid_item_price)\r\n\t\t\t\t{\r\n\t\t\t\t\t//[CUSTOM]\r\n\t\t\t\t\tif(empty($valid_item_price))\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"This is a Free Item.\");</script>';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = $text['price_error'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/*//[CUSTOM]\r\n\t\t\t\t\t// check if catalog has documents\r\n\t\t\t\t\t$tblRelatedItem = new Kutu_Core_Orm_Table_RelatedItem();\r\n\t\t\t\t\t$where = \"relatedGuid='$sanitized_item_id' AND relateAs='RELATED_FILE'\";\r\n\t\t\t\t\t$rowsetRelatedItem = $tblRelatedItem->fetchAll($where);\r\n\t\t\t\t\tif(count($rowsetRelatedItem) > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//check if the physical FILE is available in uploads directory.\r\n\t\t\t\t\t\t$flagFileFound = true;\r\n\r\n\t\t\t\t\t\tforeach($rowsetRelatedItem as $rowRelatedItem)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$tblCatalog = new Kutu_Core_Orm_Table_Catalog();\r\n\t\t\t\t\t \t$rowsetCatalog = $tblCatalog->find($rowRelatedItem->itemGuid);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t$rowCatalog = $rowsetCatalog->current();\r\n\t\t\t\t \t\t$rowsetCatAtt = $rowCatalog->findDependentRowsetCatalogAttribute();\r\n\r\n\t\t\t\t\t \t$contentType = $rowsetCatAtt->findByAttributeGuid('docMimeType')->value;\r\n\t\t\t\t\t\t\t$systemname = $rowsetCatAtt->findByAttributeGuid('docSystemName')->value;\r\n\t\t\t\t\t\t\t$filename = $rowsetCatAtt->findByAttributeGuid('docOriginalName')->value;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$parentGuid = $rowRelatedItem->relatedGuid;\r\n\t\t\t\t\t\t\t\t$sDir1 = KUTU_ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$systemname;\r\n\t\t\t\t\t\t\t\t$sDir2 = KUTU_ROOT_DIR.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$parentGuid.DIRECTORY_SEPARATOR.$systemname;\r\n\r\n\t\t\t\t\t\t\t\tif(file_exists($sDir1))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t//$flagFileFound = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\tif(file_exists($sDir2))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t//$flagFileFound = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flagFileFound = false;\r\n\t\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}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//echo \"punya file kok\";\r\n\t\t\t\t\t\t//$error_message = '<script>alert(\"\");</script>';\r\n\t\t\t\t\t\t// ADD THE ITEM\r\n\t\t\t\t\t\tif($flagFileFound)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$auth = Zend_Auth::getInstance();\r\n\t\t\t\t\t\t\t$hasBought = false;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($auth->hasIdentity())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$bpm = new Kutu_Core_Bpm_Catalog();\r\n\t\t\t\t\t\t\t\t$hasBought = $bpm->isBoughtByUser($sanitized_item_id, $auth->getIdentity()->guid);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($hasBought)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$error_message = '<script>alert(\"You have bought this Item before. Please check your account.\");</script>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$this->add_item($sanitized_item_id, $valid_item_qty, $valid_item_price, $sanitized_item_name);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$error_message = '<script>alert(\"We are Sorry. The document(s) you are requesting is still not complete. Please check back later.\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"We are Sorry. The document(s) you are requesting is still under review. Please check back later.\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t\r\n\t\t\t\t\trequire_once('Pandamp/Core/Hol/Catalog.php');\r\n\t\t\t\t\t$bpmCatalog = new Pandamp_Core_Hol_Catalog();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$aReturn = $bpmCatalog->jCartIsItemSellable($sanitized_item_id);\r\n\t\t\t\t\tif($aReturn['isError'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$error_message = '<script>alert(\"'.$aReturn['message'].'\");</script>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$this->add_item($sanitized_item_id, $valid_item_qty, $valid_item_price, $sanitized_item_name);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// REMOVE ITEM\r\n\t\t/*\r\n\t\tGET VAR COMES FROM A LINK, WITH THE ITEM ID TO BE REMOVED IN ITS QUERY STRING\r\n\t\tAFTER AN ITEM IS REMOVED ITS ID STAYS SET IN THE QUERY STRING, PREVENTING THE SAME ITEM FROM BEING ADDED BACK TO THE CART\r\n\t\tSO WE CHECK TO MAKE SURE ONLY THE GET VAR IS SET, AND NOT THE POST VARS\r\n\r\n\t\tUSING POST VARS TO REMOVE ITEMS DOESN'T WORK BECAUSE WE HAVE TO PASS THE ID OF THE ITEM TO BE REMOVED AS THE VALUE OF THE BUTTON\r\n\t\tIF USING AN INPUT WITH TYPE SUBMIT, ALL BROWSERS DISPLAY THE ITEM ID, INSTEAD OF ALLOWING FOR USER FRIENDLY TEXT SUCH AS 'remove'\r\n\t\tIF USING AN INPUT WITH TYPE IMAGE, INTERNET EXPLORER DOES NOT SUBMIT THE VALUE, ONLY X AND Y COORDINATES WHERE BUTTON WAS CLICKED\r\n\t\tCAN'T USE A HIDDEN INPUT EITHER SINCE THE CART FORM HAS TO ENCOMPASS ALL ITEMS TO RECALCULATE TOTAL WHEN A QUANTITY IS CHANGED, WHICH MEANS THERE ARE MULTIPLE REMOVE BUTTONS AND NO WAY TO ASSOCIATE THEM WITH THE CORRECT HIDDEN INPUT\r\n\t\t*/\r\n\t\tif(@$_GET['jcart_remove'] && @!$_POST[$item_add] && @!$_POST['jcart_update_cart'] && @!$_POST['jcart_check_out'])\r\n\t\t\t{\r\n\t\t\t// ENSURE THE VALUE IS AN INTEGER\r\n\t\t\t//$rid = intval($_GET['jcart_remove']);\r\n\t\t\t$rid = $_GET['jcart_remove'];\r\n\t\t\t// REMOVE THE ITEM\r\n\t\t\t//die($rid);\r\n\t\t\t$this->del_item($rid);\r\n\t\t\t}\r\n\r\n\t\t// EMPTY CART\r\n\t\tif(@$_POST['jcart_empty'])\r\n\t\t\t{\r\n\t\t\t$this->empty_cart();\r\n\t\t\t}\r\n\r\n\t\t// UPDATE ALL ITEMS IN CART SINCE VISITOR MAY UPDATE MULTIPLE FIELDS BEFORE CLICKING UPDATE\r\n\t\t// ONLY USED WHEN JAVASCRIPT IS DISABLED\r\n\t\t// WHEN JAVASCRIPT IS ENABLED, THE CART IS UPDATED WHEN AN ITEM QTY IS CHANGED\r\n\t\tif(@$_POST['jcart_update_cart'])\r\n\t\t\t{\r\n\t\t\t// POST VALUE IS AN ARRAY OF ALL ITEM IDs IN THE CART\r\n\t\t\t$item_ids = $_POST['jcart_item_id'];\r\n\r\n\t\t\t// IF NO ITEM IDs, THE CART IS EMPTY\r\n\t\t\tif ($item_ids)\r\n\t\t\t\t{\r\n\t\t\t\t// POST VALUE IS AN ARRAY OF ALL ITEM QUANTITIES IN THE CART\r\n\t\t\t\t// TREAT VALUES AS A STRING FOR VALIDATION\r\n\t\t\t\t$item_qtys = implode($_POST['jcart_item_qty']);\r\n\r\n\t\t\t\t$valid_item_qtys = filter_var($item_qtys, FILTER_VALIDATE_INT);\r\n\r\n\t\t\t\t// VALIDATION\r\n\t\t\t\t// ITEM QTY CAN ONLY BE AN INTEGER OR ZERO\r\n\t\t\t\tif (!$valid_item_qtys && $item_qtys !== '0')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// UPDATE ITEMS\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t// THE INDEX OF THE ITEM AND ITS QUANTITY IN THEIR RESPECTIVE ARRAYS\r\n\t\t\t\t\t$count = 0;\r\n\r\n\t\t\t\t\t// FOR EACH ITEM IN THE CART\r\n\t\t\t\t\tforeach ($item_ids as $item_id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t// SANITIZE THE ITEM ID\r\n\t\t\t\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t\t\t\t// GET THE ITEM QTY AND DOUBLE-CHECK THAT THE VALUE IS AN INTEGER\r\n\t\t\t\t\t\t$update_item_qty = intval($_POST['jcart_item_qty'][$count]);\r\n\r\n\t\t\t\t\t\t// UPDATE THE ITEM\r\n\t\t\t\t\t\t$this->edit_item($sanitized_item_id, $update_item_qty);\r\n\r\n\t\t\t\t\t\t// INCREMENT INDEX FOR THE NEXT ITEM\r\n\t\t\t\t\t\t$count++;\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\r\n\r\n\t\t// CHECKING POST VALUE AGAINST $text ARRAY FAILS??\r\n\t\t// HAVE TO CHECK AGAINST $jcart ARRAY\r\n\t\tif (@$_POST['jcart_update_item'] == $jcart['text']['update_button'])\r\n\t\t\t{\r\n\t\t\t// SANITIZE THE ITEM ID\r\n\t\t\t$item_id = $_POST['item_id'];\r\n\t\t\t$sanitized_item_id = filter_var($item_id, FILTER_SANITIZE_SPECIAL_CHARS);\r\n\r\n\t\t\t// GET THE ITEM QTY AND CHECK THAT THE VALUE IS AN INTEGER\r\n\t\t\t$item_qty = $_POST['item_qty'];\r\n\t\t\t$valid_item_qty = filter_var($item_qty, FILTER_VALIDATE_INT);\r\n\r\n\t\t\t// VALIDATION\r\n\t\t\t// ITEM QTY CAN ONLY BE AN INTEGER, OR ZERO, OR EMPTY\r\n\t\t\tif (!$valid_item_qty && $item_qty !== '0' && $item_qty !== '')\r\n\t\t\t\t{\r\n\t\t\t\t$error_message = $text['quantity_error'];\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t// UPDATE THE ITEM\r\n\t\t\t\t$this->edit_item($sanitized_item_id, $valid_item_qty);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t// OUTPUT THE CART\r\n\r\n\t\t// DETERMINE WHICH TEXT TO USE FOR THE NUMBER OF ITEMS IN THE CART\r\n\t\tif ($this->itemcount >= 0)\r\n\t\t\t{\r\n\t\t\t$text['items_in_cart'] = $text['multiple_items'];\r\n\t\t\t}\r\n\t\tif ($this->itemcount == 1)\r\n\t\t\t{\r\n\t\t\t$text['items_in_cart'] = $text['single_item'];\r\n\t\t\t}\r\n\r\n\t\t// IF THERE'S AN ERROR MESSAGE WRAP IT IN SOME HTML\r\n\t\tif (@$error_message)\r\n\t\t\t$error_message = \"<p class='jcart-error'>$error_message</p>\";\r\n\r\n\t\t// DISPLAY THE CART HEADER\r\n\t\techo \"<!-- BEGIN JCART -->\\n<div id='jcart'>\\n\";\r\n\t\techo @$error_message . \"\\n\";\r\n\t\techo \"<form method='post' action='\" . $form_action . \"'>\\n\\n\";\r\n\t\techo \"<table border='1'>\\n\";\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<th colspan='3'>\\n\";\r\n\t\techo \"<strong id='jcart-title'>\" . $text['cart_title'] . \"</strong> (\" . $this->itemcount . \"&nbsp;\" . $text['items_in_cart'] .\")\\n\";\r\n\t\techo \"</th>\\n\";\r\n\t\techo \"</tr>\". \"\\n\";\r\n\r\n\t\t// IF ANY ITEMS IN THE CART\r\n\t\tif($this->itemcount > 0)\r\n\t\t\t{\r\n\t\t\t// DISPLAY LINE ITEMS\r\n\t\t\tforeach($this->get_contents() as $item)\r\n\t\t\t\t{\r\n\t\t\t\techo \"<tr>\\n\";\r\n\t\t\t\t// ADD THE ITEM ID AS THE INPUT ID ATTRIBUTE\r\n\t\t\t\t// THIS ALLOWS US TO ACCESS THE ITEM ID VIA JAVASCRIPT ON QTY CHANGE, AND THEREFORE UPDATE THE CORRECT ITEM\r\n\t\t\t\t// NOTE THAT THE ITEM ID IS ALSO PASSED AS A SEPARATE FIELD FOR PROCESSING VIA PHP\r\n\t\t\t\techo \"<td class='jcart-item-qty'>\\n\";\r\n\t\t\t\techo \"<input type='text' size='2' id='jcart-item-id-\" . $item['id'] . \"' name='jcart_item_qty[ ]' value='\" . $item['qty'] . \"' style='width:30px;' />\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"<td class='jcart-item-name'>\\n\";\r\n\t\t\t\techo $item['info'] . \"<input type='hidden' name='jcart_item_info[ ]' value='\" . $item['info'] . \"' />\\n\";\r\n\t\t\t\techo \"<input type='hidden' name='jcart_item_id[ ]' value='\" . $item['id'] . \"' />\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"<td class='jcart-item-price'><span>\\n\";\r\n\t\t\t\techo $text['currency_symbol'] . number_format($item['subtotal'],2) . \"</span><input type='hidden' name='jcart_item_price[ ]' value='\" . $item['price'] . \"' />\\n\";\r\n\t\t\t\techo \"<a class='jcart-remove' href='?jcart_remove=\" . $item['id'] . \"'>\" . $text['remove_link'] . \"</a>\\n\";\r\n\t\t\t\techo \"</td>\\n\";\r\n\t\t\t\techo \"</tr>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// THE CART IS EMPTY\r\n\t\telse\r\n\t\t\t{\r\n\t\t\techo \"<tr><td colspan='3' class='empty'>\" . $text['empty_message'] . \"</td></tr>\\n\";\r\n\t\t\t}\r\n\r\n\t\t// DISPLAY THE CART FOOTER\r\n\t\techo \"<tr>\\n\";\r\n\t\techo \"<th colspan='3'>\\n\";\r\n\t\techo \"<input type='submit' id='jcart-checkout' name='jcart_checkout' class='jcart-button' value='\" . $text['checkout_button'] . \"' />\\n\";\r\n\t\techo \"<span id='jcart-subtotal'>\" . $text['subtotal'] . \": <strong>\" . $text['currency_symbol'] . number_format($this->total,2) . \"</strong></span>\\n\";\r\n\t\techo \"</th>\\n\";\r\n\t\techo \"</tr>\\n\";\r\n\t\techo \"</table>\\n\\n\";\r\n\t\techo \"<div class='jcart-hide'>\\n\";\r\n\t\techo \"<input type='submit' name='jcart_update_cart' value='\" . $text['update_button'] . \"' class='jcart-button' />\\n\";\r\n\t\techo \"<input type='submit' name='jcart_empty' value='\" . $text['empty_button'] . \"' class='jcart-button' />\\n\";\r\n\t\techo \"</div>\\n\";\r\n\t\techo \"</form>\\n\";\r\n\t\techo \"</div>\\n<!-- END JCART -->\\n\";\r\n\t\t}", "title": "" }, { "docid": "57d06401d83ba206860f2bad7da90ec3", "score": "0.5886982", "text": "function cart(){\n\t\n\tif(isset($_GET['add_cart'])){\n\t\tglobal $db;\n\t\n\t$ip_add = getIp();\n\t\n\t$p_id = $_GET['add_cart'];\n\t\n\t$check_pro = \"select * from cart where ip_add='$ip_add' AND p_id='$p_id'\";\n\t\n\t$run_check = mysqli_query($db,$check_pro);\n\t\n\t if(mysqli_num_rows($run_check)>0){\n\t\t \n\t\t echo \"\";\n\t\t \n\t }\n\t else {\n\t\t \n\t\t $q = \"insert into cart (p_id,ip_add) values ('$p_id','$ip_add')\";\n\t\t \n\t\t $run_q = mysqli_query($db,$q);\n\t\t \n\t\t echo \"<script>window.open('index.php','_self')</script>\";\n\t\t \n\t\t \n\t\t }\n\n\n }\n}", "title": "" }, { "docid": "6f0fa0e288b7ae673bcf3c3336e2e216", "score": "0.5858457", "text": "function add_cart_item( $cart_item ) {\n\t\t\t\tif (isset($cart_item['addons'])) :\n\t\t\t\t\t\n\t\t\t\t\t$extra_cost = 0;\n\t\t\t\t\t\n\t\t\t\t\tforeach ($cart_item['addons'] as $addon) :\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($addon['price']>0) $extra_cost += $addon['price'];\n\t\t\t\t\t\t\n\t\t\t\t\tendforeach;\n\t\t\t\t\t\n\t\t\t\t\t$cart_item['data']->adjust_price( $extra_cost );\n\t\t\t\t\t\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\treturn $cart_item;\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "3147c386fccf93f27c925370446e8f2b", "score": "0.5853749", "text": "public function replenishment_addcart()\r\n\t{\r\n\t\t$goods_id=I('post.goods_id');\r\n\t\t$goods_nums=I('post.goods_nums');\r\n\t\t$goods_price=I('post.goods_price');\r\n\t\taddcart($goods_id,$goods_nums,$goods_price);\r\n\t\tforeach($_SESSION['shop_cart_info'] as $val){\r\n\t\t\t$cart_goods_nums+=$val['goods_nums'];\r\n\t\t}\r\n\t\t$_SESSION['cart_goods_nums']=$cart_goods_nums;\r\n\r\n\r\n\t\t//calculate total\r\n\t\t$list=$_SESSION['shop_cart_info'];\r\n\t\tif(count($list)>0){\r\n\t\t\tforeach($list as $key=>$val){\r\n\t\t\t\t$total_price+=$val['goods_price']*$val['goods_nums'];\r\n\t\t\t\t$info=M('goods')->find($val['goods_id']);\r\n\t\t\t\t$list[$key]['name']=$info['name'];\r\n\t\t\t\t$list[$key]['spic']=$info['spic'];\r\n\t\t\t\t$list[$key]['store_num']=$info['store_num'];\r\n\t\t\t\tunset($info);\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t$total_fee=$total_price;\r\n\t\t\t$this->assign('total_price',$total_price);\t\t//商品总金额【商品原始价格】\r\n\t\t\t$this->assign('total_fee',$total_fee);\t\t//订单总金额【折后】\r\n\t\t\t$this->assign('list',$list);*/\r\n\t\t}\r\n\r\n\t\techo $total_fee;exit;\r\n\t}", "title": "" }, { "docid": "a73e2c9aff7d044377ed10f78b8ab2a4", "score": "0.58475024", "text": "function check_if_added_to_cart($item_id) {\n $user_id = $_SESSION['user_id']; //We'll get the user_id from the session\n\t$con = mysqli_connect(\"localhost\", \"root\", \"\", \"fastcart\")or die($mysqli_error($con));\n //require(\"common.php\"); // connecting to the database\n // We will select all the entries from the user_items table where the item_id is equal to the item_id we passed to this function, user_id is equal to the user_id in the session and status is 'Added to cart'\n \n $query = \"SELECT * FROM users_items WHERE item_id='$item_id' AND user_id ='$user_id' and status='Added to cart'\";\n $result = mysqli_query($con, $query) or die(mysqli_error($con));\n \n// We'll check if the no.of rows in the result and no.of rows returned by the mysqli_num_rows($result) is true. If yes then it return 0 else it returns 0\n if (mysqli_num_rows($result) >= 1) {\n return 1;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "55b7089173cb7d6b2aa1760d78093382", "score": "0.5824645", "text": "function Items(){\n\n\nif(isset($_GET['add_cart']))\n\n {\n\n\tglobal $db;\n\n\t$ip_add= getRealIpAddress();\n\n\t$get_items= \"SELECT * from Cart where ip_add='$ip_add'\";\n\n\t$run_items=mysqli_query($db,$get_items);\n\n\t$count_items= mysqli_num_rows($run_items);\n\n\n\t}\n\n\telse\n\t{\n\t\t$ip_add= getRealIpAddress();\n\n\tglobal $db;\n\n\t$get_items= \"SELECT * from Cart where ip_add='$ip_add'\";\n\n\t$run_items=mysqli_query($db,$get_items);\n\n\t$count_items= mysqli_num_rows($run_items);\n\n\t}\n\n\n echo \"$count_items\";\n\n\n\t\t\t\t}", "title": "" }, { "docid": "51d1cf7bf9d26bba7fb1daeb7b89866f", "score": "0.58039474", "text": "function _wpsc_action_customer_used_cart() {\n\n\tdo_action( '_wpsc_action_customer_used_cart' );\n\n\t// get the current users id\n\t$id = wpsc_get_current_customer_id();\n\n\t// go through the common update routine that allows any users last active time to be changed\n\twpsc_set_visitor_expiration( $id , DAY_IN_SECONDS * 2 );\n\n\t// also extend cookie expiration\n\t_wpsc_create_customer_id_cookie( $id );\n}", "title": "" }, { "docid": "a07927c8cae7c9fffd87fd37db6916c2", "score": "0.58036023", "text": "function add_to_cart($item_id, $qty)\n{\n global $sql_now, $current_user_id, $config, $db_prefix, $lang;\n $timeadd = time();\n}", "title": "" }, { "docid": "5100fecc1ecbbb6ced95ede4d2c411a3", "score": "0.57693994", "text": "function addProductToCart($user){\n try{\n $database = new Database();\n $dbConn = $database->getConnection();\n \n //get current cartID for user (CartStatus is zero for current cart)\n $cmd = 'SELECT * FROM '.CART.' WHERE '.CART.'.UserID = :id AND '.CART.'.CartStatus = :cartStatus';\n $sql = $dbConn->prepare($cmd);\n $sql->bindValue(':id',$user['ID']);\n $sql->bindValue(':cartStatus', 0);\n $sql->execute();\n \n //return a single row\n $currentCartID = $sql->fetch(PDO::FETCH_ASSOC);\n\n if($currentCartID['CartID']){\n return $currentCartID['CartID'];\n }\n else{\n //if doesn't exist create new cart ID for the user\n $insertCmd = 'INSERT INTO '.CART.' (CartID, UserID, CartStatus) VALUES ( null, :id , :cartStatus);';\n $sql = $dbConn->prepare($insertCmd);\n $sql->bindValue(':id',$user['ID']);\n $sql->bindValue(':cartStatus', 0);\n $sql->execute();\n\n //store the created CartID in a variable\n $createdId = $dbConn->lastInsertId();\n return $createdId;\n }\n }\n catch(Exception $e){\n http_response_code(400);\n $error = new stdClass();\n $error->error = \"Request Failed\";\n $error->message = $e->getMessage();\n echo json_encode($error);\n return;\n }\n}", "title": "" }, { "docid": "b0c4a387bd85a4b64a4b05cab255d76a", "score": "0.5764264", "text": "function calculation($cart,$shipping=0,$user_id=0)\n\t{\n\t\t$Idx = $cart['idx'];\n\t\t$total = 0;\n\t\t$vat = 0;\n\t\t$subtotal = 0;\n\t\t$subtotal_excl_vat = 0;\n\t\t$shipping = 0;\n\t\t$discount = 0;\n\t\t//$volume = 0;\n\t\t$user_info_id = 0;\n\t\t$redArray = array();\n\t\tfor( $i=0 ; $i< $Idx ; $i++ )\n \t{\n \t\t$quantity = $cart[$i]['quantity'] ;\n \t\t$subtotal += $quantity * $cart[$i]['product_price'];\n\t\t\t$subtotal_excl_vat += $quantity * $cart[$i]['product_price_excl_vat'];\n\t\t\t$vat += $quantity * $cart[$i]['product_vat'];\n\t\t}\n\t\t$tmparr = array();\n \t$tmparr['subtotal'] = $subtotal;\n\n \t$tmparr['tax'] = $vat;\n\t\t$shippingVat = 0;\n\t\tif (SHOW_SHIPPING_IN_CART && SHIPPING_METHOD_ENABLE) // if SHOW_SHIPPING_IN_CART set to no, make shipping Zero\n\t\t{\n\t\t\tif(!$user_id)\n\t\t\t{\n\t\t\t\t$user = JFactory::getUser();\n\t\t\t\t$user_id = $user->id;\n\t\t\t\t$shippingArray = $this->_order_functions->getShippingAddress($user_id);\n\t\t\t\tif(!empty($shippingArray[0])){\n\t\t\t\t\t$user_info_id = $shippingArray[0]->users_info_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$noOFGIFTCARD = 0;\n\t\t\tfor($i=0; $i <$Idx; $i++)\n\t\t\t{\n\t\t\t\t\tif(!is_null($cart [$i] ['giftcard_id']) && $cart [$i] ['giftcard_id'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$noOFGIFTCARD++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif($noOFGIFTCARD==$Idx)\n\t\t\t{\n\t\t\t\t$cart['free_shipping'] = 1;\n\t\t\t}else if($cart['free_shipping'] != 1)\n\t\t\t{\n\t\t\t\t$cart['free_shipping'] = 0;\n\t\t\t}\n\t\t\tif (isset($cart ['free_shipping']) && $cart ['free_shipping'] > 0) {\n\t\t\t\t$shipping = 0;\n\t\t\t}else{\n\t\t\t\t$total_discount = $cart['cart_discount'] + $cart['voucher_discount'] + $cart['coupon_discount'];\n\t\t\t\t$d['order_subtotal'] = (SHIPPING_AFTER == 'total') ? $subtotal-$total_discount : $subtotal;\n\t\t\t\t$d['users_info_id'] = $user_info_id;\n\t\t\t\t$shippingArr \t= $this->_shippinghelper->getDefaultShipping ( $d );\n\t\t\t\t$shipping\t\t= $shippingArr['shipping_rate'];\n\t\t\t\t$shippingVat\t= $shippingArr['shipping_vat'];\n\t\t\t}\n\t\t}\n\t\t$view = JRequest::getVar('view');\n\t\tif(key_exists('shipping',$cart) && $view!='cart')\n\t\t{\n\t\t\t$shipping \t = $cart['shipping'];\n\t\t\t$shippingVat = $cart['shipping_vat'];\n\t\t}\n\t\tif(VAT_RATE_AFTER_DISCOUNT)\n\t\t{\n\t\t\t$Discountvat = (VAT_RATE_AFTER_DISCOUNT * $total_discount)/(1+VAT_RATE_AFTER_DISCOUNT);\n\t\t\t$vat = $vat - $Discountvat;\n\t\t}\n\n\t\t$total\t\t= $subtotal+$shipping;\n\t\t$redArray[]= $total;\n\t\t$redArray[]= $subtotal;\n\t\t$redArray[]= $subtotal_excl_vat;\n\t\t$redArray[]= $shipping;\n\t\t$redArray[]= $cart['discount'];\n\t\t$redArray[]= $vat;\n\t\t$redArray[]= $shippingVat;\n\n\t\treturn $redArray;\n\t}", "title": "" }, { "docid": "07081821ede9b6918c090ac0244d4723", "score": "0.5759881", "text": "function uc_cart_links_process($arg1) {\n $messages = array();\n\n // Fail if the link is restricted.\n $data = variable_get('uc_cart_links_restrictions', '');\n if (!empty($data)) {\n $restrictions = explode(\"\\n\", variable_get('uc_cart_links_restrictions', ''));\n if (!empty($restrictions) && !in_array($arg1, $restrictions)) {\n $url = variable_get('uc_cart_links_invalid_page', '');\n if (empty($url)) {\n $url = '<front>';\n }\n unset($_REQUEST['destination']);\n drupal_goto($url);\n }\n }\n\n // Split apart the cart link on the -.\n $actions = explode('-', urldecode($arg1));\n $rebuild_cart = FALSE;\n\n foreach ($actions as $action) {\n switch (drupal_substr($action, 0, 1)) {\n // Set the ID of the cart link.\n case 'i':\n case 'I':\n $id = drupal_substr($action, 1);\n break;\n\n // Add a product to the cart.\n case 'p':\n case 'P':\n // Set the default product variables.\n $p = array('nid' => 0, 'qty' => 1, 'data' => array());\n $msg = TRUE;\n\n // Parse the product action to adjust the product variables.\n $parts = explode('_', $action);\n foreach ($parts as $part) {\n switch (drupal_substr($part, 0, 1)) {\n // Set the product node ID: p23\n case 'p':\n case 'P':\n $p['nid'] = intval(drupal_substr($part, 1));\n break;\n // Set the quantity to add to cart: q2\n case 'q':\n case 'Q':\n $p['qty'] = intval(drupal_substr($part, 1));\n break;\n // Set an attribute/option for the product: a3o6\n case 'a':\n case 'A':\n $attribute = intval(drupal_substr($part, 1, stripos($part, 'o') - 1));\n $option = (string) drupal_substr($part, stripos($part, 'o') + 1);\n // Multiple options for this attribute implies checkbox\n // attribute, which we must store as an array. However, all other\n // types can be stored as arrays as well.\n $p['attributes'][$attribute][$option] = $option;\n break;\n // Suppress the add to cart message: m0\n case 'm':\n case 'M':\n $msg = intval(drupal_substr($part, 1)) == 1 ? TRUE : FALSE;\n break;\n }\n }\n\n // Add the item to the cart, suppressing the default redirect.\n if ($p['nid'] > 0 && $p['qty'] > 0) {\n // If it's a product kit, we need black magic to make everything work\n // right. In other words, we have to simulate FAPI's form values.\n $node = node_load(array('nid' => $p['nid']));\n if (is_array($node->products)) {\n foreach ($node->products as $nid => $product) {\n $p['data']['products'][$nid] = array(\n 'nid' => $nid,\n 'qty' => $product->qty,\n );\n }\n }\n uc_cart_add_item($p['nid'], $p['qty'], $p['data'] + module_invoke_all('add_to_cart_data', $p), NULL, $msg, FALSE, FALSE);\n $rebuild_cart = TRUE;\n }\n break;\n\n // Empty the shopping cart.\n case 'e':\n case 'E':\n if (variable_get('uc_cart_links_empty', TRUE)) {\n uc_cart_empty(uc_cart_get_id());\n }\n break;\n\n // Display a pre-configured message.\n case 'm':\n case 'M':\n // Load the messages if they haven't been loaded yet.\n if (empty($messages)) {\n $data = explode(\"\\n\", variable_get('uc_cart_links_messages', ''));\n foreach ($data as $message) {\n $mdata = explode('|', $message);\n $messages[$mdata[0]] = $mdata[1];\n }\n }\n\n // Parse the message key and display it if it exists.\n $mkey = intval(drupal_substr($action, 1));\n if (!empty($messages[$mkey])) {\n drupal_set_message($messages[$mkey]);\n }\n break;\n }\n\n // Rebuild the cart cache if necessary.\n if ($rebuild_cart) {\n uc_cart_get_contents(NULL, 'rebuild');\n }\n }\n\n if (variable_get('uc_cart_links_track', TRUE)) {\n db_merge('uc_cart_link_clicks')\n ->key(array('cart_link_id' => $id))\n ->fields(array(\n 'clicks' => 1,\n 'last_click' => REQUEST_TIME,\n ))\n ->expression('clicks', 'clicks + :i', array(':i' => 1))\n ->execute();\n }\n\n $_SESSION['uc_cart_last_url'] = uc_referer_uri();\n\n drupal_goto();\n}", "title": "" }, { "docid": "f7424561c065ada7fcc696b9da2fe9c8", "score": "0.5740613", "text": "public function getExpCartList(Request $request){\n\n \tif(!empty($request->all())){\n \t$userId \t\t= $request->get('user_id');\n\t\t\t$cartItem = \\Cart::session($userId)->getContent();\n\t\t\tif(!empty($cartItem)){\n\t\t\t\t// for a specific user\n\t\t\t\t$total = \\Cart::session($userId)->getTotal();\n\t\t\t\t// for a specific user\n\t\t\t\t$subTotal = \\Cart::session($userId)->getSubTotal();\n\t\t\t\tforeach($cartItem as $item){\n \t\t\t$cart[]=array(\n \t\t\t\t\"name\"=>$item['name'],\n \t\t\t\t\"price\"=>number_format($item['price'],2),\n \t\t\t\t\"quantity\"=>$item['quantity'],\n \t\t\t\t\"attributes\"=>array(\n\t\t\t\t\t\t\t\t\"itinerary_departures_id\"\t=>\t$item['attributes']['itinerary_departures_id'],\n\t\t\t\t\t\t\t\t\"itinerary_id\"\t\t\t\t=>\t$item['attributes']['itinerary_id'],\n\t\t\t\t\t\t\t\t\"itinerary_image\"\t\t\t=>\t$item['attributes']['itinerary_image'],\n\t\t\t\t\t\t\t\t\"itinerary_departure_date\"\t=>\t$item['attributes']['itinerary_departure_date'],\n\t \t\t\t),\n\n \t\t\t);\n \t\t}\n\n\n\n\n\t\t $responseArray['status'] = true;\n\t \t$responseArray['code'] = 200;\n\t \t$responseArray['cart'] = $cart;\n\t \t$responseArray['total'] = number_format($total,2);\n\t \t$responseArray['subTotal'] = number_format($subTotal,2);\n\t \t$responseArray['TotalItem'] = count($cart);\n\t \t$responseArray['gst'] = $this->getGst();\n\t \t$gstValue = ($subTotal * $this->getGst())/100;\n\t\t\t\t$responseArray['gstAmount'] = number_format($gstValue,2);\n\t\t\t\t$responseArray['subTotalAfterGst'] = number_format(($subTotal + $gstValue),2);\n\t\t\t\t$subTotalAfterGst = $subTotal + $gstValue;\n\t\t\t\t$responseArray['total'] = number_format($subTotalAfterGst,2);\n\t\t\t\t$responseArray['oid'] = encrypt(0);\n\t\t\t\t$responseArray['offerValue'] = \"0.00\";\n\n\t\t\t\t//Calulate Offer If applicable\n\t\t\t\tif(array_key_exists('offerId', $request->all())){\n\n\t\t\t\t\t$offerId = $request->get('offerId');\n\t\t\t\t\t//Check if this is from Checkout Page\n\t\t\t\t\t$pos = strpos($offerId, \"chk\");\n\t\t\t\t\tif($pos>0){\n\t\t\t\t\t\t$offerStr = str_replace('?chk=','',$offerId);\n\t\t\t\t\t\ttry{\n\n\t\t\t\t\t\t\t$offerId = decrypt($offerStr);\n\n\t\t\t\t\t\t}catch (DecryptException $e) {\n\t\t\t\t $failedArray['status'] = false;\n\t\t\t\t $failedArray['code'] = 500;\n\t\t\t\t $failedArray['message'] = $e->getMessage();\n\t\t\t\t return $failedArray;\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tif($offerId!=''){\n\t\t\t\t\t\t$offer = Offer::find($offerId);\n\t\t\t\t\t\t$cartItem = \\Cart::session($userId)->getContent();\n\t \t\t\tif(!empty($cartItem)){\n\t\t\t\t\t\t\t$totalWithGst = $subTotalAfterGst;\n\t\t\t\t\t\t\t$newtotal = 0;\n\t\t\t\t\t\t\t$offerValue = 0;\n\t\t\t\t\t\t\tif($offer['offer_type']=='PERCENTAGE'){\n\t\t\t\t\t\t\t\t$offerValue = ($totalWithGst * $offer['offer_value'])/100;\n\t\t\t\t\t\t\t\t$newtotal = $totalWithGst - $offerValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($offer['offer_type']=='FLAT'){\n\t\t\t\t\t\t\t\t$offerValue = $offer['offer_value'];\n\t\t\t\t\t\t\t\t$newtotal = $totalWithGst - $offer['offer_value'];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$responseArray['total'] = number_format($newtotal,2);\n\t\t\t\t\t\t$responseArray['oid'] = encrypt($offerId);\n\t\t\t\t\t\t$responseArray['offerValue'] = number_format($offerValue,2);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t}else{\n\t\t\t\t$responseArray['status'] = false;\n\t \t$responseArray['code'] = 500;\n\t \t$responseArray['message'] = \"Invalid Request\";\n\t\t\t}\n }else{\n\t\t\t$responseArray['status'] = false;\n\t \t$responseArray['code'] = 500;\n\t \t$responseArray['message'] = \"Invalid Request\";\n\t\t}\n return response()->json($responseArray);\n }", "title": "" }, { "docid": "d9d8f58fe65cbfe435cf85ff01d9035f", "score": "0.57111007", "text": "private function queryUserInfos(){\n \n $arrBilling = array();\n $arrShipping = array(); \n \n $prefix = $this->getPrefix();\n $cartID = $this->getCartId();\n $vmUserID = $this->getVMUserID();\n\t \n\t $conn = Db::connMySQL();\t\n\t \n $this->debug(\"queryUserInfos: Start\"); \n\t\t \n \t $stmt = $conn->prepare(\"SELECT * FROM `\".$prefix.\"virtuemart_userinfos` WHERE `cartSessionID` = ? AND `virtuemart_user_id` = ? AND `address_type` = 'BT'\");\n \t $stmt->bind_param(\"si\", $cartID, $vmUserID);\n \t $stmt->execute();\n \t $result = $stmt->get_result();\t\t\n \t \n if($result->num_rows > 0) {\n \n $bInfoRow=$result->fetch_assoc(); \n \n //User Infos doesn't have email so get it from the user table\t\t\t\n \t\t$stmt = $conn->prepare(\"SELECT email FROM `\".$prefix.\"users` WHERE `id` = ?\");\n \t\t$stmt->bind_param(\"i\", $bInfoRow['virtuemart_user_id']);\n \t\t$stmt->execute();\n \t\t$result = $stmt->get_result();\t\n $jUserRow=$result->fetch_assoc(); \n \n $bInfoRow['email']=$jUserRow['email'];\n \n //UserInfo only contains countryID. Query the text for that ID\n $bInfoRow['countryName'] = $this->getCountry($bInfoRow['virtuemart_country_id']);\n \n //Query the billing state\n \t\t $bInfoRow['stateName']=$this->getState($bInfoRow['virtuemart_state_id']);\n \n $this->setBillingInfo($bInfoRow);\n }\n \n //Query the shipping info \n \t $stmt = $conn->prepare(\"SELECT * FROM `\".$prefix.\"virtuemart_userinfos` WHERE `virtuemart_user_id` = ? AND `address_type` = 'ST'\");\n \t $stmt->bind_param(\"i\", $vmUserID);\n \t $stmt->execute();\n \t $result = $stmt->get_result();\t\t\n \t \n \t if($result->num_rows > 0) { \n \t \n $sInfoRow = $result->fetch_assoc(); \n \n //Query the shipping country\n $sInfoRow['countryName']=$this->getCountry($sInfoRow['virtuemart_country_id']);\n \n //Query the shipping state\n $sInfoRow['stateName']=$this->getState($sInfoRow['virtuemart_state_id']);\n \n $this->setShippingInfo($sInfoRow);\n } \n }", "title": "" }, { "docid": "221cf657ce592f7724d4614b3db45754", "score": "0.5705143", "text": "function updateCart(){\n // for update cart and delete from cart\n global $con;\n $ip_address = getRealIpUser(); // get ip address\n if(isset($_SESSION['user_name']))// check if user_name session is exist\n {\n $user_id = $_SESSION['user_id'];\n /* if click update check remove\n / if user select to delete product they are connect to database and delete\n / product using his id \n */\n if(isset($_POST['update']))\n {\n if(isset($_POST['remove'])){\n foreach($_POST['remove'] as $product_remove_id)\n {\n $delete_product = $con->prepare(\"DELETE FROM cart where product_id = $product_remove_id AND user_id = ? AND ip_address = ?\");\n $delete_product->execute([$user_id,$ip_address]);\n if($delete_product){\n echo \"<script>window.open('cart.php','_self');</script>\";\n }\n }\n }\n }\n }\n \n }", "title": "" }, { "docid": "84367e3f95effe5a8dfe09c3cfefb8c6", "score": "0.5690433", "text": "function cart(){\n\tif (isset($_GET['add_cart'])) {\n\t\t\n\tglobal $con;\n $ip =\tgetIp();\n\t\n\t$pro_id = $_GET['add_cart'];//from getpro function add_cart is defined as ?add_cart=$pro_id\n\t\n $check_pro =\"select * from cart where ip_add='$ip' AND p_id='$pro_id'\";\n\t \n $run_check = mysqli_query($con, $check_pro);\n \n if(mysqli_num_rows($run_check)>0){\n\t\t\n\techo \"\";\n\t}\n\t \n\t \n\t //ie if add_cart do exist in the database dont insert it again in the cart table ..else insert\n\t\t \n\t \n\t \n\telse{\n\t$insert_pro =\"insert into cart (p_id,ip_add) values('$pro_id','$ip')\";\t\n\t$run_pro =mysqli_query($con, $insert_pro);\n\t\n\techo\" <script>window.open('index.php','_self')</script>\";\n\t// OR echo \"<script>alert('product has been inserted')</script>\";\t\n\t}\n\t \n\t}\n\t\n}", "title": "" }, { "docid": "53899d7c63e8d268f58b60c6ea1df1fa", "score": "0.5677477", "text": "function items(){\n\t\tglobal $db;\n\t\t$ip_add = getRealIpUser();\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\t\t$run_items = mysqli_query($db, $get_items);\n\t\t$count_items = mysqli_num_rows($run_items);\n\t\techo $count_items;\n\t}", "title": "" }, { "docid": "06d4e5101f34319ae7f431d5814b8639", "score": "0.56751734", "text": "public function process_user($item)\r\n {\r\n $this->loadModel('TempPaymentLog');\r\n $this->loadModel('EmailTemplate');\r\n $is_purchase_with_wallet_amount = 0;\r\n $this->Session->write('Auth.last_bought_item_slug', $item['Item']['slug']);\r\n if (!empty($this->request->data)) {\r\n if ($item['Item']['is_be_next']) {\r\n $item['Item']['price']+= count($item['ItemUser']) *$item['Item']['be_next_increase_price'];\r\n }\r\n $total_item_amount = $item['Item']['price']*$this->request->data['Item']['quantity'];\r\n $valid_user = true;\r\n //already registered users\r\n if ($this->Auth->user('id')) {\r\n //already logged in user\r\n $user_available_balance = $this->Item->User->checkUserBalance($this->Auth->user('id'));\r\n $amount_needed = $total_item_amount;\r\n //when wallet amount less than total amount check needed amount\r\n if ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::Wallet) {\r\n $valid_user = false;\r\n $is_show_credit_card = 0;\r\n $this->set('is_show_credit_card', $is_show_credit_card);\r\n // <-- For iPhone App code\r\n if ($this->RequestHandler->prefers('json')) {\r\n $resonse = array(\r\n 'status' => 1,\r\n 'message' => __l('Purchase via wallet not possible as the total purchase amount exceeded your wallet balance.')\r\n );\r\n $this->view = 'Json';\r\n $this->set('json', (empty($this->viewVars['iphone_response'])) ? $resonse : $this->viewVars['iphone_response']);\r\n } else {\r\n $this->Session->setFlash(__l('Purchase via wallet not possible as the total purchase amount exceeded your wallet balance.') , 'default', null, 'error');\r\n }\r\n // For iPhone App code -->\r\n //$amount_needed = $total_item_amount-$user_available_balance;\r\n\r\n }\r\n } else {\r\n //new users register process\r\n $amount_needed = $total_item_amount;\r\n $this->Item->User->create();\r\n $this->Item->User->set($this->request->data['User']);\r\n if ($this->Item->User->validates()) {\r\n $this->request->data['User']['is_active'] = 1;\r\n $this->request->data['User']['is_email_confirmed'] = 1;\r\n $this->request->data['User']['password'] = $this->Auth->password($this->request->data['User']['passwd']);\r\n $this->request->data['User']['user_type_id'] = ConstUserTypes::User;\r\n $this->request->data['User']['ip_id'] = $this->RequestHandler->getClientIP();\r\n if ($this->Item->User->save($this->request->data['User'], false)) {\r\n $user_id = $this->Item->User->getLastInsertId();\r\n $this->Item->User->_createCimProfile($user_id);\r\n $this->_sendWelcomeMail($user_id, $this->request->data['User']['email'], $this->request->data['User']['username']);\r\n $this->request->data['UserProfile']['user_id'] = $user_id;\r\n $this->Item->User->UserProfile->create();\r\n $this->Item->User->UserProfile->save();\r\n $this->Auth->login($this->request->data['User']);\r\n\t\t\t\t\t\t$this->setMaxmindInfo('login');\r\n\t\t\t\t\t\t$this->request->data['ItemUserPass'][0]['guest_name'] = $this->request->data['User']['username'];\r\n\t\t\t\t\t\t$this->request->data['ItemUserPass'][0]['guest_email'] = $this->request->data['User']['email'];\r\n $this->request->data['Item']['user_id'] = $user_id;\r\n // send to admin mail if is_admin_mail_after_register is true\r\n if (Configure::read('user.is_admin_mail_after_register')) {\r\n $email = $this->EmailTemplate->selectTemplate('New User Join');\r\n $emailFindReplace = array(\r\n '##SITE_URL##' => Router::url('/', true) ,\r\n '##USERNAME##' => $this->request->data['User']['username'],\r\n '##SITE_NAME##' => Configure::read('site.name') ,\r\n '##SIGNUP_IP##' => $this->RequestHandler->getClientIP() ,\r\n '##EMAIL##' => $this->request->data['User']['email'],\r\n '##CONTACT_URL##' => Router::url(array(\r\n 'controller' => 'contacts',\r\n 'action' => 'add',\r\n 'city' => $this->request->params['named']['city'],\r\n 'admin' => false\r\n ) , true) ,\r\n '##FROM_EMAIL##' => $this->Item->User->changeFromEmail(($email['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $email['from']) ,\r\n '##SITE_LOGO##' => Router::url(array(\r\n 'controller' => 'img',\r\n 'action' => 'blue-theme',\r\n 'logo-email.png',\r\n 'admin' => false\r\n ) , true) ,\r\n );\r\n // Send e-mail to users\r\n $this->Email->from = ($email['from'] == '##FROM_EMAIL##') ? Configure::read('EmailTemplate.from_email') : $email['from'];\r\n $this->Email->replyTo = ($email['reply_to'] == '##REPLY_TO_EMAIL##') ? Configure::read('EmailTemplate.reply_to_email') : $email['reply_to'];\r\n $this->Email->to = Configure::read('site.contact_email');\r\n $this->Email->subject = strtr($email['subject'], $emailFindReplace);\r\n $this->Email->sendAs = ($email['is_html']) ? 'html' : 'text';\r\n $this->Email->send(strtr($email['email_content'], $emailFindReplace));\r\n }\r\n }\r\n } else {\r\n $valid_user = false;\r\n }\r\n }\r\n //payment process\r\n if ($valid_user) {\r\n if ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::CreditCard) {\r\n $this->_buyItem($this->request->data);\r\n } else if ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::Wallet) {\r\n $this->_buyItem($this->request->data);\r\n } else {\r\n //paypal process\r\n if ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::CreditCard) {\r\n $payment_gateway_id = ConstPaymentGateways::PayPalAuth;\r\n } elseif ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::AuthorizeNet) {\r\n $payment_gateway_id = ConstPaymentGateways::AuthorizeNet;\r\n } elseif ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::PagSeguro) {\r\n $payment_gateway_id = ConstPaymentGateways::PagSeguro;\r\n } else {\r\n $payment_gateway_id = ConstPaymentGateways::PayPalAuth;\r\n }\r\n $paymentGateway = $this->Item->User->Transaction->PaymentGateway->find('first', array(\r\n 'conditions' => array(\r\n 'PaymentGateway.id' => $payment_gateway_id,\r\n ) ,\r\n 'contain' => array(\r\n 'PaymentGatewaySetting' => array(\r\n 'fields' => array(\r\n 'PaymentGatewaySetting.key',\r\n 'PaymentGatewaySetting.test_mode_value',\r\n 'PaymentGatewaySetting.live_mode_value',\r\n ) ,\r\n ) ,\r\n ) ,\r\n 'recursive' => 1\r\n ));\r\n $this->pageTitle.= ' - ' . sprintf(__l('Buy %s Item') , $item['Item']['name']);\r\n $this->set('gateway_name', $paymentGateway['PaymentGateway']['name']);\r\n if (empty($paymentGateway)) {\r\n throw new NotFoundException(__l('Invalid request'));\r\n }\r\n $action = strtolower(str_replace(' ', '', $paymentGateway['PaymentGateway']['name']));\r\n if ($paymentGateway['PaymentGateway']['name'] == 'PayPal') {\r\n Configure::write('paypal.is_testmode', $paymentGateway['PaymentGateway']['is_test_mode']);\r\n if (!empty($paymentGateway['PaymentGatewaySetting'])) {\r\n foreach($paymentGateway['PaymentGatewaySetting'] as $paymentGatewaySetting) {\r\n if ($paymentGatewaySetting['key'] == 'payee_account') {\r\n Configure::write('paypal.account', $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value']);\r\n }\r\n if ($paymentGatewaySetting['key'] == 'receiver_emails') {\r\n $this->Paypal->paypal_receiver_emails = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n }\r\n }\r\n // If enabled, purchase amount is first taken with amount in wallet and then passed to CreditCard //\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n $user_available_balance = $this->Item->User->checkUserBalance($this->Auth->user('id'));\r\n $amount_needed = $amount_needed-$user_available_balance;\r\n $is_purchase_with_wallet_amount = 1;\r\n }\r\n $city = $this->Item->City->find('first', array(\r\n 'conditions' => array(\r\n 'City.slug' => $this->request->params['named']['city']\r\n ) ,\r\n 'fields' => array(\r\n 'City.id'\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n $cmd = '_xclick';\r\n $cookie_value = $this->Cookie->read('referrer');\r\n //gateway options set\r\n\t\t\t\t\t\t$lat = '';\r\n\t\t\t\t\t\t$long = '';\r\n\t\t\t\t\t\tif (!empty($_COOKIE['_geo'])) {\r\n\t\t\t\t\t\t\t$_geo = explode('|', $_COOKIE['_geo']);\r\n\t\t\t\t\t\t\t$lat = $_geo[3];\r\n\t\t\t\t\t\t\t$long = $_geo[4];\r\n\t\t\t\t\t\t}\r\n // Currency Conversion Process //\r\n $get_conversion = $this->_convertAmount($amount_needed);\r\n // Storing the guest name in the temp payment table\r\n $temp_payment['user_id'] = $this->Auth->user('id');\r\n $temp_payment['item_id'] = $this->request->data['Item']['item_id'];\r\n $temp_payment['sub_item_id'] = (!empty($this->request->data['Item']['sub_item_id'])) ? $this->request->data['Item']['sub_item_id'] : '';\r\n $temp_payment['is_gift'] = $this->request->data['Item']['is_gift'];\r\n $temp_payment['quantity'] = $this->request->data['Item']['quantity'];\r\n $temp_payment['payment_gateway_id'] = $this->request->data['Item']['payment_gateway_id'];\r\n $temp_payment['payment_type'] = 'Item Purchase';\r\n $temp_payment['is_purchase_with_wallet_amount'] = $is_purchase_with_wallet_amount;\r\n $temp_payment['ip'] = $this->TempPaymentLog->toSaveIp();\r\n $temp_payment['amount_needed'] =$get_conversion['amount'];\r\n $temp_payment['currency_code'] = $get_conversion['currency_code'];\r\n $temp_payment['message'] = !empty($this->request->data['Item']['message']) ? $this->request->data['Item']['message'] : '';\r\n $temp_payment['referred_user_id ']=(!empty($cookie_value['refer_id'])) ? $cookie_value['refer_id'] : null;\r\n $temp_payment['city_id'] = $city['City']['id'];\r\n $temp_payment['latitude'] = $lat;\r\n $temp_payment['longitude'] = $long;\r\n $temp_payment['charity_id'] = !empty($this->request->data['Item']['charity_id']) ? $this->request->data['Item']['charity_id'] : '';\r\n $temp_payment['original_amount_needed']=$amount_needed;\r\n if (!empty($this->request->data['ItemUserPass'])) {\r\n $guest_names = array();\r\n $guest_emails = array();\r\n foreach($this->request->data['ItemUserPass'] as $guest) {\r\n array_push($guest_names, $guest['guest_name']);\r\n array_push($guest_emails, $guest['guest_email']);\r\n }\r\n $temp_payment['guest_name'] = serialize($guest_names);\r\n $temp_payment['guest_email'] = serialize($guest_emails);\r\n }\r\n $transaction_data['TempPaymentLog'] = $temp_payment;\r\n $this->TempPaymentLog->save($transaction_data);\r\n $temp_payment_id = $this->TempPaymentLog->getLastInsertId();\r\n \r\n $gateway_options = array(\r\n 'cmd' => $cmd,\r\n 'notify_url' => Router::url('/', true) . 'items/processpayment/paypal',\r\n 'cancel_return' => Router::url('/', true) . 'items/payment_cancel/' . $payment_gateway_id,\r\n 'return' => Router::url('/', true) . 'items/payment_success/' . $payment_gateway_id . '/' . $this->request->data['Item']['item_id'],\r\n 'item_name' => $item['Item']['name'],\r\n 'currency_code' => $get_conversion['currency_code'],\r\n 'amount' => $get_conversion['amount'],\r\n 'temp_payment_id'=>$temp_payment_id,\r\n\t\t\t\t\t\t\t 'user_defined' => array(\r\n 'user_id' => $this->Auth->user('id') ,\r\n 'item_id' => $this->request->data['Item']['item_id'], \r\n 'temp_payment_id' => $this->TempPaymentLog->getLastInsertId()\r\n ) ,\r\n );\r\n //for paypal auth\r\n if ($this->request->data['Item']['payment_gateway_id'] == ConstPaymentGateways::PayPalAuth) {\r\n $gateway_options['paymentaction'] = 'authorization';\r\n }\r\n $this->set('gateway_options', $gateway_options);\r\n } elseif ($paymentGateway['PaymentGateway']['name'] == 'AuthorizeNet') {\r\n // If enabled, purchase amount is first taken with amount in wallet and then passed to CreditCard //\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n $user_available_balance = $this->Item->User->checkUserBalance($this->Auth->user('id'));\r\n $amount_needed1 = $amount_needed-$user_available_balance;\r\n $is_purchase_with_wallet_amount = 1;\r\n }\r\n if (Configure::read('wallet.is_handle_wallet')) {\r\n $this->request->data['Item']['amount'] = $amount_needed1;\r\n $this->request->data['Item']['wallet_amount'] = $user_available_balance;\r\n } else {\r\n $this->request->data['Item']['amount'] = $amount_needed;\r\n }\r\n $this->request->data['Item']['amount'] = $this->Item->_convertAuthorizeAmount($this->request->data['Item']['amount']);\r\n $user = $this->Item->User->find('first', array(\r\n 'conditions' => array(\r\n 'User.id' => $this->Auth->user('id')\r\n ) ,\r\n 'fields' => array(\r\n 'User.id',\r\n 'User.cim_profile_id'\r\n )\r\n ));\r\n if (!empty($this->request->data['Item']['creditCardNumber'])) {\r\n //create payment profile\r\n $data = $this->request->data['Item'];\r\n $data['expirationDate'] = $this->request->data['Item']['expDateYear']['year'] . '-' . $this->request->data['Item']['expDateMonth']['month'];\r\n $data['customerProfileId'] = $user['User']['cim_profile_id'];\r\n $payment_profile_id = $this->Item->User->_createCimPaymentProfile($data);\r\n if (is_array($payment_profile_id) && !empty($payment_profile_id['payment_profile_id']) && !empty($payment_profile_id['masked_cc'])) {\r\n $payment['UserPaymentProfile']['user_id'] = $this->Auth->user('id');\r\n $payment['UserPaymentProfile']['cim_payment_profile_id'] = $payment_profile_id['payment_profile_id'];\r\n $payment['UserPaymentProfile']['masked_cc'] = $payment_profile_id['masked_cc'];\r\n $payment['UserPaymentProfile']['is_default'] = 0;\r\n $this->Item->User->UserPaymentProfile->save($payment);\r\n $this->request->data['Item']['payment_profile_id'] = $payment_profile_id['payment_profile_id'];\r\n } else {\r\n $this->Session->setFlash(sprintf(__l('Gateway error: %s <br>Note: Due to security reasons, error message from gateway may not be verbose. Please double check your card number, security number and address details. Also, check if you have enough balance in your card.') , $payment_profile_id['message']) , 'default', null, 'error');\r\n $this->redirect(array(\r\n 'controller' => 'items',\r\n 'action' => 'index'\r\n ));\r\n }\r\n }\r\n if (!empty($this->request->data['Item']['payment_profile_id'])) {\r\n $data['customerProfileId'] = $user['User']['cim_profile_id'];\r\n $data['customerPaymentProfileId'] = $this->request->data['Item']['payment_profile_id'];\r\n $data['amount'] = $this->request->data['Item']['amount'];\r\n $data['quantity'] = $this->request->data['Item']['quantity'];\r\n $data['item_id'] = $this->request->data['Item']['item_id'];\r\n $tmp_item = $this->Item->find('first', array(\r\n 'conditions' => array(\r\n 'Item.id' => $this->request->data['Item']['item_id'],\r\n 'Item.item_status_id' => array(\r\n ConstItemStatus::Open,\r\n ConstItemStatus::Tipped\r\n )\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n if ($tmp_item['Item']['min_limit'] <= ($tmp_item['Item']['item_user_count']+$this->request->data['Item']['quantity'])) {\r\n // is going to tipped or already tipped. so no need to authorize the transaction\r\n $type = 'profileTransAuthCapture';\r\n } else {\r\n $type = 'profileTransAuthOnly';\r\n }\r\n $response = $this->Item->User->_createCustomerProfileTransaction($data, $type);\r\n if (!empty($response['cim_approval_code'])) {\r\n if (!empty($response['cim_approval_code'])) {\r\n $item_user['ItemUser']['cim_approval_code'] = $response['cim_approval_code'];\r\n }\r\n if (!empty($response['cim_transaction_id'])) {\r\n $item_user['ItemUser']['cim_transaction_id'] = $response['cim_transaction_id'];\r\n }\r\n $city = $this->Item->City->find('first', array(\r\n 'conditions' => array(\r\n 'City.slug' => $this->request->params['named']['city']\r\n ) ,\r\n 'fields' => array(\r\n 'City.id'\r\n ) ,\r\n 'recursive' => -1\r\n ));\r\n $item_user['ItemUser']['city_id'] = $city['City']['id'];\r\n\t\t\t\t\t\t\t\tif (!empty($_COOKIE['_geo'])) {\r\n\t\t\t\t\t\t\t\t\t$_geo = explode('|', $_COOKIE['_geo']);\r\n\t\t\t\t\t\t\t\t\t$item_user['ItemUser']['latitude'] = $_geo[3];\r\n\t\t\t\t\t\t\t\t\t$item_user['ItemUser']['longitude'] = $_geo[4];\r\n\t\t\t\t\t\t\t\t}\r\n $item_user['ItemUser']['quantity'] = $this->request->data['Item']['quantity'];\r\n $item_user['ItemUser']['item_id'] = $this->request->data['Item']['item_id'];\r\n if (!empty($this->request->data['Item']['sub_item_id'])) {\r\n $item_user['ItemUser']['sub_item_id'] = $this->request->data['Item']['sub_item_id'];\r\n }\r\n $item_user['ItemUser']['is_paid'] = (!empty($response['capture'])) ? 1 : 0;\r\n $item_user['ItemUser']['is_gift'] = $this->request->data['Item']['is_gift'];\r\n $item_user['ItemUser']['user_id'] = $this->Auth->user('id');\r\n $item_user['ItemUser']['discount_amount'] = $amount_needed;\r\n $item_user['ItemUser']['payment_gateway_id'] = !empty($this->request->data['Item']['payment_gateway_id']) ? $this->request->data['Item']['payment_gateway_id'] : ConstPaymentGateways::AuthorizeNet;\r\n $item_user['ItemUser']['payment_profile_id'] = $this->request->data['Item']['payment_profile_id'];\r\n $pass_code = $this->_uuid();\r\n $item_user['ItemUser']['pass_code'] = $pass_code;\r\n if ($this->request->data['Item']['is_gift']) {\r\n $item_user['ItemUser']['gift_email'] = $this->request->data['Item']['gift_email'];\r\n $item_user['ItemUser']['message'] = $this->request->data['Item']['message'];\r\n $item_user['ItemUser']['gift_to'] = $this->request->data['Item']['gift_to'];\r\n $item_user['ItemUser']['gift_from'] = $this->request->data['Item']['gift_from'];\r\n }\r\n // For affiliates ( //\r\n $cookie_value = $this->Cookie->read('referrer');\r\n $refer_id = (!empty($cookie_value)) ? $cookie_value['refer_id'] : null;\r\n if (!empty($refer_id)) {\r\n $item_user['ItemUser']['referred_by_user_id'] = $refer_id;\r\n }\r\n // ) affiliates //\r\n $this->Item->ItemUser->create();\r\n $this->Item->ItemUser->set($item_user);\r\n if ($this->Item->ItemUser->save($item_user)) {\r\n // For affiliates ( //\r\n $cookie_value = $this->Cookie->read('referrer');\r\n if (!empty($cookie_value)) {\r\n $this->Cookie->delete('referrer'); // Delete referer cookie\r\n\r\n }\r\n // ) affiliates //\r\n $last_inserted_id = $this->Item->ItemUser->getLastInsertId();\r\n if (!empty($this->request->data['Item']['charity_id'])) {\r\n $this->_set_charity_detail($this->request->data['Item']['charity_id'], $last_inserted_id);\r\n }\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['id'] = $response['pr_authorize_id'];\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['item_user_id'] = $last_inserted_id;\r\n $get_conversion = $this->getAuthorizeConversionCurrency();\r\n if (!empty($get_conversion)) {\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['currency_id'] = $get_conversion['CurrencyConversion']['currency_id'];\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['converted_currency_id'] = $get_conversion['CurrencyConversion']['converted_currency_id'];\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['original_amount'] = $this->request->data['Item']['amount'];\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['rate'] = $get_conversion['CurrencyConversion']['rate'];\r\n }\r\n if (empty($response['capture'])) {\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['payment_status'] = 'Pending';\r\n } else {\r\n $data_authorize_docapture_log['AuthorizenetDocaptureLog']['payment_status'] = 'Completed';\r\n }\r\n $this->Item->ItemUser->AuthorizenetDocaptureLog->save($data_authorize_docapture_log);\r\n if (!empty($response['capture'])) {\r\n $item_user['ItemUser']['is_gift'] = (!empty($this->request->data['Item']['is_gift'])) ? 1 : 0;\r\n $item_user['ItemUser']['id'] = $last_inserted_id;\r\n if (!empty($get_conversion)) {\r\n $item_user['ItemUser']['currency_id'] = $get_conversion['CurrencyConversion']['currency_id'];\r\n $item_user['ItemUser']['converted_currency_id'] = $get_conversion['CurrencyConversion']['converted_currency_id'];\r\n $item_user['ItemUser']['authorize_amt'] = $this->request->data['Item']['amount'];\r\n $item_user['ItemUser']['rate'] = $get_conversion['CurrencyConversion']['rate'];\r\n }\r\n $this->Item->_updateTransaction($item_user['ItemUser']);\r\n }\r\n $item_user_passes = array();\r\n\t\t\t\t\t\t\t\t\t$passes = $this->_getPasses($this->request->data['Item']['item_id'], $this->request->data['Item']['quantity']);\r\n\t\t\t\t\t\t\t\t\t$i = 0;\r\n\t\t\t\t\t\t\t\t\tforeach($passes as $key => $value) {\r\n\t\t\t\t\t\t\t\t\t\t$item_user_passes['id'] = '';\r\n\t\t\t\t\t\t\t\t\t\t$item_user_passes['item_user_id'] = $last_inserted_id;\r\n\t\t\t\t\t\t\t\t\t\t$item_user_passes['pass_code'] = $value;\r\n\t\t\t\t\t\t\t\t\t\t$item_user_passes['unique_pass_code'] = $this->_unum();\r\n\t\t\t\t\t\t\t\t\t\tif (!empty($this->request->data['ItemUserPass'])) {\r\n\t\t\t\t\t\t\t\t\t\t\t$item_user_passes['guest_name'] = $this->request->data['ItemUserPass'][$i]['guest_name'];\r\n\t\t\t\t\t\t\t\t\t\t\t$item_user_passes['guest_email'] = $this->request->data['ItemUserPass'][$i]['guest_email'];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$this->Item->ItemUser->ItemUserPass->save($item_user_passes);\r\n\t\t\t\t\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\t\t\t}\r\n // If enabled, and after purchase, deduct partial amount from wallet //\r\n if (Configure::read('wallet.is_handle_wallet') && (!empty($is_purchase_with_wallet_amount))) {\r\n // Deduct amount ( zero will be updated ) //\r\n $user_available_balance = $this->Item->User->checkUserBalance($this->Auth->user('id'));\r\n $this->Item->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount -' . $user_available_balance,\r\n ) , array(\r\n 'User.id' => $item_user['ItemUser']['user_id']\r\n ));\r\n // Update transaction, This is firs transaction, to notify user that partial amount taken from wallet. Second transaction will be updated after item gets tipped.//\r\n if (!empty($user_available_balance) && $user_available_balance != '0.00') {\r\n\t\t\t\t\t\t\t\t\t\t\tif ($user_available_balance > $total_item_amount) {\r\n\t $amount_taken_from_wallet = $user_available_balance - $total_item_amount;\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t $amount_taken_from_wallet = $user_available_balance;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n $transaction['Transaction']['user_id'] = $item_user['ItemUser']['user_id'];\r\n $transaction['Transaction']['foreign_id'] = $last_inserted_id;\r\n $transaction['Transaction']['class'] = 'ItemUser';\r\n $transaction['Transaction']['amount'] = $amount_taken_from_wallet;\r\n $transaction['Transaction']['transaction_type_id'] = ConstTransactionTypes::PartallyAmountTakenForItemPurchase;\r\n $transaction['Transaction']['payment_gateway_id'] = ConstPaymentGateways::Wallet;\r\n $this->Item->User->Transaction->log($transaction);\r\n }\r\n }\r\n $last_inserted_id = $this->Item->ItemUser->getLastInsertId();\r\n $this->_itemPurchaseViaAuthorizeNet($this->request->data, $last_inserted_id);\r\n } else {\r\n $this->Session->setFlash(__l('Payment failed. Please try again.') , 'default', null, 'error');\r\n $this->redirect(array(\r\n 'controller' => 'items',\r\n 'action' => 'index'\r\n ));\r\n }\r\n } else {\r\n $this->Session->setFlash(sprintf(__l('Gateway error: %s <br>Note: Due to security reasons, error message from gateway may not be verbose. Please double check your card number, security number and address details. Also, check if you have enough balance in your card.') , $response['message']) , 'default', null, 'error');\r\n $this->redirect(array(\r\n 'controller' => 'items',\r\n 'action' => 'index'\r\n ));\r\n }\r\n } else {\r\n $this->Session->setFlash(__l('Credit card could not be updated. Please, try again.') , 'default', null, 'error');\r\n $this->redirect(array(\r\n 'controller' => 'items',\r\n 'action' => 'index'\r\n ));\r\n }\r\n } else if ($paymentGateway['PaymentGateway']['name'] == 'PagSeguro') {\r\n Configure::write('PagSeguro.is_testmode', $paymentGateway['PaymentGateway']['is_test_mode']);\r\n if (!empty($paymentGateway['PaymentGatewaySetting'])) {\r\n foreach($paymentGateway['PaymentGatewaySetting'] as $paymentGatewaySetting) {\r\n if ($paymentGatewaySetting['key'] == 'payee_account') {\r\n $email = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n if ($paymentGatewaySetting['key'] == 'token') {\r\n $token = $paymentGateway['PaymentGateway']['is_test_mode'] ? $paymentGatewaySetting['test_mode_value'] : $paymentGatewaySetting['live_mode_value'];\r\n }\r\n }\r\n }\r\n //gateway options set\r\n $ref = time();\r\n\t\t\t\t\t\t$converted_amount=0;\r\n\t\t\t\t\t\tif(!is_int($amount_needed)){\t// Quick fix for float issue with pagse //\r\n\t\t\t\t\t\t\t$converted_amount = $amount_needed * 100;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$converted_amount = $amount_needed;\r\n\t\t\t\t\t\t}\r\n $gateway_options['init'] = array(\r\n 'pagseguro' => array( // Array com informa��es pertinentes ao pagseguro\r\n 'email' => $email,\r\n 'token' => $token,\r\n 'type' => 'CBR', // Obrigat�rio passagem para pagseguro:tipo\r\n 'reference' => $ref, // Obrigat�rio passagem para pagseguro:ref_transacao\r\n 'freight_type' => 'EN', // Obrigat�rio passagem para pagseguro:tipo_frete\r\n 'theme' => 1, // Opcional Este parametro aceita valores de 1 a 5, seu efeito � a troca dos bot�es padr�es do pagseguro\r\n 'currency' => 'BRL', // Obrigat�rio passagem para pagseguro:moeda,\r\n 'extra' => 0\r\n // Um valor extra que voc� queira adicionar no valor total da venda, obs este valor pode ser negativo\r\n\r\n ) ,\r\n 'definitions' => array( // Array com informa��es para manusei das informa��es\r\n 'currency_type' => 'dolar', // Especifica qual o tipo de separador de decimais, suportados (dolar, real)\r\n 'weight_type' => 'kg', // Especifica qual a medida utilizada para peso, suportados (kg, g)\r\n 'encode' => 'utf-8'\r\n // Especifica o encode n�o implementado\r\n\r\n ) ,\r\n 'format' => array(\r\n 'item_id' => '0000' . $item['Item']['id'],\r\n 'item_descr' => 'Bought Item', //used to differ return array fron payment\r\n 'item_quant' => $this->request->data['Item']['quantity'],\r\n 'item_valor' => $converted_amount,\r\n 'item_frete' => '0',\r\n 'item_peso' => '20',\r\n ) ,\r\n );\r\n $transaction_data['TempPaymentLog'] = array(\r\n 'trans_id' => $ref,\r\n 'payment_type' => 'Buy item',\r\n 'user_id' => $this->Auth->user('id') ,\r\n 'item_id' => $this->request->data['Item']['item_id'],\r\n 'is_gift' => $this->request->data['Item']['is_gift'],\r\n 'quantity' => $this->request->data['Item']['quantity'],\r\n 'payment_gateway_id' => $this->request->data['Item']['payment_gateway_id'],\r\n 'gift_to' => !empty($this->request->data['Item']['gift_to']) ? $this->request->data['Item']['gift_to'] : '',\r\n 'gift_from' => !empty($this->request->data['Item']['gift_from']) ? $this->request->data['Item']['gift_from'] : '',\r\n 'gift_email' => !empty($this->request->data['Item']['gift_email']) ? $this->request->data['Item']['gift_email'] : '',\r\n 'ip_id' => $this->TempPaymentLog->toSaveIp() ,\r\n 'amount_needed' => $amount_needed,\r\n 'currency_code' => Configure::read('paypal.currency_code') ,\r\n 'message' => !empty($this->request->data['Item']['message']) ? $this->request->data['Item']['message'] : '',\r\n );\r\n\t\t\t\t\t\tif (!empty($_COOKIE['_geo'])) {\r\n\t\t\t\t\t\t\t$_geo = explode('|', $_COOKIE['_geo']);\r\n\t\t\t\t\t\t\t$transaction_data['TempPaymentLog']['latitude'] = $_geo[3];\r\n\t\t\t\t\t\t\t$transaction_data['TempPaymentLog']['longitude'] = $_geo[4];\r\n\t\t\t\t\t\t}\r\n // For affiliates ( //\r\n $cookie_value = $this->Cookie->read('referrer');\r\n $refer_id = (!empty($cookie_value)) ? $cookie_value['refer_id'] : null;\r\n if (!empty($refer_id)) {\r\n $transaction_data['TempPaymentLog']['referred_user_id'] = $refer_id;\r\n }\r\n // ) affiliates //\r\n if (!empty($this->request->data['ItemUserPass'])) {\r\n $guest_names = array();\r\n $guest_emails = array();\r\n foreach($this->request->data['ItemUserPass'] as $guest) {\r\n array_push($guest_names, $guest['guest_name']);\r\n array_push($guest_emails, $guest['guest_email']);\r\n }\r\n $transaction_data['guest_name'] = serialize($guest_names);\r\n $transaction_data['guest_email'] = serialize($guest_emails);\r\n }\r\n $this->TempPaymentLog->save($transaction_data);\r\n //\t$this->Session->write('transaction_data',$transaction_data);\r\n $this->set('gateway_options', $gateway_options);\r\n }\r\n $this->set('action', $action);\r\n $this->set('amount', $amount_needed);\r\n $this->set('item', $item);\r\n $this->render('do_payment');\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b14e614b6b8a9df5ed8abc65ece0247d", "score": "0.5671466", "text": "public function add_to_cart()\n\t{\n\t\t$json = file_get_contents('php://input');\n\t\t//$json \t\t= '{\"product_id\":\"155\",\"quantity\":\"5\",\"color\":\"black\",\"size\":\"15\",\"type\":\"add\"}';\n\t\t$jsonobj \t= json_decode($json);\n\t\t$language \t= @$jsonobj->language;\n\t\t\n\t\t$ws \t\t= @$jsonobj->ws;\n\t\t$ws \t\t= empty($ws)? 'add_to_cart':$ws;\n\t\t$language = empty($language)? 'en':$language;\n\t\t//$user_id = 642;\n\t\t$user_id = $this->check_user_login($language,$ws);\n\t\t$pid \t= @$jsonobj->product_id;\n\t\t$delete_product \t= @$jsonobj->delete_product;\n\n\t\t$quantity \t= @$jsonobj->quantity;\n\t\t$color = @$jsonobj->color;\n\t\t$size = @$jsonobj->size;\n\t\t$weight = @$jsonobj->weight;\n\t\n\n\t\t$type \t= @$jsonobj->type;\n\t\t$type = empty($type)? 'add':$type;\n\t\t$cart_qty = 0;\n $metadata = array();\n \n $user_id = 28;\n\n\t\tif(!empty($pid)&&!empty($user_id)&&!empty($quantity))\n\t\t\t\t{\n\n\t\t if(!empty($color)) $metadata['color'] = $color;\n\t\t if(!empty($size)) $metadata['size'] = $size;\n\t\t if(!empty($weight)) $metadata['weight'] = $weight;\n\t\t \n\t\t\t\t\t$this->load->library('user_account');\n\t\t\t\t\t\n\t\t\t\t\tif ($type == 'add')\n\t\t\t\t\t{\n\t\t\t\t\t\t$pro_details = $this->custom_model->my_where('product','*', ['id' => $pid]);\n\t\t\t\t\t\tif ($pro_details)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($pro_details[0]['stock_status'] == 'notinstock') \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo json_encode( array(\"status\" => false,\"ws\" => $ws , \"messasge\" => \"Product is not in stock \" ) );die;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$response = $this->user_account->add_remove_cart($pid,$user_id,'add',$quantity, $metadata);\n\n\t\t\t\t\t\t// echo \"<pre>\";\n\t\t\t\t\t\t// print_r($user_id);\n\t\t\t\t\t\t// die;\n\n\t\t\t\t\t\tif($response)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset($response['cart_qty']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cart_qty = $response['cart_qty'];\n\t\t\t\t\t\t\t\tunset($response['cart_qty']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo json_encode( array(\"status\" => true , \"ws\" => $ws,\"cart\" => $response,\"count\" => $cart_qty) );die;\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 $msg = ($language == 'ar'? 'لا يوجد رصيد كاف لإضافة كمية ...':'Not enough stock to add quantity...');\n\t\t\t\t\t\t\techo json_encode( array(\"status\" => false, \"ws\" => $ws ,\"message\" => $msg) );die;\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telseif ($type == 'remove' || $type == 'remove_one_by_one')\n\t\t\t\t\t{\n\t\t\t\t\t if(!empty($metadata)){\n\t\t \t\t\t\tif(!empty($metadata)){\n\t\t \t\t\t\t\tforeach ($metadata as $pkey => $pvalue) {\n\t\t \t\t\t\t\t\t$string = str_replace(' ', '', $pvalue);\n\n\t\t \t\t\t\t\t\t$pid .= 'm'.$string;\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t\t\n\t\t \t\t\t// echo \"<pre>\";\n\t\t \t\t\t// print_r($pid);\n\t\t \t\t\t// die;\n\n\t\t \t\t\t\n\t\t \t\t\tif($type == 'remove')\n\t\t \t\t\t{\n\t\t \t\t\t $response = $this->user_account->add_remove_cart($pid,$user_id,'remove',$quantity, $metadata);\n\t\t \t\t\t}\n\t\t \t\t\telse{\n\t\t \t\t\t $response = $this->user_account->add_remove_cart($pid,$user_id,'remove_one_by_one',$quantity, $metadata); \n\t\t \t\t\t}\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tif ($response != '-1')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset($response['cart_qty']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cart_qty = $response['cart_qty'];\n\t\t\t\t\t\t\t\tunset($response['cart_qty']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(empty($response))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$response = new stdClass();\n\t\t\t\t\t\t\t\t$count = '0';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\techo json_encode( array(\"status\" => true , \"ws\" => $ws , \"cart\" => $response,\"count\" => $cart_qty) );die;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t//echo \"$pid - $user_id - $quantity\";\n\t\t\t\tif ($language == 'ar')\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = 'طلب غير صالح';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$message = 'Invalid request';\n\t\t\t\t\t}\n\t\t\t\techo json_encode( array(\"status\" => false,\"ws\" => $ws , \"message\" => $message));die;\n\t\t\t\tdie;\n \t}", "title": "" }, { "docid": "553a2961390bc32f7096113ebc856485", "score": "0.5662455", "text": "protected static function setCartUserData()\n {\n self::$cart['user_data'] = [\n 'b_country' => isset(self::$location['country']) ? self::$location['country'] : '',\n 'b_state' => isset(self::$location['state']) ? self::$location['state'] : '',\n 'b_city' => isset(self::$location['city']) ? self::$location['city'] : '',\n 's_country' => isset(self::$location['country']) ? self::$location['country'] : '',\n 's_state' => isset(self::$location['state']) ? self::$location['state'] : '',\n 's_city' => isset(self::$location['city']) ? self::$location['city'] : '',\n 'zipcode' => isset(self::$location['zipcode']) ? self::$location['zipcode'] : '',\n ];\n }", "title": "" }, { "docid": "0e852002915dea5ef534f229f596c7b3", "score": "0.5660597", "text": "function setCartOfCurrentUser( $p4m_cart ) {\n\n return true;\n }", "title": "" }, { "docid": "505602a65c1fd2b64967f3da5c6ef28d", "score": "0.56400436", "text": "function addToCart($productID, $name, $price, $weightGrams, $qtyOrdered, $ImgFilename) {\n if (!isset($_SESSION[\"cart\"][0])) { // Create Empty Session Cart if not already created\n $_SESSION[\"cart\"][0] = [\n \"itemCount\" => 0,\n \"productCount\" => 0,\n \"shippingInstructions\" => \"\",\n \"shippingWeightKG\" => 0,\n \"shippingPriceBandKG\" => 0,\n \"shippingCountry\" => DEFAULTS[\"countryCode\"],\n \"shippingType\" => SHIPPING_VALUES[\"Types\"][0],\n \"subTotal\" => 0.00,\n \"shippingCost\" => 0.00,\n \"total\" => 0.00,\n \"invoiceID\" => \"\",\n \"ppOrderID\" => \"\",\n \"ppOrderStatus\" => \"\",\n ];\n }\n // Add Item\n $newItemID = $_SESSION[\"cart\"][0][\"itemCount\"] + 1;\n $newItem = [\n \"itemID\" => $newItemID,\n \"productID\" => $productID,\n \"name\" => $name,\n \"price\" => $price,\n \"weightGrams\" => $weightGrams,\n \"qtyOrdered\" => $qtyOrdered,\n \"qtyAvailForRtn\" => $qtyOrdered,\n \"imgFilename\" => $ImgFilename,\n \"addedToCartTimestamp\" => date(\"Y-m-d H:i:s\"),\n ];\n $_SESSION[\"cart\"][$newItemID] = $newItem;\n \n // Update Weights, Counts & Totals\n $_SESSION[\"cart\"][0][\"itemCount\"] += 1;\n $_SESSION[\"cart\"][0][\"productCount\"] += $qtyOrdered;\n $_SESSION[\"cart\"][0][\"shippingWeightKG\"] += ($weightGrams * $qtyOrdered) / 1000;\n $_SESSION[\"cart\"][0][\"subTotal\"] += ($price * $qtyOrdered);\n $_SESSION[\"cart\"][0][\"total\"] = $_SESSION[\"cart\"][0][\"subTotal\"];\n return true;\n}", "title": "" }, { "docid": "720630c1e58543abeb77ab969cf7d82d", "score": "0.5638812", "text": "function pre_checkout(){\n\t\t//add coupon code from cart.php to session \n\t\tif(!empty($_REQUEST['code'])){\n\t\t\t$couponCode = strtolower($_REQUEST['code']);\n\t\t\t$this->Coupon->recursive = -1;\n\t\t\t$foundCoupon = $this->Coupon->find('first',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AND'=>array('code LIKE'=>$couponCode,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'site_id'=>$this->siteConfig->site_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\tif($foundCoupon){\n\t\t\t\t$_SESSION['cart']['code'][$couponCode] = 1;\n\t\t\t\t$totalVals = $_SESSION['cart']['totals']; \n\t\t\t\t$coupons = $this->Coupon->getCoupons($this->Cart->items, ($totalVals['noTaxNoShipping']));\n\t\t\t\t$this->checkCouponErrors();\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash(__(\"Invalid Coupon Code.\", true));\n\t\t\t}\n\t\t\t\t//redirect back to cart\n\t\t\t$this->redirect($this->https(array('controller'=>'orders','action'=>'cart')));\n\t\t}\n\t\tif($user = $this->Auth->user()){\n\t\t\t$billingAddress = $this->BillingAddress->getSelectedAddress($this->authUser['id']);\n\t\t\tif(!empty($billingAddress)){\n\t\t\t\tif(!isset($_SESSION['Selected']['bill_id'])){\n\t\t\t\t\t$this->sessionSelected('bill_id',$billingAddress['BillingAddress']['bill_id']);\n\t\t\t\t}\n\t\t\t\t$shippingAddress = $this->ShippingAddress->getSelectedAddress($this->authUser['id']);\n\t\t\t\tif(!empty($shippingAddress)){\n\t\t\t\t\tif(!isset($_SESSION['Selected']['ship_id'])){\n\t\t\t\t\t\t$this->sessionSelected('ship_id',$shippingAddress['ShippingAddress']['ship_id']);\n\t\t\t\t\t}\n\t\t\t\t\t$this->redirect($this->https(array('controller'=>'orders','action'=>'checkout')));\n\t\t\t\t}else{\n\t\t\t\t\tif($user['User']['cart_guest'] == 1){\n\t\t\t\t\t\t$this->redirect($this->https(array('controller'=>'billing_addresses','action'=>'guest_add')));\n\t\t\t\t\t}\n\t\t\t\t\t$this->redirect($this->https(array('controller'=>'users','action'=>'pre_checkout_shipping')));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($user['User']['cart_guest'] == 1){\n\t\t\t\t\t$this->redirect($this->https(array('controller'=>'billing_addresses','action'=>'guest_add')));\n\t\t\t\t}\n\t\t\t\t$this->redirect($this->https(array('controller'=>'users','action'=>'pre_checkout_billing')));\n\t\t\t}\n\t\t}else{\n\t\t\t$this->Transporter->setTransporter('pre_login_cart');\n\t\t\t$this->redirect($this->https(array('controller'=>'users','action'=>'add')));\n\t\t}\n\t}", "title": "" }, { "docid": "4af4ff99ea34fa013d8832843cc0face", "score": "0.5637162", "text": "function total_item(){\n\tif (isset($_GET['add_cart'])) {\n\t\t\n\t\tglobal $con;\n\t\t\n\t\t$ip = getIp();\n\t\t\n\t\t$get_items =\"select * from cart where ip_add='$ip'\";\n\t\t\n\t\t$run_items = mysqli_query($con, $get_items);\n\t\n\t\n\t $count_items = mysqli_num_rows($run_items);\n\t}\n\t\telse\n\t\t\t\n\t\t\t\n\t\n\tglobal $con;\n\t\t\n\t\t$ip = getIp();\n\t\t\n\t\t$get_items =\"select * from cart where ip_add='$ip'\";\n\t\t\n\t\t$run_items = mysqli_query($con, $get_items);\n\t $count_items = mysqli_num_rows($run_items);\n\t\t\n\t\t{\techo $count_items ;\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "b8ded72ef7ef0fa2aee166a5b97d816c", "score": "0.56287414", "text": "public function get_cart_post(){\n\t$user_id=$this->post('user_id');\n\t$message=array();\n\t$flag=$this->Mobile_model->user_checking($user_id);\n\tif($flag==0){\n\t\t $message['status'] =0;\n\t\t $message['message']='unauthorized user';\n\t\t $this->response($message, REST_Controller::HTTP_OK);\n\t}\n\t$cart=$this->Mobile_model->get_user_cart($user_id);\n\tif(count($cart)>0)\n { \n $message['status']=1;\n\t $message['cart_list']=$cart;\n\t $message['image_path']=base_url().'assets/uploads/product_pics/';\n\t\n }\n else{\n\t $message['status']=0;\n\t $message['message']='No cart products Available';\n }\n \n $this->response($message, REST_Controller::HTTP_OK);\n\t\n\t\n\t\n}", "title": "" }, { "docid": "0a7469fc6c0f3f858c95e615086a46af", "score": "0.560789", "text": "function addExtrasToCart() {\n\t\tif(isset($this->session->userdata['cart'])) {\n\t\t\t$cart \t\t= $this->session->userdata['cart'];\n\t\t} else {\n\t\t\t$cart \t\t= array();\n\t\t}\n\t\t$total_cost = 0;\n\t\t$extras\t= array();\n\n\t\t$extra_qty_array = $this->input->post('extra_qty');\n\t\t$extra_id_array = $this->input->post('extra_id');\n\t\t$extra_price_array = $this->input->post('extra_price');\n\n\t\t$this->db->select('item_id, item_name, item_price');\n\t\t$items_query = $this->db->get_where('items',array('item_status' => 1));\n\t\t$items = $items_query->result_array();\n\t\t\n\t\t//echo '<pre>'; print_r(array_search(1, array_column($items, 'item_id'))); exit;\n\n\t\tif(is_array($extra_qty_array) && count($extra_qty_array) > 0 && array_sum($extra_qty_array) > 0){\n\t\t\tforeach ($extra_id_array as $key => $extra_item_id) {\n\t\t\t\t$temp_item = array();\n\t\t\t\tif($extra_item_id !='' && !in_array($extra_item_id, array(-1,0))){\n\t\t\t\t\t\n\t\t\t\t\t$db_item_key = array_search($extra_item_id, $this->array_column($items, 'item_id'));\n\t\t\t\t\t\n\t\t\t\t\t$temp_item['item_id'] = $extra_item_id;\n\t\t\t\t\t$temp_item['item_name'] = (!empty($db_item_key) && isset($items[$db_item_key]['item_name'])) ? $items[$db_item_key]['item_name'] : 'Product #';\n\t\t\t\t\t$temp_item['item_price'] = (!empty($db_item_key) && isset($items[$db_item_key]['item_price'])) ? $items[$db_item_key]['item_price'] : $extra_price_array[$key];\n\t\t\t\t\t$temp_item['item_qty'] = $extra_qty_array[$key];\n\t\t\t\t\t$total_cost \t\t\t = $total_cost + ($temp_item['item_qty'] * $temp_item['item_price']);\n\t\t\t\t\t$extras[] \t= $temp_item;\n\n\t\t\t\t}/*\n\t\t\t\t\t//this code working in case of static extra item which is commented on 31-march-2016\n\t\t\t\t\telseif (in_array($extra_item_id, array(-1,0))) {\n\t\t\t\t\t$temp_item['item_id'] = $extra_item_id;\n\t\t\t\t\t$temp_item['item_name'] = ($extra_item_id == -1) ? 'Magnetic Fastener' : '5-Pack Pins';\n\t\t\t\t\t$temp_item['item_price'] = ($extra_item_id == -1) ? 3.00 : 3.5;\n\t\t\t\t\t$temp_item['item_qty'] = $extra_qty_array[$key];\n\t\t\t\t\t$total_cost \t\t\t = $total_cost + ($temp_item['item_qty'] * $temp_item['item_price']);\n\t\t\t\t\t$extras[] \t= $temp_item;\n\t\t\t\t}*/\n\t\t\t}\n\t\t\t//echo '<pre>'; print_r($extras); exit;\n\t\t\t$cart['extras'] = $extras;\n\t\t\t$this->session->set_userdata('cart',$cart);\n\t\t\t$this->session->set_userdata('extras_total_cost',$total_cost);\n\t\t\t$data['extras'] = $extras;\n\t\t\t$this->load->view('order/list_extras',$data);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t// commented by sunny on 17-march-2016\n\t\t$magnet_qty = (int)$this->input->post('magnet_qty');\n\t\t$pin_qty\t= (int)$this->input->post('pin_qty');\n\t\t\n\t\tif($magnet_qty + $pin_qty > 0) {\n\t\t\tif(isset($this->session->userdata['cart'])) {\n\t\t\t\t$cart \t= $this->session->userdata['cart'];\n\t\t\t} else {\n\t\t\t\t$cart = array();\n\t\t\t}\n\t\t\t\n\t\t\t$cart['order_mf_qty'] = $data['mf_qty'] = $magnet_qty;\n\t\t\t$cart['order_pf_qty'] = $data['pf_qty'] = $pin_qty;\n\t\t\t\n\t\t\t$this->session->set_userdata('cart',$cart);\n\t\t\t\n\t\t\t$this->load->view('order/list_extras',$data);\n\t\t\treturn;\n\t\t}*/\n\t}", "title": "" }, { "docid": "5c81868f610d026f44144c3612bdfaf9", "score": "0.5605715", "text": "function addToMenuCart()\n {\n global $CFG, $objSmarty;\n\n $sessionid = session_id();\n $addon = explode(',', $_REQUEST['Addons']);\n sort($addon);\n foreach ($addon as $value)\n {\n if ($value != '')\n {\n $newaddon .= $value . ',';\n }\n\n }\n $_REQUEST['Addons'] = $newaddon;\n //echo \"request==><pre>\";print_r($_REQUEST);echo \"</pre>\";\n #echo \"Addons==><pre>\";print_r($_REQUEST['Addons']);echo \"</pre>\";\n #Addons\n if ($_REQUEST['Addons'] != \"\")\n {\n $addons = explode(\",\", $_REQUEST['Addons']);\n if (is_array($addons))\n {\n foreach ($addons as $key => $value)\n {\n if (!empty($addons[$key]))\n {\n $addonss[] = \"'\" . $addons[$key] . \"'\";\n }\n }\n if (!empty($addonss))\n {\n $addons_add = implode(\",\", $addonss);\n if ($addons_add != \"\")\n {\n $condition1 .= \"menuaddons_id IN (\" . $addons_add . \")\";\n $maincond .= \"menuaddons_id IN (\" . $addons_add . \") GROUP BY addonparentid\";\n }\n }\n }\n\n $pizza_size_check = $_REQUEST['pizzasize'];\n $pizza_size_check_arr = explode(\"_\", $pizza_size_check);\n\n #echo \"<pre>\";print_r($pizza_size_check_arr);echo \"</pre>\";\n\n $addonsprice = $this->getMultivalue(\"menuaddons_addonsname,menuaddons_price,menuaddons_price_medium,menuaddons_price_large,menuaddons_price_slice,menuaddons_categoryid\",\n $CFG['table']['restaurant_menuaddons'], \"$condition1\");\n\n $mainaddonsid_arr = $this->getMultivalue(\"menuaddons_addonsname,addonparentid\",\n $CFG['table']['restaurant_menuaddons'], $maincond);\n\n $addonsaddprice = '';\n\n if (!empty($addonsprice))\n {\n\n if (is_array($mainaddonsid_arr))\n {\n\n foreach ($mainaddonsid_arr as $mkey => $mval)\n {\n $main_addon_id = $this->filterInput($mainaddonsid_arr[$mkey]['addonparentid']);\n $main_addon_name = $this->getValue(\"addonsname\", $CFG['table']['restaurant_addons'],\n \"id = '\" . $main_addon_id . \"'\");\n $sub_addonssname = '';\n $subaddonsname = '';\n foreach ($addonsprice as $key => $value)\n {\n $mainaddonparid = $this->getValue(\"addonparentid\", $CFG['table']['restaurant_menuaddons'],\n \"menuaddons_id = '\" . $this->filterInput($addons[$key]) . \"'\");\n if ($main_addon_id == $mainaddonparid)\n {\n #Size addon price Condition\n if (isset($_REQUEST['pizzasize']) && !empty($_REQUEST['pizzasize']))\n {\n if ($pizza_size_check_arr[0] == 'Small')\n {\n $addonstotal[] = $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n } elseif ($pizza_size_check_arr[0] == 'Medium')\n {\n $addonstotal[] = $addonsprice[$key]['menuaddons_price_medium'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price_medium'];\n } elseif ($pizza_size_check_arr[0] == 'Large')\n {\n $addonstotal[] = $addonsprice[$key]['menuaddons_price_large'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price_large'];\n } else\n {\n $addonstotal[] = $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n }\n }\n #Slice addon price Condition\n elseif (isset($_REQUEST['pizzasize_slice']) && !empty($_REQUEST['pizzasize_slice']))\n {\n\n $sliceaddonprice_val = $this->getSliceAddonsPrice_OrderPop($addonsprice[$key]['menuaddons_price_slice'],\n $this->filterInput($_REQUEST['pizzasliceprice_position']));\n #echo \"<pre>slice prizes \";print_r($sliceaddonprice_val);echo \"</pre>\";\n $addonstotal[] = $sliceaddonprice_val;\n $addonsaddprice = $sliceaddonprice_val;\n } else\n {\n $addonstotal[] = $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n }\n\n $menu_addonprice = '';\n if ($addonsaddprice != '0.00' && $addonsaddprice != '' )\n {\n if ($CFG['site']['currency_option'] == 'img')\n {\n $menu_addonprice = '(' . '<img src=\"' . $CFG['site']['currency_image'] .\n '\" title=\"\" alt=\"currency\" /> ' . $addonsaddprice . ')';\n } else\n {\n $menu_addonprice = '(' . $CFG['site']['currency_symbol'] . $addonsaddprice . ')';\n }\n }\n $sub_addonssname = $this->getValue(\"addonsname\", $CFG['table']['restaurant_addons'],\n \"id = '\" . $this->filterInput($addonsprice[$key]['menuaddons_addonsname']) . \"'\");\n $subaddonsname[] = $sub_addonssname . '' . $menu_addonprice;\n }\n\n }\n if (isset($subaddonsname) && !empty($subaddonsname))\n {\n $subaddon_imp = implode(\" + \", $subaddonsname);\n $addonsname[] = $main_addon_name . '( ' . $subaddon_imp . ' )';\n }\n\n }\n\n }\n\n /*foreach($addonsprice as $key=>$value){\n #Size addon price Condition\n if(isset($_REQUEST['pizzasize']) && !empty($_REQUEST['pizzasize'])){\n if($pizza_size_check_arr[0] == 'Small'){\n $addonstotal[]= $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n }\n elseif($pizza_size_check_arr[0] == 'Medium'){\n $addonstotal[]= $addonsprice[$key]['menuaddons_price_medium'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price_medium'];\n }\n elseif($pizza_size_check_arr[0] == 'Large'){\n $addonstotal[]= $addonsprice[$key]['menuaddons_price_large'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price_large'];\n }\t\t\t\t\n else{\n $addonstotal[]= $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n }\n }\n #Slice addon price Condition\n elseif(isset($_REQUEST['pizzasize_slice']) && !empty($_REQUEST['pizzasize_slice'])){\n \n $sliceaddonprice_val\t=\t$this->getSliceAddonsPrice_OrderPop($addonsprice[$key]['menuaddons_price_slice'],$_REQUEST['pizzasliceprice_position']);\n #echo \"<pre>slice prizes \";print_r($sliceaddonprice_val);echo \"</pre>\";\n $addonstotal[]= $sliceaddonprice_val;\n $addonsaddprice = $sliceaddonprice_val;\n }\n else{\n $addonstotal[]= $addonsprice[$key]['menuaddons_price'];\n $addonsaddprice = $addonsprice[$key]['menuaddons_price'];\n }\n \n $menu_addonprice = '';\n if($addonsaddprice != '0.00' ){\n if($CFG['site']['currency_option'] == 'img'){\n $menu_addonprice = '('.'<img src=\"'.$CFG['site']['currency_image'].'\" title=\"\" alt=\"currency\" /> '. $addonsaddprice.')';\n }else{\n $menu_addonprice = '('.$CFG['site']['currency_symbol']. $addonsaddprice.')';\n }\n }\n $addonssname = $this->getValue(\"addonsname\",$CFG['table']['restaurant_addons'],\"id = '\".$addonsprice[$key]['menuaddons_addonsname'].\"'\");\n $addonsname[] = $addonssname.''.$menu_addonprice;\n }*/\n\n }\n\n #echo \"addonsaddprice \".$addonsaddprice;\n #echo \"<pre>\";print_r($addons_name);echo \"</pre>\";\n\n if (!empty($addonsname))\n {\n #$addons_name = implode(\" + \",$addonsname);\n $addons_name = implode(\" , \", $addonsname);\n }\n if (!empty($addonstotal) && is_array($addonstotal))\n {\n $menu_addprice = array_sum($addonstotal);\n }\n }\n\n if (isset($_REQUEST['pizzasize_slice']) && $_REQUEST['pizzasize_slice'] != '')\n {\n\n $pizzaSliceprice = $this->getMultivalue(\"pizza_slice_price,pizza_slice_name\", $CFG['table']['restaurant_pizza_slice'],\n \"pizza_slice_id = '\" . $this->filterInput($_REQUEST['pizzasize_slice']) . \"'\");\n $menuprice = $pizzaSliceprice[0]['pizza_slice_price'];\n $pizzasize = $pizzaSliceprice[0]['pizza_slice_name'];\n }\n /*else{\n $menuprice \t\t= $this->filterInput($_REQUEST['menuprice']);\n $pizzasize \t = $this->filterInput($_REQUEST['pizzasize']);\n }*/ elseif (isset($_REQUEST['pizzasize']) && !empty($_REQUEST['pizzasize']))\n {\n $menuprice = $this->filterInput($_REQUEST['menuprice']);\n $pizzasize = $this->filterInput($_REQUEST['pizzasize']);\n } else\n {\n $menuprice = $this->filterInput($_REQUEST['menuprice']);\n $pizzasize = $this->filterInput($_REQUEST['pizzasize']);\n }\n #echo \"<br>aaa-->\".$pizza_addonsprice;\n #echo \"<br>ccc-->\".$pizza_crustprice;\n\n #exit;\n\n $menuid = $this->filterInput($_REQUEST['menuid']);\n $restaurantid = $this->filterInput($_REQUEST['resid']);\n $menuname = $this->filterInput($this->GetValue(\"menu_name\", $CFG['table']['restaurant_menu'],\n \"id = '\" . $this->filterInput($_REQUEST['menuid']) . \"'\"));\n $menutype = $this->GetValue(\"menu_type\", $CFG['table']['restaurant_menu'],\n \"id = '\" . $this->filterInput($_REQUEST['menuid']) . \"'\");\n //$menuprice \t\t= $this->filterInput($_REQUEST['menuprice']);\n $quantity = $this->filterInput($_REQUEST['quantity']);\n $splins = $this->filterInput($_REQUEST['menuspl_ins']);\n //$addonsname \t= $this->filterInput($_REQUEST['addonsname']);\n //$addonsprice \t= $this->filterInput($_REQUEST['addonsprice']);\n //$pizzasize \t = $this->filterInput($_REQUEST['pizzasize']);\n\n /*if($addonsprice != ''){\n #$totmenuprice \t= ($menuprice * $quantity) + $addonsprice;\n #$totmenuprice \t= ( ($menuprice + $addonsprice) * $quantity) ;\n $totmenuprice \t= ( ($menuprice + $menu_addprice) * $quantity) ;\n }else{\n $totmenuprice = ( ( $menuprice + $pizza_addonsprice + $pizza_crustprice ) * $quantity);\n #$totmenuprice \t= ($menuprice * $quantity);$pizzasize\n }\n \n if($addons_name != ''){\n $cond .= \" AND addonsname = '\".$addons_name.\"' \"; \n }\n if($crust_name != ''){\n $cond .= \" AND pizza_crustname = '\".$crust_name.\"' \"; \n }\n if($pizza_addons_name != ''){\n $cond .= \" AND pizza_addonsname = '\".$pizza_addons_name.\"' \"; \n }*/\n\n #$sel = \"SELECT quantity, cart_id FROM \".$CFG['table']['restaurant_cart'].\" WHERE menuid = '\".$menuid.\"' AND sessionid = '\".$sessionid.\"' AND addonsname = '\".$addons_name.\"' AND pizza_crustname = '\".$crust_name.\"' AND pizza_addonsname = '\".$pizza_addons_name.\"' AND pizza_size = '\".$pizzasize.\"' \";\n $sel = \"SELECT quantity, cart_id FROM \" . $CFG['table']['restaurant_cart'] .\n \" WHERE menuid = '\" . $menuid . \"' AND sessionid = '\" . $sessionid .\n \"' AND addonsname = '\" . mysqli_real_escape_string($this->DBCONN,$addons_name) .\n \"' AND pizza_size = '\" . mysqli_real_escape_string($this->DBCONN,$pizzasize) . \"' \";\n #echo $sel;\n $res = $this->ExecuteQuery($sel, \"select\");\n $getquantity = $res[0]['quantity'];\n $getcartid = $res[0]['cart_id'];\n $totalcartsession = count($res);\n //echo \"<br>tot-->\".$totalcartsession;\n //exit;\n\n #$totalcartsession = $this->getNumvalues($CFG['table']['restaurant_cart'],\"menuid = '\".$menuid.\"' AND sessionid = '\".$sessionid.\"' \");\n if ($totalcartsession == '0')\n {\n\n if ($addonsprice != '')\n {\n $totmenuprice = (($menuprice + $menu_addprice) * $quantity);\n } else\n {\n $totmenuprice = (($menuprice + $pizza_addonsprice + $pizza_crustprice) * $quantity);\n }\n\n $ins_cart = \"INSERT INTO \n\t\t\t\t\t\t\t\t\" . $CFG['table']['restaurant_cart'] . \" \n\t\t\t\t\t\t\tSET \n\t\t\t\t\t\t\t\tmenuid \t\t\t = '\" . $menuid . \"', \n\t\t\t\t\t\t\t\trestaurantid \t = '\" . $restaurantid . \"', \n\t\t\t\t\t\t\t\tmenuname \t\t = '\" . $menuname . \"',\n\t\t\t\t\t\t\t\taddonsname \t\t = '\" . mysqli_real_escape_string($this->DBCONN,addslashes($addons_name)) . \"',\n\t\t\t\t\t\t\t\taddonsprice\t\t = '\" . $menu_addprice . \"',\n\t\t\t\t\t\t\t\tmenutype \t\t = '\" . $menutype . \"', \n\t\t\t\t\t\t\t\tmenuprice \t\t = '\" . $menuprice . \"', \n\t\t\t\t\t\t\t\tquantity\t\t = '\" . $quantity . \"',\n\t\t\t\t\t\t\t\tpizza_crustname\t = '\" . $crust_name . \"', \n\t\t\t\t\t\t\t\tpizza_crustprice = '\" . $pizza_crustprice . \"', \n\t\t\t\t\t\t\t\tpizza_addonsname = '\" . $pizza_addons_name . \"',\n\t\t\t\t\t\t\t\tpizza_addons_price = '\" . $pizza_addonsprice . \"', \n\t\t\t\t\t\t\t\tpizza_size\t\t = '\" . mysqli_real_escape_string($this->DBCONN,$pizzasize) . \"',\n\t\t\t\t\t\t\t\tspecialinstruction = '\" . $splins . \"', \n\t\t\t\t\t\t\t\ttot_menuprice = '\" . $totmenuprice . \"', \n\t\t\t\t\t\t\t\tsessionid \t\t = '\" . $sessionid . \"',\n\t\t\t\t\t\t\t\taddeddate \t\t = '\" . CUR_TIME . \"' \";\n $res_cart = $this->ExecuteQuery($ins_cart, \"insert\");\n } else\n {\n\n $updquantity = $getquantity + $quantity;\n\n if ($addonsprice != '')\n {\n $totmenuprice = (($menuprice + $menu_addprice) * $updquantity);\n } else\n {\n $totmenuprice = (($menuprice + $pizza_addonsprice + $pizza_crustprice) * $updquantity);\n }\n\n $up_cart = \"UPDATE \n\t\t\t\t\t\t\t\" . $CFG['table']['restaurant_cart'] . \" \n\t\t\t\t\t\t\tSET \n\t\t\t\t\t\t\t\tmenuid \t\t\t = '\" . $menuid . \"', \n\t\t\t\t\t\t\t\trestaurantid \t = '\" . $restaurantid . \"', \n\t\t\t\t\t\t\t\tmenuname \t\t = '\" . $menuname . \"', \n\t\t\t\t\t\t\t\taddonsname \t\t = '\" . $addons_name . \"',\n\t\t\t\t\t\t\t\taddonsprice\t\t = '\" . $menu_addprice . \"',\n\t\t\t\t\t\t\t\tmenutype \t\t = '\" . $menutype . \"', \n\t\t\t\t\t\t\t\tmenuprice \t\t = '\" . $menuprice . \"', \n\t\t\t\t\t\t\t\tquantity\t\t = '\" . $updquantity . \"', \n\t\t\t\t\t\t\t\tpizza_crustname\t = '\" . $crust_name . \"', \n\t\t\t\t\t\t\t\tpizza_crustprice = '\" . $pizza_crustprice . \"', \n\t\t\t\t\t\t\t\tpizza_addonsname = '\" . $pizza_addons_name . \"',\n\t\t\t\t\t\t\t\tpizza_addons_price = '\" . $pizza_addonsprice . \"',\n\t\t\t\t\t\t\t\tpizza_size\t\t = '\" . $pizzasize . \"',\n\t\t\t\t\t\t\t\tspecialinstruction = '\" . $splins . \"', \n\t\t\t\t\t\t\t\ttot_menuprice = '\" . $totmenuprice . \"', \n\t\t\t\t\t\t\t\tsessionid \t\t = '\" . $sessionid . \"',\n\t\t\t\t\t\t\t\taddeddate \t\t = '\" . CUR_TIME . \"'\n\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t menuid = '\" . $menuid . \"' AND sessionid = '\" . $sessionid .\n \"' AND cart_id = '\" . $getcartid . \"' \";\n $res_cart = $this->ExecuteQuery($up_cart, \"update\");\n }\n }", "title": "" }, { "docid": "5780b041485157c8862d93ebb47cb655", "score": "0.5599976", "text": "function processTransaction($cartObj, $loggedInUserDetailsArr, $data){\n\n\t\t\tif(isset($_SESSION[SITE_NAME]['BILLADDRESS']['shipping']) && !empty($_SESSION[SITE_NAME]['BILLADDRESS']['shipping'])){\n\t\t\t\t$getAddress = $this->getAddressByAddressid($_SESSION[SITE_NAME]['BILLADDRESS']['shipping'],$loggedInUserDetailsArr);\n\t\t\t\tif($this->num_rows($getAddress)>0){\n\t\t\t\t\t$addressShipDetails = $this->fetch($getAddress);\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$shippingFName = $this->escape_string($this->strip_all($addressShipDetails[\"customer_fname\"]));\n\t\t\t$shippingLName = \"\";\n\t\t\t$shipping_email = $this->escape_string($this->strip_all($addressShipDetails[\"customer_email\"]));\n\t\t\t$shipping_contact = $this->escape_string($this->strip_all($addressShipDetails[\"customer_contact\"]));\n\t\t\t$shippingState = $this->escape_string($this->strip_all($addressShipDetails[\"state\"]));\n\t\t\t$shippingCity = $this->escape_string($this->strip_all($addressShipDetails[\"city\"]));\n\t\t\t$shippingAddress1 = $this->escape_string($this->strip_all($addressShipDetails[\"address1\"]));\n\t\t\t$shippingAddress2 = $this->escape_string($this->strip_all($addressShipDetails[\"address2\"]));\n\t\t\t$shippingCompany = \"\";\n\t\t\t$shippingPincode = $this->escape_string($this->strip_all($addressShipDetails[\"pincode\"]));\n\t\t\t\n\t\t\tif(isset($_SESSION[SITE_NAME]['BILLADDRESS']['Billing']) && !empty($_SESSION[SITE_NAME]['BILLADDRESS']['Billing'])){ \n\t\t\t\t$getAddress = $this->getAddressByAddressid($_SESSION[SITE_NAME]['BILLADDRESS']['Billing'],$loggedInUserDetailsArr);\n\t\t\t\tif($this->num_rows($getAddress)>0){\n\t\t\t\t\t$addressBillDetails = $this->fetch($getAddress);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$billFName \t= $this->escape_string($this->strip_all($addressBillDetails[\"customer_fname\"]));\n\t\t\t$billLName \t= \"\";\n\t\t\t$billState \t= $this->escape_string($this->strip_all($addressBillDetails[\"state\"]));\n\t\t\t$billCity \t= $this->escape_string($this->strip_all($addressBillDetails[\"city\"]));\n\t\t\t$billAddress1 = $this->escape_string($this->strip_all($addressBillDetails[\"address1\"]));\n\t\t\t$billAddress2 = $this->escape_string($this->strip_all($addressBillDetails[\"address2\"]));\n\t\t\t$billCompany = \"\";\n\t\t\t$billPincode = $this->escape_string($this->strip_all($addressBillDetails[\"pincode\"]));\n\t\t\t\n\t\t\t$customer_id = $this->escape_string($this->strip_all($loggedInUserDetailsArr['id']));\n\t\t\t$payment_mode = $this->escape_string($this->strip_all($data['paymentMode']));\n\n\t\t\t//$txn_id = \"HM-\".date(\"YmdHis\", time());\n\t\t\t//permaCode\n\t\t\t\t$prefix\t= 'AS-';\n\t\t\t\t$permalink \t= str_shuffle('1234567890');\n\t\t\t\t$permalink \t= substr($permalink,0,8);\n\t\t\t\t$txn_id \t= $this->generate_id($prefix, $permalink, 'order', 'txn_id');\n\t\t\t//permaCode::end\n\n\t\t\t$payment_status = 'Payment Pending';\n\t\t\t$order_status = 'In Process';\n\t\t\t$created = date('Y-m-d H:i:s');\n\n\t\t\t$query = \"insert into \".PREFIX.\"order(\n\t\t\t\t\t\ttxn_id, payment_mode, customer_id, billing_email, \n\t\t\t\t\t\tbilling_fname, billing_lname, billing_address_line1, billing_address_line2, billing_city, billing_pincode, billing_state,\n\t\t\t\t\t\tshipping_fname, shipping_lname, shipping_email, shipping_address_line1, shipping_address_line2, shipping_city, shipping_pincode, shipping_state,\n\t\t\t\t\t\tpayment_status, created, order_status) \n\t\t\t\t\t values (\n\t\t\t\t\t\t'\".$txn_id.\"', '\".$payment_mode.\"', '\".$loggedInUserDetailsArr['id'].\"', '\".$loggedInUserDetailsArr['email'].\"', \n\t\t\t\t\t\t'\".$billFName.\"', '\".$billLName.\"', '\".$billAddress1.\"', '\".$billAddress2.\"', '\".$billCity.\"', '\".$billPincode.\"', '\".$billState.\"',\n\t\t\t\t\t\t'\".$shippingFName.\"', '\".$shippingLName.\"', '\".$shipping_email.\"', '\".$shippingAddress1.\"', '\".$shippingAddress2.\"', '\".$shippingCity.\"', '\".$shippingPincode.\"', '\".$shippingState.\"',\n\t\t\t\t\t\t'\".$payment_status.\"', '\".$created.\"', '\".$order_status.\"')\";\n\t\t\t//echo $query;\n\t\t\t//exit; \n\n\t\t\t$this->query($query);\n\n\t\t\t$orderId = $this->last_insert_id();\n\n\t\t\t$cartArr = $cartObj->getCart();\n\t\t\t$_SESSION[SITE_NAME]['outOfStock'] = array();\n\t\t\t$processedProduct = 0;\n\t\t\tif($cartArr){\n\t\t\t\tforeach($cartArr as $oneProduct){\n\t\t\t\t\t$cartProductDetail = $this->getUniqueProductById($oneProduct['productId']);\n\t\t\t\t\t\n\t\t\t\t\t//$productPrice = $this->getProductPriceByPriceId($oneProduct['price_id']);\n\t\t\t\t\t//$productSizeDetails = $this->getProductSizeDetailsBySizeAndProductId($oneProduct['productId']);\n\n\t\t\t\t\t$quantity = $this->escape_string($this->strip_all($oneProduct['quantity']));\n\n\t\t\t\t\tif($cartProductDetail['availability'] >= $quantity) {\n\t\t\t\t\t\tif($loggedInUserDetailsArr['user_type']==\"b2b\"){\n\t\t\t\t\t\t\t$query = \"insert into \".PREFIX.\"order_details(order_id, product_id, customer_id, quantity, customer_price, customer_discount_price, gst_rate, size, vendor_id) values ('\".$orderId.\"', '\".$cartProductDetail['id'].\"', '\".$loggedInUserDetailsArr['id'].\"', '\".$quantity.\"', '\".$cartProductDetail['b2b_price'].\"', '\".$cartProductDetail['b2b_discount_price'].\"', '\".$cartProductDetail['tax'].\"', '0','\".$cartProductDetail['vendor_id'].\"')\";\n\t\t\t\t\t\t}else if($loggedInUserDetailsArr['user_type']==\"b2c\"){\n\t\t\t\t\t\t\t$query = \"insert into \".PREFIX.\"order_details(order_id, product_id, customer_id, quantity, customer_price, customer_discount_price, gst_rate, size, vendor_id) values ('\".$orderId.\"', '\".$cartProductDetail['id'].\"', '\".$loggedInUserDetailsArr['id'].\"', '\".$quantity.\"', '\".$cartProductDetail['price'].\"', '\".$cartProductDetail['discount_price'].\"', '\".$cartProductDetail['tax'].\"', '0','\".$cartProductDetail['vendor_id'].\"')\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->query($query);\n\t\t\t\t\t\t$processedProduct = $processedProduct+1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$productArr = array(\n\t\t\t\t\t\t\t\"productId\" => $oneProduct['productId'],\n\t\t\t\t\t\t\t//\"price_id\" => $oneProduct['price_id'],\n\t\t\t\t\t\t\t//\"size\" => $oneProduct['size'],\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$_SESSION[SITE_NAME]['outOfStock'][] = $productArr;\n\t\t\t\t\t\t//$removeCart = $cartObj->removeProductFromCart($oneProduct['productId'], $oneProduct['price_id']);\n\t\t\t\t\t\t$removeCart = $cartObj->removeProductFromCart($oneProduct['productId']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($processedProduct==0) {\n\t\t\t\t\t$this->query(\"delete from \".PREFIX.\"order where id='\".$orderId.\"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$amtArr = $this->getCartAmountAndQuantity($cartObj, $loggedInUserDetailsArr);\n\t\t\t$shippingCharges = $amtArr['shippingCharges'];\n\t\t\t$loyalty_points = \"0\";\n\t\t\t$giftCard = \"0\";\n\t\t\t$payment_status = 'Payment Pending';\n\t\t\t\n\t\t\tif(isset($_SESSION[SITE_NAME]['giftCard'])) {\n\t\t\t\t$giftCard = $_SESSION[SITE_NAME]['giftCard'];\n\t\t\t\t$giftCardMessage = $_SESSION[SITE_NAME]['giftCardMessage'];\n\t\t\t} else {\n\t\t\t\t$giftCard = 0;\n\t\t\t\t$giftCardMessage = '';\n\t\t\t}\n\n\t\t\tif($processedProduct>0) {\n\t\t\t\t$this->query(\"update \".PREFIX.\"order set shipping_charges='\".$shippingCharges.\"', loyalty_points='\".$loyalty_points.\"', giftCard='\".$giftCard.\"', giftCardMessage='\".$giftCardMessage.\"' where id='\".$orderId.\"'\");\n\t\t\t}\n\n\t\t\treturn array(\n\t\t\t\t\t\t\"orderId\" => $orderId, \n\t\t\t\t\t\t\"txnId\" => $txn_id, \n\t\t\t\t\t\t\"cartPriceDetails\" => $amtArr, \n\t\t\t\t\t\t\"status\" => \"success\", \n\t\t\t\t\t\t\"processedProduct\" => $processedProduct\n\t\t\t\t\t);\n\t\t}", "title": "" }, { "docid": "f7ca1bc6e8fb632724807d0a7b850bf6", "score": "0.5575748", "text": "private function doRequestLoop(){\n \n foreach($_REQUEST as $key=>$value) { \n \n $this->debug(\"doRequestLoop(): Key - \".$key.\" VALUE - \". $value);\n \n //****************USERID*******************//\n //If the value of the input is (h-userID)\n if($value == \"h-userID\"){ //This is the VMuserID option \n $userIDValueField = str_replace(\"t\",\"p\",$key); //Replace t with p to get the name of the input containing the userID \n if(!empty($userIDValueField)){ \n if(isset($_REQUEST[$userIDValueField])){ \n $userID =$_REQUEST[$userIDValueField]; //SET THE USERID\n if(!empty($userID)){\n $this->debug(\"doRequestLoop: SUCCESS - UserID: \".$userID);\n $this->setRequestUserID($userID);\n }else{\n $this->debug(\"doRequestLoop: WARNING - userID is blank or zero USERID: \".$userID);\n }\n }else{\n $this->debug(\"doRequestLoop: WARNING - TValue(\".$userIDValueField.\") not set\");\n }\n }else{\n $this->debug(\"doRequestLoop: WARNING - TValue field not found for userID pfield\");\n } \n }\n \n //****************CART ID*******************//\n if($key== \"HTTP_COOKIE2\"){ \n \n $this->debug(\"doRequestLoop: Found Cookie Key: \".$key);\n $cookieArr = explode(\";\", $value); \n \n foreach($cookieArr as $cookie){ \n \n $c = explode(\"=\", $cookie); \n $clientCode = $this->getClientCode();\n if(!empty($clientCode)){ \n if($c[0] == \" Cart32-\".$clientCode){ \n $this->debug(\"doRequestLoop: Found CartID In Cookie Value =\". $c[0]);\n //The Cart ID\n $cartID = $c[1]; \n //First add to cart after logout was giving old users cartID. Check the submitted IP value and make sure this doesn't happen\n if(isset($_REQUEST['ip'])){\n if(!empty($_REQUEST['ip'])){\n if($_REQUEST['ip'] != $cartID){\n $cartID = $_REQUEST['ip'];\n $this->debug(\"doRequestLoop : REQUEST[ip] override CartID Value = \".$cartID);\n }\n }\n } \n $this->setRequestCartID($cartID); \n $this->debug(\"doRequestLoop: Set CartID from COOKIE: CARTID= \". $cartID);\n }\n }else{\n $this->debug(\"doRequestLoop: ERROR - NO CLIENT CODE SET \");\n } \n }//End foreach cookie \n }//End if ket HTTP_COOKIE2\n \n //****************LOOK FOR IP REQUEST VAR*******************//\n if(strtolower($key)== \"ip\"){ \n $this->debug(\"doRequestLoop: Found IP Key: \".$key);\n if($this->requestCartID == \"\" || $this->requestCartID == 0){\n $this->debug(\"doRequestLoop: Request CartID is zero or blank\");\n if($value != \"\" && $value !=0 && $value !=\"0\" && $value !=\"undefined\"){\n $this->setRequestCartID($value); \n $this->debug(\"doRequestLoop: Set CartID from IP. CARTID=\".$value);\n }\n } \n }//End IP request var\n \n }//End loop over request vars \n }", "title": "" }, { "docid": "5cfd652ecd78ca7cb9e0c6d0c44d9a92", "score": "0.55752236", "text": "function get_user_ip() {\t\t\t\n\t\t\t $ipaddress = '';\n\t\t\t if (isset($_SERVER['HTTP_CLIENT_IP']))\n\t\t\t\t $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\t\t else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n\t\t\t\t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t else if(isset($_SERVER['HTTP_X_FORWARDED']))\n\t\t\t\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\t\t else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\t\t else if(isset($_SERVER['HTTP_FORWARDED']))\n\t\t\t\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\t\t else\n\t\t\t\t $ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\t\t$parts = explode(',', $ipaddress);\n\t\t\tif(count($parts) > 1) $ipaddress = $parts[0];\n\t\t\t return $ipaddress; \n\t\t}", "title": "" }, { "docid": "7a4c9c60b0ef627c4e5858fa09ff34b5", "score": "0.5566202", "text": "function items(){\n\t\n\t\n\t\n\tif(isset($_GET['add_cart'])){\n\t\tglobal $db;\n\t\t\n\t\t$ip_add = getIp();\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\t\t\n\t\t$run_items = mysqli_query($db,$get_items);\n\t\t\n\t\t$count_items = mysqli_num_rows($run_items);\n\t\t\n\t\t\n\t\t\n\t\t}\n\telse {\n\t\tglobal $db;\n\t\t$ip_add = getIp();\n\t\t\n\t\t$get_items = \"select * from cart where ip_add='$ip_add'\";\n\t\t\n\t\t$run_items = mysqli_query($db,$get_items);\n\t\t\n\t\t$count_items = mysqli_num_rows($run_items);\n\t\t\t\t\n\t\t}\n\t\n\techo $count_items;\t\n\t}", "title": "" }, { "docid": "d88367cc6f54155e3fbe72ccd96aa830", "score": "0.55658424", "text": "function ps_wp_cart_button()\r\n{\r\n\r\n\t$resume['total'] = '0';\r\n\t$resume['items'] = '0';\r\n\t\r\n\tif( !empty( $_SESSION['pssimpleCart'] ) ){ \r\n\t\t\r\n\t\tforeach ($_SESSION['pssimpleCart'] as $item)\r\n\t\t{\t\t\t\r\n\t\t\t$resume['total'] += str_replace(',', '.', $item['price']) * $item['quantity'];\r\n\t\r\n\t\t\t$resume['items'] += $item['quantity'];\r\n\t\t}\r\n\t}\r\n\t\r\n\t$resume['total'] =\tmoney( $resume['total'] );\r\n\t\t\r\n\treturn (object) $resume;\r\n}", "title": "" }, { "docid": "b09548220b26eb224411ebc71ea2df40", "score": "0.5555907", "text": "public function open_cart_api_addcart() \n\t{\n if (isset($_REQUEST['product_id'])) \n\t\t{\n if ($_REQUEST['cakePhp_cart_session'] == '') \n\t\t\t{\n $this->Session->write('cart_process');\n $cart_session = $this->str_rand(15);\n } \n\t\t\telse \n\t\t\t{\n $cart_session = $_REQUEST['cakePhp_cart_session'];\n }\n\t\t\t\n $carts = $this->Shoppingcart->find('first', array('conditions' => array('Shoppingcart.product_id' => $_REQUEST['product_id']),'order' => array('Shoppingcart.cart_id' => 'desc')));\n\t\t\t\n if (empty($carts)) {\n $this->request->data['Shoppingcart']['cart_session'] = $cart_session;\n $this->request->data['Shoppingcart']['product_id'] = str_replace(\",\", '', $_REQUEST['product_id']);\n $this->request->data['Shoppingcart']['metal'] = str_replace(\",\", '', $_REQUEST['metal']);\n $this->request->data['Shoppingcart']['purity'] = str_replace(\",\", '', $_REQUEST['purity']);\n $this->request->data['Shoppingcart']['size'] = str_replace(\",\", '', $_REQUEST['size']);\n $this->request->data['Shoppingcart']['clarity'] = str_replace(\",\", '', $_REQUEST['clarity']);\n $this->request->data['Shoppingcart']['color'] = str_replace(\",\", '', $_REQUEST['color']);\n $this->request->data['Shoppingcart']['metalcolor'] = str_replace(\",\", '', $_REQUEST['metalcolor']);\n $this->request->data['Shoppingcart']['weight'] = str_replace(\",\", '', $_REQUEST['weight']);\n $this->request->data['Shoppingcart']['quantity'] = str_replace(\",\", '', $_REQUEST['quantity']);\n $this->request->data['Shoppingcart']['stoneamount'] = str_replace(\",\", '', $_REQUEST['stoneamount']);\n $this->request->data['Shoppingcart']['goldamount'] = str_replace(\",\", '', $_REQUEST['goldamount']);\n $this->request->data['Shoppingcart']['vat'] = str_replace(\",\", '', $_REQUEST['vat']);\n $this->request->data['Shoppingcart']['vat_per'] = str_replace(\",\", '', $_REQUEST['vat_per']);\n $this->request->data['Shoppingcart']['making_charge'] = str_replace(\",\", '', $_REQUEST['making_charge']);\n $this->request->data['Shoppingcart']['making_per'] = str_replace(\",\", '', $_REQUEST['making_per']);\n $this->request->data['Shoppingcart']['total'] = str_replace(\",\", '', $_REQUEST['total']);\n $this->request->data['Shoppingcart']['goldprice'] = str_replace(\",\", '', $_REQUEST['goldprice']);\n $this->request->data['Shoppingcart']['stoneprice'] = str_replace(\",\", '', $_REQUEST['stoneprice']);\n $this->request->data['Shoppingcart']['gemstoneamount'] = str_replace(\",\", '', $_REQUEST['gemstoneamount']);\n $this->request->data['Shoppingcart']['created_date'] = date('Y-m-d H:i:s');\n\t\t\t\t\n\t\t\t\t$this->Shoppingcart->save($this->request->data);\n } else {\n // $this->request->data['Shoppingcart']['cart_id'] = $carts['Shoppingcart']['cart_id'];\n $carts['Shoppingcart']['quantity'] = ($carts['Shoppingcart']['quantity']+$_REQUEST['quantity']);\n $this->Shoppingcart->save($carts);\n }\n\t\t\tif($this->Session->read('discount')!=''){\n\t\t\t\t$this->Order->updateAll(array('discount_per'=>NULL,'discount_amount'=>0),array('order_id'=>$this->Session->read('Order')));\n\t\t\t\t$this->Discounthistory->deleteAll(array('order_id'=>$this->Session->read('Order')),false,false,false);\n\t\t\t\t$this->Session->delete('discount');\n\t\t\t}\n\t\t\t\n\t\t\t\n if($this->Session->check('User.user_id')){\n $this->User->id = $this->Session->read('User.user_id');\n $this->User->saveField('cart_session', $cart_session);\n }\n\t\t\t\n\t\t\techo $cart_session;\n }\n \n\t\t\n }", "title": "" }, { "docid": "6494663af87ba6f2de1d175975ba445d", "score": "0.5554306", "text": "function getRealIpUser(){\n // this function to get real ip for user\n switch(true){\n case(isset($_SERVER['HTTP_X_REAL_IP'])): return $_SERVER['HTTP_X_REAL_IP'];\n case(isset($_SERVER['HTTP_CLIENT_IP'])): return $_SERVER['HTTP_CLIENT_IP'];\n case(isset($_SERVER['HTTP_X_FORWARDED_FOR'])): return $_SERVER['HTTP_X_FORWARDED_FOR'];\n default: return $_SERVER['REMOTE_ADDR'];\n }\n \n }", "title": "" }, { "docid": "183dcf1764646de04ad429e7a760e08d", "score": "0.5547234", "text": "function total_price(){\n\n \t\t$ip_add = getRealIpAddr();\n\n \t\tglobal $db;\n\n \t\t$total = 0;\n\n \t\t$sel_price = \"SELECT * FROM cart where ip_add='$ip_add'\";\n\n \t\t$run_price = mysqli_query($db,$sel_price);\n\n \t\twhile ($record = mysqli_fetch_array($run_price)){\n\n \t\t\t\t$pro_id = $record['p_id'];\n\n \t\t\t\t$pro_price = \"SELECT * FROM products where product_id='$pro_id'\";\n\n \t\t\t\t$run_pro_price = mysqli_query($db,$pro_price);\n\n \t\t\t\twhile($p_price = mysqli_fetch_array($run_pro_price)){\n\n \t\t\t\t\t$product_price = array($p_price['product_price']);\n\n \t\t\t\t\t$values = array_sum($product_price);\n\n \t\t\t\t\t$total += $values;\n \t\t\t\t}\n \t\t}\n \t\techo \"Rs \" . $total;\n }", "title": "" }, { "docid": "1486005a35e0d2cc6c0cb651be6508be", "score": "0.5545959", "text": "public function ip_info($user_ip=null) \r\n\t{\r\n\t\t\tif ($user_ip ==\"\"){$user_ip = $this->getUserIP();} \r\n\t\t\t$user_ip = '103.232.101.27';\r\n\t\t $rowData=null;$spl=null;\r\n\t\t $spl=explode(\".\",$user_ip);\r\n\t\t $ip2=$spl[0].\".\".$spl[1].\".\".$spl[2];\r\n\t\t \r\n\t\t $rowData=$this->db->query(\"SELECT * from t_ip_info where ip = '\".$ip2.\"'\")->result();\r\n\t\t foreach($rowData as $rdata){$rowData = $rdata->data;}\r\n\t\t //echo $this->db->last_query();\r\n\t\t //print_r($rowData); exit;\r\n\t\t if (count($rowData)==0)\r\n\t\t {\r\n\t\t\t $xml = $this->curl_get_ip(\"https://easyrecharge.ws/ipinfo/ipinfo/info/$user_ip\",array()); \r\n\t\t\t //echo $xml;exit;\r\n\t\t\t if (!strlen($xml)){ $xml = $this->curl_get_ip(\"https://pro.ip-api.com/json/\".$user_ip.\"?key=o85nrcMiyTMo7jV\",array());}\r\n\t\t\t //echo $xml;exit;\r\n\t\t\t if ($xml){$this->db->insert('t_ip_info', array('ip'=>$ip2, 'data'=>$xml));}\r\n\t\t\t $xmlData = json_decode($xml);\r\n\t\t\t //$xml = json_decode($this->mm->curl_get_ip(\"https://pro.ip-api.com/json/\".$user_ip.\"?key=o85nrcMiyTMo7jV\"));\r\n\t\t\t return $xmlData;\r\n\t\t } \r\n\t\t else { $xmlData = json_decode($rowData); return $xmlData;}\r\n\t }", "title": "" }, { "docid": "9d3d27ae221be08f592605871bb70ec4", "score": "0.5542025", "text": "public static function name(){\n\n \n // $user_id = Auth::user()->id;\n\n\n\n //the geoPlugin server\n $host = 'http://www.geoplugin.net/php.gp?ip={IP}&base_currency={CURRENCY}';\n\n //the default base currency\n $currency = 'USD';\n //initiate the geoPlugin vars\n $ip = null;\n $city = null;\n $region = null;\n $areaCode = null;\n $dmaCode = null;\n $countryCode = null;\n $countryName = null;\n $continentCode = null;\n $latitude = null;\n $longitude = null;\n $currencyCode = null;\n $currencySymbol = null;\n $currencyConverter = null;\n $autoloadLanguage = true;\n\n\n\n\n\n //session_destroy();\n //$ip = '182.176.176.21';\n //$ip = '1.0.0.255';\n \n\n // $session_current_ip = $session->get('session_current_ip');\n\n // $session_current_country_code = $session->get('session_current_country_code');\n\n // $session_licence_price = $session->get('session_licence_price');\n\n // $session_designation_price = $session->get('session_designation_price');\n\n \n// if(empty($session_current_ip)){\n //$ip = JFactory::getApplication()->input->server->get('REMOTE_ADDR','');\n // $ip = file_get_contents('https://api.ipify.org');\n \n $ip = $_SERVER[\"HTTP_CF_CONNECTING_IP\"] ?? '31.203.100.107'; // get the user actual ip or if not accessible set it to zone 2 any country .i.e kuwait\n \n \n //$ip = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n //$ip = '203.175.72.232';\n //$ip = '109.201.137.46';\n \n // //$ip = request()->ip();\n \n //dd($_SERVER['HTTP_X_FORWARDED_FOR']);\n //$session->set('session_current_ip', $ip);\n\n // global $_SERVER;\n // if ( is_null( $ip ) ) {\n // \t$ip = JFactory::getApplication()->input->server->get('REMOTE_ADDR','');\n // }\n\n\n $host = \"http://www.geoplugin.net/php.gp?ip=$ip&base_currency=dollar\";\n\n \n\n $data = array();\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $host);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, 'geoPlugin PHP Class v1.0');\n $response = curl_exec($ch);\n curl_close($ch);\n // Log::info($response);\n \n\n \n $data = unserialize($response);\n \n //set the geoPlugin vars\n \n $city = $data['geoplugin_city'];\n $region = $data['geoplugin_region'];\n $areaCode = $data['geoplugin_areaCode'];\n $dmaCode = $data['geoplugin_dmaCode'];\n $countryCode = $data['geoplugin_countryCode'];\n $countryName = $data['geoplugin_countryName'];\n $continentCode = $data['geoplugin_continentCode'];\n $latitude = $data['geoplugin_latitude'];\n $longitude = $data['geoplugin_longitude'];\n $currencyCode = $data['geoplugin_currencyCode'];\n $currencySymbol = $data['geoplugin_currencySymbol'];\n $currencyConverter = $data['geoplugin_currencyConverter'];\n \n \n //dd($countryCode);\n return $ct_name = $countryName;\n\n\n }", "title": "" }, { "docid": "dfc2532c1b2be1ab78097604f1376724", "score": "0.55319947", "text": "function add_product_to_cart() {\n if ( ! is_admin() ) {\n if(true){//$_SERVER[\"REMOTE_ADDR\"] == \"27.255.218.39\"\n global $woocommerce;\n $curPageURL = frc_curPageURL();\n if(strpos($curPageURL,\"get-premium-membership\")){\n //echo $curPageURL;\n $product_id = 28901;\n $found = false;\n //check if product already in cart\n $cartArr = @$woocommerce->cart->get_cart();\n //echo \"<pre>\";print_r($cartArr);echo \"</pre>\";\n if ( is_array($cartArr) && sizeof( $cartArr ) > 0 ) {\n foreach ( $cartArr as $cart_item_key => $values ) {\n $_product = $values['data'];\n if ( $_product->id == $product_id )$found = true;\n }\n // if product not found, add it\n if ( ! $found )$woocommerce->cart->add_to_cart( $product_id );\n }else{\n // if no products in cart, add it\n @$woocommerce->cart->add_to_cart( $product_id );\n }\n }\n }\n }\n}", "title": "" }, { "docid": "e64ffe1ae16c58f702cfe28d4b6e327b", "score": "0.55302423", "text": "private function update_cart($uid)\r\n\t{\r\n\t\r\n\t\t\t//echo \"<pre>\"; print_r($db_cart); exit;\t\t\t\t\t\r\n\t\t $cart_num = Cart::count(); //Count cart item from session\r\n\t\t\r\n\t\tif($cart_num>0) // If there cart data in Session\r\n\t\t{\r\n\t\t\t//add to db for guest user's added cart\r\n\t\t\t$content = Cart::content();\r\n\t\t\tforeach($content as $eachcontentCart)\r\n\t\t\t{\r\n\t\t\t\t$cartRowId = $eachcontentCart->rowid;\r\n\t\t\t}\r\n\t\t\t//echo \"<pre>\";print_r($content);\r\n\t\t\t\r\n\t\t\tforeach($content as $each_content)\r\n\t\t\t{\r\n\t\t\t\t$product_id = $each_content->id;\r\n\t\t\t\t$product_name = $each_content->name;\r\n\t\t\t\t$product_quantity = $each_content->qty;\r\n\t\t\t\t$product_price = $each_content->price; // Price amount for each item\r\n\t\t\t\t$product_duration = $each_content->options->duration;\r\n\t\t\t\t$product_no_of_days = $each_content->options->no_of_days;\r\n\t\t\t\t$product_form_factor = $each_content->options->form_factor;\r\n\t\t\t\t$subtotal = $each_content->subtotal;\r\n\t\t\t\t$cartRowId = $each_content->rowid;\r\n\t\t\t\t\r\n\t\t\t\t $cartContent = DB::table('carts')\r\n ->where('user_id',Session::get('member_userid'))\r\n ->where('product_id',$product_id)\r\n ->where('no_of_days',$product_no_of_days)\r\n ->where('form_factor',$product_form_factor)\r\n ->first();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tif(count($cartContent)<1) // cart item not matches with database content so, insert as a new cart item\r\n\t\t\t\t{\r\n\t\t\t\t\t$insert_cart = DB::table('carts')->insert(['user_id' => Session::get('member_userid'), 'row_id' => $cartRowId, 'product_id' => $product_id , 'product_name' => $product_name, 'quantity' => $product_quantity, 'amount' => $product_price, 'duration' => $product_duration, 'no_of_days' => $product_no_of_days, 'form_factor' => $product_form_factor,'sub_total' => $subtotal, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);\r\n\t\t\t\t\t//exit;\r\n\t\t\t\t}\r\n\t\t\t\telse // cart item matches with database content so, update quantity ofthat particular item\r\n\t\t\t\t{\r\n\t\t\t\t\t$new_quantity = ($cartContent->quantity)+$product_quantity; //quantity from DB + cart item quantity\r\n $new_sub_total = $new_quantity * $product_price; // Sub Total \r\n\t\t\t\t\t$update_cart = DB::table('carts')\r\n\t\t\t\t\t\t\t\t\t\t->where('cart_id', $cartContent->cart_id)\r\n\t\t\t\t\t\t\t\t\t\t->update(['quantity' => $new_quantity,'sub_total'=>$new_sub_total]);\r\n\t\t\t\t}\r\n\t\t\t} //Foreach End\r\n\t\t\t//now db contains all previous and current added cart items...so deleted all cart items and add all contents from db\r\n\t\t\t\r\n\t\t\tCart::destroy(); // After inserting all cart data into database just\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t } // Cart session If End\r\n\t\t \r\n\t\t \r\n\t\t /* All cart get from DB of logged user */\r\n\t\t\t $dbCartContent = DB::table('carts')\r\n ->where('user_id',Session::get('member_userid'))\r\n ->get();\r\n\t\t\t\r\n\t\t\tforeach($dbCartContent as $eachCartContent)\r\n\t\t\t{\r\n\t\t\t\tCart::add($eachCartContent->product_id, $eachCartContent->product_name, $eachCartContent->quantity, $eachCartContent->amount, array('duration' => $eachCartContent->duration,'no_of_days'=>$eachCartContent->no_of_days,'form_factor'=>$eachCartContent->form_factor));\t\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tDB::table('carts')->where(\"user_id\",Session::get('member_userid'))->delete();\r\n\t\t\t\r\n\t\t\t$content = Cart::content();\r\n\t\t\tforeach($content as $each_content)\r\n\t\t\t{\r\n\t\t\t\t$product_id = $each_content->id;\r\n\t\t\t\t$product_name = $each_content->name;\r\n\t\t\t\t$product_quantity = $each_content->qty;\r\n\t\t\t\t$product_price = $each_content->price; // Price amount for each item\r\n\t\t\t\t$product_duration = $each_content->options->duration;\r\n\t\t\t\t$product_no_of_days = $each_content->options->no_of_days;\r\n\t\t\t\t$product_form_factor = $each_content->options->form_factor;\r\n\t\t\t\t$subtotal = $each_content->subtotal;\r\n\t\t\t\t$cartRowId = $each_content->rowid;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$insert_cart = DB::table('carts')->insert(['user_id' => Session::get('member_userid'), 'row_id' => $cartRowId, 'product_id' => $product_id , 'product_name' => $product_name, 'quantity' => $product_quantity, 'amount' => $product_price, 'duration' => $product_duration, 'no_of_days' => $product_no_of_days, 'form_factor' => $product_form_factor,'sub_total' => $subtotal, 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9675b3a09181ee3da7066a0883319c10", "score": "0.5520663", "text": "function cart()\n{\n $product_array = unserialize(file_get_contents(\"./products/products_list\"));\n $total = 0;\n foreach ($_SESSION as $name=>$value)\n {\n if (substr($name, 0, 5) == \"cart_\" && $value > 0)\n {\n $id = substr($name, 5, strlen($name) - 5);\n foreach ($product_array as $product)\n {\n if ($product['id'] == $id)\n {\n echo \"Product \".$id.\": \".$value.\" x $\".$product['price'].\" = $\".number_format($product['price'] * $value, 2).\"<br>\";\n $total += number_format($product['price'] * $value, 2);\n }\n }\n }\n }\n if ($total == 0)\n echo \"<br><br><p>Your cart is empty</p>\";\n else\n {\n // display checkout button (validate button)\n // for here, you will need to add a check if there is a logged in user\n echo \"<br>TOTAL: $\".$total;\n ?>\n <p>\n <form action=\"https://www.paypal.com/us/cgi-bin/webscr\" method=\"post\">\n <input type=\"hidden\" name=\"cmd\" value=\"_cart\">\n <input type=\"hidden\" name=\"upload\" value\"1\">\n <input type=\"hidden\" name=\"business\" value=\"[email protected]\">\n\n <!-- create items here; list each item in the shopping cart and add it to paypal-->\n <?php paypal_items(); ?>\n\n <input type=\"hidden\" name=\"currency_code\" value=\"USD\">\n <input type=\"hidden\" name=\"amount\" value=\"<?php echo $total.\":\" ?>\">\n <input type=\"image\" src=\"http://www.paypal.com/en_US/i/btn/x-click-but03.gif\" name=\"submit\" alt=\"Make payments with PayPal - it's fast, free and secure!\">\n </form>\n </p>\n <?php\n }\n}", "title": "" }, { "docid": "a665066e8aac9c3f4f54d8a2124d6b02", "score": "0.55156", "text": "function total_price()\n\t{\n\t\t$total = 0;\n\t\t\n\t\tglobal $con;\n\t\t\n\t\t//creating or using cookie \n\t\tif(isset($_COOKIE[\"ipUserEcommerce\"]))\n\t\t{\n\t\t\t$ip\t= $_COOKIE[\"ipUserEcommerce\"];\n\t\t\t}else{\n\t\t\t$ip=getIp();\n\t\t\tsetcookie('ipUserEcommerce',$ip,time()+1206900);\n\t\t}\n\t\t\n\t\t$sel_price = \"select * from cart where ip_add='$ip'\";\n\t\t\n\t\t$run_price = mysqli_query($con,$sel_price);\n\t\t\n\t\twhile($p_price = mysqli_fetch_array($run_price))\n\t\t\n\t\t{\n\t\t\t$pro_id = $p_price['p_id'];\n\t\t\t\n\t\t\t$pro_qty = $p_price['qty'];\n\t\t\t\n\t\t\t$pro_price = \"select * from products where product_id='$pro_id'\";\n\t\t\t\n\t\t\t$run_pro_price = mysqli_query($con,$pro_price);\n\t\t\t\n\t\t\twhile($pp_price = mysqli_fetch_array($run_pro_price))\n\t\t\t\n\t\t\t{\n\t\t\t\t$product_price = array($pp_price['product_price']*$pro_qty);\n\t\t\t\t\n\t\t\t\t$values = array_sum($product_price);\n\t\t\t\t\n\t\t\t\t$total += $values;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\techo $total.\" تومان \";\t\n\t}", "title": "" }, { "docid": "543159b4fc6a93b93526b25f48b4e940", "score": "0.5506634", "text": "public function view_cart()\n\t{\n\t\t$total_saved = $totaltax = $totaldel = 0;\n\t\t$json = file_get_contents('php://input');\n\t\t// $user_id = 627;\n\t\t$jsonobj \t= json_decode($json);\n\n\t\t$language \t= @$jsonobj->language;\n\t\t$language = empty($language)? 'en':$language;\n\n \t$ws \t\t= @$jsonobj->ws;\n\t\t$ws \t\t= empty($ws)? 'view_cart':$ws;\n\t\t\n $user_id = $this->check_user_login($language,$ws);\n \n \t \t$response = $data = $data1 = $error = array();\n \t \t$cart_qty = 0;\n\n\t\t$this->load->library('user_account');\n\n \t \tif (empty($user_id)) {\n \t \t\techo json_encode( array(\"status\" => false ,\"ws\" => $ws ,\"message\" => ($language == 'ar'? 'طلب غير صالح':'Invalid request')) );die;\n \t \t}\n\n //Remove last order which is draft and add product to cart\n $this->load->library('place_order');\n $orderids = $this->custom_model->my_where('order_master','*', ['customer_id' => $user_id, 'payment_status' => 'Draft']);\n if (!empty($orderids))\n {\n foreach ($orderids as $key => $value)\n {\n $oid = $value['order_master_id'];\n $this->place_order->remove_order($oid, 'order_master_id', $user_id);\n }\n }\n \n \t \t$cart = $this->custom_model->my_where('my_cart','content',array('user_id'=>$user_id,'meta_key' => 'cart'));\n\n \t \tif(!empty($cart)) $content = unserialize($cart[0]['content']);\n\n \t \t// echo \"<pre>\";\n \t \t// print_r($content);die;\n\n \t \t$adel = array();\n \t \tif (!empty($content)) {\n\t\t\t$default_tax = $this->custom_model->get_admin_option(\"default_tax\");\t\t\n\t\t\tforeach ($content as $key => $value) {\n\t\t\t\t$res = $this->this_product_data($value['pid'],$language);\n\n\t\t\t\tif ($res)\n\t\t\t\t{\n\t\t\t\t\t$append = $value['pid'];\n\t\t\t\t\t\n\t\t\t\t\t$wish_arr = $this->custom_model->my_where('my_cart','id,content',array('user_id' => $user_id,'meta_key' => 'wish_list'));\n\n\t\t\t\t\tif(!empty($wish_arr)) $my_wish = unserialize($wish_arr[0]['content']);\n\t\t\t\t\t// echo \"<pre>\";\n\t\t\t\t\tif (!empty($res) && $res['curr']['stock_status'] != 'notinstock')\n\t\t\t\t\t{\n\t\t\t\t\t\t$data1[$key]['is_in_wish_list'] = !empty($my_wish) && in_array($append, $my_wish)? 1:0;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($value['metadata'])){\n foreach ($value['metadata'] as $pkey => $pvalue) {\n \t\t\t\t\t\t$append .= 'm'.$pvalue;\n \t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($res['curr']['stock'] < $value['qty'] && $res['curr']['stock'] != 0)\n\t\t\t\t\t{\n\t\t\t\t\t $this->user_account->add_remove_cart($value['pid'],$user_id,'add',$res['curr']['stock']);\n\n\t\t\t\t\t\t$error[] = 'Quantity of '.$res['curr']['product_name'].' is reduced.';\n\t\t\t\t\t\t$value['qty'] = $res['curr']['stock'];\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telseif ($res['curr']['stock_status'] == 'notinstock' || $res['curr']['stock'] == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->wish_list_actions($user_id, $value['pid'], 'add');\n\t\t\t\t\t\t$this->user_account->add_remove_cart($append,$user_id,'remove');\n\t\t\t\t\t\t$error[] = $res['curr']['product_name'].lang('product_moved_wishlist');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n $cart_qty += $value['qty'];\n\t\t\t\t\t$shipping = $res['curr1']['shipping'];\n\t\t\t\t\t$vendor_name = $res['curr1']['vendor_name'];\n\t\t\t\t\t$adel[$vendor_name] = $shipping;\n\t\t\t\t\t$tax = $res['curr']['tax'];\n if(!empty($default_tax)){\n if(empty($tax)){\n $tax = $default_tax;\n }\n }\n $price = $res['curr']['price'] * $value['qty'];\n $sale_price = $res['curr']['sale_price'] * $value['qty'];\n if(empty($res['curr']['sale_price'])) $sale_price = $price;\n $total_saved += ($price - $sale_price);\n\t\t\t\t\tif(!empty($tax)) $totaltax = $totaltax + ( $sale_price * $tax ) / 100;\n\n\t\t\t\t\t$arr = array_merge($res['curr'], $res['curr1'], array('uqty' => $value['qty']));\n\n\t\t\t\t\t$data['product'][] = $arr;\n\t\t\t\t\t$data1[$key]['p'] = $res['curr'];\n\t\t\t\t\t$data1[$key]['partner_name'] = $res['curr1']['vendor_name'];\n\t\t\t\t\t$data1[$key]['uqty'] = $value['qty'];\n\t\t\t\t\t$data1[$key]['metadata'] = !empty($value['metadata'])? $value['metadata']: new stdClass();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!empty($adel)){\n\t\t\t\tforeach ($adel as $akey => $avalue) {\n\t\t\t\t\t$totaldel = $totaldel + $avalue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$default_replacement_policy = $this->custom_model->get_admin_option(\"default_replacement_policy\");\n\t\t\t$default_transaction_cost = $this->custom_model->get_admin_option(\"default_transaction_cost\");\n\t\t\t$data[\"default_tax\"] = $default_tax;\n\t\t\t$data[\"default_transaction_cost\"] = $default_transaction_cost;\n\t\t\t$data['default_replacement_policy'] = $default_replacement_policy;\n\n\t\t\tforeach ($data1 as $key => $value)\n\t\t\t{\n\t\t\t\t// echo \"<pre>\";\n\t\t\t\t// print_r($value);\n\t\t\t\t$response[] = $value;\n\t\t\t\t// $response[$value['v']['vendor_name']][] = $value;\n\t\t\t}\n\n\t\t\t// $response = array_values($response);\n\t\t\t// if(empty($error)) $error = new stdClass();\n\n\t\t\t// echo \"<pre>\";\n\t\t\t// print_r($response);\n\t\t\t// die;\n\n\t\t\techo json_encode( array(\"status\" => true ,\"ws\" => $ws ,/*\"data\" => $data,*/\"response\" => $response,\"total_tax\" => $totaltax, \"total_shipping\" => $totaldel, \"total_saved\" => $total_saved, \"count\" => $cart_qty,/* \"removed_product\" => $error*/) );die;\n\t\t}\n\t\telse{\n\t\t\t$data = new stdClass();\n\n\t\t\techo json_encode( array(\"status\" => false ,\"message\" => \"Empty cart \" ,\"ws\" => $ws ,\"data\" => $data,\"response\" => $response, \"removed_product\" => $error) );die;\n\t\t}\n\n\t\techo json_encode( array(\"status\" => false ,\"ws\" => $ws,\"message\" => ($language == 'ar'? 'طلب غير صالح':'No Products') ) );die;\n \t}", "title": "" }, { "docid": "43cf2f63271ffa1267bceb2f70eeda81", "score": "0.5490887", "text": "function miniCart($cart,$time=\"present\"){\n //debug($cart);\n $smallCart=\"<h1 style='margin-left:30px;margin-right:30px;'>Your Cart</h1>\";\n $smallCart.=\"<table style='width:94%;font-family:lucida sans unicode;margin:30px;font-size:small;box-shadow:0 0 10px;color:grey'>\";\n $smallCart.=\"<tr><th>Description</th><th>Brand</th><th>Quantity</th><th>Price/Qty</th><th>Subtotal</th></tr>\";\n foreach($cart as $key):\n $options=\"\";\n $price=($key['details']->field_discount_price_value && ($key['details']->field_discount_price_value < $key['details']->field_original_price_value))?$key['details']->field_discount_price_value:$key['details']->field_original_price_value;\n $priceMultiple=$price*($key['cart_value']['quantity']);\n $grand_total+=$priceMultiple;\n $price=number_format($price,2);\n $priceMultiple=number_format($priceMultiple,2);\n foreach($key['cart_value'] as $k=>$value):\n $k=ucfirst($k);\n if($k!=\"Quantity\")\n $options.=\"<b>$k</b>\".\" : \".$value.\"<br>\";\n endforeach;\n if($key['details']->field_name_value)\n $smallCart.=\"<tr><td>{$key['details']->field_name_value}<br>$options</td><td>{$key['details']->brand}</td><td style='padding-left:20px'>{$key['cart_value']['quantity']}</td><td>$$price</td><td>$$priceMultiple</td></tr>\";\n endforeach;\n $grand_total=number_format($grand_total,2);\n $smallCart.=\"<tr style='background:steelblue;color:white;'><td colspan='4' align='right'>Grand Sub-Total :</td><td>$$grand_total</td></tr>\";\n \n if($cart['price_estimate']['final_price']):\n $smallCart.=\"<tr style='background:steelblue;color:white;border-top:1px solid lightgrey;font-weight:bold'><td colspan='4' align='right'>Final Price (Including Taxes):</td><td>$\".number_format($cart['price_estimate']['final_price'],2).\"</td></tr>\";\n endif;\n $smallCart.=\"</table>\";\n $smallCart.=\"\n<style>\nth,td{\n padding:10px;\n}\nth{\n background:steelblue;\n color:white;\n}\ntr:nth-child(even) {background:ivory}\ntr:nth-child(odd) {background:lightyellow}\n</style>\n \";\nreturn $smallCart;\n}", "title": "" }, { "docid": "423d261d64a27891f6979eb79ce6ec7f", "score": "0.54720837", "text": "function total_items(){\r\n global $conn;\r\n if(isset($_GET['add_cart'])){\r\n $ip = getIp();\r\n $get_items = \"SELECT * FROM cart where ip_address='$ip'\";\r\n $run_items = mysqli_query($conn,$get_items);\r\n $count_items = mysqli_num_rows($run_items);\r\n }\r\n else{\r\n $ip = getIp();\r\n $get_items = \"SELECT * FROM cart where ip_address='$ip'\";\r\n $run_items = mysqli_query($conn,$get_items);\r\n $count_items = mysqli_num_rows($run_items);\r\n }\r\n echo $count_items;\r\n}", "title": "" }, { "docid": "b92ddaf37b06d56f78cc651d569a76ca", "score": "0.547129", "text": "public function addToCartDailySpecial()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn 123;\n\n\t\t\t\t\t\t\tif (!isset($_SESSION['kr_item'])) {\n\t\t\t\t\t\t\t\t$_SESSION['kr_item'] = array();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$p = new CHtmlPurifier();\n\t\t\t\t\t\t\tif (isset($this->data['notes'])) {\n\t\t\t\t\t\t\t\t$this->data['notes'] = $p->purify($this->data['notes']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*START VALIDATE IF PRICE IS HACK */\n\t\t\t\t\t\t\t$website_disabled_cart_validation = getOptionA('website_disabled_cart_validation');\n\n\t\t\t\t\t\t\tif ($website_disabled_cart_validation != 2) :\n\n\t\t\t\t\t\t\t\t//dump($this->data);\n\t\t\t\t\t\t\t\t$h_item_id = isset($this->data['item_id']) ? $this->data['item_id'] : '';\n\t\t\t\t\t\t\t\t$h_price = isset($this->data['price']) ? $this->data['price'] : '';\n\t\t\t\t\t\t\t\t$h_discount = isset($this->data['discount']) ? $this->data['discount'] : '';\n\n\n\t\t\t\t\t\t\t\tif (!is_numeric($h_item_id)) {\n\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. item id is invalid\");\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($food_info = Yii::app()->functions->getFoodItem($h_item_id)) {\n\t\t\t\t\t\t\t\t\tif ($food_info['merchant_id'] == $this->data['merchant_id']) {\n\n\t\t\t\t\t\t\t\t\t\t$item_discount = $food_info['discount'];\n\t\t\t\t\t\t\t\t\t\t$item_price = json_decode($food_info['price'], true);\n\t\t\t\t\t\t\t\t\t\tif (count($item_price) <= 1 && is_numeric($h_price)) {\n\n\t\t\t\t\t\t\t\t\t\t\tforeach ($item_price as $item_price_val) {\n\t\t\t\t\t\t\t\t\t\t\t\t$original_price = $item_price_val;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif ($food_info['two_flavors'] == 2) {\n\t\t\t\t\t\t\t\t\t\t\t\t//echo '2 flavor';\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($original_price != $h_price) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Price has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t//dump(\"WITH SIZE\");\t \t\t\t\t\t \t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif (is_numeric($h_price)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$item_price_original = isset($item_price[0]) ? $item_price[0] : '';\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_numeric($item_price_original)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($h_price != $item_price_original) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Price has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($this->data['two_flavors'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->data['two_flavors'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif ($this->data['two_flavors'] != 2) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!empty($h_price)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h_price = explode(\"|\", $h_price);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!is_array($h_price) && count($h_price) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Price has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$h_size_id = isset($h_price[2]) ? $h_price[2] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$h_price_added = isset($h_price[0]) ? $h_price[0] : '';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t$item_price_original = isset($item_price[$h_size_id]) ? $item_price[$h_size_id] : '';\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($item_price_original != $h_price_added) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Price has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t/*CHECK DISCOUNT*/\n\t\t\t\t\t\t\t\t\t\t/*dump(\"discount=>$item_discount\");\n\t \t\t dump(\"h_discount=>$h_discount\");*/\n\n\t\t\t\t\t\t\t\t\t\tif ($h_discount > 0.001) {\n\t\t\t\t\t\t\t\t\t\t\tif ($h_discount != $item_discount) {\n\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Discount has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tif ($item_discount >= 0.001) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($h_discount != $item_discount) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Discount has been tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. Food item id is belong to another merchant\");\n\t\t\t\t\t\t\t\t\t\treturn;\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$this->msg = t(\"Failed. Food item id is tampered\");\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/*CHECK SUB ITEM PRICE*/\n\t\t\t\t\t\t\t\t//dump($this->data['sub_item']);\n\t\t\t\t\t\t\t\tif (isset($this->data['sub_item'])) {\n\t\t\t\t\t\t\t\t\tif (is_array($this->data['sub_item']) && count($this->data['sub_item']) >= 1) {\n\t\t\t\t\t\t\t\t\t\tforeach ($this->data['sub_item'] as $h_sub_item) {\n\n\t\t\t\t\t\t\t\t\t\t\tif (is_array($h_sub_item) && count($h_sub_item) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($h_sub_item as $h_sub_item_val) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$hh_sub_item = explode(\"|\", $h_sub_item_val);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (is_array($hh_sub_item) && count($hh_sub_item) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h_sub_item_id = isset($hh_sub_item[0]) ? $hh_sub_item[0] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$h_sub_item_price = isset($hh_sub_item[1]) ? $hh_sub_item[1] : '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/*dump(\"h_sub_item_id=>$h_sub_item_id\");\n\t\t\t\t \t\t\t \tdump(\"h_sub_item_price=>$h_sub_item_price\");*/\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($sub_item_info = FunctionsV3::getAddonItem($h_sub_item_id)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($h_sub_item_price != $sub_item_info['price']) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. addon item price is tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. addon id is tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->msg = t(\"Failed. addon item price is tampered\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\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/*END VALIDATE IF PRICE IS HACK */\n\n\n\t\t\t\t\t\t\t/*remove sub item with no values*/\n\t\t\t\t\t\t\t$enabled_select_addon = TRUE;\n\t\t\t\t\t\t\tif ($enabled_select_addon == TRUE) {\n\t\t\t\t\t\t\t\tif (isset($this->data['sub_item'])) {\n\t\t\t\t\t\t\t\t\tif (is_array($this->data['sub_item']) && count($this->data['sub_item']) >= 1) {\n\t\t\t\t\t\t\t\t\t\tforeach ($this->data['sub_item'] as $key_subitem => $sub_item_val) {\n\t\t\t\t\t\t\t\t\t\t\tif (count($this->data['sub_item'][$key_subitem]) <= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t//if ($sub_item_val[0]==\"0\" || empty($sub_item_val[0])){\n\t\t\t\t\t\t\t\t\t\t\t\tif (isset($sub_item_val[0])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($sub_item_val[0] == \"0\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tunset($this->data['sub_item'][$key_subitem]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*dump($this->data);\n\t \tdie();\t*/\n\n\t\t\t\t\t\t\t/** two flavor pizza */\n\t\t\t\t\t\t\tif (!isset($this->data['two_flavors'])) {\n\t\t\t\t\t\t\t\t$this->data['two_flavors'] = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ($this->data['two_flavors'] == 2) {\n\n\t\t\t\t\t\t\t\t$merchant_two_flavor_option = getOption($this->data['merchant_id'], 'merchant_two_flavor_option');\n\n\t\t\t\t\t\t\t\t$two_flavor_price = '';\n\t\t\t\t\t\t\t\tif (is_array($this->data['sub_item']) && count($this->data['sub_item']) >= 1) {\n\t\t\t\t\t\t\t\t\t$price = array();\n\t\t\t\t\t\t\t\t\tforeach ($this->data['sub_item'] as $key => $val) {\n\t\t\t\t\t\t\t\t\t\tif (isset($val[0])) {\n\t\t\t\t\t\t\t\t\t\t\t$t = explode(\"|\", $val[0]);\n\t\t\t\t\t\t\t\t\t\t\tif ($t[3] == \"right\" || $t[3] == \"left\") {\n\t\t\t\t\t\t\t\t\t\t\t\t$price[$key] = $t[1];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$highest_price = 0;\n\n\t\t\t\t\t\t\t\t\tif ($merchant_two_flavor_option == 2) {\n\t\t\t\t\t\t\t\t\t\tif (is_array($price) && count($price) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t$sum_up = 0;\n\t\t\t\t\t\t\t\t\t\t\tforeach ($price as $price_val) {\n\t\t\t\t\t\t\t\t\t\t\t\t$sum_up += $price_val;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif ($sum_up > 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t$highest_price = $sum_up / 2;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$highest_price = max($price);\n\t\t\t\t\t\t\t\t\t\t$highest_key = array_search($highest_price, $price);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$this->data['price'] = $highest_price;\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/** two flavor pizza */\n\n\t\t\t\t\t\t\t//unset($_SESSION['kr_item']);\n\t\t\t\t\t\t\t$this->msg = t(\"Food Item added to cart\");\n\t\t\t\t\t\t\tif (isset($this->data['item_id'])) {\n\t\t\t\t\t\t\t\t$item = $this->data;\n\t\t\t\t\t\t\t\t//dump($item); die();\n\n\t\t\t\t\t\t\t\t/** check if item is taxable*/\n\t\t\t\t\t\t\t\tif ($food_info = Yii::app()->functions->getFoodItem($item['item_id'])) {\n\t\t\t\t\t\t\t\t\t$item['non_taxable'] = $food_info['non_taxable'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tunset($item['action']);\n\t\t\t\t\t\t\t\tif (is_numeric($this->data['row'])) {\n\t\t\t\t\t\t\t\t\t$row = $this->data['row'] - 1;\n\t\t\t\t\t\t\t\t\t$_SESSION['kr_item'][$row] = $item;\n\t\t\t\t\t\t\t\t\t$this->msg = t(\"Cart updated\");\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$addon_ids = array();\n\t\t\t\t\t\t\t\t\tif (!isset($item['sub_item'])) {\n\t\t\t\t\t\t\t\t\t\t$item['sub_item'] = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (is_array($item['sub_item']) && count($item['sub_item']) >= 1) {\n\t\t\t\t\t\t\t\t\t\tforeach ($item['sub_item'] as $sub_item) {\n\t\t\t\t\t\t\t\t\t\t\tforeach ($sub_item as $sub_item1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$t = explode(\"|\", $sub_item1);\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_array($t) && count($t) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$addon_ids[] = $t[0];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (is_array($addon_ids) && count($addon_ids) >= 1) {\n\t\t\t\t\t\t\t\t\t\t$item['addon_ids'] = $addon_ids;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//dump($item);\t \t\t\t\n\t\t\t\t\t\t\t\t\t//die();\n\n\t\t\t\t\t\t\t\t\t$found = false;\n\t\t\t\t\t\t\t\t\t$found_key = '';\n\t\t\t\t\t\t\t\t\tif (!isset($_SESSION['kr_item'])) {\n\t\t\t\t\t\t\t\t\t\t//$_SESSION['kr_item']='';\t \t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$_SESSION['kr_item'] = array();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (is_array($_SESSION['kr_item']) && count($_SESSION['kr_item']) >= 1) {\n\t\t\t\t\t\t\t\t\t\t$x = 0;\n\t\t\t\t\t\t\t\t\t\tforeach ($_SESSION['kr_item'] as $key => $val) {\n\t\t\t\t\t\t\t\t\t\t\tif ($val['item_id'] == $item['item_id']) {\n\t\t\t\t\t\t\t\t\t\t\t\t$found_key = $key;\n\n\t\t\t\t\t\t\t\t\t\t\t\t$notes = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif ($item['notes'] == $val['notes']) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$notes = true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t//dump($val);\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t/** check cooking_ref*/\n\t\t\t\t\t\t\t\t\t\t\t\t$cooking_ref = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($val['cooking_ref'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$val['cooking_ref'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($item['cooking_ref'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$item['cooking_ref'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif ($item['cooking_ref'] == $val['cooking_ref']) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cooking_ref = true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t/*check size*/\n\t\t\t\t\t\t\t\t\t\t\t\t$item_size = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif ($item['price'] == $val['price']) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$item_size = true;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t/** ingredients*/\n\t\t\t\t\t\t\t\t\t\t\t\t$ingredients = false;\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($item['ingredients'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$item['ingredients'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($val['ingredients'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$val['ingredients'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_array($item['ingredients']) && count((array) $item['ingredients']) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (count((array) $val['ingredients']) >= count((array) $item['ingredients'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$compare = array_diff((array) $val['ingredients'], (array) $item['ingredients']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (count($compare) <= 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ingredients = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($val['ingredients'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$val['ingredients'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$compare = array_diff((array) $val['ingredients'], (array) $item['ingredients']);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (count($compare) <= 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ingredients = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t/** addon */\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($item['addon_ids'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$item['addon_ids'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($val['addon_ids'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$val['addon_ids'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (is_array($item['addon_ids']) && count($item['addon_ids']) >= 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (count((array) $val['addon_ids']) >= count((array) $item['addon_ids'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$compare = array_diff((array) $val['addon_ids'], (array) $item['addon_ids']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (count($compare) <= 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($cooking_ref == TRUE && $ingredients == TRUE && $item_size == TRUE && $notes == TRUE) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isset($val['addon_ids'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$val['addon_ids'] = '';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t$compare = array_diff((array) $val['addon_ids'], (array) $item['addon_ids']);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (count($compare) <= 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($cooking_ref == TRUE && $ingredients == TRUE && $item_size == TRUE && $notes == TRUE) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}/* end foreach*/\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t/*if ( $found==false){\n\t \t\t\t\techo 'false';\n\t \t\t\t} else echo \"true=>$found_key\";\t \t\t\t\t \n\t \t\t\tdie(); */\n\n\t\t\t\t\t\t\t\t\t//dump($item); die();\n\n\t\t\t\t\t\t\t\t\tif ($found == false) {\n\t\t\t\t\t\t\t\t\t\t$_SESSION['kr_item'][] = $item;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$_SESSION['kr_item'][$found_key]['qty'] += $item['qty'];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//dump($_SESSION['kr_item']) ;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$this->code = 1;\n\t\t\t\t\t\t\t} else $this->msg = Yii::t(\"default\", \"Item id is required\");\n\t\t\t\t\t\t}", "title": "" }, { "docid": "d4dcb76c9ce013be75174f3dcf0bf80a", "score": "0.546923", "text": "function getRealIpUser(){\n\n switch(true){\n\n case(!empty($_SERVER['HTTP_X_REAL_IP'])) : return $_SERVER['HTTP_X_REAL_IP'];\n case(!empty($_SERVER['HTTP_CLIENT_IP'])) : return $_SERVER['HTTP_CLIENT_IP'];\n case(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) : return $_SERVER['HTTP_X_FORWARDED_FOR'];\n\n default : return $_SERVER['REMOTE_ADDR'];\n\n }\n}", "title": "" }, { "docid": "f000fea22e039e7aacff632d2a64bfbd", "score": "0.54628736", "text": "function getRealIpUser(){\n \n switch(true){\n \n case(!empty($_SERVER['HTTP_X_REAL_IP'])) : return $_SERVER['HTTP_X_REAL_IP'];\n case(!empty($_SERVER['HTTP_CLIENT_IP'])) : return $_SERVER['HTTP_CLIENT_IP'];\n case(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) : return $_SERVER['HTTP_X_FORWARDED_FOR'];\n \n default : return $_SERVER['REMOTE_ADDR'];\n \n }\n \n}", "title": "" }, { "docid": "7a3a97ce605f3d625fbf2102e0ec2a73", "score": "0.545539", "text": "function show_cart(){ \n\t\tfor (@reset($_SESSION[\"container\"]); list($i) = @each($_SESSION[\"container\"]);){ // walk through the cart\n\t\t\techo \"<table width=\\\"97%\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" align=\\\"center\\\" cellpadding=\\\"10\\\">\n <tr>\n <td width=\\\"80%\\\" height=\\\"14\\\"><table width=\\\"100%\\\" border=\\\"0\\\">\n <tr>\n <td width=\\\"71%\\\" height=\\\"14\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\" size=\\\"2\\\"><div id='change$i'>\".$_SESSION[\"container\"][$i][\"count\"].\" Items of</div> <b>\".$_SESSION[\"container\"][$i][\"name\"].\" (\".$_SESSION[\"container\"][$i][\"price\"].\"&euro;)</b> <br>\"; \n\t\t\t\t\t\t\t\tif(isset($_SESSION[\"container\"][$i][\"type\"])&&$_SESSION[\"container\"][$i][\"type\"]!=NULL){\n echo \"Version : \".$_SESSION[\"container\"][$i][\"type\"];\n\t\t\t\t\t\t\t\t}\n echo \"</font></td>\n <td width=\\\"29%\\\" height=\\\"14\\\">&nbsp;</td>\n </tr>\n </table></td>\n <td width=\\\"20%\\\" height=\\\"14\\\"><div align=\\\"center\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\"><font size=\\\"2\\\"><b>\".$_SESSION[\"container\"][$i][\"price\"]*$_SESSION[\"container\"][$i][\"count\"].\" EUR</b></font></font></font></div></td>\n </tr>\n <tr style=\\\"border-bottom : solid 1px #666666\\\">\n <td style=\\\"border-bottom : solid 1px #666666\\\" width=\\\"80%\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\" size=\\\"2\\\">VAT \n (\".$_SESSION[\"container\"][$i][\"vat\"].\") </font></td>\n <td style=\\\"border-bottom : solid 1px #666666\\\" width=\\\"20%\\\"><div align=\\\"center\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\" size=\\\"2\\\">\".$this->sub_total($i,$_SESSION[\"container\"][$i][\"vat\"]).\" \n EUR </font></div></td>\n </tr><tr align=center><td colspan=2 align=center></td></tr>\";\n\t\t\t}\n\t\techo \"<script language=JavaScript>\\n\n\t\t\t\tfunction createRequestObject(){\n\t\t\t\t\tvar request_;\n\t\t\t\t\tvar browser = navigator.appName;\n\t\t\t\t\tif(browser == \\\"Microsoft Internet Explorer\\\"){\n\t\t \t\t\t\trequest_ = new ActiveXObject(\\\"Microsoft.XMLHTTP\\\");\n\t\t\t\t\t}else{\n\t\t \t\t\t\trequest_ = new XMLHttpRequest();\n\t\t\t \t}\n\t\t\t\t\treturn request_;\n\t\t\t\t}\n\t\t\t\tvar http = createRequestObject();\n\t\t\t\tfunction Call(url){\n\t\t\t\t\t//alert(url);\t\n\t\t\t\t\thttp.open('get',url); \n\t\t\t\t\thttp.onreadystatechange = handle_call;\n\t\t\t\t\thttp.send(null);\t\n\t\t\t\t}\n\t\t\t\tfunction handle_call(){\n\t\t\t\t\tif(http.readyState == 4)\n\t\t\t\t\t{\n\t\t \t\t\t\tvar response = http.responseText;\n\t\t \t\t\t\tdocument.getElementById('display_cart').innerHTML = response;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</script>\";\n\t\t\tif(count($_SESSION[\"container\"])>0){\n echo \"<tr>\n <td style=\\\"border-bottom : solid 1px #666666\\\" width=\\\"80%\\\" height=\\\"34\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\" size=\\\"2\\\"><b>Total \n TTC</b></font></td>\n <td style=\\\"border-bottom : solid 1px #666666\\\" width=\\\"20%\\\" height=\\\"34\\\"><div align=\\\"center\\\"><font face=\\\"Arial, Helvetica, sans-serif\\\" size=\\\"2\\\"><b> \".$this->total().\"\n EUR</b></font></div></td>\n </tr>\";}else{\n echo \"<tr><td colspan=2> Sorry there is no products in cart ...</td></tr>\";\n }\n \n echo \"</table>\";\n\t}", "title": "" }, { "docid": "01c54ad39ef7b85594b6120686ae4ad7", "score": "0.54517865", "text": "function getIpCustomer(){\n$ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $ipaddress = getenv('REMOTE_ADDR');\n else\n $ipaddress = 'IP Tidak Dikenali';\n \n return $ipaddress;\n}", "title": "" }, { "docid": "8c6c30c25ce1fcefba0414b27f9ae3aa", "score": "0.544981", "text": "function set_cart(){\n if(empty($_SESSION['shopping_cart'])) {\n $_SESSION['shopping_cart'] = array();\n array_push($_SESSION['shopping_cart'], $_POST);\n header(\"Location: /views/checkout/shopping_cart.php\");\n exit();\n } \n else {\n foreach($_SESSION['shopping_cart'] as $item_key => $item_value):\n /*\n If user is adding the same product_sku && product_color => ADD the quantity\n */\n if(\n $_SESSION['shopping_cart'][$item_key]['product_sku'] === $_POST['product_sku']\n && \n $_SESSION['shopping_cart'][$item_key]['product_color'] === $_POST['product_color']\n ){\n $current = $_SESSION['shopping_cart'][$item_key]['user_quantity'];\n $update = $_POST['user_quantity'];\n $new_quantity = $current + $update;\n $_SESSION['shopping_cart'][$item_key]['user_quantity'] = $new_quantity;\n get_cart();\n /*header(\"Location: /views/checkout/shopping_cart.php\");\n exit();*/\n }\n endforeach;\n array_push($_SESSION['shopping_cart'], $_POST);\n get_cart();\n }\n \n }", "title": "" }, { "docid": "03efd8e6cdee0b6f482ce7297d1ee37c", "score": "0.5448269", "text": "public function grabShoppingCart()\n\t{\n\t\t#grab all the items in my cart and grab data for each one\n\t\t$this->DB->build( array( \t'select'\t=> 'ec.*',\n\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'eco_cart' => 'ec' ),\n\t\t\t\t\t\t\t\t\t'group'\t\t=> 'ec.c_id',\n\t\t\t\t\t\t\t\t\t'order'\t\t=> 'ec.c_type',\n\t\t\t\t\t\t\t\t\t'where' \t=> 'ec.c_member_id = ' . $this->memberData['member_id'],\n\t\t\t\t\t\t\t\t\t'add_join'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t0 => array( 'select' \t=> 'eb.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'eco_banks' => 'eb' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> \"eb.b_id = ec.c_type_id and ec.c_type='bank'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t1 => array( 'select' \t=> 'ecc.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'eco_credit_cards' => 'ecc' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> \"ecc.cc_id = ec.c_type_id and ec.c_type='cc'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 'select' \t=> 'es.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'eco_stocks' => 'es' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> \"es.s_id = ec.c_type_id and ec.c_type='stock'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'select' \t=> 'elt.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'eco_long_terms' => 'elt' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> \"elt.lt_id = ec.c_type_id and ec.c_type='lt'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\n,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'select' \t=> 'esi.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'eco_shop_items' => 'esi' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> \"esi.si_id = ec.c_type_id and ec.c_type='shopitem'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\t\t);\n\t\t$this->DB->execute();\t\n\t}", "title": "" }, { "docid": "fb00b2f8cb823db8b61fd872378f278e", "score": "0.54462117", "text": "function cart(){\n\t\t\n\t\t\n\tif(isset($_GET['add_cart'])){\n\t\n\tglobal $con;\n\t$ip=getIp();\n\t$pro_id= $_GET['add_cart'];\t\n\t$check_pro =\"select * from cart where ip_add='$ip' AND p_id='$pro_id'\";\t\n\t$run_check=mysqli_query($con, $check_pro);\t\n\tif(mysqli_num_rows($run_check)>0){\n\t\t\n\t\techo \" \";\n\t}\n\telse{\n\t\t\t$insert_pro= \"insert into cart (p_id,ip_add) values('$pro_id','$ip')\";\n\t\t\t$run_pro = mysqli_query($con, $insert_pro);\n\t\t\t\n\t\t\techo \"<script>window.open('sales.php','_self')</script>\";\n\t}\n\t}\n\t\t\n}", "title": "" }, { "docid": "f07c7b2dcc6e8a89434353e4ee9b1bdc", "score": "0.544198", "text": "function func_taxcloud_lookup_tax($customerID, $products, $origin, $destination, $shipping, &$errMsg) {\n\tglobal $client;\n\n\tif(is_null($origin)) return -1;\n\n\n\t// These address checks are sometimes needed to ensure that the user has logged in. This may not be necessary for your cart.\n\tif(is_null($destination)) return -1; \n\n\tif(!is_null($origin) && !is_null($destination)) {\n\n\t\t$cartItems = Array();\n\n\t\t$index = 0;\n\n\n\t\tforeach ($products as $k => $product) {\n\n\t\t\t$cartItem = new CartItem();\n\n\t\t\t$cartItem->setItemID($product['productid']); //change this to how your cart stores the product ID\n\t\t\t$cartItem->setIndex($index); // Each cart item must have a unique index\n\n\t\t\t$tic = $product['tic']; //func_taxcloud_get_tic($match[0]);\n\t\t\tif(!$tic) {\n\t\t\t\t//no TIC has been assigned to this product, use default\n\t\t\t\t$tic = \"00000\";\n\t\t\t}\n\n\t\t\t$cartItem->setTIC(\"00000\");\n\n\t\t\t$price = $product['price']; // change this to how your cart stores the price for the product\n\n\t\t\t$cartItem->setPrice($price); // Price of each item\n\t\t\t$cartItem->setQty($product['qty']); // Quantity - change this to how your cart stores the quantity\n\n\t\t\t$cartItems[$index] = $cartItem;\n\n\t\t\t$index++;\n\n\t\t}\n\n\t\t//Shipping as a cart item - shipping needs to be taxed\n\t\t$cartItem = new CartItem();\n\t\t$cartItem->setItemID('shipping');\n\t\t$cartItem->setIndex($index);\n\t\t$cartItem->setTIC(\"11010\");\n\t\t$cartItem->setPrice($shipping); // The shipping cost from your cart\n\t\t$cartItem->setQty(1);\n\t\t$cartItems[$index] = $cartItem;\n\n\t\t// Here we are loading a stored exemption certificate. You will probably want to allow the user to select from a list\n\t\t// of stored exemption certificates and pass that certificate into this method. \n\t\t//$exemptCert = func_taxcloud_get_exemption_certificates($customerID);\n\n\t\t$params = array( \"apiLoginID\" => TAXCLOUD_API_ID,\n\t\t\t\t \"apiKey\" => TAXCLOUD_API_KEY,\n\t\t\t\t \"customerID\" => $customerID,\n\t\t\t\t \"cartID\" => $_SESSION['session_id'],\n\t\t\t\t \"cartItems\" => $cartItems,\n\t\t\t\t \"origin\" => $origin,\n\t\t\t\t \"destination\" => $destination,\n\t\t\t\t \"deliveredBySeller\" => FALSE\n\t\t);\n\t\t\n \n //var_dump($params);\n\n\t\t//Call the TaxCloud web service\n\t\ttry {\n\n\t\t\t$lookupResponse = $client->lookup( $params );\n\n\t\t} catch (Exception $e) {\n\n\t\t\t//retry\n\t\t\ttry {\n\t\t\t\t$lookupResponse = $client->lookup( $params );\n\t\t\t} catch (Exception $e) {\n\n\t\t\t\t$errMsg[] = \"Try - 1: Error encountered looking up exemption certificates \".$e->getMessage();\n\n\t\t\t\t//irreparable, return\n\t\t\t\t//Handle the error appropriately \n\t\t\t\t//return -1;\n\t\t\t}\n\t\t}\n \n //var_dump($lookupResponse);\n\n\t\t$lookupResult = $lookupResponse->{'LookupResult'};\n \n //var_dump($lookupResult);\n\n\t\tif($lookupResult->ResponseType == 'OK' || $lookupResult->ResponseType == 'Informational') {\n\t\t\t$cartItemsResponse = $lookupResult->{'CartItemsResponse'};\n\t\t\t$cartItemResponse = $cartItemsResponse->{'CartItemResponse'};\n\t\t\t$taxes = Array();\n\t\t\t$index = 0;\n\n\t\t\t//response may be an array\n\t\t\tif ( is_array($cartItemResponse) ) {\n\t\t\t\tforeach ($cartItemResponse as $c) {\n\t\t\t\t\t$amount = ($c->TaxAmount);\n\t\t\t\t\t$taxes[$index] = $amount;\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$amount = ($cartItemResponse->TaxAmount);\n\t\t\t\t$taxes[0] = $amount;\n\t\t\t}\n\t\t\t\n\t\t\t// Here you will need to determine what to do with the results. Usually you would return\n\t\t\t// the tax array and assign the tax amount to each item in the cart and then recalculate \n\t\t\t// the totals. Here we are just returning the total tax amount.\n\n\t\t\treturn array_sum($taxes);\n\n\t\t} else {\n\t\t\t$errMsgs = $lookupResult->{'Messages'};\n //var_dump($errMsgs);\n\t\t\tforeach($errMsgs as $err) {\n\t\t\t\t$errMsg[] = \"Try 2: Error encountered looking up tax amount \".$err->{'Message'};\n\t\t\t}\n\t\t\t\n\t\t\t//Handle the error appropriately \n\t\t}\n\t} else {\n\n\t\treturn -1;\n\t}\n}", "title": "" }, { "docid": "8d2e9ac794e0ecb3f58662bc741eb6b4", "score": "0.54419744", "text": "function total_items(){\n if(isset($_GET['add_cart'])){\n global $con;\n $ip = getIp();\n $get_items =\"select * from cart where ip_add='$ip'\";\n $run_items = mysqli_query($con, $get_items);\n $count_items = mysqli_num_rows($run_items);\n \n }\n \n else {\n\t\t$ip = getIp();\n\t\t$get_items =\"select * from cart where ip_add='$ip'\";\n\t\t$run_items = mysqli_query($con, $get_items);\n\t\t$count_items = mysqli_num_rows($run_items);\n }\n\techo $count_items;\n}", "title": "" }, { "docid": "628025fb81c566a1623b88fd25e2d691", "score": "0.54265916", "text": "function total_price(){\n\t\t \n\t\t $total = 0;//initial price by default to avoid error display when the total price is empty\n\t\t \n\t\t global $con;\n\t\t \n\t\t $ip = getIp(); \n\t\t \n\t\t $sel_price = \"select * from cart where ip_add ='$ip'\";\n\t\t \n\t\t $run_price = mysqli_query($con, $sel_price);\n\t\t \n\t\t while($p_price=mysqli_fetch_array($run_price)){\n\t\t\t \n\t\t\t $pro_id = $p_price['p_id']; //getting the p_id of each item he/she add_to_cart\n\t\t\t \n\t\t\t $pro_price =\"select * from products where product_id='$pro_id'\"; //using the product_id='$pro_id' to look for all the item and each price tag in our all products table\n\t\t\t \n\t\t\t $run_pro_price = mysqli_query($con, $pro_price);\n\t\t\t \n\t\t\t while ($pp_price = mysqli_fetch_array($run_pro_price)){\n\t\t\t\t \n\t\t\t$product_price =array($pp_price['product_price']); //we used array bcos the product_price might b morethaan one some time\n\t\t\t\n\t\t\t$values =array_sum($product_price); //therefore the array_sum function sum up all the prices in the array\n\t\t\t\n\t\t\t$total += $values; //here ' we incatinating the initial price plus total_sum \n\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 }\n\t\t \n\t\techo\"$\" .$total; \n\t\t \n\t\t \n\t }", "title": "" }, { "docid": "650044d29c50e5b19cb8e532a3065042", "score": "0.5421965", "text": "function cartList($db,$user){\r\n\t\t$data = $db->getCart($user);\r\n\t\t$total = 0;\r\n\t\tforeach($data as $row){\r\n\t\techo \"<div>\";\r\n\t\techo \"<h2>{$row['ProductName']}</h2>\";\r\n\t\techo \"<p>Price: {$row['Price']}</p>\";\r\n\t\tif($row['SalePrice'] == 0){\r\n\t\t\t$total = $row['Price'] + $total;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$percent = $row['SalePrice'] /100;\r\n\t\t\t$total = ($row['Price'] - ($row['Price'] * $percent)) + $total;\r\n\t\t}\r\n\t\t\r\n\t\techo \"<hr />\";\r\n\t\techo \"</div>\";\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn $total;\r\n\t}", "title": "" }, { "docid": "b6337d26c3405568cff539cbe5588242", "score": "0.54214865", "text": "function total_items(){\n\n\n if(isset($_GET['add_cart'])){\n\n\n \tglobal $con;\n\n \t$ip = getIp();\n\n \t$get_items= \"select * from carts where ip_add = '$ip'\";\n\n \t$run_items= mysqli_query($con,$get_items);\n\n \t$count_items = mysqli_num_rows($run_items);\n\n }\n\n else{\n \n global $con;\n\n\n \t$ip = getIp();\n\n \t$get_items= \"select * from carts where ip_add = '$ip'\";\n\n \t$run_items= mysqli_query($con,$get_items);\n\n \t$count_items = mysqli_num_rows($run_items);\n\n }\n\n\n echo $count_items;\n}", "title": "" }, { "docid": "f2ad8b49b233ce107abde3341f9edd5e", "score": "0.5420993", "text": "function item($item,$bits=array(),$key=0,$imgserver=\"$\") {\n $t=explode(\",\",$item[4]);\n $p=unserialize($item[3]);\n $amount=(int)($item[6]/GRAMS);\n $price=$item[5]/COINS;\n $outt=array(\"id\"=>$item[0],\"art\"=>$item[1],\"name\"=>$item[2],\"price_view\"=>$item[7],\"visual\"=>$key);\n $outt[\"bits\"]=$bits;\n if($amount==0) $outt['outofstock']=1;\n else if($amount<0) $outt['anyamount']=1;\n else $outt['amount']=$amount;\n if($price==0) $outt['noprice']=1;\n else if($price<0) $outt['ondemand']=1;\n else $outt['price']=$price;\n if(isset($p['descr'])) $outt[\"descr\"]=$p['descr'];\n $outt[\"addtobasket\"]=\"0\"; \n if(isset($_SESSION['basket'])) {\n $outt[\"addtobasket\"]=\"1\";\n if(q_(\"SELECT * FROM `basket` WHERE `art`='\".$item[0].\"' AND `user`='\".mysql_real_escape_string($_SESSION['basket']).\"'\",-1)) $outt[\"inbasket\"]=\"1\";\n } \n foreach($t as $t1) $outt[\"img\"][]=str_replace(\"$\",$t1,$imgserver);\n return($outt);\n}", "title": "" }, { "docid": "ca8690b16a06f271ff52c950a6baf031", "score": "0.5404975", "text": "function add_item($cart_id, $product, $quantity) \n\t\t{ \n\t\t\t// check quantity of product already in shopping cart\n\t\t\t$qty = check_item($cart_id, $product);\n\t\t\t// add new quanity to previously ordered quantity\n\t\t\t$quantity +=$qty;\n\t\t\t\n\t\t\t// make sure there is enough inventory to match quantity ordered\n\t\t\t$sql =\"SELECT inventory.qty, inventory.title, band.bandName FROM inventory, band WHERE inventory.pid= {$product} AND inventory.bandName = band.id\";\n\t\t\t//$result = mysqli_query($connect, $sql) or die(\"Could not query the shopping cart db.\");<br />\n\t\t\t$result = mysqli_query($connect, $sql);\n\t\t\t\n\t\t\twhile($row = mysqli_fetch_array($result))\n\t\t\t{\t\t\t\t\n\t\t\t\t// if the total quantity ordered is greater than inventory\n\t\t\t\t// fail and inform customer\n\t\t\t\tif ($quantity > $row['qty'])\n\t\t\t\t{\n\t\t\t\t\tprint \"<html><head><link rel='stylesheet' type='text/css' href='../style.css'><script language='JavaScript' src='../javascript/formVal.js'></script></head><body bgcolor='#000000' leftmargin=75 marginwidth=75 topmargin=35 marginheight=35 background='../art/skullBackground.jpg' onLoad=\\\"preloadImages('../art/swapImages/back_over.gif')\\\"><b>Sorry, we don't have the inventory to meet your order at this time</b>.<br>There are only {$row['qty']} of {$row['bandName']} :: {$row['title']} left in stock.<br>Please go back try a smaller quantity.<br><br><a href='javascript:history.back();' onMouseOut=\\\"swapImgRestore()\\\" onMouseOver=\\\"swapImage('back','','../art/swapImages/back_over.gif',1)\\\"><img src='../art/swapImages/back.gif' alt=':: back' name='back' width=70 height=26 border=0></a><br><br>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t// if there wasn't a qty of this product already in the shopping cart\n\t\t\tif ($qty ==0)\n\t\t\t{\n\t\t\t\t$sql = \"INSERT INTO shoppingCart (session, product, qty) VALUES ('{$cart_id}', {$product}, {$quantity})\";\n\t\t\t\t//mysqli_query($connect, $sql) or die(\"Could not insert item into shopping cart db.\");\n\t\t\t\tmysqli_query($connect, $sql);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql = \" UPDATE shoppingCart SET qty={$quantity} WHERE session='{$cart_id}' and product={$product}\";\n\t\t\t\t//mysqli_query($connect, $sql) or die(\"Could not modify item into shopping cart db.\");\n\t\t\t\tmysqli_query($connect, $sql);\n\t\t\t}\n\t\t\t\n\t\t\t//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t// CLEAN HOUSE!!!\n\t\t\t// before leaving, delete all shopping cart items over 4 hours old\n\t\t\t$sql = \"DELETE FROM shoppingCart WHERE (CURRENT_TIMESTAMP() - date > 40000)\";\n\t\t\t//mysqli_query($connect, $sql) or die(\"Could not delete items into shoppingcart db.\");\n\t\t\tmysqli_query($connect, $sql);\n\t\t\t\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "f9316e47b22e1a04b242e067724d6fce", "score": "0.5396326", "text": "static function account_to_session()\n {\n//\\DBG::log(\"account_to_session(): POST: \".var_export($_POST, true));\n if (empty($_POST) || !is_array($_POST)) return;\n//\\DBG::log(\"Shop::account_to_session(): Have POST\");\n foreach ($_POST as $key => $value) {\n $_SESSION['shop'][$key] =\n trim(strip_tags(contrexx_input2raw($value)));\n }\n if ( empty($_SESSION['shop']['gender2'])\n || empty($_SESSION['shop']['lastname2'])\n || empty($_SESSION['shop']['firstname2'])\n || empty($_SESSION['shop']['address2'])\n || empty($_SESSION['shop']['zip2'])\n || empty($_SESSION['shop']['city2'])\n || empty($_SESSION['shop']['phone2'])\n || empty($_SESSION['shop']['countryId2'])\n ) {\n $_SESSION['shop']['equal_address'] = false;\n } elseif (!empty($_POST['equal_address'])) {\n // Copy address\n $_SESSION['shop']['company2'] = $_SESSION['shop']['company'];\n $_SESSION['shop']['gender2'] = $_SESSION['shop']['gender'];\n $_SESSION['shop']['lastname2'] = $_SESSION['shop']['lastname'];\n $_SESSION['shop']['firstname2'] = $_SESSION['shop']['firstname'];\n $_SESSION['shop']['address2'] = $_SESSION['shop']['address'];\n $_SESSION['shop']['zip2'] = $_SESSION['shop']['zip'];\n $_SESSION['shop']['city2'] = $_SESSION['shop']['city'];\n $_SESSION['shop']['phone2'] = $_SESSION['shop']['phone'];\n $_SESSION['shop']['countryId2'] = $_SESSION['shop']['countryId'];\n $_SESSION['shop']['equal_address'] = true;\n }\n if (empty($_SESSION['shop']['countryId'])) {\n // countryId2 is set in Cart::init() already\n $_SESSION['shop']['countryId'] = $_SESSION['shop']['countryId2'];\n }\n // Fill missing arguments with empty strings\n if (empty($_SESSION['shop']['company2'])) $_SESSION['shop']['company2'] = '';\n if (empty($_SESSION['shop']['gender2'])) $_SESSION['shop']['gender2'] = '';\n if (empty($_SESSION['shop']['lastname2'])) $_SESSION['shop']['lastname2'] = '';\n if (empty($_SESSION['shop']['firstname2'])) $_SESSION['shop']['firstname2'] = '';\n if (empty($_SESSION['shop']['address2'])) $_SESSION['shop']['address2'] = '';\n if (empty($_SESSION['shop']['zip2'])) $_SESSION['shop']['zip2'] = '';\n if (empty($_SESSION['shop']['city2'])) $_SESSION['shop']['city2'] = '';\n if (empty($_SESSION['shop']['phone2'])) $_SESSION['shop']['phone2'] = '';\n if (empty($_SESSION['shop']['countryId2'])) $_SESSION['shop']['countryId2'] = 0;\n }", "title": "" }, { "docid": "b05b6cd782ab0877542099e4c4fbe3be", "score": "0.5395991", "text": "function total_items() {\n\n if(isset($_GET['add_cart'])){ // determine if a variable is set \n\n global $db_connection;\n\n $ip = getIp();\n\n $get_items = \"SELECT * FROM cart WHERE ip_add='$ip'\";\n\n $run_items = mysqli_query($db_connection,$get_items); \n \n $count_items = mysqli_num_rows($run_items);\n }\n else { \n\n global $db_connection;\n\n $ip = getIp();\n\n $get_items = \"SELECT * FROM cart WHERE ip_add='$ip'\";\n\n $run_items = mysqli_query($db_connection,$get_items); \n \n $count_items = mysqli_num_rows($run_items);\n\n }\n \n echo $count_items;\n\n }", "title": "" }, { "docid": "e501bca69e7152c90d94fe88fd138b37", "score": "0.53944546", "text": "function get_ip(){\r\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){\r\n\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t} else {\r\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\r\n\t}\r\n\treturn $ip;\r\n}", "title": "" }, { "docid": "d50832da57ba729c988fb78bf883d624", "score": "0.5392615", "text": "function get_ip() {\n /* first, look for an IP address from the server */\n if (!empty($_SERVER[\"REMOTE_ADDR\"]) ) {\n\t$client_ip = $_SERVER[\"REMOTE_ADDR\"]; \n }\n\n /* look for proxy servers */\n if ($_SERVER[\"HTTP_CLIENT_IP\"]) {\n\t$proxy_ip = $_SERVER[\"HTTP_CLIENT_IP\"];\n } else if ($_SERVER[\"HTTP_X_FORWARDED_FOR\"]) {\n\t$proxy_ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"]; \n }\n\n /* look for a real IP address underneath proxies */\n if ($proxy_ip) { \n\tif (preg_match(\"/^([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/\",\n\t $proxy_ip, $ip_list)) {\n\t $private_ip = array(\n\t\t'/^0\\./',\n\t\t'/^127\\.0\\.0\\.1/',\n\t\t'/^192\\.168\\..*/',\n\t\t'/^172\\.16\\..*/',\n\t\t'/^10.\\.*/',\n\t\t'/^224.\\.*/',\n\t\t'/^240.\\.*/',\n\t ); \n\t $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); \n\t} \n } \n return $client_ip;\n}", "title": "" }, { "docid": "9312772bface6a1ee3597bcbc8af5465", "score": "0.53916913", "text": "function addItemToCart($prodId, $productDetails)\n{\n if ($_SESSION['loggedIn'] === true)\n {\n $userId = $_SESSION['userId'];\n $cartId = $_SESSION['cartId'];\n $amount = $_POST['amount'];\n\n $noInStock = getNumberInStock($prodId);\n\n // if the selected amount is higher than the numberInStock, the amount is set to the numberInStock\n if ($amount > $noInStock)\n {\n $amount = $noInStock;\n }\n\n // if the item is already in your cart, update the amount of it instead of creating a new entry\n if (isProductAlreadyInCart($cartId, $prodId, $amount))\n {\n if ($amount > $noInStock) $amount = $noInStock;\n updateAmountInCart($cartId, $prodId, $amount);\n }\n else\n {\n addItem($amount, $noInStock, $prodId, $cartId);\n }\n\n $action = $productDetails['catName'] . 's';\n header(\"Location: ?c=shop&a={$action}#success\");\n }\n else\n {\n // redirect to login if the user wants to add an item to their cart\n header('Location: ?c=account&a=login');\n }\n}", "title": "" }, { "docid": "cd73696663a5d17f319998b6d8f9e362", "score": "0.538942", "text": "function ciniki_customers_sapos_cartItemLookup($ciniki, $tnid, $customer, $args) {\n\n if( !isset($args['object']) || $args['object'] == '' \n || !isset($args['object_id']) || $args['object_id'] == '' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.154', 'msg'=>'No customer specified.'));\n }\n\n //\n // Get the customer settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_customer_settings', 'tnid', $tnid, 'ciniki.customers', 'settings', 'membership');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $customer_settings = $rc['settings'];\n\n $types = array('10'=>'Regular', '20'=>'Student', '30'=>'Individual', '40'=>'Family', 'lifetime'=>'Lifetime');\n\n //\n // Lookup the customer product/membership\n //\n if( $args['object'] == 'ciniki.customers.product' ) {\n $strsql = \"SELECT products.id, \"\n . \"products.name, \"\n . \"products.code, \"\n . \"products.permalink, \"\n . \"products.type, \"\n . \"products.status, \"\n . \"products.flags, \"\n . \"products.unit_amount \"\n . \"FROM ciniki_customer_products AS products \"\n . \"WHERE products.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND products.id = '\" . ciniki_core_dbQuote($ciniki, $args['object_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.customers', array(\n array('container'=>'products', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'code', 'permalink', 'type', 'status', 'flags', \n 'unit_amount',\n ),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.507', 'msg'=>'Membership product not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['products'][0]) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.508', 'msg'=>'Unable to find membership product'));\n }\n $product = array_shift($rc['products']);\n \n //\n // Setup the item details\n //\n $item = array(\n 'id' => $product['id'],\n 'description' => $product['name'],\n 'code' => $product['code'],\n 'flags' => 0x08,\n 'object' => 'ciniki.customers.product',\n 'object_id' => $product['id'],\n 'taxtype_id' => 0,\n 'price_id' => 0,\n 'quantity' => 1,\n 'notes' => '',\n 'unit_amount' => $product['unit_amount'],\n 'unit_discount_amount' => 0,\n 'unit_discount_percentage' => 0,\n );\n\n return array('stat'=>'ok', 'item'=>$item);\n }\n\n //\n // Lookup the requested course offering if specified along with a price_id\n //\n if( $args['object'] == 'ciniki.customers.membership' ) {\n $mtype = $args['object_id'];\n if( isset($customer_settings[\"membership-type-$mtype-active\"]) && $customer_settings[\"membership-type-$mtype-active\"] == 'yes' \n && isset($customer_settings[\"membership-type-$mtype-price\"]) && $customer_settings[\"membership-type-$mtype-price\"] > 0\n && isset($customer_settings[\"membership-type-$mtype-online\"]) && $customer_settings[\"membership-type-$mtype-online\"] == 'yes'\n ) {\n $item = array(\n 'object'=>'ciniki.customers.membership',\n 'object_id'=>$mtype,\n 'price_id'=>0,\n 'description'=>'Membership - ' . $types[$mtype],\n 'limited_units'=>'yes',\n 'units_available'=>1,\n 'unit_amount'=>$customer_settings[\"membership-type-$mtype-price\"],\n 'unit_discount_amount'=>0,\n 'unit_discount_percentage'=>0,\n 'taxtype_id'=>0,\n 'flags'=>0x08, // No quantity item\n );\n return array('stat'=>'ok', 'item'=>$item);\n }\n else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.155', 'msg'=>'No item specified.'));\n }\n }\n\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.customers.156', 'msg'=>'No item specified.'));\n}", "title": "" }, { "docid": "f7bbc48367cfc880217e4d676d2f62bc", "score": "0.53871924", "text": "function get_ip()\n{\t$do_check = 1;\n\t$addrs = array();\n\n\tif( $do_check )\n\t{\n\t\tforeach( array_reverse(explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])) as $x_f )\n\t\t{\n\t\t\t$x_f = trim($x_f);\n\t\t\tif( preg_match('/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/', $x_f) )\n\t\t\t{\n\t\t\t\t$addrs[] = $x_f;\n\t\t\t}\n\t\t}\n\n\t\t$addrs[] = $_SERVER['HTTP_CLIENT_IP'];\n\t\t$addrs[] = $_SERVER['HTTP_PROXY_USER'];\n\t}\n\n\t$addrs[] = $_SERVER['REMOTE_ADDR'];\n\n\tforeach( $addrs as $v )\n\t{\n\t\tif( $v )\n\t\t{\n\t\t\tpreg_match(\"/^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$/\", $v, $match);\n\t\t\t$ip = $match[1].'.'.$match[2].'.'.$match[3].'.'.$match[4];\n\n\t\t\tif( $ip && $ip != '...' )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif( ! $ip || $ip == '...' )\n\t{\n\t\tprint_error(\"Không thể xác định địa chỉ IP của bạn.\");\n\t}\n\n\treturn $ip;\n}", "title": "" }, { "docid": "578035745326fb08ef8a3be87d01b82f", "score": "0.538374", "text": "function total_price() {\n\n\t\t\t\t\t\t$ip_add= getRealIpAddress();\n\n\t\t\t\t\t\tglobal $db;\n\n\n\t\t\t\t\t\t$total= 0;\n\n\t\t\t\t\t\t$sel_price= \"SELECT * from Cart where ip_add='$ip_add'\";\n\n\t\t\t\t\t\t$run_price= mysqli_query($db, $sel_price);\n\n\t\t\t\t\t\twhile($record=mysqli_fetch_array($run_price))\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t$pro_id= $record['p_id'];\n\t\t\t\t\t\t\t$pro_price=\"Select * from Products where Product_id='$pro_id'\";\n\t\t\t\t\t\t\t$run_pro_price= mysqli_query($db,$pro_price);\n\t\t\t\t\t\t\twhile($p_price=mysqli_fetch_array($run_pro_price)) {\n\n\t\t\t\t\t\t\t\t$Product_price = array($p_price['Product_price']);\n\n\t\t\t\t\t\t\t\t$values= array_sum($Product_price);\n\n\t\t\t\t\t\t\t\t$total +=$values;\n\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\techo \"Rs.\" .$total;\n\n\t\t\t\t}", "title": "" }, { "docid": "c85e942607bc8d911942fb9caf3489ca", "score": "0.5378418", "text": "function getCart() {\n return $_SESSION[\"cart\"];\n }", "title": "" }, { "docid": "44892555e64c3b5899f1cbb87af71257", "score": "0.5377202", "text": "function checkout() \n\t{\n\t\t# if items in cart don't have user_id, set.\n\t\t$params = array();\n\t\t$user_id = $this->Session->read(\"Auth.User.user_id\");\n\t\t$session_id = $this->Session->read(\"session_id\"); # Only if session already exists!\n\t\tif ($session_id)\n\t\t{\n\t\t\t$items = $this->CartItem->find('all',array('conditions'=>\"session_id = '$session_id'\"));\n\t\t\tforeach ($items as $item)\n\t\t\t{\n\t\t\t\t$item[\"CartItem\"][\"user_id\"] = $user_id;\n\t\t\t\t$item[\"CartItem\"][\"session_id\"] = \"\";\n\t\t\t\t$this->CartItem->save($item);\n\t\t\t}\n\t\t}\n\t\t$this->set(\"cartItems\", $this->_mycartitems());\n\t}", "title": "" }, { "docid": "18498f4cc8f2cd222239d3110f3e9b26", "score": "0.53753275", "text": "function load_ajax_cart(){\n global $wpdb;\n $cart_data = wpdmpp_get_cart_data();\n $quantity = $discount = $variation = $price = null;\n $cart_items = array();\n foreach($cart_data as $pid=>$cdt){\n extract($cdt);\n if($pid){\n $cart_items[$pid] = get_post($pid,ARRAY_A);\n $cart_items[$pid]['quantity'] = $quantity;\n $cart_items[$pid]['discount'] = $discount;\n $cart_items[$pid]['variation'] = $variation;\n $cart_items[$pid]['price'] = (double)$price;\n\n if(isset($cdt['coupon'])){\n $valid_coupon=check_coupon($pid,$coupon);\n if($valid_coupon!=0){\n $cart_items[$pid]['coupon'] = $coupon;\n $cart_items[$pid]['coupon_discount'] = $valid_coupon;\n }\n else\n $cart_items[$pid]['error'] = __('Coupon does not exist','wpdm-premium-packages');\n }\n }\n }\n $settings = get_option('_wpdmpp_settings');\n $currency_sign = wpdmpp_currency_sign();\n $total_quantity = 0;\n $cart = \"\";\n if(is_array($cart_items) && count($cart_items) > 0) {\n foreach ($cart_items as $item) {\n $prices = 0;\n $variations = \"\";\n if (isset($item['coupon_discount'])) {\n $discount_amount = (($item['coupon_discount'] / 100) * ($item['price'] + $prices) * $item['quantity']);\n } else {\n $discount_amount = \"\";\n $discount_style = \"\";\n $discount_title = \"\";\n }\n if (isset($item['error'])) {\n $coupon_style = \"style='border:1px solid #ff0000;'\";\n $title = $item['error'];\n } else {\n $coupon_style = \"\";\n $title = \"\";\n }\n //filter for adding various message after cart item\n $cart_item_info = \"\";\n $cart_item_info = apply_filters(\"wpdmpp_cart_item_info\", $cart_item_info, $item['ID']);\n $imgurl = \"\";\n $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($item['ID']), array(600, 300));\n $imgurl = $thumb['0'];\n $cart .= \"<div class='media' id='mini_cart_item_{$item['ID']}'><a title='\" . __('Delete cart item', 'wpdm-premium-packages') . \"' class='wpdmpp_cart_delete_item pull-right btn btn-xs btn-danger' href='#' onclick='return wpdmpp_mpp_remove_cart_item($item[ID])'><i class='fa fa-trash-o'></i></a><div class='pull-left'><a href='\" . get_permalink($item['ID']) . \"'><img class='img-circle' src='\" . wpdm_dynamic_thumb($imgurl, array(40, 40)) . \"'></a></div><div class='media-body'><div class='mcwpname'>$item[post_title]</div><strong>\" . $currency_sign . number_format($item['price'] + $prices) . \" &times; \" . $item['quantity'] . \" </strong></div></div>\";\n $total_quantity += $item['quantity'];\n }\n $cart .= \"\n <div class='media'>\n <button class='btn btn-primary btn-sm btn-block' type='button' onclick='location.href=\\\"\" . get_permalink($settings['page_id']) . \"\\\"'>\n <span id='wpdmpp_mini_cart_subtotal'>\" . $currency_sign . wpmpp_get_cart_total() . \"</span> &nbsp; | &nbsp; \" . __(\"Checkout\", \"wpdm-premium-packages\") . \"</button>\n </div>\n <script language='JavaScript'>\n function wpdmpp_mpp_remove_cart_item(id){\n if(!confirm('\".__('Are you sure?','wpdm-premium-packages').\"')) return false;\n jQuery('#mini_cart_item_'+id+' *').css('color','#ccc');\n jQuery.post('\" . home_url('?wpdmpp_remove_cart_item=') . \"'+id\n ,function(res){\n var obj = jQuery.parseJSON(res);\n\n jQuery('#mini_cart_item_'+id).fadeOut().remove();\n\n jQuery('#wpdmpp_mini_cart_subtotal').html(obj.cart_subtotal); });\n return false;\n }\n\n function wpdmpp_update_minicart(event) {\n if (event.origin !== window.location.protocol+'//'+window.location.hostname)\n return;\n\n if(event.data=='cart_updated'){\n jQuery.get('?wpdmupdatecart=1', function(res){\n var data = jQuery.parseJSON(res);\n console.log(data);\n jQuery('.wpdm-mini-cart').html(data.content);\n jQuery('#wpdm-cit').html(data.total);\n jQuery('#wpdm-cic').html(data.items);\n });\n }\n }\n window.addEventListener('message', wpdmpp_update_minicart, false);\n </script>\n \";\n $cart_['content'] = $cart;\n $cart_['items'] = $total_quantity;\n $cart_['total'] = $currency_sign . wpmpp_get_cart_total();\n } else {\n $cart_['content'] = \"<div class='panel panel-default'><div class='panel-body text-danger'>\". __('Cart is Empty !','wpdm-premium-packages').\"</div><div class='panel-footer'><a href='\".wpdmpp_continue_shopping_url().\"' class='btn btn-sm btn-primary'>\".__('Continue Shopping','wpdm-premium-packages').\"</a></div></div>\n\n <script language='JavaScript'>\n function wpdmpp_update_minicart(event) {\n if (event.origin !== window.location.protocol+'//'+window.location.hostname)\n return;\n\n if(event.data=='cart_updated'){\n jQuery.get('?wpdmupdatecart=1', function(res){\n var data = jQuery.parseJSON(res);\n console.log(data);\n jQuery('.wpdm-mini-cart').html(data.content);\n jQuery('#wpdm-cit').html(data.total);\n jQuery('#wpdm-cic').html(data.items);\n });\n }\n }\n window.addEventListener('message', wpdmpp_update_minicart, false);\n </script>\n \";\n $cart_['items'] = 0;\n $cart_['total'] = wpdmpp_currency_sign().\"0.00\";\n }\n return $cart_;\n }", "title": "" }, { "docid": "65899b65a9e5410214fcd0ef30ac665f", "score": "0.53602713", "text": "public function clientHookAfterAddToCart(&$cartItem, &$ecommModule){\n\t}", "title": "" }, { "docid": "d7026faf08eb7ce5284a23965b5b5c00", "score": "0.5353444", "text": "function twoTapPurchase(){\n $_SESSION['twotap_bad_fields']=\"\";\n $cart_id=$_SESSION['twotap_latest_cart_id'];\n $base_path=getcwd();\n $sdk=$base_path.\"/\".drupal_get_path('module','twotapmart').\"/twotap-sdk/twoTap.php\";\n include_once($sdk);\n $field_inputs=get_myfield_inputs();\n $response=purchase_info($cart_id,$field_inputs);\n \n if($response['message']==\"bad_required_fields\"):\n $_SESSION['twotap_bad_fields']=$response['description'].\"<br>\";\n endif;\n\n $_SESSION['twotap_latest_purchase_id']=$response['purchase_id'];\n return $response['purchase_id'];\n}", "title": "" }, { "docid": "e213a037d42bad993042a38a1833bd81", "score": "0.53420734", "text": "function getRealIpAddress(){\n\nif (!empty($_SERVER[\"HTTP_CLIENT_IP\"]))\n{\n //check for ip from share internet\n $ip = $_SERVER[\"HTTP_CLIENT_IP\"];\n}\nelseif (!empty($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\n{\n // Check for the Proxy User\n $ip = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n}\nelse\n{\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n}\nreturn $ip;\n}", "title": "" }, { "docid": "c373497661b85e18bd1a9c9deeaba2d4", "score": "0.53419757", "text": "public function ajax_add_to_cart()\n {\n $json['status'] = 'success';\n\n try\n {\n $this->db->trans_start();\n\n // get currency\n $currency = $this->core_model->get('currency', $this->_currency);\n\n $voucher_id = $this->input->post('voucher_id');\n $quantity = $this->input->post('quantity');\n $name = $this->input->post('name');\n $email = $this->input->post('email');\n $message = $this->input->post('message');\n $type = $this->input->post('type');\n $arr_cart = array();\n\n // get old session cart\n $old_session_cart = ($this->session->userdata('session_cart')) ? $this->session->userdata('session_cart') : '';\n\n $arr_old_cart = ($old_session_cart != '') ? json_decode($old_session_cart) : array();\n $found = 0;\n\n foreach ($arr_old_cart as $key => $old_cart)\n {\n if ($old_cart->voucher_id == $voucher_id)\n {\n continue;\n }\n\n $arr_cart[] = clone $old_cart;\n }\n\n $cart = new stdClass();\n $cart->product_id = 0;\n $cart->quantity = $quantity;\n $cart->voucher_id = $voucher_id;\n $cart->type = $type;\n $cart->name = $name;\n $cart->email = $email;\n $cart->message = $message;\n\n $arr_cart[] = clone $cart;;\n\n $session_cart = json_encode($arr_cart);\n $this->session->set_userdata('session_cart', $session_cart);\n\n $voucher = $this->core_model->get('voucher', $voucher_id);\n\n $price = ceil($voucher->value / $currency->currency_exchange);\n $total = $price * $quantity;\n\n $voucher->price_display = $currency->name . ' ' . number_format($price, 0, ',', '.');\n $voucher->weight_display = 1;\n $voucher->total_display = $currency->name . ' ' . number_format($total, 0, ',', '.');\n $voucher->quantity = $quantity;\n $voucher->image_name = '';\n\n $json['voucher'] = $voucher;\n\n $this->db->trans_complete();\n }\n catch (Exception $e)\n {\n $json['message'] = $e->getMessage();\n $json['status'] = 'error';\n\n if ($json['message'] == '')\n {\n $json['message'] = 'Server error.';\n }\n }\n\n echo json_encode($json);\n }", "title": "" }, { "docid": "c74c552ee9f3002bf8f0ac6c37fab5b7", "score": "0.5340473", "text": "public function setShippingInformation(){\n\t\t\n\t\t$Authorization \t\t=\t$this->request->getHeader('Authorization');\n\t\t$customerId\t\t\t=\t$this->_context->getUserId(); /*get Login user detail*/\n\t\t\n\t\t$user_data \t\t\t=\tjson_decode($this->request->getContent(), true);\n\t\t$user_data['addressInformation']['shippingAddress']['street']\t=\texplode(\"|\", $user_data['addressInformation']['shippingAddress']['street']);\n\t\t$user_data['addressInformation']['billingAddress']['street']\t=\texplode(\"|\", $user_data['addressInformation']['billingAddress']['street']);\n\t\t\n\t\t\n\t\t$ch = curl_init('https://elocal.ae/rest/default/V1/carts/mine/shipping-information');\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($user_data));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t'Content-Type: application/json',\n\t\t\t'Authorization: '.$Authorization,\n\t\t));\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 5);\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n\n\t\t//execute post\n\t\t$result = curl_exec($ch);\n\n\t\t//close connection\n\t\tcurl_close($ch);\n\t\t\n\t\t$json = json_decode($result, true);\n\t\t//echo $customerId; //exit;\n\t\t//echo \"<pre>\"; print_r($result); exit;\n\t\t\n\t\treturn [$json];\n\t\t\n }", "title": "" }, { "docid": "ad21689a36b7c046c3b517760ae176c2", "score": "0.5339389", "text": "public function add_to_cart()\n {\n\n global $wpdb;\n\n $scheme_id = (int)$_POST['scheme_id'];\n\n $session_id = $this->session_id;\n\n $scheme = $this->get_scheme_by_id($scheme_id);\n\n $places_ids = $this->get_places_ids_in_cart_by_scheme_id($scheme_id);\n if ($scheme->purchase_limit > 0 && count($places_ids) >= $scheme->purchase_limit) {\n echo \"limit\";\n die();\n }\n\n $place_in_cart = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM $wpdb->bmm_carts WHERE place_id = %d\", (int)$_POST['seat_id']), ARRAY_A);\n\n if (!empty($place_in_cart)) {\n echo '0';\n die();\n }\n\n $save = $wpdb->insert($wpdb->bmm_carts, array(\n 'session_id' => $session_id,\n 'place_id' => (int)$_POST['place_id'],\n 'seat_id' => (int)$_POST['seat_id'],\n 'date' => date('Y-m-d H:i:s'),\n ), array(\n '%s',\n '%d',\n '%s'\n ));\n\n $this->update_cart_time($session_id, $places_ids);\n\n $update = $this->update_place_status($_POST['place_id'], $_POST['seat_id'], 3);\n\n $this->refresh_shortcode_content();\n die();\n\n }", "title": "" }, { "docid": "700968cc0914deff37872fafc09504d2", "score": "0.53336346", "text": "function _mycartitems()\n\t{\n\t\t$this->CartItem->deleteAll(\"created_date IS NULL OR DATE_ADD(created_date, INTERVAL 15 MINUTE) < NOW()\");\n\n\t\t$conditions = \"\";\n\t\t$anon_session_id = $this->Session->read(\"session_id\");\n\t\t$user_id = $this->Session->read(\"Auth.User.user_id\");\n\t\tif ($anon_session_id) { $conditions .= \"session_id = '$anon_session_id'\"; }\n\t\tif ($user_id) { $conditions .= ($conditions ? \" OR \" : \"\") . \"CartItem.user_id = '$user_id'\"; }\n\n\t\terror_log(\"CART CONDITIONS=$conditions\");\n\n\t\treturn $this->CartItem->find('all', array('conditions'=>$conditions));\n\t}", "title": "" }, { "docid": "dba351dd799fe9cc0dadcf9b54d63c47", "score": "0.53305924", "text": "function demo_insert_link_item_to_cart($item_id = 0)\r\n\t{\r\n\t\t$this->load->library('flexi_cart');\r\n\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\r\n\t\t### Basic Examples ###\r\n\t\t\r\n\t\tif ($item_id == 101)\r\n\t\t{\r\n\t\t\t// Insert an item with the minimum required set of fields.\r\n\t\t\t$cart_data = array('id' => 101, 'name' => 'Item #101, minimum required fields.', 'quantity' => 1, 'price' => 20);\r\n\t\t}\r\n\t\telse if ($item_id == 102)\r\n\t\t{\r\n\t\t\t// Insert multiple items at once.\r\n\t\t\t$cart_data = array(\r\n\t\t\t\tarray('id' => 1021, 'name' => 'Item #1021, multiple items at once.', 'quantity' => 1, 'price' => 22.50),\r\n\t\t\t\tarray('id' => 1022, 'name' => 'Item #1022, multiple items at once.', 'quantity' => 1, 'price' => 35.95),\r\n\t\t\t\tarray('id' => 1023, 'name' => 'Item #1023, multiple items at once.', 'quantity' => 1, 'price' => 16)\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\r\n\t\t### Shipping Examples ###\r\n\t\t\r\n\t\telse if ($item_id == 103)\r\n\t\t{\r\n\t\t\t// Insert an item with free shipping.\r\n\t\t\t$cart_data = array('id' => 103, 'name' => 'Item #103, free shipping.', 'quantity' => 1, 'price' => 19.95, 'shipping_rate' => 0);\r\n\t\t}\r\n\t\telse if ($item_id == 104)\r\n\t\t{\r\n\t\t\t// Insert an item with free shipping to the UK only. \r\n\t\t\t// This example uses the database table 'item_shipping' set via the config file, to define the location, the key 'shipping_rate' should not be set.\r\n\t\t\t$cart_data = array('id' => 104, 'name' => 'Item #104, free shipping to the UK only.', 'quantity' => 1, 'price' => 19.95);\r\n\t\t}\r\n\t\telse if ($item_id == 105)\r\n\t\t{\r\n\t\t\t// Insert an item with a shipping surcharge.\r\n\t\t\t$cart_data = array('id' => 105, 'name' => 'Item #105, shipping surcharge (&pound10.00).', 'quantity' => 1, 'price' => 59.95, 'shipping_rate' => 10);\r\n\t\t}\r\n\t\telse if ($item_id == 106)\r\n\t\t{\r\n\t\t\t// Insert an item that will be shipped separately from the rest of the cart. \r\n\t\t\t// This example uses the database table 'item_shipping' set via the config file.\r\n\t\t\t$cart_data = array('id' => 106, 'name' => 'Item #106, shipped separately from the rest of the cart.', 'quantity' => 1, 'price' => 19.95);\r\n\t\t}\r\n\t\telse if ($item_id == 107)\r\n\t\t{\r\n\t\t\t// Item than can only be shipped to the UK.\r\n\t\t\t// This example uses the database table 'item_shipping' set via the config file.\r\n\t\t\t$cart_data = array('id' => 107, 'name' => 'Item #107, can only be shipped to specific location (UK).', 'quantity' => 1, 'price' => 21.5);\r\n\t\t}\r\n\t\telse if ($item_id == 108)\r\n\t\t{\r\n\t\t\t// Item than cannot be shipped to the UK or France.\r\n\t\t\t// This example uses the database table 'item_shipping' set via the config file.\r\n\t\t\t$cart_data = array('id' => 108, 'name' => 'Item #108, cannot be shipped to specific location (UK or France).', 'quantity' => 1, 'price' => 24.75);\r\n\t\t}\r\n\t\telse if ($item_id == 109)\r\n\t\t{\r\n\t\t\t// Insert an item with a defined weight, this can be used to calculate shipping. \r\n\t\t\t// The items weight can trigger different shipping rates, add different quantities to test the effect.\r\n\t\t\t$cart_data = array('id' => 109, 'name' => 'Item #109, defined weight.', 'quantity' => 1, 'price' => 55, 'weight' => 138);\r\n\t\t}\r\n\t\t\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\r\n\t\t### Tax Examples ###\r\n\t\t\r\n\t\telse if ($item_id == 110)\r\n\t\t{\r\n\t\t\t// Insert a tax free item.\r\n\t\t\t// This example uses the database table 'item_tax' set via the config file.\r\n\t\t\t$cart_data = array('id' => 110, 'name' => 'Item #110, tax free.', 'quantity' => 1, 'price' => 109.5);\r\n\t\t}\r\n\t\telse if ($item_id == 111)\r\n\t\t{\r\n\t\t\t// Insert an item with a specified tax rate that does not match the default cart tax rate.\r\n\t\t\t// Note: The tax rate must only be set as a non-formatted number. Example: 12.5 = 12.5% tax.\r\n\t\t\t$cart_data = array('id' => 111, 'name' => 'Item #111, specified tax of 12.5%.', 'quantity' => 1, 'price' => 45.95, 'tax_rate' => 12.5);\r\n\t\t}\r\n\t\t\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\r\n\t\t### Stock Examples ###\r\n\t\t\r\n\t\telse if ($item_id == 112)\r\n\t\t{\r\n\t\t\t// Insert a stock controlled item that is IN-STOCK.\r\n\t\t\t// This example uses the database table 'item_stock' set via the config file.\r\n\t\t\t$cart_data = array('id' => 112, 'name' => 'Item #112, stock controlled, in-stock.', 'quantity' => 1, 'price' => 16.99);\r\n\t\t}\r\n\t\telse if ($item_id == 113)\r\n\t\t{\r\n\t\t\t// Insert a stock controlled item that is OUT-OF-STOCK.\r\n\t\t\t// This example uses the database table 'item_stock' set via the config file.\r\n\t\t\t$cart_data = array('id' => 113, 'name' => 'Item #113, stock controlled, out-of-stock.', 'quantity' => 1, 'price' => 16.99);\r\n\t\t}\r\n\t\t\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\r\n\t\t### Misc. Examples ###\r\n\t\t\r\n\t\telse if ($item_id == 114)\r\n\t\t{\r\n\t\t\t// Insert an item with a specified number of reward points.\r\n\t\t\t$cart_data = array('id' => 114, 'name' => 'Item #114, specified 1000 reward points.', 'quantity' => 1, 'price' => 18.99, 'reward_points' => 1000);\r\n\t\t}\r\n\t\telse if ($item_id == 115)\r\n\t\t{\r\n\t\t\t// Insert an item with preset options.\r\n\t\t\t// Note: To insert an item with selectable options, see the 'Add Items to Cart via a Form' example.\r\n\t\t\t$cart_data = array(\r\n\t\t\t\t'id' => 115, 'name' => 'Item #115, options.', 'quantity' => 1, 'price' => 79.49, \r\n\t\t\t\t'options' => array(\r\n\t\t\t\t\t'Option Type #1' => 'Option #1', 'Option Type #2' => 'Option #2'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t// Note: The 'options' array could also have been set without array keys, or can even be set as just a string.\r\n\t\t}\r\n\t\telse if ($item_id == 116)\r\n\t\t{\r\n\t\t\t// Insert an item with misc. data fields, in this example 'user_note' and 'sku'.\r\n\t\t\t// The 'sku' field is not shown in the cart demo but is saved to the order table during checkout.\r\n\t\t\t$cart_data = array(\r\n\t\t\t\t'id' => 116, 'name' => 'Item #116, misc. \"user note\" and \"sku\" fields.', 'quantity' => 1, 'price' => 55, \r\n\t\t\t\t'sku' => 'ITEMSKU116', 'user_note' => 'Customer Note'\r\n\t\t\t);\r\n\t\t}\r\n\t\telse if ($item_id == 117)\r\n\t\t{\r\n\t\t\t// Insert an item that is given its own unique row everytime its re-added to the cart.\r\n\t\t\t$cart_data = array('id' => 117, 'name' => 'Item #117, unique row everytime re-added.', 'quantity' => 1, 'price' => 149.5, 'unique' => TRUE);\r\n\t\t}\r\n\t\t\r\n\t\t###+++++++++++++++++++++++++++++++++###\r\n\t\t\r\n\t\t// Insert collected data to cart.\r\n\t\tif (isset($cart_data))\r\n\t\t{\r\n\t\t\t$this->flexi_cart->insert_items($cart_data);\r\n\t\t}\r\n\r\n\t\t// Set a message to the CI flashdata so that it is available after the page redirect.\r\n\t\t$this->session->set_flashdata('message', $this->flexi_cart->get_messages());\r\n\t}", "title": "" }, { "docid": "4ec71ba9c91f797732ae287dbf945fd9", "score": "0.5329476", "text": "function mlcf_getip() {\n\tif (isset($_SERVER))\n\t{\n \t\tif (isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"]))\n \t\t{\n \t\t\t$ip_addr = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\n \t\t}\n \t\telseif (isset($_SERVER[\"HTTP_CLIENT_IP\"]))\n \t\t{\n \t\t\t$ip_addr = $_SERVER[\"HTTP_CLIENT_IP\"];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$ip_addr = $_SERVER[\"REMOTE_ADDR\"];\n \t\t}\n\t}\n\telse\n\t{\n \t\tif ( getenv( 'HTTP_X_FORWARDED_FOR' ) )\n \t\t{\n \t\t\t$ip_addr = getenv( 'HTTP_X_FORWARDED_FOR' );\n \t\t}\n \t\telseif ( getenv( 'HTTP_CLIENT_IP' ) )\n \t\t{\n \t\t\t$ip_addr = getenv( 'HTTP_CLIENT_IP' );\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$ip_addr = getenv( 'REMOTE_ADDR' );\n \t\t}\n\t}\nreturn $ip_addr;\n}", "title": "" }, { "docid": "60195ba3f22d4da02940af7f0497438e", "score": "0.5327486", "text": "function getRealIpAddr() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n }\n elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n else {\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n}", "title": "" }, { "docid": "5744260ce649b04c2b899cab1c81440f", "score": "0.5325671", "text": "function cart_get_items() {\n\t $items = array();\n\t foreach ($_SESSION['cart'] as $item_id => $quantity ) {\n\t // Get product data from db\n\t $item = view_item($item_id);\n\t $price = $item['price'];\n\t $quantity = intval($quantity);\n\t $totalQuantity = $item['totalQuantity'];\n\t \n\t // Calculate total\n\t $total = round($price * $quantity, 2);\n\n\t // Store data in items array\n\t $items[$item]['name'] = $item['itemName'];\n\t $items[$item]['price'] = $price;\n\t $items[$item]['quantity'] = $quantity;\n\t $items[$item]['total'] = $total;\n\t $items[$item]['totalQuantity'] = $totalQuantity;\n\t \n\t }\n\t return $items;\n\t}", "title": "" }, { "docid": "9891fa53503d9603b5084107d4cc3386", "score": "0.53240544", "text": "function menuCartList()\n {\n global $CFG, $objSmarty;\n\n $sessionid = session_id();\n \n #echo \"<pre>\";print_r($_REQUEST);echo \"</pre>\";\n // exit;\n\n if (isset($_REQUEST['resid']) && !empty($_REQUEST['resid']))\n {\n $resid = $this->filterInput($_REQUEST['resid']);\n\n $restDetails = $this->GetMultivalue(\"restaurant_salestax,restaurant_delivery_charge,restaurant_minorder_price,restaurant_delivery,restaurant_pickup\",\n $CFG['table']['restaurant'], \"restaurant_id = '\" . $resid . \"'\");\n //echo \"<pre>\";print_r($restDetails);echo \"</pre>\";\n }\n\n $sel_cart = \"SELECT cart_id, menuid, restaurantid, menuname, menutype, addonsname, addonsprice, menuprice, quantity, pizza_size, pizza_crustname, pizza_crustprice, pizza_addonsname, pizza_addons_price, specialinstruction, tot_menuprice FROM \" .\n $CFG['table']['restaurant_cart'] . \" WHERE restaurantid = '\" . $resid .\n \"' AND sessionid = '\" . $sessionid . \"' AND quantity != '0' GROUP BY cart_id \";\n $res_cart = $this->ExecuteQuery($sel_cart, \"select\");\n \n //$res_cart[0]['resname'] = $this->getValue(\"restaurant_seourl\", $CFG['table']['restaurant'], \"restaurant_id = '\" .$res_cart[0]['restaurantid']. \"'\");\n \n //echo \"<pre>\";print_r($res_cart);echo \"</pre>\";\n \n if (count($res_cart) > 0)\n {\n $orderSubTotal = 0;\n $quantity = 0;\n foreach ($res_cart as $key => $value)\n {\n $orderSubTotal += $res_cart[$key]['tot_menuprice'];\n $quantity += $res_cart[$key]['quantity']; \n }\n }\n\n if ($restDetails[0]['restaurant_delivery'] == 'Yes')\n {\n //if($_REQUEST['deliverypickup'] == 'delivery'){\n $deliverychargeamt = $restDetails[0]['restaurant_delivery_charge'];\n //}\n \n }\n if($_REQUEST['deliverypickup'] == 'pickup'){\n $deliverychargeamt1 = $restDetails[0]['restaurant_delivery_charge'];\n }\n $tax = $restDetails[0]['restaurant_salestax'];\n if ($tax != '')\n {\n $taxamount = $orderSubTotal * ($tax / 100);\n }\n\n #Offer\n $sel_off = \"SELECT offer_id, offer_percentage, offer_price, offer_valid_from, offer_valid_to, status FROM \" .\n $CFG['table']['restaurant_offer'] . \" WHERE status ='1' AND restaurant_id = '\" .\n $resid . \"' ORDER BY offer_id DESC LIMIT 1 \";\n $res_off = $this->ExecuteQuery($sel_off, \"select\");\n #echo \"<pre>\";print_r($res_off);echo \"</pre>\";exit;\n\n if (count($res_off) > 0)\n {\n $today = date(\"Y-m-d\");\n if (($orderSubTotal >= $res_off['0']['offer_price']) && ($res_off['0']['offer_valid_from']) <=\n $today && ($res_off['0']['offer_valid_to'] >= $today))\n {\n $offer_percentage = $res_off['0']['offer_percentage'];\n $Offer_purchasePrice = $res_off['0']['offer_price'];\n }\n }\n if (!empty($Offer_purchasePrice) && ($orderSubTotal >= $Offer_purchasePrice))\n {\n\n $orderDiscountPrice = $orderSubTotal * ($offer_percentage / 100);\n $orderDiscountPriceTotal = $orderSubTotal - $orderDiscountPrice;\n\n $orderGrandTotal = $orderDiscountPriceTotal + $deliverychargeamt + $taxamount;\n #$orderGrandTotal_withoutdel = $orderDiscountPriceTotal+$taxamount;\n $orderGrandTotal_withoutdel = $orderSubTotal + $taxamount;\n } else\n {\n $orderGrandTotal = $orderSubTotal + $deliverychargeamt + $taxamount;\n $orderGrandTotal_withoutdel = $orderSubTotal + $taxamount;\n }\n\n \n //Voucher code\n $ordSub = '';\n $voucherMsg = '';\n $voucherCode = '';\n if ($_REQUEST['voucher']) {\n $voucherCode = $this->filterInput($_REQUEST['voucher']);\n } elseif ($_SESSION['voucher']) {\n $voucherCode = $this->filterInput($_SESSION['voucher']);\n }\n \n //echo \"vouchercode\".$voucherCode.\"<br>\";\n \n if ($voucherCode != '') {\n //Check voucher code is avilable or not\n $voucherDet = $this->voucherDetailByCode($resid,$voucherCode);\n //echo \"ggg\".$voucherDet.\"<br>\";\n if ($voucherDet != 'Not Avail') {\n if ($_SESSION['customerid'] && $voucherDet[0]['use_type'] == 'S') {\n //Get existing used voucher \n $existUse = $this->getNumvalues($CFG['table']['order'],\"customer_id = '\".$this->filterInput($_SESSION['customerid']).\"' AND voucher_id = '\".$this->filterInput($voucherDet[0]['id']).\"'\");\n if ($existUse == 0) {\n if ($voucherDet[0]['off_type'] == 'Price') {\n $ordSub = $voucherDet[0]['off_price_percentage'];\n if (($orderSubTotal - $ordSub) <= 0) {\n $voucherMsg = 'Not enough subtotal';\n }\n \n } elseif ($voucherDet[0]['off_type'] == 'Percentage') {\n $ordSub = $orderSubTotal * ($voucherDet[0]['off_price_percentage'] / 100);\n if (($orderSubTotal - $ordSub) <= 0) {\n $voucherMsg = 'Not enough subtotal';\n }\n }\n } else {\n $voucherMsg = 'Since it is a one-time use voucher.You have already used this voucher';\n }\n } else {\n if ($voucherDet[0]['off_type'] == 'Price') {\n $ordSub = $voucherDet[0]['off_price_percentage'];\n \n //echo \"ordSub\".$ordSub;\n //echo \"ordSub\".$orderSubTotal;\n if (($orderSubTotal - $ordSub) <= 0) {\n $voucherMsg = 'Not enough subtotal';\n }\n } elseif ($voucherDet[0]['off_type'] == 'Percentage') {\n \n $ordSub = $orderSubTotal * ($voucherDet[0]['off_price_percentage'] / 100);\n if (($orderSubTotal - $ordSub) <= 0) {\n $voucherMsg = 'Not enough subtotal';\n }\n }\n } \n } else {\n $voucherMsg = 'This voucher code not available now..!';\n }\n \n if ($voucherMsg == '') {\n \n $_SESSION['voucherId'] = $voucherDet[0]['id'];\n $_SESSION['voucher'] = stripslashes($voucherDet[0]['voucher_name']);\n $_SESSION['voucherPrice'] = $ordSub;\n $orderGrandTotal = $orderGrandTotal-$ordSub;\n }\n $objSmarty->assign('voucherMsg',$voucherMsg);\n $objSmarty->assign('voucherPrice',$ordSub);\n }\n #echo \"orderGrandTotal->\". $orderGrandTotal;\n //echo $voucherMsg;\n \n $objSmarty->assign('offervalue', $orderDiscountPrice);\n $objSmarty->assign('discountprice', $orderDiscountPrice);\n //$objSmarty->assign('subtotal',number_format($orderSubTotal,2));\n $objSmarty->assign('subtotal', $orderSubTotal);\n $objSmarty->assign('taxamount', $taxamount);\n $objSmarty->assign('total', $orderGrandTotal);\n //$objSmarty->assign('withoutdel_total',number_format($orderGrandTotal_withoutdel,2));\n $objSmarty->assign('withoutdel_total', $orderGrandTotal_withoutdel);\n\n $objSmarty->assign('deliverycharge', $restDetails[0]['restaurant_delivery_charge']);\n $objSmarty->assign('newdeliverycharge', $deliverychargeamt1);\n $objSmarty->assign('minorderprice', $restDetails[0]['restaurant_minorder_price']);\n $objSmarty->assign('salestax', $restDetails[0]['restaurant_salestax']);\n $objSmarty->assign('deliveryoption', $restDetails[0]['restaurant_delivery']);\n $objSmarty->assign('pickupoption', $restDetails[0]['restaurant_pickup']);\n\n $objSmarty->assign('rest_offer_percentage', $offer_percentage);\n $objSmarty->assign('Offer_purchasePrice', $Offer_purchasePrice);\n $objSmarty->assign('offer', $offer_percentage);\n\n $objSmarty->assign('cartDetailsCnt', count($res_cart));\n $objSmarty->assign('cartDetails', $res_cart);\n \n \n $CartCount = $this->getNumValues($CFG['table']['restaurant_cart'], \"restaurantid = '\".$resid.\"' AND sessionid = '\".$sessionid.\"'\");\n $objSmarty->assign('CartCount', $quantity);\n }", "title": "" }, { "docid": "3c0c725ed484916dba08ca0c6c910a5e", "score": "0.5318612", "text": "function get_ip() {\n\n $ip = \"unknown\";\n \n $clientip = getenv(\"HTTP_CLIENT_IP\");\n $forwardedip = getenv(\"HTTP_X_FORWARDED_FOR\");\n $remoteaddr = getenv(\"REMOTE_ADDR\");\n $spos = strpos($forwardedip,\",\");\n \n if($spos) { \n \n $forwardedip = substr($forwardedip, 0, $spos); \n \n }\n \n if ($clientip) { \n \n $ip = $clientip;\n \n } elseif ($forwardedip) { \n \n $ip = $forwardedip; \n \t\n } else { \n \n $ip = $remoteaddr; \n \n }\n \n return $ip;\n\n}", "title": "" }, { "docid": "90767a9e58b54f79f7a451d7a9d08fa9", "score": "0.5314874", "text": "function checkCart()\n\t{\n\t\tif (!isset($_SESSION['cart_items']))\n\t\t{\n\t\t\t$_SESSION['cart_items'] = array(\n\t\t\t\tITEM_NEW => array(),\n\t\t\t\tITEM_USED => array()\n\t\t\t);\n\t\t\t$_SESSION['cart_qty'] = 0;\n\t\t\t$_SESSION['cart_total'] = 0;\n\t\t}\n\t}", "title": "" }, { "docid": "e533fea322cbbb749c595b571f207ccd", "score": "0.53084683", "text": "function f_getIP() {\n\tif (f_validIP($_SERVER[\"HTTP_CLIENT_IP\"])) {\n\t\treturn $_SERVER[\"HTTP_CLIENT_IP\"];\n\t}\n\t \n\tforeach (explode(\",\",$_SERVER[\"HTTP_X_FORWARDED_FOR\"]) as $ip) {\t \n\t\tif (f_validIP(trim($ip))) {\t\t \n\t\t\treturn $ip;\t\t \n\t\t}\t \n\t}\n\t \n\tif (f_validIP($_SERVER[\"HTTP_X_FORWARDED\"])) { \n\t\treturn $_SERVER[\"HTTP_X_FORWARDED\"];\t \n\t} elseif (f_validIP($_SERVER[\"HTTP_FORWARDED_FOR\"])) {\t \n\t\treturn $_SERVER[\"HTTP_FORWARDED_FOR\"];\t \n\t} elseif (f_validIP($_SERVER[\"HTTP_FORWARDED\"])) {\t \n\t\treturn $_SERVER[\"HTTP_FORWARDED\"];\t \n\t} elseif (f_validIP($_SERVER[\"HTTP_X_FORWARDED\"])) {\t \n\t\treturn $_SERVER[\"HTTP_X_FORWARDED\"];\t \n\t} else {\n\t\treturn $_SERVER[\"REMOTE_ADDR\"];\t \n\t}\n }", "title": "" }, { "docid": "817851ff4e580af8437e7425a6dcaa40", "score": "0.5306438", "text": "function uc_paydollar_datafeed() {\n $src = check_plain($_POST['src']);\n $prc = check_plain($_POST['prc']);\n $bank_ord = check_plain($_POST['Ord']);\n $holder = check_plain($_POST['Holder']);\n $successcode = check_plain($_POST['successcode']);\n $order_id = check_plain($_POST['Ref']);\n $paydollar_ref = check_plain($_POST['PayRef']);\n $amt = check_plain($_POST['Amt']);\n $cur = check_plain($_POST['Cur']);\n $cart_id = check_plain($_POST['remark']);\n $authid = check_plain($_POST['Authid']);\n $eci = check_plain($_POST['eci']);\n $payerauth = check_plain($_POST['payerAuth']);\n $sourceip = check_plain($_POST['sourceIp']);\n $ipcountry = check_plain($_POST['ipCountry']);\n $cdatetime = time();\n $mdatetime = $cdatetime;\n\n $order = uc_order_load($order_id);\n // variable for Ubercart\n $context = array(\n 'revision' => 'formatted-original',\n 'type' => 'amount',\n );\n $options = array(\n 'sign' => FALSE,\n );\n\n if (!is_null($successcode)) {\n // Insert the datafeed into database\n db_query(\"INSERT INTO {uc_paydollar_datafeed} (src, prc, ord, holder, successcode, ref, payref, amt, cur, remark, authid, eci, payerauth, sourceip, ipcountry, cdatetime, mdatetime) VALUES (%d, %d, %d, '%s', %d, '%s', %d, %f, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)\", $src, $prc, $bank_ord, $holder, $successcode, $order_id, $paydollar_ref, $amt, $cur, $cart_id, $authid, $eci, $payerauth, $sourceip, $ipcountry, $cdatetime, $mdatetime);\n }\n\n switch ($successcode) {\n Case 0:\n watchdog('uc_paydollar', 'Receiving PayDollar datafeed with SUCCESS notification for order @cart_id.', array(\n '@cart_id' => $cart_id,\n ));\n $comment = t('PayDollar transaction ID: @paydollar_ref', array('@paydollar_ref' => $paydollar_ref));\n uc_payment_enter($order_id, 'paydollar', $amt, $order->uid, NULL, $comment);\n\n // Empty that cart...\n uc_cart_empty($cart_id);\n\n // Complete a sale, including adjusting order status and creating user account.\n uc_cart_complete_sale($order);\n\n uc_order_comment_save($order_id, 0, t('Payment of @amount @cur submitted through PayDollar.', array('@amount' => uc_price($amt, $context, $options), '@cur' => $cur)), 'order', 'payment_received');\n uc_order_comment_save($order_id, 0, t('PayDollar IPN reported a payment of @amount @cur.', array('@amount' => uc_price($amt, $context, $options), '@cur' => $cur)));\n\n break;\n\n Case 1:\n watchdog('uc_paydollar', 'Receiving PayDollar datafeed with FAIL notification for order @cart_id.', array(\n '@cart_id' => $cart_id,\n ), WATCHDOG_ERROR);\n break;\n\n default:\n watchdog('uc_paydollar', 'Receiving PayDollar datafeed with OTHERS notification for order @cart_id.', array(\n '@cart_id' => $cart_id,\n ), WATCHDOG_ERROR);\n break;\n }\n\n // echo the page back to PayDollar\n print(\"OK\\n\");\n print(\"successcode = $successcode\");\n exit(0);\n}", "title": "" } ]
1424c8ab9f3decca39b0fcd4f52585cb
Generate new user's access token
[ { "docid": "b90e82022dd60a1105ffb3bf24f79670", "score": "0.6061922", "text": "public function generateToken()\n {\n $token = array(\n \"iss\" => $this->id,\n \"aud\" => $this->name,\n \"iat\" => $this->email,\n \"nbf\" => $this->phone\n );\n\n return JWT::encode($token, self::JWT_KEY);\n }", "title": "" } ]
[ { "docid": "570259429e8812faa72a6e1c7a736f74", "score": "0.7757422", "text": "public function generateAccessToken()\n {\n $this->access_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "title": "" }, { "docid": "ef4ee0fdeb8d4dd6ce7d349beb4cab69", "score": "0.7720464", "text": "public function generateAccessToken()\n\t{\n\t\t$this->access_token = Yii::$app->security->generateRandomString();\n\t}", "title": "" }, { "docid": "4ea601ad6ad69bcf7fbc423415322e62", "score": "0.75320584", "text": "public function generateAccessToken()\n {\n $this->verification_token = Yii::$app->security->generateRandomString($length = 16);\n }", "title": "" }, { "docid": "322437f29657b2f4c9a1fdfd24f5bd72", "score": "0.7507615", "text": "public static function generateNewToken( \\app\\models\\User $user)\n {\n $accessToken = ApiAccessToken::find()->where(['user_id' => $user->id])->one();\n if (!$accessToken) {\n $accessToken = new ApiAccessToken();\n $accessToken->user_id = $user->id;\n }\n $accessToken->access_token = Yii::$app->security->generateRandomString( self::ACCESS_TOKEN_LENGTH );\n $accessToken->exp_date = date('Y-m-d H:i:s', strtotime(\"now +\" . self::EXPIRATION_PERIOD ));\n return $accessToken;\n }", "title": "" }, { "docid": "675be54d7c0e365dd6ee885376ce5652", "score": "0.7206449", "text": "public function generateAccessToken()\n {\n return Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "040cfc5056823fb603e0bcebea8f13eb", "score": "0.7043961", "text": "public function generateToken() {\n // we randomly generate an API token\n $api_token = Str::random(80);\n // we check whether the generated token already exists in the users table\n $api_token_found = User::where('api_token', $api_token)->first();\n while ($api_token_found) {\n // if the generated token is already associated with a registered user, we generates a new token\n $api_token = Str::random(80);\n // we check whether also this newly generated token already exists in the users table\n $api_token_found = User::where('api_token', $api_token)->first();\n }\n // we get the logged in user\n $user = Auth::user();\n // we associate to this user the generated token (this token will certainly be different from those of the other users)\n $user->api_token = $api_token;\n $user->save();\n return redirect()->route('admin.profile');\n }", "title": "" }, { "docid": "e3c4d2780c64896e1dc514f42bcb4fe6", "score": "0.6898446", "text": "public function createToken();", "title": "" }, { "docid": "eef61013c5e40a05f9b33ea7b2c97aad", "score": "0.688092", "text": "public function generateToken();", "title": "" }, { "docid": "8f57f005f53700d5fd1f736c5fb6cdc2", "score": "0.68691826", "text": "function new_access_token($token, $consumer) {\n // for the user associated with this token if the request token \n // is authorized \n // should also invalidate the request token \n }", "title": "" }, { "docid": "3db688cc42e0ed644ad2aa6631580d18", "score": "0.6856895", "text": "function genAuthToken(){\n $timestamp = time();\n $username = $_SESSION['userid'];\n $random = rand(0, 50);\n \n return md5( \"YANS\" . $timestamp . $username . $random );\n }", "title": "" }, { "docid": "785e983085dcfeac9b84b48527b51177", "score": "0.6821396", "text": "function new_access_token($token, $consumer, $verifier = null) {\n // for the user associated with this token if the request token\n // is authorized\n // should also invalidate the request token\n }", "title": "" }, { "docid": "7e76565f330a03ccabdcab77159d0a9c", "score": "0.6810837", "text": "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "title": "" }, { "docid": "e7e26b3a6a0f0ecc02de1bd2b302a5f3", "score": "0.6750917", "text": "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "title": "" }, { "docid": "7d043e4ffaddd129549ef9479d5f8268", "score": "0.6712755", "text": "public function createToken(\\Navis\\UserBundle\\Entity\\User $user)\n {\n $token = sha1(time().$user->getSecretToken());\n\n $user->setAccessToken($token);\n $user->setExpiresAt(time()+300);//añado 5 minutos al tiempo de expiracion del token\n\n $this->getEntityManager()->persist($user);\n $this->getEntityManager()->flush();\n\n \n\n return $token;\n }", "title": "" }, { "docid": "97593580a9cadcdeff4e6f7bc79de491", "score": "0.66862136", "text": "public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }", "title": "" }, { "docid": "59cc760f3ef561ab93f1ea8068b29128", "score": "0.66794145", "text": "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "title": "" }, { "docid": "1b36da8ef717d6fd4477734dff763900", "score": "0.6637521", "text": "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "title": "" }, { "docid": "d626c58b3412018172de7800bb865292", "score": "0.6615257", "text": "public function generate(IUser $user = null, IClient $client, array $scopes = [])\n {\n $token = new AccessToken(uniqid(), $user, $client, $scopes, time() + 60);\n return $token;\n }", "title": "" }, { "docid": "8d3260b893068294366939505b67475d", "score": "0.66045356", "text": "public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }", "title": "" }, { "docid": "5b41d7dc8a3d8507650f4029cc28c70a", "score": "0.65345776", "text": "protected function createToken()\n {\n if ($this->client->getRefreshToken()) {\n $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n $this->client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($this->token))) {\n mkdir(dirname($this->token), 0700, true);\n }\n file_put_contents($this->token, json_encode($this->client->getAccessToken()));\n }", "title": "" }, { "docid": "8cfeaf594eb0839207f68ab4d1548a9b", "score": "0.6525411", "text": "public function createAdminToken();", "title": "" }, { "docid": "b6c07664e002df8f1f21e79c82ab8a4d", "score": "0.6510278", "text": "public static function generate_token($user) {\n\n $payload = [\n 'iat' => time(),\n 'uid' => $user['user_id']\n ];\n\n if (Configure::read('JWT.expired_period')) {\n $payload['exp'] = strtotime(Configure::read('JWT.expired_period'));\n }\n\n return \\Firebase\\JWT\\JWT::encode($payload, Configure::read('JWT.secret'));\n }", "title": "" }, { "docid": "28027a1f6be33be459db9ed48384ed53", "score": "0.65085906", "text": "public function generateToken(){\n //if(empty($_SESSION['token']) && (empty($_SESSION['tokenAge']) || (time() - (int)$_SESSION['tokenAge']) > (int)$this->maxAge)){\n if(function_exists('random_bytes')){\n $_SESSION['token'] = bin2hex(random_bytes(32));\n }elseif(function_exists('mcrypt_create_iv')){\n $_SESSION['token'] = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM));\n }else{\n $_SESSION['token'] = bin2hex(openssl_random_pseudo_bytes(32));\n }\n $_SESSION['tokenAge'] = time();\n //} \n }", "title": "" }, { "docid": "8a625e1b60679f1264640b774d8f47fe", "score": "0.65003675", "text": "public function generate(User $user): PasswordToken;", "title": "" }, { "docid": "f68a3eb67f92644196b16c288bade7ad", "score": "0.64819777", "text": "public function regenerateToken();", "title": "" }, { "docid": "b4aca6ee59a462b64c8fe86ad167f94a", "score": "0.6471619", "text": "public function generateToken(AdminRequest $request)\n {\n $uid = $request->input('uid');\n try\n {\n $user = $this->credentials->getUserCredentials($uid);\n if (!empty($user))\n {\n return $user->createToken('ops')->accessToken;\n }\n }\n catch (Exception $ex)\n {\n Log::error('Admin generate user token exception:' . $ex->getMessage());\n abort(500);\n }\n abort(404);\n }", "title": "" }, { "docid": "8b645f1603f7afdfdfe7dd2d638f15b5", "score": "0.6457944", "text": "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "title": "" }, { "docid": "f7fbe85cc3d29d84854f298156cb11ad", "score": "0.645443", "text": "public function generateToken()\n {\n $this->api_token = str_random(60);\n while (User::where('api_token', $this->api_token)->first()) {\n $this->api_token = str_random(60);\n }\n $this->save();\n return $this->api_token;\n }", "title": "" }, { "docid": "37245d4c2c977e9f1a44743e96706ce0", "score": "0.64326036", "text": "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "title": "" }, { "docid": "5a617a197d15fe7a8f3c39803f3ae090", "score": "0.641679", "text": "public function generateToken()\n {\n if (empty($this->username) || empty($this->api_token)) {\n throw new \\Exception(\"Username and Api Token must be set\");\n }\n $time = time();\n return hash_hmac(\"sha256\", $this->username . \"::\" . $this->api_token . \"::\" . $time, $this->api_token);\n }", "title": "" }, { "docid": "ba14edec9c374d53be24d0df42ed2a08", "score": "0.6411793", "text": "public function generate(&$user)\n {\n if(!is_object($user))\n {\n return false;\n }\n //delete all existing tokens\n $user->tokens->delete();\n\n $secret = openssl_random_pseudo_bytes(32);\n\n //generate new token\n $token = new Tokens();\n $token->users_id = $user->id;\n $token->secret_key = $this->crypt->encryptBase64($secret);\n $token->created = date('Y-m-d H:i:s');\n $token->hmac = hash_hmac('sha256', strtolower($user->username) . '|' . $token->created, $secret, false);\n\n //save token information\n if($token->save())\n {\n //return encrypted token\n return $this->crypt->encryptBase64($this->crypt->encrypt($user->username . '|' . $token->created . '|' . $token->hmac));\n }\n return false;\n }", "title": "" }, { "docid": "0a11db2cc0fea20df4bdc7c94731b059", "score": "0.6411048", "text": "abstract public function url_access_token();", "title": "" }, { "docid": "5a66a4f941a10b5ada2f6b19c2267b89", "score": "0.6390806", "text": "function genera_token ($user, $profile)\r\n{\r\n\t$token = \"\";\r\n\r\n\t/* Aqui estaria el algoritmo para la generacion\r\n\tdel token */\r\n\r\n\treturn $token;\r\n}", "title": "" }, { "docid": "7b7a0ec605cd118979f0d7306f111038", "score": "0.6381521", "text": "public function requestToken(Request $request)\n\t{\n\t $request->validate([\n\t 'email' => 'required|email',\n\t 'password' => 'required',\n\t 'device_name' => 'required',\n\t ]);\n\n\t $user = User::where('email', $request->email)->first();\n\n\t if (! $user || ! Hash::check($request->password, $user->password)) {\n\t \t$response = [\n\t \t\t'status' => 'error',\n\t\t\t\t'message' => 'The provided credentials are incorrect.'\n\t\t\t];\n\t\t\treturn response()->json($response, 200);\n\t }\n\n\t $data['access_token'] = $user->createToken($request->device_name)->plainTextToken;\n\n\t $response = [\n \t\t'status' => 'success',\n \t\t'message' => 'Token generated',\n \t\t'data' => $data,\n\t\t];\n\t return response()->json($response, 200);\n\t}", "title": "" }, { "docid": "ac1bccb3222033635d85c6da6cd4f2ed", "score": "0.63776773", "text": "public function generateToken(User $user)\n {\n $token = new Token();\n $token->setAttribute('user_id', $user->getAttribute('id'));\n $token->setAttribute('token', md5($user->getAttribute('email') . microtime() . rand(0, 100)));\n $this->renewToken($token);\n $token->save();\n return $token;\n }", "title": "" }, { "docid": "e61e0b7ef0503fa7d657940426acaf49", "score": "0.6373754", "text": "protected function generateSessionToken() {}", "title": "" }, { "docid": "46d3a731cffa9dc5a00e180e6a21b5ca", "score": "0.6346697", "text": "public function generateToken()\n\t{\n\t\treturn Token::make();\n\t}", "title": "" }, { "docid": "068e553e44772b751b9d60e5027b6e05", "score": "0.631294", "text": "public function generateToken() {\n\t\t$appConfig = $this->config;\n\t\t$token = $this->secureRandom->generate(32);\n\t\t$appConfig->setAppValue('owncollab_ganttchart', 'sharetoken', $token);\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "fd28b8e0f87d2167b96dd50e4ddfa149", "score": "0.62842304", "text": "public function generateToken()\n {\n $request = $this->call('v1/auth/token', Constants::METHOD_POST, [\n 'timestamp' => time(),\n 'nonce' => $this->generateNonce(),\n ]);\n\n return isset($request['token']) ? $request['token'] : false;\n }", "title": "" }, { "docid": "86a5d23f5941d741e319a4861a5b28d4", "score": "0.6275088", "text": "public function withStandardAccessToken()\n {\n return $this->withAccessToken($this->randomUserId(), 'user');\n }", "title": "" }, { "docid": "e9d4f2285460d9d6e474a9f9ca560c0c", "score": "0.6272032", "text": "public function generateAuthKey()\n {\n $this->token = Yii::$app->security->generateRandomString(32);\n }", "title": "" }, { "docid": "ae28b4c76db9bfe37952f8ee3228b92b", "score": "0.627178", "text": "function generate_token()\n\t{\n\t return sha1(base64_encode(openssl_random_pseudo_bytes(30)));\n\t}", "title": "" }, { "docid": "d667a11b897407d825b10e1e11d9ab07", "score": "0.62387145", "text": "public function generate_token_for_user($userId)\n {\n if(empty($userId)){\n return false;\n }\n $token = str_random(50);\n $token_data = DB::table('member_token')->where(\"member_id\",$userId)->value('member_id');\n \n //*** Update User Token ***//\n MemberTokenModel::create(array(\n 'token'=> $token,\n 'member_id' => $userId,\n \n ));\n return $token;\n }", "title": "" }, { "docid": "d9df18bfdf550421ca8f84f5787a7932", "score": "0.6235543", "text": "public function generateAccessToken($token){\n $zohoCredentials = $this->where('user_id',Auth::user()->id)->first();\n $tokenval = json_decode($token->value);\n $refresh_token=$tokenval->refresh_token;\n\n $post = [\n 'refresh_token' => $refresh_token,\n 'redirect_uri' => 'http://example.com/callbackurl',\n 'client_id' => $zohoCredentials->client_id,\n // 'client_id' => '1000.DCKGTZMMMJJVOBZE0K8DTZUVG5WBYE',\n 'client_secret' => $zohoCredentials->client_secret,\n // 'client_secret' => '8f3baa9e9419d00a6047269e54f3e581735ce808b4',\n 'grant_type' => 'refresh_token',\n ];\n\n $ch=curl_init();\n\n for($i=0; $i<count($this->domains); $i++) {\n curl_setopt($ch, CURLOPT_URL, 'https://accounts.zoho.'. $this->domains[$i] .'/oauth/v2/token');\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\n\n $response = curl_exec($ch);\n\n if(isset(json_decode($response, true)['access_token']) ){\n break;\n }\n }\n\n\n if(curl_getinfo($ch, CURLINFO_RESPONSE_CODE) === 200) {\n $tokenval->access_token = json_decode($response)->access_token;\n $token->value=json_encode($tokenval);\n $token->save();\n }\n\n return json_decode($token->value)->access_token;\n }", "title": "" }, { "docid": "3d9171f29cb8687544c3a0bf59ebc2cc", "score": "0.62300885", "text": "public function createCustomerAccessToken(SocialAccountInterface $socialUser);", "title": "" }, { "docid": "5ea64e950c369860bc4428724d747d7a", "score": "0.6220218", "text": "static function generateToken($user_id, $expires = null) {\n\t\t$hash = self::randChars(128, true);\n\t\t$token = \\Model\\User\\Token::create([\n\t\t\t'user_id' => $user_id,\n\t\t\t'expires_at' => date('Y-m-d H:i:s', $expires ?: strtotime('+1 week')),\n\t\t\t'token' => $hash\n\t\t]);\n\t\treturn $hash;\n\t}", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.6218063", "text": "public function getAccessToken();", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.6218063", "text": "public function getAccessToken();", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.6218063", "text": "public function getAccessToken();", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.6218063", "text": "public function getAccessToken();", "title": "" }, { "docid": "43a8121e7f38bae09c66043ced1591c7", "score": "0.6218063", "text": "public function getAccessToken();", "title": "" }, { "docid": "f66df14803dc4d5996e380f392f13dad", "score": "0.6212972", "text": "function createAccessToken($data, $secret) {\n $header = encodeBase64UrlSafe(json_encode(array(\"typ\" => \"JWT\", \"alg\" => \"HS256\")));\n $payload = encodeBase64UrlSafe(json_encode($data));\n $rawSignature = hash_hmac(\"sha256\", \"$header.$payload\", $secret, $raw = true);\n $signature = encodeBase64UrlSafe($rawSignature);\n return \"$header.$payload.$signature\";\n}", "title": "" }, { "docid": "c259ba5a1c943aa2395ac9cecc2bb69f", "score": "0.620195", "text": "public function createIdToken($client_id, $userInfo, $nonce = null, $userClaims = null, $access_token = null);", "title": "" }, { "docid": "899bc98d5807b8dd54f6e0585d36561a", "score": "0.61965156", "text": "function gen_token()\n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn create_token();\n\t}", "title": "" }, { "docid": "95425c239dcd4b5a5eefc66837901e54", "score": "0.6188345", "text": "public function generateToken()\n {\n if($this->api_token == null)\n $this->api_token = str_random(60);\n $this->save();\n return $this;\n }", "title": "" }, { "docid": "c678e002d1dcd0b121a66327a53aaa2d", "score": "0.61855614", "text": "function generateToken()\n {\n return md5(uniqid(rand().time(),true));\n }", "title": "" }, { "docid": "ff809ba4125e7fcd170d68e615c9033b", "score": "0.61780924", "text": "function generate() {\n\n if ($_SERVER[\"REQUEST_METHOD\"] !== 'POST') {\n http_response_code(403);\n echo 'Forbidden';\n die();\n } else {\n //fetch posted data\n $posted_data = file_get_contents('php://input');\n $input = (array) json_decode($posted_data);\n $data = $this->_pre_token_validation($input);\n }\n\n $token = $this->_generate_token($data);\n http_response_code(200);\n echo $token;\n }", "title": "" }, { "docid": "e87c92b327bdec96159b484cbe6e327b", "score": "0.6178072", "text": "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n\n\n }", "title": "" }, { "docid": "3ef87fbd0bf12897de4899011f3bb59c", "score": "0.6177203", "text": "function new_request_token($consumer) {\n }", "title": "" }, { "docid": "e16560c231ab8883b08a4a3f0a780276", "score": "0.6175961", "text": "protected function newToken(): string\n {\n $new = $this->fetchNewToken();\n\n $this->cache->put(\n $this->key,\n encrypt($new['access_token']),\n $new['expires_in'] / 60 - 1\n );\n\n return $new['access_token'];\n }", "title": "" }, { "docid": "ddb1adc2dfd029801749170c451e5cf8", "score": "0.61504704", "text": "public function createToken()\n\t{\n\t\t$domain = $this->config->get('app.domain');\n\n\t\t$data = [\n\t\t\t'iss' => $domain,\n\t\t\t'aud' => $domain,\n\t\t\t'iat' => time(),\n\t\t\t'exp' => time () + $this->expiration,\n\t\t];\n\n\t\t$token = JWT::encode($data, $this->config->get('app.app_key'));\n\n\t\t$this->createAuth([\n\t\t\t'token' => $token,\n\t\t\t'expires_at' => date('Y-m-d h:i:s', $data['exp'])\n\t\t]);\n\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "987b9f39b9649c8fc4f0549679833b31", "score": "0.61449605", "text": "public function generateNewToken() : string\n {\n $token = \"\";\n try {\n $fullUrl = $this->_getFullUrl(Config::AUTH_URL);\n $result = $this->client->post($fullUrl, [\n \"client_id\" => Config::CLIENT_ID,\n \"email\" => Config::EMAIL,\n \"name\" => Config::NAME\n ]);\n $data = json_decode($result->getBody()->getContents());\n $token = $data->data->sl_token;\n\n } catch (Exception $e) {\n echo $this->responseService\n ->withStatus($e->getCode())\n ->single([], \"data\", null, $e->getMessage());\n }\n return $token;\n }", "title": "" }, { "docid": "63021e99709883e4b7e3e511a125f5ac", "score": "0.6137186", "text": "public function run()\n {\n $accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMjkiLCJqdGkiOiI5NDdjODdlMWI0MTU1N2Q1NzRiMmIzOTgzM2ViZWJjZWY3NjZmZTA3Yjc5NjllYTI3NTc1NTgwNTYzNTBlOGUyMjBlMDhhZTA0ZjhlYzM3MyIsImlhdCI6MTYyNTI0MjM0MywibmJmIjoxNjI1MjQyMzQzLCJleHAiOjE2NTY3NzgzNDMsInN1YiI6IjE0NjEiLCJzY29wZXMiOltdfQ.RjIAPcd6oSptTTKM0HhDIp8vA_xqhI5iccoxw1whZRvCzYHVii-WHiHU3JwRQDtJXKzRheqqcioUKkpoHH2SZQ1biWX0S5mqmunITFLoIHXhi61YYp4ctvlfvxud-9EGeQ4agqLazGDwxgCAwbo5dJRhvSX_SLcq0XLIdHU-_WqYXyb1Cy7vejsfR2Tx26vDqKsneHOiOTji7RT8TRg0Ej222WivgfBfcB-FzKPlFoKp6kYoSeLBvd5hZLERzFjfeWDVd38S4zxTFoSZH6Sg-WqZ5s3472CJ36_zWsh3R3Ebu0S7s-0uriCkdrVlzNY1xZABkVAedd-JyNgmKgA-zVb4AsNUXOqKJ-S7Nn3uVZmdbBWYjMPJBomsjt3xSSP4zq3-aJGJabG-GMvzWSGMxBDQeYlzFy_B3JLK0ZWaWLFN8eLJsHuHhF2zjypcPZkOajuQvrXNSFgm69_x57SSveM0eFkcbcvYzfHDcw6EvBrwPcvGE9RDajqBz3_So57WJRx2P_S7DJm64O_1m53AsmJz34MQxwCcDSUc7ZKwEX8mRRcu2RjWWoCLvOtA3mWx7v8nuREKXweBeHgSoPwXAJLIlsLT0yWVT603mseTVZ1MDSdtr46demlr_FGwqsKHyu5Fz54SBMpUEsqD3qIkFDT4VMc6Ge8v3ll_WVRui3M';\n\n $client = new ClientGuzzle([\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$accessToken,\n 'Content-Type' => 'application/json'\n ],\n ]);\n\n $response = $client->get('https://www.lioren.cl/api/ciudades');\n $responseBody = json_decode((string) $response->getBody(), true);\n foreach($responseBody as $ciudad){\n Ciudad::create([\n 'nombre' => $ciudad['nombre'],\n 'codigo' => $ciudad['id'],\n ]);\n }\n }", "title": "" }, { "docid": "a66b479d594dbc1940891de4e44e2639", "score": "0.6134509", "text": "function newToken($params = array()){\n\t\t$data =\t[\n\t\t\t\"client_id\"=>$this->client_id, \n\t\t\t\"client_secret\"=> $this->client_secret,\n\t\t\t\"refresh_token\"=> $this->refresh_token\n\t\t\t];\n\t\t\n\t\t//echo json_encode($data), PHP_EOL; //die();\n\t\t$r = false;\n\t\tMpApi::sleep(); \n\t\t$response = json_decode($this->callCurl('POST' , '/new/token' , false, $data ),true);\n\t\t\n\t\t//print_r($response); die('pp');\n\t\t\n\t\tif(isset($response['access_token']) AND $response['access_token'] != ''){\n\t\t\t$this->access_token = $response['access_token'];\n\t\t\t$this->refresh_token = $response['refresh_token'];\n\t\t\t//echo '<!-- New tokens generated: ' . print_r($response,1) . '-->';\n\t\t\t$r = $response['access_token'];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "5b9b2e024e936398cee0208c171e20c6", "score": "0.6131034", "text": "public function generateNewToken()\n {\n $this->token = uniqid(null, true);\n return ($this->token);\n }", "title": "" }, { "docid": "ae70e6f9156d7e7dc54c97ebe2931875", "score": "0.61229527", "text": "public function getAccessToken( $force_new = false );", "title": "" }, { "docid": "647932d223b86bc25a1ab750f2d9f274", "score": "0.61098343", "text": "public static function generateToken()\r\n {\r\n $_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(32));\r\n }", "title": "" }, { "docid": "34d6123cfe218d3374f94c28484ed8ba", "score": "0.61029434", "text": "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "title": "" }, { "docid": "9a0a53fe0a4126543263d8519ccaec54", "score": "0.61017615", "text": "function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }", "title": "" }, { "docid": "97d7c4963b384190db9238b1641bbe69", "score": "0.60976964", "text": "static function generateToken() {\n $token = Cache::get(\"token\", false);\n if ($token) {\n return $token;\n } else {\n $time = floor(time() / 1000);\n $token = md5(bin2hex($time));\n new Cache(\"token\", $token);\n return $token;\n }\n }", "title": "" }, { "docid": "1ab1940d4cf23d6af5f831c1f7f3ba87", "score": "0.6086125", "text": "private function generateToken()\n {\n return hash('SHA256', uniqid((double) microtime() * 1000000, true));\n }", "title": "" }, { "docid": "364e9ebf25a5b2c34a6bb4847e217dbc", "score": "0.6078502", "text": "function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }", "title": "" }, { "docid": "ece8f7b301d171041b515e2a3ed18cdf", "score": "0.607173", "text": "private function createToken()\n {\n $this->token = md5(time().uniqid());\n return true;\n }", "title": "" }, { "docid": "dae4dc11fc561e061dd092f19e701650", "score": "0.6069426", "text": "public static function acquire_token() {\n\n\t\t\n\n\t\t$response = skydrive_tokenstore::get_tokens_from_store();\n\n\t\tif (empty($response['access_token'])) {\t// No token at all, needs to go through login flow. Return false to indicate this.\n\n\t\t\treturn false;\n\n\t\t\texit;\n\n\t\t} else {\n\n\t\t\tif (time() > (int)$response['access_token_expires']) { // Token needs refreshing. Refresh it and then return the new one.\n\n\t\t\t\t$refreshed = skydrive_auth::refresh_oauth_token($response['refresh_token']);\n\n\t\t\t\tif (skydrive_tokenstore::save_tokens_to_store($refreshed)) {\n\n\t\t\t\t\t$newtokens = skydrive_tokenstore::get_tokens_from_store();\n\n\t\t\t\t\treturn $newtokens['access_token'];\n\n\t\t\t\t}\n\n\t\t\t\texit;\n\n\t\t\t} else {\n\n\t\t\t\treturn $response['access_token']; // Token currently valid. Return it.\n\n\t\t\t\texit;\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "655812eb9ffbc208e4bdff52fa64b996", "score": "0.6064751", "text": "function getAccessToken($userID);", "title": "" }, { "docid": "9bac509fe019bf68d9e3828abd995302", "score": "0.6058063", "text": "function accessToken() {\n $twilioAccountSid = Configure::read('Twilio.accountSid');\n $authToken = Configure::read('Twilio.authToken');\n $twilioApiKey = Configure::read('Twilio.apiKey');\n $twilioApiSecret = Configure::read('Twilio.secret');\n $ipmServiceSid = Configure::read('Twilio.chatSid');\n\n // An identifier for your app - can be anything you'd like\n $appName = 'TwilioChatDemo';\n // choose a random username for the connecting user\n $identity = \"john_doe\";\n // A device ID should be passed as a query string parameter to this script\n $deviceId = 'somedevice';\n $endpointId = $appName . ':' . $identity . ':' . $deviceId;\n\n // Create access token, which we will serialize and send to the client\n $token = new AccessToken(\n $twilioAccountSid,\n $twilioApiKey,\n $twilioApiSecret,\n 3600,\n $identity\n );\n\n // Create IP Messaging grant\n $ipmGrant = new IpMessagingGrant();\n $ipmGrant->setServiceSid($ipmServiceSid);\n $ipmGrant->setEndpointId($endpointId);\n\n // Add grant to token\n $token->addGrant($ipmGrant);\n\n // return serialized token and the user's randomly generated ID\n\n return [\n 'identity' => $identity,\n 'token' => $token->toJWT(),\n ];\n }", "title": "" }, { "docid": "408fe166146c8310aa8dbe0a536b9068", "score": "0.6034183", "text": "function GenerateToken($username, $password)\r\n{\r\n $current_time = date(\"Y-m-d H:m:s\",time());\r\n $token = MD5($username . $password . $current_time);\r\n return $token;\r\n}", "title": "" }, { "docid": "5e1ad0682099e30c633cee346d72148d", "score": "0.60268956", "text": "public function generateAccountActivationToken()\n {\n $this->account_activation_token = Yii::$app->security->generateRandomString();\n }", "title": "" }, { "docid": "b5150008229e5f56d1c74c10ea78ed91", "score": "0.60241884", "text": "public function generateAccessToken($userId, array $requestParams) {\n\t\tif ($this->findUser($userId)) {\n\t\t\tif ($this->validateRequestParams($requestParams, 'login')) {\n\t\t\t\t$accessTokenModel = $this->createToken($this->applicationModel->id, $userId);\n\n\t\t\t\treturn $accessTokenModel->token;\n\t\t\t}\n\t\t}\n\n\t\tthrow new CHttpException(403, 'You are not authorized to perform this action');\n\t}", "title": "" }, { "docid": "e553e519edbfbeb7e7c72044059e6b62", "score": "0.60169244", "text": "function _generate()\n\t{\n\t\t$username = $this->CI->session->userdata('username');\n\t\t\n\t\t$token_source = fopen(\"http://random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new\", \"r\");\n\t\t$token = fread($token_source, 20);\n\t\t\n\t\t$identifier = $username . $token;\n\t\t$identifier = $this->_salt($identifier);\n\t\t\n\t\t$this->CI->db->query(\"UPDATE `users` SET `identifier` = '$identifier', `token` = '$token' WHERE `username` = '$username'\");\n\t\t\n\t\tsetcookie(\"logged_in\", $identifier, time()+3600, '/');\n\t}", "title": "" }, { "docid": "314f7cc616a43d00d06422ed8cdc0695", "score": "0.60157114", "text": "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "title": "" }, { "docid": "53ab9408525b1ea4395d7481df94122c", "score": "0.6014569", "text": "public function setaccess_token($value);", "title": "" }, { "docid": "5712c2531c80f35a219f6a6b74e014fe", "score": "0.60133976", "text": "public static function generateApiToken()\n {\n do {\n $token = Str::random(60);\n } while (User::where('api_token', $token)->first());\n\n return $token;\n }", "title": "" }, { "docid": "621e1240e196eb0aba2612668f8eaa9a", "score": "0.60133535", "text": "public function generateToken($email);", "title": "" }, { "docid": "21df21d5ba57eafb1167697c25338d98", "score": "0.60076994", "text": "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth()->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "title": "" }, { "docid": "87266029dbc983a6a8de90fa852344ab", "score": "0.60051405", "text": "function gen_token(){\n\t\t$secretKey = \"BismILLAHirrohmaanirrohiim\";\n\n\t\t// Generates a random string of ten digits\n\t\t$salt = mt_rand();\n\n\t\t// Computes the signature by hashing the salt with the secret key as the key\n\t\t$signature = hash_hmac('sha256', $salt, $secretKey, true);\n\n\t\t// base64 encode...\n\t\t$encodedSignature = base64_encode($signature);\n\n\t\t// urlencode...\n\t\t$encodedSignature = urlencode($encodedSignature);\n\n\t\treturn $encodedSignature;\n\t}", "title": "" }, { "docid": "5d376a8e14eddeb8a7e1fb5a17088ad2", "score": "0.6001266", "text": "public function generateRefreshAccessToken($accountId, $email,$name)\r\n {\r\n $accessToken = \"\";\r\n $dateNow = Carbon::now('UTC')->timestamp;\r\n $secretKey = Config(\"app.key\");\r\n $secretIv = Config(\"app.key\");\r\n $encryptMethod = \"AES-256-CBC\";\r\n $signature = hash('sha256', $secretKey);\r\n $iv = substr(hash('sha256', $secretIv), 0, 16);\r\n\r\n $header = [\r\n \"alg\" => \"sha256\",\r\n \"typ\" => \"JWT\",\r\n ];\r\n\r\n $payload = [\r\n \"account_id\" => $accountId,\r\n \"user_email\" => $email,\r\n \"user_name\" => $name,\r\n \"creation_ttl_date\" => Carbon::now('UTC')->timestamp,\r\n \"expire_ttl_date\" => Carbon::now('UTC')->addMinute($this->ttl)->timestamp,\r\n \"creation_refrech_ttl_date\" => \"\",\r\n \"expire_refrech_ttl_date\" => \"\",\r\n ];\r\n\r\n $encryptedHeader = base64_encode(openssl_encrypt(json_encode($header), $encryptMethod, $signature, 0, $iv));\r\n\r\n $encryptedPayload = base64_encode(openssl_encrypt(json_encode($payload), $encryptMethod, $signature, 0, $iv));\r\n $accessToken = $encryptedHeader . \".\" . $encryptedPayload . \".\" . $signature;\r\n return $accessToken;\r\n }", "title": "" }, { "docid": "765cbfc9c14106009362f67ff44594a6", "score": "0.5997776", "text": "public function accessToken($bypassNonce = false) {\n\t\t$result = $this->verify('request', $bypassNonce);\n\n\t\t// Optional TTL\n\t\t$options = array();\n\t\t$ttl = $this->getParam(self::XOAUTH_TOKEN_TTL, true);\n\t\tif($ttl) {\n\t\t\t$options['token_ttl'] = $ttl;\n\t\t}\n\n\t\t$verifier = $this->getParam(self::OAUTH_VERIFIER, true);\n\t\tif($verifier) {\n\t\t\t$options['verifier'] = $verifier;\n\t\t}\n\n\t\t$options['callback_url'] = isset($result['callback_url']) ? $result['callback_url'] : null;\n\t\t$options['referer_url'] = isset($result['referer_url']) ? $result['referer_url'] : null;\n\n\t\t// Exchange request token for an access token\n\t\tif(! isset($this->storages['request_token'])) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t'You must supply a storage object implementing ' .\n\t\t\t\t\t $this->storageMap['request_token']);\n\t\t}\n\n\t\tif(! isset($this->storages['access_token'])) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t'You must supply a storage object implementing ' .\n\t\t\t\t\t $this->storageMap['access_token']);\n\t\t}\n\n\t\t// Should have a transaction here?\n\t\t$accessToken = $this->storages['access_token']->createAccessToken(\n\t\t\t$result['consumer_key'], $result['username'], $options);\n\t\tif(! $accessToken) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\t'Cannot create new access token for ' . json_encode($result));\n\t\t}\n\n\t\t// Delete request token here\n\t\t$this->storages['access_token']->deleteRequestToken($result['token']);\n\n\t\t$data = [];\n\t\t$data[self::OAUTH_TOKEN] = Rfc3986::urlEncode($accessToken['token']);\n\t\t$data[self::OAUTH_TOKEN_SECRET] = Rfc3986::urlEncode($accessToken['token_secret']);\n\t\t$data[self::OAUTH_CALLBACK_CONFIRMED] = 1;\n\n\t\tif(! empty($accessToken['expires_at']) && is_numeric($accessToken['expires_at'])) {\n\t\t\t$expiresAt = Carbon::createFromTimestamp(intval($accessToken['expires_at']));\n\n\t\t\t$data[self::XOAUTH_TOKEN_TTL] = $expiresAt->diffInSeconds();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0ea52b1651819462ddff335a36baebde", "score": "0.5996285", "text": "public function createToken()\n {\n $key = base64_encode(getenv('JWT_SECRET'));\n $payload = array(\n \"jti\" => base64_encode(random_bytes(32)),\n \"iat\" => time(),\n \"iss\" => getenv('BASE_URL'),\n \"nbf\" => time() + 10,\n \"exp\" => time() + (3600 * 24 * 15),\n \"data\" => [\n \"user\" => [\n \"username\" => $this->username,\n \"uuid\" => $this->uuid\n ]\n ]\n );\n try {\n return $this->container->jwt::encode($payload, $key, 'HS256');\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "8f262999e6a26805632931835005c438", "score": "0.599279", "text": "function generate_auth_token($username){\r\n\tglobal $dbc;\r\n\t\r\n\t//generate random token\r\n\t$random_token = md5($username).'_';\r\n\t$random_token .= hash('sha256', uniqid(mt_rand(), true).uniqid(mt_rand(), true));\r\n\r\n\t//update user's auth token\r\n\t$query = 'UPDATE user SET '.\r\n\t\t\t 'auth_token = \\''. $random_token .'\\' '.\r\n\t\t\t 'WHERE username = \\''. $username .'\\'';\r\n\t\r\n\t$result = mysqli_query($dbc, $query);\r\n\t\r\n\tif(!$result){\r\n\t\t$msg = 'Error - problem generating token '. mysqli_errno($dbc) .'<br />';\r\n\t\treturn $msg;\r\n\t}\r\n\telse {\r\n\t\treturn $random_token;\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "9038ed077bc0c9077914353bdde4ab28", "score": "0.59913003", "text": "public static function accessToken(){\n $appInfo = WxAppInfo::get(1);\n if($appInfo->is_over_time){\n // 过期重新获取access token\n $appid = $appInfo->appid;\n $appsecret = $appInfo->appsecret;\n $grantType = 'client_credential';\n $url = 'https://api.weixin.qq.com/cgi-bin/token?appid=' . $appid . '&secret=' . $appsecret . '&grant_type=' . $grantType;\n $api = curl_init();\n curl_setopt($api, CURLOPT_URL, $url);\n curl_setopt($api, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($api, CURLOPT_HEADER, false);\n $tokenObj = curl_exec($api);\n curl_close($api);\n $tokenObj = json_decode($tokenObj);\n $appInfo->access_token = $tokenObj->access_token;\n $appInfo->expires_in = $tokenObj->expires_in;\n $appInfo->isUpdate(true)->save();\n $token = $tokenObj->access_token;\n }else{\n // 未过期\n $token = $appInfo->access_token;\n }\n\n return $token;\n }", "title": "" }, { "docid": "714435962deb82e91c567abf7eba725e", "score": "0.59828264", "text": "public function generateToken($liveApi = false){\n\n $tokenLiveUrl = $this->safaricomLiveUrl.'/oauth/v1/generate?grant_type=client_credentials';\n $tokenSandboxUrl = $this->safaricomSandboxUrl.'/oauth/v1/generate?grant_type=client_credentials';\n\n $tokenUrl = $liveApi ? $tokenLiveUrl : $tokenSandboxUrl;\n try{\n $credentials = base64_encode($this->consumerKey.':'.$this->consumerSecret);\n\n $client = new Client();\n $response = $client->get($tokenUrl,\n [\n 'headers' => [\n 'Authorization' => 'Basic ' . $credentials,\n ],\n ]);\n\n $response = (string) $response->getBody();\n $json = json_decode($response);\n $access_token = $json->access_token;\n\n return $access_token;\n }catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "79b33ba63f82dbd70d01c77a4d8ed763", "score": "0.5977435", "text": "private function generateResetPasswordToken()\n {\n $passwordReset = PasswordReset::create([\n 'user_id' => $this->id,\n 'token' => Str::random(150) . $this->id . time(),\n 'expires' => Carbon::now()->addDays(30)->format('Y-m-d H:i:s')\n ]);\n\n return $passwordReset;\n }", "title": "" }, { "docid": "128f7224a2fd7c0df82698f2c47f6fa9", "score": "0.5974973", "text": "private function generateAuthToken(){\n // generate iv\n $iv = openssl_random_pseudo_bytes(self::IVLEN);\n\t$token=[\n\t\"loggedUser\"=>$this->loggedUser,\n\t\"expires\"=>time()+3600,\n\t\"someVar\"=>\"someValue\"\n\t];\n\t$token = json_encode($token);\n $encrypted = openssl_encrypt($token, self::ALG, self::AESKEY, OPENSSL_RAW_DATA,$iv);\n $this->authToken=(base64_encode($iv.$encrypted));\n }", "title": "" }, { "docid": "62c84093882c5fe82f3f6ca04a8b2459", "score": "0.5974764", "text": "protected function createToken($appId, $userId) {\n\t\t$accessTokenModel = $this->findAccessTokenModel($userId, $appId);\n\t\tif (!$accessTokenModel) {\n\t\t\t$accessTokenModelClassname = $this->getAccessTokenModelClassName();\n\t\t\t$accessTokenModel = new $accessTokenModelClassname();\n\t\t}\n\n\t\t$accessTokenModel->user_id = $userId; // @todo explicit user id use\n\t\t$accessTokenModel->application_id = $appId;\n\t\t$accessTokenModel->expire_date = $this->getNewTokenExpireDate();\n\t\t$accessTokenModel->token = $this->generateRandomHash();\n\n\t\treturn $this->saveToken($accessTokenModel);\n\t}", "title": "" }, { "docid": "c23f8d16590724dca3f2bf982a32f9b7", "score": "0.5972394", "text": "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "aefc8aafece2297d1aae1fe7d43edac2", "score": "0.59643036", "text": "protected abstract function grant_token($user, $token);", "title": "" }, { "docid": "4159e31a1320a212c5b143894c8fabf9", "score": "0.5963145", "text": "protected function createNewToken($token){\n return response()->json([\n 'access_token' => $token,\n 'token_type' => 'bearer',\n 'expires_in' => auth('api')->factory()->getTTL() * 60,\n 'user' => auth()->user()\n ]);\n }", "title": "" }, { "docid": "1726997db5a1e897027e027e36c9b96f", "score": "0.59587556", "text": "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c04f4f0f39866d46e7a1061727f49055", "score": "0.595827", "text": "public static function generate(){\r\n return Session::put(Config::get('session/token_name'), md5(uniqid()));\r\n }", "title": "" } ]
ee8b3614db69efd75fc2aad7c0289cec
Returns maximum number of composite related products.
[ { "docid": "b9b0276a90832b66cf175e081969bdee", "score": "0.694417", "text": "public function getMaxRelationsCount()\n {\n $connection = $this->indexerResource->getConnection();\n $relationSelect = $connection->select();\n $relationSelect->from(\n ['relation' => $this->indexerResource->getTable('catalog_product_relation')],\n ['count' => new \\Zend_Db_Expr('count(relation.child_id)')]\n );\n $relationSelect->group('parent_id');\n\n $maxSelect = $connection->select();\n $maxSelect->from(\n ['max_value' => $relationSelect],\n ['count' => new \\Zend_Db_Expr('MAX(count)')]\n );\n return $connection->fetchOne($maxSelect);\n }", "title": "" } ]
[ { "docid": "72b34ffce933325fbfe589ad64ad7d86", "score": "0.6324044", "text": "public function getProductCount();", "title": "" }, { "docid": "a35f4b6d5739c37876d7235dc2d1b764", "score": "0.62234706", "text": "public function getCountProduct(): int\n {\n return $this->listOfClassCollection->count();\n }", "title": "" }, { "docid": "58748544ac2e359d4de0093e46cc6900", "score": "0.61920387", "text": "function edali_woo_related_products_limit() {\n\t\tglobal $product;\n\t\t$args['posts_per_page'] = 6;\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "b6935d125196ce463946c4c9ef9b5e99", "score": "0.61779684", "text": "function listing_manager_front_max_number_of_related( $args ) {\n\t$args['posts_per_page'] = 3; \n\t$args['columns'] = 3;\n\treturn $args;\n}", "title": "" }, { "docid": "0befe26c7ecc9b410186cf9428600157", "score": "0.60749984", "text": "public function maxTotalCount();", "title": "" }, { "docid": "3dc3745d76a29b4c680ea90a1692c2de", "score": "0.60269624", "text": "function get_products_count() {\n return count(get_products_all());\n}", "title": "" }, { "docid": "8427f7456fe0d69a085331aba297c89a", "score": "0.60027826", "text": "public function NumeroProductos(){\n $numero_productos = Product::count();\n return $numero_productos;\n }", "title": "" }, { "docid": "5216f7caf7806e48aef86961228c5d48", "score": "0.59816533", "text": "public function getProductCollectionCount()\n {\n return $this->_klevuCollection->loadProductCountByCollection();\n }", "title": "" }, { "docid": "dae71b4ab297ef8a8730f1d4108dd4b2", "score": "0.5942291", "text": "public function getMaxCapacity()\r\n {\r\n $maxCapacity = 0;\r\n\r\n foreach ($this->activeSquares as $square) {\r\n $capacity = $square->need('capacity');\r\n\r\n if ($capacity > $maxCapacity) {\r\n $maxCapacity = $capacity;\r\n }\r\n }\r\n\r\n return $maxCapacity;\r\n }", "title": "" }, { "docid": "5ebf4695ad5951d685674a2ee6523b7a", "score": "0.5935807", "text": "public function getNumberOfProducts(): int;", "title": "" }, { "docid": "aac6d5b8df0e7931ded9e0fec8879ba3", "score": "0.5927494", "text": "public function productsCount()\n {\n return $this->products()->count();\n }", "title": "" }, { "docid": "060caa74fcec204215b9c112df3210fa", "score": "0.5843253", "text": "public function getProductsCount(): int\n {\n return Product::query()->count();\n }", "title": "" }, { "docid": "30a37aeb7fe8f1359d5379626b272088", "score": "0.58180946", "text": "function boldthemes_change_number_related_products( $args ) {\n\t\t\t$args['posts_per_page'] = 3; // # of related products\n\t\t\t$args['columns'] = 3; // # of columns per row\n\t\t\treturn $args;\n\t\t}", "title": "" }, { "docid": "1b80f7f7bbfe83dfdbc5d72403140d50", "score": "0.57895017", "text": "function woo_related_products_limit() {\r\n global $product;\r\n\r\n\t$args['posts_per_page'] = 6;\r\n\treturn $args;\r\n}", "title": "" }, { "docid": "1ddc7d8b176d5337e10d4269cafc7d97", "score": "0.5769856", "text": "public function getCount() {\n $allProducts = $this->readProduct();\n\n if (count($allProducts)<1) {\n return 0;\n }\n\n $count = 0;\n foreach ($allProducts as $product) {\n $count=$count+$product;\n }\n\n return $count;\n}", "title": "" }, { "docid": "bdc3eedc65b9370122ca3e557756e9df", "score": "0.5744591", "text": "public function GetMaxResourcesCapacity(){\n global $DB, $config;\n if( $config['MG_max_cap'] <= 0 ) throw new Exception(\"Magazine is not activated! MG_max_cap must be > 0!\");\n\n $qtmg= $DB->query(\"SELECT id FROM \".TB_PREFIX.\"t_builds WHERE func= 'mag_e' SELECT id FROM t_builds WHERE func= 'mag_e' and (arac is null or arac= \".$this->user->raceId.\")\");\n if( $qtmg->num_rows >0 ) {\n $tmg= $qtmg->fetch_array();\n $maglev= $this->GetBuildLevel($tmg['id']); //magazine level\n\n $maxres= $config['MG_max_cap'] * ($maglev + 1);\n } else {\n echo \"<b>WARNING: Magazine is activated but there is no building with magazine function!</b>\";\n $maxres= $config['MG_max_cap'];\n }\n return $maxres;\n }", "title": "" }, { "docid": "529962f6826ce6f71b68fcdf5a5439a3", "score": "0.5739548", "text": "public function getNumberOfProduct() {\n $query = \"SELECT * FROM `product` WHERE `visible` = 1 \";\n $db = new DB();\n $result = $db->prepare($query);\n $result->execute();\n $data = $result->rowCount();\n return $data;\n }", "title": "" }, { "docid": "67be6dbd8e66e6d5b174eca263030295", "score": "0.57086164", "text": "public function getMaxBagItems()\n {\n return $this->max_bag_items;\n }", "title": "" }, { "docid": "34073997809df97d10562e0ec4730ae7", "score": "0.5698366", "text": "function woo_related_products_limit() {\n global $product;\n\t$col_count_progression = get_theme_mod('shop_col_progression', '3'); \n\t$args = array(\n\t\t'post_type' \t\t=> 'product',\n\t\t'no_found_rows' \t\t=> 1,\n\t\t'posts_per_page' \t\t=> $col_count_progression,\n\t\t'ignore_sticky_posts' \t=> 1,\n\t\t'post__not_in' \t=> array($product->id)\n\t);\n\treturn $args;\n}", "title": "" }, { "docid": "1387692f5f614c353ba922bc8885f395", "score": "0.5673226", "text": "public function countProduct();", "title": "" }, { "docid": "a002550441a885674d4cd8ee15cfc6ba", "score": "0.56543994", "text": "public function getMaxPurchaseableItems() : int\r\n\t{\r\n\t\treturn $this->provider->getOption('max_purchaseable_items');\r\n\t}", "title": "" }, { "docid": "ff177d280dcb1711f7c445eb888c0510", "score": "0.56125796", "text": "public function count()\n {\n return $this->products->count();\n }", "title": "" }, { "docid": "051df758a153d053ede08001cf9b8aec", "score": "0.56113005", "text": "protected function _fetchMaxChunks() {\n $count = 'COUNT(*)';\n $model = $this->getModel();\n $select = clone $this->getSelect();\n $select->reset(Zend_Db_Select::COLUMNS)\n ->reset(Zend_Db_Select::FROM)\n ->reset(Zend_Db_Select::ORDER)\n ->reset(Zend_Db_Select::GROUP)\n ;\n $select->from($model->getName(), array('c' => $count));\n\n if ($max = $this->_fetchMaxChunksFromFilters($select)) {\n return $max;\n } else {\n $result = $model->fetchRow($select);\n return $result->c;\n }\n }", "title": "" }, { "docid": "8c99bc3856c21ef0ad8a14b08d93ea2f", "score": "0.55924803", "text": "public function maxModuleCount(){\n \n return $this->maximum_iterations;\n }", "title": "" }, { "docid": "8f2835181a74089501a5eb0f4822b6a0", "score": "0.55812085", "text": "function get_pharm_max_reviews() {\n\tglobal $db;\n\n\t$sql = \"SELECT P.FirstName, P.LastName, y.num FROM Pharmacist P, (\n\t\tSELECT PharmID, COUNT(*) as num FROM Review group by PharmID) as y \n\t\tWHERE P.PharmID = y.PharmID \n\t\tAND y.num = (\n\t\t\tSELECT MAX(x.num) FROM (\n\t\t\tSELECT COUNT(*) as num FROM Review GROUP BY PharmID) as x);\";\n\t$result = $db->query($sql);\n\t$array = $result->fetchALL(PDO::FETCH_ASSOC);\n\treturn $array;\n}", "title": "" }, { "docid": "c631ae741a83fba918cb79779c2a6d58", "score": "0.5556839", "text": "public function maxExtras(): ?int;", "title": "" }, { "docid": "945738fecbe967155dc20cc2c0ac5c86", "score": "0.5540508", "text": "public function CountSetProducts()\n {\n return $this->createQueryBuilder('p')\n ->andWhere('p.setProduct > :val')\n ->setParameter('val', 1)\n ->select('count(p.id)')\n ->getQuery()\n ->getSingleScalarResult();\n }", "title": "" }, { "docid": "2e63bdbfe62c1e179f7bcda3258796f0", "score": "0.55400634", "text": "public function getCountForProducts()\n\t{\n\t\t$user_table = \\Config::get('webshoppack::user_table');\n\t\t$user_id = 'u.'.\\Config::get('webshoppack::user_id_field');\n\t\t$product_details = \\DB::select('select parent.id AS category_id, COUNT(prod.id) product_count from product_category AS node, product_category AS parent,\n\t\t\t\t\t\t\t\t\t\tproduct AS prod, '.$user_table.' AS u where node.category_left BETWEEN parent.category_left AND parent.category_right\n\t\t\t\t\t\t\t\t\t\tAND node.id = prod.product_category_id AND prod.product_status != \\'Deleted\\' AND prod.product_status = \\'Ok\\' AND '.$user_id.' = prod.product_user_id\n\t\t\t\t\t\t\t\t\t\tGROUP BY parent.id ORDER BY node.category_left');\n\t\tif (count($product_details)) {\n\t\t\tforeach($product_details as $product)\n\t\t\t{\n\t\t\t\t$this->prod_cat_count_arr[$product->category_id] = $product->product_count;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5a366ba2963a4e62689363794e2a1f79", "score": "0.5531392", "text": "public function getCountProducts() {\n return $this->model->where('id_user', '=', $this->current_user->id)->count();\n }", "title": "" }, { "docid": "c9b7f1d32ad945d6f4a2e342506a8846", "score": "0.5524068", "text": "public function getMaxPickCount()\n\t{\n\t\treturn $this->getProperty('maxPickCount');\n\t}", "title": "" }, { "docid": "510001c9bd468a10ca7009a9da42940b", "score": "0.5511544", "text": "public function getMaxOrderNumber();", "title": "" }, { "docid": "652345439fffb4851e58b1468457f0c9", "score": "0.55084294", "text": "public function countMaximums()\n {\n return $this->getEntityManager()->createQuery(\n 'SELECT l, COUNT( s.id) AS maxi\n FROM AppBundle:Level l INDEX BY l.id\n LEFT JOIN l.statistics s\n GROUP BY l.id\n ')\n ->getResult();\n }", "title": "" }, { "docid": "930f58ad26e2e77e0bb2e451501215a0", "score": "0.5487489", "text": "public static function getProductsCount(): int\n {\n return ProductService::getNumberOfProducts();\n }", "title": "" }, { "docid": "a5e2caaed6b3ee511dc8ee9268d9eb85", "score": "0.54702747", "text": "public function countLigne_produit_compose(){\n\t\t\t\t\t return count($this->listeLigne_produit_compose());\n\t\t\t\t\t }", "title": "" }, { "docid": "65d4fa09f11687b8ebdbe8d61c0e3b95", "score": "0.5468021", "text": "public function getProductDetailCount()\n {\n return $this->count(self::product_detail);\n }", "title": "" }, { "docid": "ff7cf9251263603980c9a6bed0c0cdd4", "score": "0.54664564", "text": "public function getAmountOfLPChildren() {\n\t\treturn count($this->getLPChildren());\n\t}", "title": "" }, { "docid": "5d61be018457334ff836b663a0fd539c", "score": "0.5465266", "text": "public function getProductsCount()\n {\n return $this->_iProductsCnt;\n }", "title": "" }, { "docid": "ab07f97d6c87199b1c8085183133e4ce", "score": "0.5464097", "text": "public function getMaxCount() {\n return $this->maxCount ? WCF::getLanguage()->get('wcf.page.gman.item.maxcount') : null;\n }", "title": "" }, { "docid": "faafcf41e277ade030373d93e442dfe1", "score": "0.5452116", "text": "public function getCollectionSize(): int;", "title": "" }, { "docid": "f93fc8e3ba9bf49f568cdb04b38821dc", "score": "0.54479456", "text": "public function getProductPictureCount()\n {\n return $this->count(self::product_picture);\n }", "title": "" }, { "docid": "a02ae35b1b509bbab7cb0b371ff28d8d", "score": "0.540069", "text": "public function count()\r\n {\r\n return count($this->related);\r\n }", "title": "" }, { "docid": "c93bebb9ed0881f825e7afd246321eac", "score": "0.5392851", "text": "public function getNumberOfProducts(): ?string;", "title": "" }, { "docid": "32df8360d3c0c04063afc3e5d59bf8e8", "score": "0.5390951", "text": "public function getNumberOfPrizes()\n {\n return count($this->getPrizes());\n }", "title": "" }, { "docid": "f31006cfcec555aa764b67c966b8233b", "score": "0.53882563", "text": "public function getMaxProductsSort()\n {\n $maxSort = $this->db->GetOne(\n \"SELECT MAX(products_sort) FROM \" . TABLE_PRODUCTS\n );\n\n return $maxSort + 10000;\n }", "title": "" }, { "docid": "36314b218a6e4a73e5518123ec8e4fd0", "score": "0.5388147", "text": "public static function getCartProductsCount(){\n return self::getCartProductsQuery()->count();\n }", "title": "" }, { "docid": "17e0c623a1f48d41c60390745a256e4b", "score": "0.53853816", "text": "function getNbRefWithoutProduct(){\n $result = & $this->handle->query(\"select count(id) as nbRefWithoutProduct from imports_suppliers\".\n \" where id_Import = \". $this->id . \" and nb_idTC = 0\" , __FILE__, __LINE__, false);\n $rec = & $this->handle->fetchAssoc($result);\n// $nbRefWithoutProduct = $rec['nbRefWithoutProduct'];\n\n return $rec['nbRefWithoutProduct'];\n }", "title": "" }, { "docid": "7bc54e5ad09da819c153e40835a61f61", "score": "0.5382076", "text": "public function cart_calculate_maxitems( ) {\n\t\t$cart_maxitems = array();\n\t\t$cart = $this->session->get( 'ubc-cart' );\n\t\tif ( $cart ) {\n\t\t\tforeach ( $cart as $cartrow => $itemrow ) {\n\t\t\t\tif ( 1 == $itemrow['prodmaxed'] ) {\n\t\t\t\t\t$cart_maxitems[] = $itemrow['prodid'];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn implode( ',',$cart_maxitems );\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "52bc96ce1d433705a7d2ad14ea2d7aa6", "score": "0.53746945", "text": "function get_maximum_choice_group_number() {\n return 8;\n }", "title": "" }, { "docid": "88c4265e3387144000947062a0cceb79", "score": "0.53539044", "text": "public function getMaximumQuantity()\n {\n return $this->maximumQuantity;\n }", "title": "" }, { "docid": "907d77896aa8858eabe9a86a36f55741", "score": "0.53525794", "text": "public function AcceptedSubComponentCardinality()\n\t\t{\n\t\t\treturn array();\n\t\t}", "title": "" }, { "docid": "eca2b6012f5e062e9574725b3f6e918a", "score": "0.5344441", "text": "public function getNumProducts()\n {\n if (!isset($this->cart->products)) {\n return 0;\n }\n\n $amount = 0;\n foreach ($this->cart->products as $id => $product) {\n foreach ($product->size as $size) {\n $amount++;\n }\n }\n\n return $amount;\n }", "title": "" }, { "docid": "48e68b25f9dfe93f0865dc6826722761", "score": "0.5334817", "text": "public function count(): int {\n return $this->getInnerContainer()->count();\n }", "title": "" }, { "docid": "48e68b25f9dfe93f0865dc6826722761", "score": "0.5334817", "text": "public function count(): int {\n return $this->getInnerContainer()->count();\n }", "title": "" }, { "docid": "60ad1b2f243dd522418581e57e8fe04a", "score": "0.53163654", "text": "public function getMaxOccurances();", "title": "" }, { "docid": "00a39fbe27ef9fd0f0255315113cf965", "score": "0.53085464", "text": "public function hasMax(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "00a39fbe27ef9fd0f0255315113cf965", "score": "0.53085464", "text": "public function hasMax(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "41bd99947354f5fb391cf2ceefef7f8b", "score": "0.5303732", "text": "protected function _getProductsCount()\n {\n if(!$this->_request->getParam('id')){\n return false;\n }\n $collection = $this->categoryRepository->get($this->_request->getParam('id'))->getProductCollection();\n\n return $collection->getSize();\n }", "title": "" }, { "docid": "78fbdec69615c2177ef6cd095e27b34e", "score": "0.5299052", "text": "public function getMaxDepth()\n {\n $aSubvariants = $this->getMdSubvariants();\n\n if (!count($aSubvariants)) {\n return 0;\n }\n\n $iMaxDepth = 0;\n foreach ($aSubvariants as $oSubvariant) {\n if ($oSubvariant->getMaxDepth() > $iMaxDepth) {\n $iMaxDepth = $oSubvariant->getMaxDepth();\n }\n }\n\n return $iMaxDepth + 1;\n }", "title": "" }, { "docid": "ad8e1ac65a42c12da8a76bc916e1a70d", "score": "0.52938217", "text": "public function getMaxChildren()\n {\n return $this->maxChildren;\n }", "title": "" }, { "docid": "a59b425ee0ae341cf193731f3d9de3eb", "score": "0.5290649", "text": "public function getWidthOfProduct(): int;", "title": "" }, { "docid": "a73d5c5c764d08f1e6167cafa2d723e8", "score": "0.5285785", "text": "public function getMaxProcesses(): int;", "title": "" }, { "docid": "f4592ef624b6a9af82a5df3c994034e7", "score": "0.5283986", "text": "public function hasMaxTotalInstances(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "c53cd398c21969b358029542030737df", "score": "0.5283003", "text": "function numOfChildCategories() {\n\t\tif (is_array($this->categories_uid)) {\n\t\t\treturn count($this->categories_uid );\n\t\t}\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "0fe10e89aa6e8fd4a9eaa5fc0fd3861d", "score": "0.5277109", "text": "public function getMaxSolutions()\n\t{\n\t\treturn $this->maxSolutions;\n\t}", "title": "" }, { "docid": "4aa389fe7157391bbf8829129fcb12bc", "score": "0.52741545", "text": "public function cardinality(): int\n {\n return 1 + $this->left->cardinality() + $this->right->cardinality();\n }", "title": "" }, { "docid": "f495019e6e6f5dfa3a5a2466087fe018", "score": "0.5267544", "text": "function yith_wcwl_count_all_products() {\n return YITH_WCWL()->count_all_products();\n }", "title": "" }, { "docid": "f495019e6e6f5dfa3a5a2466087fe018", "score": "0.5267544", "text": "function yith_wcwl_count_all_products() {\n return YITH_WCWL()->count_all_products();\n }", "title": "" }, { "docid": "dbb72f262aa07e660c4aa3ea8c697b37", "score": "0.5261654", "text": "public function getCapacity() {\n $salons = $this->activeSalon();\n $capacity = 0;\n foreach($salons->get() as $salon) {\n $capacity += $salon->max_members;\n }\n return $capacity;\n }", "title": "" }, { "docid": "d325aab894a229d8f8b2580abdfb7e48", "score": "0.5247331", "text": "function get_max(){\n\t\t$this->load->model('Mdl_products');\n\t\t$max_id = $this->Mdl_products->get_max();\n\t\treturn $max_id;\n\t}", "title": "" }, { "docid": "e8f015963bae50f0ec167f9f20960afb", "score": "0.5243231", "text": "public function nbrComents()\n {\n $bdd = $this->dbConnect();\n $req = $bdd->prepare('SELECT COUNT(content) FROM post WHERE idItem');\n $req->execute(array());\n return $req;\n }", "title": "" }, { "docid": "f0ec8aaa6e7bc469e98ece990b5ad688", "score": "0.52410007", "text": "function get_object_count()\n {\n return $this->get_browser()->count_external_repository_objects($this->get_condition());\n }", "title": "" }, { "docid": "355b9aac0d089c9d208dd8505399b4d5", "score": "0.5240629", "text": "public function relationCount(): int\n {\n return count(explode('.', $this->name)) - 1;\n }", "title": "" }, { "docid": "cd6859bd0693d1b128ccfb96cd2d68fc", "score": "0.524021", "text": "public function maxLimit(): int;", "title": "" }, { "docid": "2cc68d10d2b6c68621b4731068617d28", "score": "0.5232742", "text": "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "title": "" }, { "docid": "dabe8f36ae7373d777ccf0d34d522fd5", "score": "0.52324474", "text": "public function countNumCategories();", "title": "" }, { "docid": "8b5ea510371b391d8f66b04a63984fbc", "score": "0.5231613", "text": "public function hasMaxInstances(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "b528ccd230cdfda88b8a6d7bff46523f", "score": "0.5231059", "text": "public function getTopLengthOfProduct(): ?int\n {\n return $this->widthOfProduct;\n }", "title": "" }, { "docid": "0adb384d313972792a9ccccd00bf4873", "score": "0.5229206", "text": "public static function productApiCount()\r\n {\r\n return array();\r\n }", "title": "" }, { "docid": "0871e668a649267e06eb0c9ecb8abd5a", "score": "0.5219883", "text": "public function findMaxNumberOfInstructions()\n {\n $maxInstructions = 0;\n foreach ($this->getMowers() as $mower) {\n $currentMowerInstructionsCount = count($mower->getInstructions());\n if ($currentMowerInstructionsCount > $maxInstructions) {\n $maxInstructions = $currentMowerInstructionsCount;\n }\n }\n\n return $maxInstructions;\n }", "title": "" }, { "docid": "a77d0f3eb8dafb8b4dd4a835d6dd803c", "score": "0.5214512", "text": "public function getNumConsumos()\n {\n return $this->num_consumos;\n }", "title": "" }, { "docid": "c72464748311b20e4d17e6b1d31bfbe0", "score": "0.52106696", "text": "public function getPositionLimit()\n {\n $limit = $this->getProduct()->getData($this->_getPositionLimitField());\n if ($limit === null) {\n // use configuration settings\n $limit = $this->_targetRuleData->getMaximumNumberOfProduct($this->getProductListType());\n $this->getProduct()->setData($this->_getPositionLimitField(), $limit);\n }\n return $this->_targetRuleData->getMaxProductsListResult($limit);\n }", "title": "" }, { "docid": "37111c8baf56457eea642768f442351b", "score": "0.5206071", "text": "function count() {\n\t\t$count = $this->db->from(\"product\")->count_all_results();;\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "a6abe7dc3e6370c25933e67f04b1482d", "score": "0.5205314", "text": "public function count(){ return $this->countChildren(); }", "title": "" }, { "docid": "e02b86e555ebdd496f7962a41151300e", "score": "0.5205192", "text": "private function _getNumPages()\n {\n $numItems = count($this->_pictures);\n $numPages = floor($numItems / MAX_ITEMS_PER_PAGE);\n\n if (MAX_ITEMS_PER_PAGE * $numPages < $numItems) {\n $numPages++;\n }\n\n return $numPages;\n }", "title": "" }, { "docid": "8d4ccc4a380f9ed8c092e7ceb91af2ab", "score": "0.5204723", "text": "public function getSize()\n\t{\n\t\t$size = 1;\n\t\tforeach ($this->getChildren() as $child)\n\t\t{\n\t\t\t$size += $child->getSize();\n\t\t}\n\n\t\treturn $size;\n\t}", "title": "" }, { "docid": "d2813fb41ef9bd708cd6f59bf2d3a4fc", "score": "0.51876426", "text": "public function numComponents() { return $this->_m_numComponents; }", "title": "" }, { "docid": "45e0cf5fd321008c956dba9be80fdfcf", "score": "0.51835775", "text": "public function maxCapacity(): int\n {\n $characters = strlen(config('urlhub.hash_char'));\n $length = config('urlhub.hash_length');\n\n // for testing purposes only\n // tests\\Unit\\Middleware\\UrlHubLinkCheckerTest.php\n if ($length === 0) {\n return 0;\n }\n\n return (int) pow($characters, $length);\n }", "title": "" }, { "docid": "485c11c94c8fc9543ff9ace5df244150", "score": "0.51794994", "text": "function get_products_num() {\n global $db;\n if (isset($_SESSION['customer_id'])){\n $products_query = \"select count(products_id) as products_num\n \t \t\t\t\t\t from \" . TABLE_CUSTOMERS_BASKET . \"\n \t \t\t\t\t\t where customers_id = \" . (int)$_SESSION['customer_id'];\n } else {\n $products_query = \"select count(products_id) as products_num\n \t \t\t\t\t\t from \" . TABLE_CUSTOMERS_BASKET . \"\n \t \t\t\t\t\t where cookie_id = '\" . $_SESSION['cookie_cart_id'] . \"'\";\n }\n $products = $db->Execute($products_query);\n\n if ($products->RecordCount() > 0){\n return (float)$products->fields['products_num'];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "91f0f49fb2ca1b60d0afc225f7657391", "score": "0.517805", "text": "private function get_product_count() {\n\t\t$query_args = array();\n\t\t$query_args['post_type'] = array( 'product', 'product_variation' );\n\t\t$query = new \\WP_Query();\n\t\t$query->query( $query_args );\n\t\treturn intval( $query->found_posts );\n\t}", "title": "" }, { "docid": "5f0fe6f3114b1296a4b515d7c2a8dd4d", "score": "0.5169409", "text": "public function get_total_products(){\n\t\treturn $this->db->count_all($this->_table);\n\t}", "title": "" }, { "docid": "283438a071e8666025095acf983866ed", "score": "0.51656675", "text": "public function getMaxOrders()\n {\n return $this->maxOrders;\n }", "title": "" }, { "docid": "a0f8c2db1e0945a35e20417f96e1cdb3", "score": "0.5155448", "text": "final public function getRawCount(): int\n {\n return $this->products->count();\n }", "title": "" }, { "docid": "cb8dc8f65d92b0d431d155ff008263a8", "score": "0.51493007", "text": "public function getBottomLengthOfProduct(): ?int\n {\n return $this->widthOfProduct;\n }", "title": "" }, { "docid": "fbe375ba4d048b380eee373865ff5456", "score": "0.51452714", "text": "function set_wc_max_product_page() {\n global $jrl_theme_options;\n if( !empty($jrl_theme_options['max_product_page']) ) {\n $max_product = $jrl_theme_options['max_product_page'];\n add_filter( 'loop_shop_per_page', create_function( \"$cols\", \"return $max_product;\" ), 20 );\n }\n}", "title": "" }, { "docid": "b275420c35409b94865e4d371a02d9ab", "score": "0.51390356", "text": "private function getTotalNumOfExtraItems(){\n \n return sizeof($this->extras);\n }", "title": "" }, { "docid": "729e04c64aad0c9c32fd42010b58c463", "score": "0.5136087", "text": "function nb_publ($id) {\n $ens_photo=photo_perso($id);\n $nb_photo_perso=count($ens_photo);\n return $nb_photo_perso;\n}", "title": "" }, { "docid": "c2d68888540c24a7326f99dca844415b", "score": "0.5134714", "text": "public function most_selling_products(){\n $paid=1;\n $get_sold_product = $this->con->prepare (\"\n SELECT product_id \n FROM sales \n WHERE paid=?\n \");\n $get_sold_product->bind_param(\"i\", $paid);\n $get_sold_product->execute();\n $get_sold_product->bind_result( $product_id );\n $sold_product_id=null;\n echo \"<br/>\";\n $count = 0;\n $initial_value=0;\n while ($get_sold_product->fetch()){\n $sold_product_id .= $product_id;\n $arr_sold_products = explode(\",\", $sold_product_id);\n $total_products_sold = count($arr_sold_products).'<br/>';\n $counts = array_unique($arr_sold_products);\n }\n print_r($counts);\n echo \"\".\n \"<h4>\".\"Products sold: \".$total_products_sold.\"</h4>\".\n \"\";\n }", "title": "" }, { "docid": "8db837f02c9f971a1b62d7d80f487270", "score": "0.512723", "text": "public function getSize()\n {\n $size = 1;\n\n foreach ($this->getChildren() as $child) {\n $size += $child->getSize();\n }\n\n return $size;\n }", "title": "" }, { "docid": "59c05a8c4c08d527b214ec7865a040c1", "score": "0.5127207", "text": "public function getSize(): int\n {\n $size = 1;\n foreach ($this->getChildren() as $child) {\n $size += $child->getSize();\n }\n\n return $size;\n }", "title": "" }, { "docid": "027db7590ab4f6b10c0ecb57afda61ab", "score": "0.5123481", "text": "function oxides_edge_woocommerce_products_per_page() {\n\t\t$products_per_page = 12;\n\n\t\tif (oxides_edge_options()->getOptionValue('edgtf_woo_products_per_page')) {\n\t\t\t$products_per_page = oxides_edge_options()->getOptionValue('edgtf_woo_products_per_page');\n\t\t}\n\n\t\treturn $products_per_page;\n\t}", "title": "" } ]
80c46a407f4ba01ab9ee57f86cb71b1f
Updates an existing ClasscationAdmin model. If update is successful, the browser will be redirected to the 'view' page.
[ { "docid": "a049b2ae6f4222ad9f32f2a679bf8b9b", "score": "0.632434", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n date_default_timezone_set(\"Asia/Shanghai\");\n $model->updatetime = date(\"Y-m-d H-i-s\",time());\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $cat=new Classadmin('',array('id','praent_id','categoryname','fullname'));\n $_list=$cat->getTree(ClasscationAdmin::get_menus(true));//获取分类结构\n $list = array('0'=>'顶级菜单');\n foreach($_list as $value){\n $list[$value['id']] = $value['fullname'];\n }\n return $this->render('update', [\n 'model' => $model,\n 'list' => $list,\n ]);\n }\n }", "title": "" } ]
[ { "docid": "b5bee2ee979458a7f73582bd8dd4cc36", "score": "0.68477535", "text": "public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }", "title": "" }, { "docid": "d41fb1291a447a36816b5f09a5ff3535", "score": "0.66544896", "text": "function update(){\n\t\t$this->model->update();\n\t}", "title": "" }, { "docid": "61286f7e6a83c6bae2b669ebb746001c", "score": "0.6652395", "text": "public function updateAction() {\n $model = new Application_Model_Compromisso();\n //passo para a model os dados a serem upados\n $model->update($this->_getAllParams());\n //redireciono para a view\n $this->_redirect('compromisso/index');\n }", "title": "" }, { "docid": "68e3b3b47a7faed0efb5ab31915172fd", "score": "0.6640242", "text": "public function update(ClassRequest $request, ClassModel $class)\n {\n $this -> authorize(\"update\", ClassModel::class);\n\n $class -> update($request -> all());\n\n return redirect()\n -> route(\"admin.class.edit\", $class -> id)\n -> with(\"success\", \"Class was updated successfully!\");\n }", "title": "" }, { "docid": "3c98ce8df35a24cbe1d69481f95a5658", "score": "0.65747553", "text": "public function actionUpdate() {\n $model = $this->loadModel();\n $modelAmbienteUso = new Ambiente_Uso;\n $modelUsuario = new Usuario();\n $modelAmbiente = new Ambiente();\n $modelPredio = new Predio();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Alocacao'])) {\n $model->attributes = $_POST['Alocacao'];\n $a = $model->DT_DIA;\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->ID_ALOCACAO));\n }\n\n $this->render('update', array(\n 'model' => $model,\n 'modelAU' => $modelAmbienteUso,\n 'modelU' => $modelAmbienteUso,\n 'modelA' => $modelAmbiente,\n 'modelP' => $modelPredio\n ));\n }", "title": "" }, { "docid": "b3bf092d9672e82f5adf02d50b8e8fea", "score": "0.65635395", "text": "public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "bf4fd17074741ffd08053ffd5dd4bf1d", "score": "0.65278876", "text": "public function actionUpdate() {\n Yii::import('bootstrap.widgets.TbEditableSaver'); //or you can add import 'ext.editable.*' to config\n $es = new TbEditableSaver('Donneur'); // 'User' is classname of model to be updated\n $es->update();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n /*if (isset($_POST['pk'])) {\n $model = $this->loadModel($_POST['pk']);\n $model->first_name = $_POST['first_name'];\n $model->save();\n // $this->redirect(array('view', 'id' => $model->id));\n }\n\n /* $this->render('update', array(\n 'model' => $model,\n ));*/\n }", "title": "" }, { "docid": "040c123dc9258c1878089a7f0bb3d576", "score": "0.64481324", "text": "public function actionUpdate()\n {\n $categoryOptions = DataHelper::getCategoryOptions();\n $statusMap = CmsCategory::getCategoryStatus();\n $model = $this->findModel($_GET['id']);\n if (Yii::$app->request->isPost) {\n $model->image_main_file = UploadedFile::getInstance($model, 'image_main_file');\n if (($file = $model->uploadImageMain())!=false) {\n UtilHelper::DeleteImg($model->image_main);\n $model->image_main = $file['src'];\n }\n $model->image_node_file = UploadedFile::getInstance($model, 'image_node_file');\n if (($file = $model->uploadImageNode())!=false) {\n UtilHelper::DeleteImg($model->image_node);\n $model->image_node = $file['src'];\n }\n $model->banner_file = UploadedFile::getInstance($model, 'banner_file');\n if (($file = $model->uploadBanner())!=false) {\n UtilHelper::DeleteImg($model->banner);\n $model->banner = $file['src'];\n }\n \n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n DataHelper::deleteCache();\n return $this->redirect(['index']);\n }\n }\n return $this->render('update', [\n 'model' => $model,\n 'categoryOptions' => $categoryOptions,\n 'statusMap' => $statusMap,\n ]);\n }", "title": "" }, { "docid": "fb24e01f805191aeec23b80c37935b1b", "score": "0.64380866", "text": "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\t\t//print_r(\"update mode\");exit;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n // return $this->redirect(['view', 'id' => $model->id]);\r\n\t\t return $this->redirect(['index']);\r\n }\r\n\r\n return $this->renderAjax('update', [\r\n 'model' => $model,\r\n ]);\r\n }", "title": "" }, { "docid": "47a65f1eb3a2d2e8991bba5b78c62ee1", "score": "0.6410995", "text": "public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }", "title": "" }, { "docid": "09de993b223ecc51add04c70e3873824", "score": "0.6392073", "text": "public function actionUpdate($id)\n {\n $this->layout =\"main-admin\";\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_factura_gastos]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "694148d4b00cef90f2d30ec61d5c7cb2", "score": "0.63759845", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\tif($model->tags)\n\t\t\tforeach($model->tags as $tag)\n\t\t\t\tarray_push($model->formTags, $tag->title);\n//var_dump($model->teacherModels);exit;\n\t\tif($model->teacherModels)\n\t\t\tforeach($model->teacherModels as $teacher)\n\t\t\t\tarray_push($model->teachers, $teacher->id);\n\t\t\n\t\t$model->classDays = $model->classDays ? explode(',', $model->classDays) : null;\n\t\tif(isset($_POST['Classes'])) {\n\t\t\t$model->attributes = $_POST['Classes'];\n\t\t\t$model->formTags = isset($_POST['Classes']['formTags']) ? explode(',', $_POST['Classes']['formTags']) : null;\n $model->teachers = isset($_POST['Classes']['teachers']) ? $_POST['Classes']['teachers']: null;\n\t\t\t$model->classDays = isset($_POST['Classes']['classDays']) ? explode(',', $_POST['Classes']['classDays']) : null;\n\t\t\t$model->price = isset($_POST['Classes']['price']) ? $_POST['Classes']['price'] : 0;\n\n\t\t\tif($model->save()) {\n\t\t\t\tYii::app()->user->setFlash('success', '<span class=\"icon-check\"></span>&nbsp;&nbsp;اطلاعات با موفقیت ذخیره شد.');\n\t\t\t\t$this->redirect(array('admin'));\n\t\t\t} else\n\t\t\t\tYii::app()->user->setFlash('failed', 'در ثبت اطلاعات خطایی رخ داده است! لطفا مجددا تلاش کنید.');\n\t\t}\n\n\t\t$this->render('update', array(\n\t\t\t\t'model' => $model,\n\t\t));\n\t}", "title": "" }, { "docid": "668803ffd52ac5b1477bb9f71a581d9b", "score": "0.6372723", "text": "public function actionUpdate()\n\t{\n\n\t\t//print_r (Yii::app()->user);\n\t\tif (Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\n\t\t$model=$this->loadarticles();\n\t\t$params=array('Articles'=>$model);\n//\t\tif(Yii::app()->user->checkAccess('updateOwnArticle',$params))\n//\t\t{\n//\t\t\t\n\t\t\tif(isset($_POST['Articles']))\n\t\t\t{\n\t\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\t\tif($model->save()){\n\t\t\t\t\t$this->redirect(array('show','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n//\t\t}else{\n//\t\t\techo \"no permissions\";\n//\t\t}\n\t\t$this->render('update',array('model'=>$model));\n\t}", "title": "" }, { "docid": "c0ac76f174957bc48564911bfedf41c1", "score": "0.63451356", "text": "public function actionUpdate()\n {\n $model = $this->loadModel();\n\n if (isset($_POST['User']))\n {\n $model->attributes = $_POST['User'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Данные обновлены!'));\n\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "43096183bb7a80220f3381799e9b8661", "score": "0.63447404", "text": "function update(){\n session_start();\n $id=$_SESSION['id_alumno'];\n $nombre= $_POST['nombre'];\n $apellido= $_POST['apellido'];\n $telefono= $_POST['telefono'];\n \n unset($_SESSION['id_alumno']);\n $this->model->update(['id'=>$id,'nombre'=>$nombre,'apellido'=>$apellido,'telefono'=>$telefono]);\n \n $url= constant('URL').\"alumno\";\n header(\"Location: $url\");\n\n // $this->index();\n\n // if ($this->model->update(['id'=>$id,'nombre'=>$nombre , 'apellido'=>$apellido,'telefono'=>$telefono])) {\n // $alumno = new Alumnos();\n // $alumno->id=$id;\n // $alumno->nombre=$nombre;\n // $alumno->apellido=$apellido;\n // $alumno->telefono=$telefono;\n // $this->view->alumno=$alumno;\n // $this->render();\n\n\n // }else{\n // $this->view->render('errors/index');\n // }\n // $url= constant('URL').\"alumno\";\n // header(\"Location: $url\");\n }", "title": "" }, { "docid": "a6bfd8deed0b20eeed5d792ef78116d0", "score": "0.63125134", "text": "public function actionUpdate($id)\n {\n $model=$this->loadModel($id);\n $model->scenario = 'admin';\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('update',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "749667cc0e968f5c373d6971f6616683", "score": "0.6263169", "text": "public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}", "title": "" }, { "docid": "0933dfeab89a854285e7d014e1cd1da9", "score": "0.62609965", "text": "public function actionUpdate($id)\n\n {\n \n $model = new Main();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n\n }\n \n \n\n }", "title": "" }, { "docid": "69775370104aa801243d76d01a36b93e", "score": "0.62602985", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadfiles();\n\t\tif(isset($_POST['Files']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Files'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('show','id'=>$model->id));\n\t\t}\n\t\t$this->render('update',array('model'=>$model));\n\t}", "title": "" }, { "docid": "e1906ab800950dd80e655f98b53a11f0", "score": "0.625719", "text": "public function actionUpdate()\n\t{\n\t\t$model=new Companyorganisation();\n\t\t$this->render('update',array(\n\t\t\t\t'model'=>$model,'dataNode'=>$this->GetOrg(),\n\t\t));\n\t}", "title": "" }, { "docid": "56b8d72b3d8fae1c6bab736eb6fe617f", "score": "0.6239221", "text": "public function update() {\n\t\t$id = $this->input->post('idUpdate');\n\t\t$data = $this->input->post();\n\t\t$update['nama'] = $data['nama_kategoriUpdate'];\n\t\tif ($this->kategori_m->update($id, $update)) {\n\t\t\t$this->message('Berhasil! Data berhasil di update', 'success');\n $this->cache->delete('homepage');\n $this->cache->delete('list_kategori');\n\t\t} else {\n\t\t\t$this->message('Gagal! Data gagal di update', 'danger');\n\t\t}\n\t\tredirect('kategori');\n\t}", "title": "" }, { "docid": "92caac8cbacacad06c8f0e0f4db4495c", "score": "0.62120104", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n $condicion = new CodicionPago;\n $bodega = new Bodega;\n $categoria = new Categoria;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ConfFa']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ConfFa'];\n\t\t\tif($model->save()) {\n\t\t\t\t//$this->redirect(Yii::app()->user->returnUrl);\n\t\t\t\t$this->redirect(array('update&id=1&men=S002'));\n } else {\n $this->redirect(array('update&id=1&men=E002'));\n }\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n 'condicion'=>$condicion,\n 'categoria'=>$categoria,\n 'bodega'=>$bodega,\n\t\t));\n\t}", "title": "" }, { "docid": "aa4fe366a77e918027e159edb7a4d2d0", "score": "0.62093526", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect('/content-menu');\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "ea770f4f68b3fe225e69e5f982c22148", "score": "0.61951286", "text": "public function actionUpdate($id)\n\t{\n $this->layout='admin';\n \n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Bet']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Bet'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "b617d72a779ce40bb76360d7df7d762d", "score": "0.6179917", "text": "public function actionUpdate($id)\n {\n $category = LsYii::getGetValue('category');\n Role::setMenus($category);\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'category' => $category]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "fde48aa4beb502f5c8b1f9f30e511ef4", "score": "0.6174646", "text": "public function actionUpdate($id){\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->category_id]);\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }", "title": "" }, { "docid": "0c258778c4d8545e0c41dbd064e71182", "score": "0.6160156", "text": "public function actionUpdate($id) {\n $id_user = Yii::app()->user->getId();\n $model = User::model()->findByPk($id_user);\n $tipo = $model->id_tipoUser;\n if($tipo == \"1\"){\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Consultor'])) {\n $model->attributes = $_POST['Consultor'];\n if ($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n } else {\n $this->redirect(array('User/ChecaTipo'));\n }\n \n \n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n \n }", "title": "" }, { "docid": "f7098c5557f356df24948d833d931d4d", "score": "0.61558867", "text": "public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "9c5f20790a1f6d459f0324dd9e0d27a5", "score": "0.6148725", "text": "public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}", "title": "" }, { "docid": "04b786cd0233382d7e742b0be752da90", "score": "0.61449295", "text": "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['GestionComentarios'])) {\n $model->attributes = $_POST['GestionComentarios'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "21ac182fd893a303b63a32f8966785b1", "score": "0.61381704", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n //var_dump($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "0ec76cb5663ea1aa20c0c20483197717", "score": "0.6136112", "text": "public function update()\n\t{\n\t\t$this->getModel()->update($this);\n\t}", "title": "" }, { "docid": "2bc0799ff62be8986ef50bf593122e77", "score": "0.6118811", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->parent_id=0;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n } else {\n \t$locals=[];\n \t$locals['model']=$model;\n return $this->render('update', $locals);\n }\n }", "title": "" }, { "docid": "cd4b8ac7d87fd33152669d5dae142e21", "score": "0.61133987", "text": "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) \r\n {\r\n return $this->redirect(['view', 'id' => $model->idapresentacao]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "30a3021bbe79cafb6346f98498373cad", "score": "0.61130834", "text": "function update_pasien()\n {\n $modelpasien = $this->m_pasien;\n $modelpasien->update();\n \n if($this->session->userdata('status') != \"login\"){\n redirect(base_url(\"admin\"));\n }\n else if($this->session->userdata('status') == \"login\"){\n $this->index();\n }\n }", "title": "" }, { "docid": "a2345340fca3d9211a6e8189bb851ee5", "score": "0.61065274", "text": "public function actionUpdate($id) {\n Login::UserAuth('Customers', 'Update');\n $model = $this->loadModel($id);\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\n if (isset($_POST['Customers'])) {\n $_POST['Customers'] = CI_Security::ChkPost($_POST['Customers']);\n $model->attributes = $_POST['Customers'];\n $model->password = md5($model->password);\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->cid));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "4c20933341b60b2a63b6f51268a39d68", "score": "0.6105911", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t$this->layout='//layouts/modalIframe';\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Providers']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Providers'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('response', 'id'=>$model->id, 'action'=>'updated'));\n\t\t}\n\n\t\t$this->renderFormAjax($model);\n\n\t\t\n\t}", "title": "" }, { "docid": "b4ac5d15f5bc1a1d8ec55443fc0c0caa", "score": "0.6097076", "text": "public function actionUpdate($id)\n\t{\n\t\t//if(!Yii::app()->user->checkAccess(Params::DEFAULT_UPDATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=$this->loadModel($id);\n\t\t// Uncomment the following line if AJAX validation is needed\t\n\n\t\tif(isset($_POST['PPDokrekammedisM']))\n\t\t{\n\t\t\t$model->attributes=$_POST['PPDokrekammedisM'];\n\t\t\tif($model->save()){\n\t\t\t\tYii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('admin','id'=>$model->dokrekammedis_id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "5b056c5dee95a9e6f0496bc55882373a", "score": "0.60906243", "text": "public function update()\n {\n // if we have POST data to create a new customer entry\n if (isset($_POST['submit_update_vendedor'])) {\n // Instance new Model (Customers)\n $Vendedor = new VendedoresModel();\n // do update() from model/model.php\n $Vendedor->update($_POST['nome'], $_POST['email'], $_POST['vendedor_id']);\n }\n\n // where to go after customer has been added\n header('location: ' . URL . 'vendedores/index');\n }", "title": "" }, { "docid": "254786f012d4076f1bf7cbd73d8affc1", "score": "0.6077623", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }", "title": "" }, { "docid": "254786f012d4076f1bf7cbd73d8affc1", "score": "0.6077623", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }", "title": "" }, { "docid": "b5cfd596715b7681beab413ffce3674b", "score": "0.60693556", "text": "public function actionUpdate($id)\n\t{\n\t\t//$this->layout='//layouts/column2';\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['RekruitmenMaba']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RekruitmenMaba'];\n\t\t\tif($model->save()){\n\t\t\t\tif($model->lampiran){\n\n\t\t\t\t}\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_rmaba));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,'manajemen'=>'manajemen',\n\t\t));\n\t}", "title": "" }, { "docid": "32a5f4c14d2cb75449011bc8eb5db7b1", "score": "0.6063222", "text": "public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Cotizador'])) {\n $model->attributes = $_POST['Cotizador'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "7a6c2ac1c4f0f63683a2413e540bbfb1", "score": "0.6058664", "text": "public function actionUpdate($id)\n { \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "8a8435361e9bc9d80d1cc97e330d861e", "score": "0.6056737", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t$user = User::model()->find('username=?',array(Yii::app()->user->name));\n\t\t$user_right_ID = $user->user_right_ID;\n\t\t$type_ID = $user->user_type_ID;\n\t\t$role_ID = $user->role_ID;\n\t\t$user_ID = $user->user_ID;\n\n\t\t/**\n\t\t*\tThe user_right_ID gives the user the possibility to read/write information in the database,\n\t\t* if 2 then the user have read and write permission\n\t\t*\n\t\t*\tThe type_ID defines if it's BGT or IFT\n\t\t* \n\t\t*\tThe role_ID defines the user function i.e. (Abteilungsleiter,Projektlieter,Ingenieur,F&E-Koordination or Vorstand)\n\t\t*/\n\t\tif($user_right_ID == \"2\" && ($type_ID==\"1\" || $type_ID==\"3\")){\t\t\t\t\n\t\t\t$projekt = $model;\t\n\t\t\t$projekt->attributes=Bgt::model()->find('projekt_id=?',array($id));\n\t\t\tif($projekt->vertreter == $user->user_ID){\n\t\t\t\tself::update($model,$user);\n\t\t\t}else if($role_ID == \"4\" && $user_ID == $model->projektschöpfer){\n\t\t\t\tself::update($model,$user);\n\t\t\t}else if($role_ID == \"3\" && $user_ID == $model->projekt_leiter){\n\t\t\t\tself::update($model,$user);\t\t\t\t\n\t\t\t}else if($role_ID == \"2\" || $role_ID == \"5\"){\n\t\t\t\tself::update($model,$user);\t\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\techo \"<script>alert('Sie sind nicht berechtigt, diese Aktion durchzuführen')</script>\";\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t\techo \"<script>alert('Sie sind nicht berechtigt, diese Aktion durchzuführen')</script>\";\n\t\t}\n\t}", "title": "" }, { "docid": "e44506c3b280597ce756f76f76a4d3eb", "score": "0.60466444", "text": "public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Residencebaseinfo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Residencebaseinfo'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->rbi_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "a0e29c4fbbc5ff7b403f43f8d0d3a07e", "score": "0.60394233", "text": "public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\n//\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// }\n }", "title": "" }, { "docid": "b77bbc93a30ff85aaad341e7a3ee087c", "score": "0.6038992", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "38a06f5765b5e93db6bf125ab1b8edc7", "score": "0.60365677", "text": "public function actionUpdate($id) {\n\t\t$model = $this -> loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t$this -> performAjaxValidation($model);\n\n\t\tif (isset($_POST['Proyecto'])) {\n\t\t\t$model -> attributes = $_POST['Proyecto'];\n\t\t\tif ($model -> save())\n\t\t\t\t$this -> redirect(array('view', 'id' => $model -> id));\n\t\t}\n\n\t\t$this -> render('update', array('model' => $model, ));\n\t}", "title": "" }, { "docid": "4218d4ddabe6f22625213e7043a74cac", "score": "0.6035436", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Alumno']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Alumno'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->al_rut));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "d9b46f8bfc3b42859081fbfed32cb9a5", "score": "0.60280174", "text": "public function actionUpdateElement($id, $class)\n {\n\t\n\t\t$classFullName = 'frontend\\\\modules\\\\catalog\\\\models\\\\' . $class;\n\t\t$model = $classFullName::findOne(['id'=>$id]);\t\n\t\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index-elements']);\n }\n return $this->render('updateElement', [\n 'model' => $model,\n\t\t\t'class' => $class,\n ]);\n }", "title": "" }, { "docid": "0f9d93cdbeed2991976eb7c0d23b8cad", "score": "0.6024703", "text": "public function actionUpdate($id)\n {\n if($this->isAuthenticate())\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) \n {\n return $this->redirect(['index','type' => $model->IdEntityType]);\n } else \n {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "4ec46eea05efbadab333c7388b6c6526", "score": "0.60231113", "text": "public function actionUpdate($id)\n {\n if(Yii::$app->user->can('site-clerk'))\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }else \n {\n $this->redirect(\\Yii::$app->urlManager->createURL(\"site/login\"));\n }\n }", "title": "" }, { "docid": "67b9a15157da0836569ff77c0d696d12", "score": "0.60063046", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ed7a6ead50ca2389885617a3dcde767a", "score": "0.60054684", "text": "public function actionUpdate()\n {\n $id_usuario_actual=\\Yii::$app->user->id;\n $buscaConcursante = Concursante::find()->where(['id' => $id_usuario_actual])->one();\n\n $request = Yii::$app->request;\n $id_tabla_presupuesto=$request->get('id_tabla_presupuesto');\n $id_postulacion = $request->get('id_postulacion');\n $model = $this->findModel($id_tabla_presupuesto);\n\n $buscaPostulacion = Postulacion::find()->where(['and',['id_postulacion' => $id_postulacion],['id_concursante' => $buscaConcursante->id_concursante]])->one();\n\n if($buscaPostulacion != null && $model != null){ \n\n if ($model->load(Yii::$app->request->post())) {\n\n $cantidad = (float) preg_replace('/[^0-9.]/', '', $model->cantidad);\n $precioUni = (float) preg_replace('/[^0-9.]/', '', $model->precioUnitario);\n $total = $cantidad * $precioUni;\n $model->costoTotal = $total.'';\n \n if($model->save()){\n return $this->redirect(['/site/section4', 'id_postulacion' => $id_postulacion]);\n }else{\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n }\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n\n }", "title": "" }, { "docid": "ac34a0cddf6fcb22d534ba53bd64a5c2", "score": "0.60042995", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index' ,'id' => $model->inmueble_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "98dde42dff25ba50dafab86de19d4a04", "score": "0.6003476", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->kamar_id]);\n // }\n if ($model->load(Yii::$app->request->post())) {\n // Yii::$app->creator->update($model);\n $model->updated_by = Yii::$app->user->identity->username;\n \t $model->updated_date = date(\"Y-m-d\");\n $model->save();\n return $this->redirect(['view', 'id' => $model->kamar_id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0f6cb3481245e4149c1912512b84d869", "score": "0.6002734", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->DE_NRODEVOL]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "4ac899b16e5438457ffd257f0512e0fa", "score": "0.60012305", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $this->layout=\"main\";\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "42c7521d3277c1355300132f79d74643", "score": "0.5998587", "text": "public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'update', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}", "title": "" }, { "docid": "df45bd17d743dc5d4cf401bd0955e4e6", "score": "0.5997105", "text": "public function actionUpdate($id)\n {\n if(isset(Yii::$app->user->identity->id)){\n if(SiteController::findCom(17)){\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ADepId]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n else {\n $this->redirect(['site/error']);\n }\n }else {\n $this->redirect(['site/login']);\n }\n}", "title": "" }, { "docid": "619c2c72e60c7fdefb9887c320b48a5f", "score": "0.59919447", "text": "public function actionUpdate($id)\n {\n if (empty(Yii::$app -> user -> identity)) {\n return $this -> redirect(['site/login']);\n }\n\t if (!Yii::$app -> user -> can('adminEditor')) {\n throw new ForbiddenHttpException('您没有该项操作的权限!');\n }\n\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model -> save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n \n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "031b58056384afa7b37df2b8f264b5da", "score": "0.5991614", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->scenario = Member::SCENARIO_ADMIN;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "93ebdfb719b24f07daf0cfbc4b90f203", "score": "0.599", "text": "public function actionUpdate($id)\n\t{\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_UPDATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=$this->loadModel($id);\n $listHari = array( 'Senin'=> 'Senin',\n 'Selasa'=> 'Selasa',\n 'Rabu'=> 'Rabu',\n 'Kamis'=> 'Kamis',\n 'Jumat'=> 'Jumat',\n 'Sabtu'=> 'Sabtu',\n 'Minggu'=> 'Minggu',\n );\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['PPJadwaldokterM']))\n\t\t{\n\t\t\t$model->attributes=$_POST['PPJadwaldokterM'];\n $model->jadwaldokter_buka = $model->jadwaldokter_mulai.' S/d '.$model->jadwaldokter_tutup;\n\t\t\tif($model->save()){\n Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('admin','id'=>$model->jadwaldokter_id,'sukses'=>1));\n }\n\t\t}\n\n\t\t$this->render($this->path_view.'update',array(\n\t\t\t'model'=>$model,\n 'listHari'=>$listHari\n\t\t));\n\t}", "title": "" }, { "docid": "542bef9ee5790c4df02abf5a3872cf07", "score": "0.5986014", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['AcervoImpreso']))\n\t\t{\n\t\t\t$model->attributes=$_POST['AcervoImpreso'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->idacervo));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "676395b854fc1723572d25e01f07981a", "score": "0.59843236", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "096b3c5a8049dd783d30b11c858cc7a3", "score": "0.5984055", "text": "public function actionUpdate($id)\n\t{\n\t\t$role = Yii::app()->user->role;\n\t\tif(!in_array($role, array('staff', 'admin'))) {\n\t\t\t$this->redirect(array('site/index'));\n\t\t}\n\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Teacher']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Teacher'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "601f068aa1e225f1b17accd7708bbc63", "score": "0.59829015", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // $model->ReClave=$model->Clave;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "e1db3c6a0ce993eabf588e6d2ab71ae4", "score": "0.59827006", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Pagosconceptos']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Pagosconceptos'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('admin','id'=>$model->PACO_ID));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "e06f2429e02c2a9b4504bb4a55dd1f66", "score": "0.59801745", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\t\t\n\t\tif(isset($_POST['name']))\n\t\t{\n\t\t\t$model->fCatalogueName=$_POST['name'];\n\t\t\t$model->fStatus=$_POST['statu'];\n\t\t\t$model->fIsDownLoad=$_POST['down'];\n\t\t\t$model->fUpdateUser=Yii::app()->params->loginuser->fUserName;\n\t\t\t$model->fUpdateDate=time();\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\t$this->renderPartial('update',array(\n\t\t\t\t\t\t'data'=>UFSBaseUtil::printJson(array(\n\t\t\t\t\t\t\t\t'fCatalogueName'=>CHtml::encode($model->fCatalogueName),\n\t\t\t\t\t\t\t\t'fIsDownLoad'=>CHtml::encode($model->fIsDownLoad),\n\t\t\t\t\t\t\t\t'fStatus'=>CHtml::encode($model->fStatus),\n\t\t\t\t\t\t\t\t'fUpdateDate'=>CHtml::encode(empty($model->fUpdateDate)?'':date('Y-m-d',$model->fUpdateDate)),\n\t\t\t\t\t\t\t\t'fUpdateUser'=>CHtml::encode($model->fUpdateUser),\n\t\t\t\t\t\t\t\t'msg'=>$this->FrameInfo(Yii::app()->params['layouttype']['top'],Yii::t('message','Update Success'),Yii::app()->params['notytype']['success']),\n\t\t\t\t\t\t))\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "267c7ee36cabb42558de5011b2d669b3", "score": "0.5979451", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->No_]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "133ac12aeba54b837b4fc574a18d36bf", "score": "0.5966828", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['TDespachoCabecera']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TDespachoCabecera'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_despacho));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "37f1224df868addb98693c05e64a28a0", "score": "0.5956579", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //$locationModel = Location::find()->where(['location_id' => $this->location->id])->one();\n $locationModel = $model->location ? $model->location : new Location;\n //TODO: проверить, рефакторинг\n $locationModel->save();\n //$locationModel->link('debtor', $model);\n $model->link('location', $locationModel);\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = $model->name ? $model->name : new Name;\n //TODO: проверить, рефакторинг\n $nameModel->save();\n $nameModel->link('debtor', $model);\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "cf3cd1a0c0dcaee1247a4a15440edce8", "score": "0.5956546", "text": "public function actionUpdate()\r\n {\r\n $model=Settings::findOne(1);\r\n\r\n \r\n if ($model->load(Yii::$app->request->post())) \r\n {\r\n $model->code=strtolower($model->code);\r\n if($model->save())\r\n {\r\n Yii::$app->session->setFlash('success','Account Updated');\r\n return $this->redirect(['/site/index']);\r\n }\r\n else\r\n {\r\n print_r($model->errors); exit;\r\n }\r\n } \r\n else \r\n {\r\n Yii::$app->view->title=\"Update Account Info\";\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n \r\n\r\n }", "title": "" }, { "docid": "b4ca15cc414fcf71b7f732b97d6a41c4", "score": "0.59544915", "text": "public function actionUpdate($id) {\n $this->active_menu = \"mcms\";\n $this->open_class = \"category\";\n $this->active_class = \"piadmin\";\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Purchaseitem'])) {\n $model->attributes = $_POST['Purchaseitem'];\n $model->goods_service=$_POST['Purchaseitem']['goods_service'];\n if($_POST['Purchaseitem']['goods_service']==\"Good\"){\n $model->gst_code_type = 'HSN';\n }else{\n $model->gst_code_type = 'SAC';\n }\n $model->low_qty = $_POST['Purchaseitem']['low_qty'];\n $model->type = $_POST['Purchaseitem']['type'];\n $model->gst_code = $_POST['Purchaseitem']['gst_code']; \n $model->gst_percent = $_POST['Purchaseitem']['gst_percent'];\n $model->cess_tax = $_POST['Purchaseitem']['cess_tax'];\n $model->item_classification=$_POST['Purchaseitem']['item_classification'];\n $model->cess_percent=$_POST['Purchaseitem']['cess_percent'];\n if ($model->save()) {\n if (empty($model->barcode)) {\n $model->barcode = time() . $model->id;\n $model->save();\n }\n d21('Purchase Item updated by ' . Yii::app()->user->getUsername(), \"site.login\");\n $this->redirect(array('admin'));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "4399a23faf7f33cd6f5707945dd3d08e", "score": "0.5952154", "text": "public function actionUpdate($id)\n {\n $this->layout = 'headbar';\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "93f244dd4cb356f0a0851e563c86235e", "score": "0.5946162", "text": "public function update ()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_update');\n $view->title = \"Verein\";\n $view->heading = \"Verein bearbeiten\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->display();\n }", "title": "" }, { "docid": "2a22f55e11b4d74de65269b6861a63a7", "score": "0.59460884", "text": "public function actionUpdate($id) {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "713b3ca2f1c757d910f5a2002975aa3a", "score": "0.59447986", "text": "public function actionUpdate($id)\n\t{\n //if(!Yii::app()->user->checkAccess(Params::DEFAULT_UPDATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));}\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['RKPengirimanrmT']))\n\t\t{\n\t\t\t$model->attributes=$_POST['RKPengirimanrmT'];\n\t\t\tif($model->save()){\n Yii::app()->user->setFlash('success', '<strong>Berhasil!</strong> Data berhasil disimpan.');\n\t\t\t\t$this->redirect(array('view','id'=>$model->pengirimanrm_id));\n }\n\t\t}\n\n\t\t$this->render($this->path_view.'update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "394559ae111ba1b48cf089a0f5c23621", "score": "0.5943531", "text": "public function updateDB(){\n $this->model->updateDB();\n header('location:index.php?controller=category');\n }", "title": "" }, { "docid": "77405c15eed17a4506bf6baac3987fc7", "score": "0.5941837", "text": "public function update(){\n\t\t$this->autenticate();\n\t\t$id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$fecha_nacimiento = \"'\".$_POST['fecha_nacimiento'].\"'\";\n\t\t$genero = \"'\".$_POST['genero'].\"'\";\n\t\t$tipo_sangre = \"'\".$_POST['tipo_sangre'].\"'\";\n\t\t$estado_civil = \"'\".$_POST['estado_civil'].\"'\";\n\t\t$peso = $_POST['peso'];\n\t\t$estatura = $_POST['estatura'];\n\t\t$provincia = \"'\".$_POST['provincia'].\"'\";\n\t\t$distrito = \"'\".$_POST['distrito'].\"'\";\n\t\t$corregimiento = \"'\".$_POST['corregimiento'].\"'\";\n\t\t$direccion = \"'\".$_POST['direccion'].\"'\";\n\t\t$telefono = \"'\".$_POST['telefono'].\"'\";\n\t\t$correo = \"'\".$_POST['correo'].\"'\";\n\t\t$sede = \"'\".$_POST['sede'].\"'\";\n\t\t$categoria = \"'\".$_POST['categoria'].\"'\";\n\t\t$departamento = \"'\".$_POST['departamento'].\"'\";\n\t\t$apartado_postal = \"'\".$_POST['apartado_postal'].\"'\";\n\t\t$cargo = \"'\".$_POST['cargo'].\"'\";\n\t\t$representante_gobierno = \"'\".$_POST['representante_gobierno'].\"'\";\n\t\t$unidad = \"'\".$_POST['unidad'].\"'\";\n\t\trequire_once(\"../app/models/administrativo.php\");\n\t\t$administrativo=new Administrativo();\n\t\t$administrativo->update($id,$nombre,$fecha_nacimiento,$genero,$tipo_sangre,$estado_civil,$peso,$estatura,$provincia,$distrito,$corregimiento,$direccion,$telefono,$correo,$sede,$categoria,$departamento,$apartado_postal,$cargo,$representante_gobierno,$unidad);\n\t\t$id = strval($id);\n\t\theader(\"Location: http://localhost:8000/administrativos/show/$id\");\n\t\texit;\n\t}", "title": "" }, { "docid": "3218985831a11edf489139ea18ac83ab", "score": "0.59417653", "text": "public function actionUpdate($id) {\n\n $username = Yii::$app->user->identity->username;\n $modelUser = UserSetting::findByUsername($username);\n\n \n if($id == '46' || $id == '43' || $id == '33'|| $id == '1'){\n // Periksa apakah yg update adalah user tersebut.\n if(!(Yii::$app->user->identity->getId() == '46' || Yii::$app->user->identity->getId() == '43')){\n\n Yii::$app->getSession()->setFlash('error', [\n 'type' => 'error',\n 'duration' => 500,\n 'icon' => 'fa fa-info-circle',\n 'message' => Yii::t('app', 'Anda tidak berhak mengkoreksi data User System.'),\n 'title' => 'Info',\n 'positonY' => Yii::$app->params['flashMessagePositionY'],\n 'positonX' => Yii::$app->params['flashMessagePositionX']\n ]);\n return $this->redirect(['index']);\n }\n }\n\n $model = $this->findModel($id);\n\n // print_r($model);die;\n\n $model2 = new Userloclibforcol;\n $model3 = new Userloclibforloan;\n $modelAssignment = $this->findModelAssignment($id);\n // print_r($modelAssignment);die;\n\n $iddatabase = $model->ID;\n if ($model->load(Yii::$app->request->post()) && $model2->load(Yii::$app->request->post()) && $model3->load(Yii::$app->request->post())) {\n if ($model->save()) {\n\n $model2->User_id = $model->ID;\n $arr = $model2->LocLib_id;\n $sqldelcol = \"DELETE FROM `userloclibforcol` WHERE `User_id`=\" . $iddatabase . \";\";\n Yii::$app->db->createCommand($sqldelcol)->query();\n\n if ($arr !== \"\") {\n foreach ($arr as $loc => $value) {\n\n //$model2->LocLib_id=$value;\n\n $sql = \"INSERT INTO `userloclibforcol` (`User_id`, `LocLib_id`) VALUES (\" . $model2->User_id . \", \" . $value . \");\";\n Yii::$app->db->createCommand($sql)->query();\n }\n }\n $sqldelloan = \"DELETE FROM `userloclibforloan` WHERE `User_id`=\" . $iddatabase . \";\";\n Yii::$app->db->createCommand($sqldelloan)->query();\n $model3->User_id = $model->ID;\n $array = $model3->LocLib_id;\n\n if ($array !== \"\") {\n foreach ($array as $sir => $sirkulasi) {\n\n //$model3->LocLib_id=$sirkulasi;\n $sql = \"INSERT INTO `userloclibforloan` (`User_id`, `LocLib_id`) VALUES (\" . $model3->User_id . \", \" . $sirkulasi . \");\";\n Yii::$app->db->createCommand($sql)->query();\n }\n }\n\n Yii::$app->getSession()->setFlash('success', [\n 'type' => 'info',\n 'duration' => 500,\n 'icon' => 'fa fa-info-circle',\n 'message' => Yii::t('app', 'Success Save'),\n 'title' => 'Info',\n 'positonY' => Yii::$app->params['flashMessagePositionY'],\n 'positonX' => Yii::$app->params['flashMessagePositionX']\n ]);\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'model2' => $model2,\n 'model3' => $model3,\n ]);\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'model2' => $model2,\n 'model3' => $model3,\n 'modelUser'=>$modelUser,\n 'modelAssignment' => $modelAssignment,\n \n ]);\n }\n }", "title": "" }, { "docid": "4712aa149131180883a0e50d26ecd5f4", "score": "0.59362286", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->category_table_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "1399befabe5724b29e40424b939635fc", "score": "0.59344435", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t$model->password = md5($_POST['Users']['password']);\t\t\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "f6002dbf85bce790322080c660ff7a37", "score": "0.59316146", "text": "public function actionUpdate($id)\n\t{\n\n\t\t//Check accessControl.\n\t\t$model= Users::model()->with('UserLogin')->findByPk($id);\n\t\t$result = Yii::app()->authManager->getAuthAssignment(Yii::app()->user->roles,$id);\n\n\t\t$self = false;\n\t\tif(!empty($result)){\n\t\t\t$self = true;\n\t\t}\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\n\t\t\t$dp_file = CUploadedFile::getInstance($model, 'display_picture');\n\n\t\t\t$user_login = UserLogin::model()->findByAttributes(array('user_id'=>$id));\n\n\t\t\t$user_login->username = $model->email;\n\t\t\t$user_login->display_name = $model->fname.\" \".$model->lname;\n\n\t\t\tif($model->validate()){\n\t\t\t\tif($model->save() && $user_login->update()){\n\n\t\t\t\t\t$user_id = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t\t'self'=>$self\n\t\t));\n\t}", "title": "" }, { "docid": "a4e5b6504193e6c167652f6170c67603", "score": "0.59304017", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n if (Yii::$app->request->isPost) {\n $model->load(Yii::$app->request->post());\n // $postData = Yii::$app->request->post();\n // $model->load($postData);\n // $model->order = $postData['order'] ? $postData['order'] : 0;\n\n if ($model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Linktree success updated.'));\n if (Yii::$app->request->isAjax) {\n return $this->redirect(Yii::$app->request->referrer ?: ['manage', 'creation' => $model->creation_id]);\n }\n return $this->redirect(['manage', 'creation' => $model->creation_id]);\n\n } else {\n if (Yii::$app->request->isAjax) {\n return \\yii\\helpers\\Json::encode(\\app\\components\\widgets\\ActiveForm::validate($model));\n }\n }\n }\n\n\t\t$this->view->title = Yii::t('app', 'Update Linktree: {title}', ['title' => $model->title]);\n\t\t$this->view->description = '';\n\t\t$this->view->keywords = '';\n\t\treturn $this->oRender('admin_update', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "title": "" }, { "docid": "3806f0f2f59992307dfdb38c4444964b", "score": "0.5929607", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "73518eee79f6ef7fec00244a94211a19", "score": "0.5929591", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "20f269e5f9edd93ef0cc2601a748d677", "score": "0.5926145", "text": "function update()\n {\n $nim = $this->input->post('nim');\n $nama = $this->input->post('nama');\n $kota = $this->input->post('kota');\n $this->siswa_model->update($nim, $nama, $kota);\n redirect('siswa/page');\n }", "title": "" }, { "docid": "651bc936c960c976c402baace51e6896", "score": "0.5923903", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success','Berhasil Mengubah Pekerjaan');\n return $this->redirect(['/admin/user/index']);\n }\n\n return $this->render('form', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "aec4511701905edd6372d921a8f2f61c", "score": "0.59201646", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->cname.' 已经修改成功!');\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "45735c75b619be1a07331009bd299b8b", "score": "0.5918275", "text": "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()))\n {\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n var_dump($model->errors); die;\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "1f078a79ef8dbec4cf94585d79c56d4a", "score": "0.5914023", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "1f078a79ef8dbec4cf94585d79c56d4a", "score": "0.5914023", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "1f078a79ef8dbec4cf94585d79c56d4a", "score": "0.5914023", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "2ad0aae5d47fbe9c11c70ff96b755e40", "score": "0.59068274", "text": "public function actionUpdate(){\n \tif(!isset($_POST['username'])||!isset($_POST['password'])||!isset($_POST['state'])){\n return $this->redirect('add.html');\n }\n $id = Helper::filtdata(Yii::$app->request->post('id'),'INT');\n $app = Yii::$app->request;\n $model = $this->findModel($id);\n $model->username = Helper::filtdata($app->post('username'));\n $model->state = Helper::filtdata($app->post('state'));\n if($_FILES['file']['name']){\n \t\t$save_dir = dirname(dirname(__FILE__)).'/web/media/images/head_img/';\n \t$model->head_img = Helper::upload('file','jpeg',$save_dir);\n }\n if($app->post('password')){\n $model->password = htmlspecialchars(trim(rand(1000,9999).md5($app->post('password'))));\n }\n $model->state = Helper::filtdata($app->post('state'),'INT');\n $model->updated_at = time()+(3600*8);\n $model->role = Helper::filtdata($app->post('role'));\n if($model->save()){\n \tif(isset($_POST['role'])){\n \t\t$role = yii::$app->authManager->getRole($_POST['role']);\n \t\tyii::$app->authManager->revokeAll($id);//先删除所有角色\n \t\t$res = yii::$app->authManager->assign($role, $model->id); //重新添加角色\n \t\tif($res){\n \t\t\t return $this->redirect('index.html');\n \t\t}else{\n \t\t\treturn $this->redirect('add.html');\n \t\t}\n \t}\n \n }\n }", "title": "" }, { "docid": "144b7b13f9e93dabb4409c062fa78d36", "score": "0.5905703", "text": "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\tif(isset($_POST['buttonCancel']))\n {\n $this->redirect(Yii::app()->homeUrl);\n }\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Organisation']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Organisation'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->orgId));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "65f3b1f9bb24950a4fa3dc4a65fc1509", "score": "0.59036505", "text": "public function update()\n {\n $model = $this->model()::findOrFail(request('_id'));\n $data = array_merge(request()->all(), ['slug' => request('name')]);\n $category = $model->update($data);\n return redirect()->route('admin.'.$this->table().'.index');\n }", "title": "" }, { "docid": "a8074c24615d4e5bd6541ff388f396f5", "score": "0.59027946", "text": "public function actionUpdate($id)\n {\n if(Permiso::requerirRol('administrador')){\n $this->layout='/main2';\n }elseif(Permiso::requerirRol('gestor')){\n $this->layout='/main3';\n }\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "9c43886b25b173e0121509a14cc6b9b8", "score": "0.5901813", "text": "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "title": "" } ]
fce9d07967982e139f77d5e1269bd7ec
Returns the limit of the list's slice for the current page
[ { "docid": "30c8ef40bdbf3aa13f3b68acc1b01bc6", "score": "0.7081553", "text": "public function limit()\n {\n return $this->perPage;\n }", "title": "" } ]
[ { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7755902", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7755902", "text": "public function getLimit();", "title": "" }, { "docid": "e5b460e78658963000e9ca011c9139cd", "score": "0.76323795", "text": "function getPageLimit() {\n\t\t$pageLimit = $this->get('limit');\n\t\tif(empty($pageLimit)) {\n\t\t\t$pageLimit = vglobal('list_max_entries_per_page');\n\t\t\tif(empty($pageLimit)) {\n\t\t\t\t$pageLimit = self::PAGE_LIMIT;\n\t\t\t}\n\t\t}\n\t\treturn $pageLimit;\n\t}", "title": "" }, { "docid": "f3bb6f9e824f62fd28a8f99e7d481957", "score": "0.7559258", "text": "public function limit()\n\t{\n\t\treturn (int) $this->items_per_page;\n\t}", "title": "" }, { "docid": "263e77085d5be1aaa196fc63db9e0855", "score": "0.7542367", "text": "function query_limit() {\n\t\t\n //calculate the $list_start position\n $list_start = ( $this->current_page - 1 ) * $this->record_per_page;\n\n //Start of the list should be less than pagination count\n if( $list_start >= $this->total_items ){ $list_start = ( $this->total_items - $this->record_per_page ); }\n\n //list start can't be negative\n if( $list_start < 0 ){ $list_start = 0; }\n\n return 'LIMIT ' . intval($list_start, 10) . ', ' . intval($this->record_per_page, 10);\n\t\n\t}", "title": "" }, { "docid": "8a4b12c3f1b6021d297584b8fd2ccd02", "score": "0.7296399", "text": "public function getLimit()\r\n {\r\n return $this->limitPerPage;\r\n }", "title": "" }, { "docid": "f22363dbdc799821337a08c967c4cfc1", "score": "0.7274071", "text": "public function getLimit() {\n return $this->getData('limit');\n }", "title": "" }, { "docid": "0590b914cd6a6a2a9a810046eaf6f4d8", "score": "0.72463626", "text": "public function getLimit(){ }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.7105412", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "c6d9b34c3ecbca2bc6dde4adc7e14651", "score": "0.7063313", "text": "public function getLimit() {\n return $this->limit;\n }", "title": "" }, { "docid": "1efd33ac39cb9dcbea0ea99ab7e6c83c", "score": "0.7062414", "text": "public function getLimit() { return $this->limit; }", "title": "" }, { "docid": "548eb260ab0515f3407c049c3d3cde2e", "score": "0.70542455", "text": "public function getLimit() {\r\n\t\t\treturn $this->limit;\r\n\t\t}", "title": "" }, { "docid": "09b6527c7b4f8d9817864e13b3244983", "score": "0.7041562", "text": "public function getLimit()\n {\n return $this->_limit;\n }", "title": "" }, { "docid": "713dc820f9128c6a4aa872d46f0e00b4", "score": "0.703333", "text": "public function getLimit()\n {\n return $this->getModifier('limit');\n }", "title": "" }, { "docid": "177a1f3287aacd7da4bb34379a49e20b", "score": "0.70261586", "text": "public function getLimit()\r\n {\r\n return $this->fields['Limit']['value'];\r\n }", "title": "" }, { "docid": "166198da22053ddf6f22ced2d420d08e", "score": "0.7019229", "text": "public function getLimit(){\n\t\treturn $this->limit;\n\t}", "title": "" }, { "docid": "4e606ec5afc5d90a686e4dec61bd21dd", "score": "0.70155543", "text": "public function getLimit() {\n return $this->limit;\n }", "title": "" }, { "docid": "53ec1131d7ad2034a7900bda28cb843a", "score": "0.699983", "text": "abstract public function limit( $theCount = NULL );", "title": "" }, { "docid": "0368c2dd76183ba82d075d0311ca5e60", "score": "0.69832575", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "ee37564be909745c382ec8843648254c", "score": "0.6945725", "text": "public function getLimit()\n {\n return $this->request->getParam(self::LIMIT_PARAM_NAME);\n }", "title": "" }, { "docid": "67965c830ecb5e14a0b6a5bcbb9fc9f6", "score": "0.6922426", "text": "function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "3898fd89b86d6427d91cfa9aba0857e6", "score": "0.6912906", "text": "public function getLimit()\n\t{\n\t\treturn isset($this->_query['limit']) ? $this->_query['limit'] : -1;\n\t}", "title": "" }, { "docid": "2ace9b8ad65155a14eb06ce18dfa906b", "score": "0.6884659", "text": "public function getLimit() {\n return \" Limit \".(($this->currentpage-1)*$this->perpage).\", \".$this->perpage;\n }", "title": "" }, { "docid": "97c21ef736cc9d8968bdfea229e63091", "score": "0.6874122", "text": "public function getLimit()\n {\n return isset($this->_query['limit']) ? $this->_query['limit'] : -1;\n }", "title": "" }, { "docid": "de30801f0d730edd4019715c08893c20", "score": "0.6869365", "text": "function getPagingLimit()\n\t\t{\n\t\t\treturn $this->recordLimit;\n\t\t}", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.6836606", "text": "public function limit($limit);", "title": "" }, { "docid": "9ba4cd9ad2fe2003e5bffcd046f9ae5d", "score": "0.6833135", "text": "public function get_pagelimit() : int\n {\n return $this->limit;\n }", "title": "" }, { "docid": "b7df81a79e16f645c9f9198dc0d01287", "score": "0.683271", "text": "public function getLimit() : int\n {\n return $this->limit;\n }", "title": "" }, { "docid": "41b54d48a9f756bd4d8d6424fdbf5067", "score": "0.68222916", "text": "public function getLimit(): int\n {\n return $this->limit;\n }", "title": "" }, { "docid": "28f6139afa1af3d53fe3b6d9ed0bab7c", "score": "0.6806449", "text": "public function limit( $limit, $offset = 0 );", "title": "" }, { "docid": "4eb1d89c27e9d53db723b739a0bcdb1e", "score": "0.6797272", "text": "public function getLimit()\n {\n $limit = $this->_getData('_current_limit');\n if ($limit) {\n return $limit;\n }\n\n $limits = $this->getAvailableLimit();\n $defaultLimit = $this->getDefaultPerPageValue();\n if (!$defaultLimit || !isset($limits[$defaultLimit])) {\n $keys = array_keys($limits);\n $defaultLimit = $keys[0];\n }\n\n $limit = $this->getRequest()->getParam($this->getLimitVarName());\n if ($limit && isset($limits[$limit])) {\n if ($limit == $defaultLimit) {\n Mage::getSingleton('catalog/session')->unsLimitPage();\n } else {\n $this->_memorizeParam('limit_page', $limit);\n }\n } else {\n $limit = Mage::getSingleton('catalog/session')->getLimitPage();\n }\n if (!$limit || !isset($limits[$limit])) {\n $limit = $defaultLimit;\n }\n\n $this->setData('_current_limit', $limit);\n return $limit;\n }", "title": "" }, { "docid": "f0c8f81929dc12b5086055d6f69f8b77", "score": "0.6780324", "text": "function getPagesLimit()\n\t\t{\n\t\t\treturn $this->pagesLimit;\n\t\t}", "title": "" }, { "docid": "5a473a85999d0b9b1ac4e35a6299da77", "score": "0.6731206", "text": "public function limit(/*# int */ $count, /*# int */ $offset = 0);", "title": "" }, { "docid": "edd8d33d26295447379e04c1f18ef2d5", "score": "0.67073333", "text": "public function paginLimit(){\n if(empty($this->paginParams['count'])){\n return;\n }\n $options = array(\n array('name' => 5, 'value' => 5),\n array('name' => 10, 'value' => 10),\n array('name' => 15, 'value' => 15),\n array('name' => 20, 'value' => 20),\n array('name' => 25, 'value' => 25),\n array('name' => 30, 'value' => 30),\n array('name' => 35, 'value' => 35),\n array('name' => 50, 'value' => 50),\n array('name' => 100, 'value' => 100),\n array('name' => 'همه', 'value' => $this->paginParams['count']),\n );\n \n $select = $this->Form->select('limit',$options,array(\n 'id' => 'limit',\n 'value' => $this->paginParams['limit'],\n 'empty' => false,\n ));\n $label = $this->Html->tag('label','نمایش');\n $div = $this->Html->div('page-limit form-filter',$label.$select);\n return $div.$this->__limitScript();\n }", "title": "" }, { "docid": "817f29d16da325986de96f51a0538b9c", "score": "0.6705396", "text": "abstract public function getMaxPerPage();", "title": "" }, { "docid": "56f2b9e11ce58d636bd08710b61685b0", "score": "0.6679098", "text": "public function limit($offset, $limit);", "title": "" }, { "docid": "bde22cd476600db73970efe8e2d5fd8d", "score": "0.66718554", "text": "function getMaxPerPage();", "title": "" }, { "docid": "2abba0c39d0ea0ca769c3bd15864873f", "score": "0.6649859", "text": "public function getLimit()\n {\n return (int) $this->request->get(\"iDisplayLength\",10);\n }", "title": "" }, { "docid": "f7d39f7c5ed848372fab5c9cd30a97b4", "score": "0.6624557", "text": "function plimit($limit=0,$offset=0)\n {\n global $conf;\n if (! $limit) $limit=$conf->liste_limit;\n if ($offset > 0) return \" LIMIT $offset,$limit \";\n else return \" LIMIT $limit \";\n }", "title": "" }, { "docid": "9de2c5c3c04be58c142959ad0eba8c26", "score": "0.6615045", "text": "public function limit($limit = 20, $offset = null);", "title": "" }, { "docid": "9d66510ef14a6a4f2f08b9d40dadf8c9", "score": "0.66013414", "text": "public function limit(int $limit, int $offset = 0);", "title": "" }, { "docid": "b4f6d35029ad00f9902f8f5194cd65e0", "score": "0.6582456", "text": "function getLimitStart() { return $this->_limitstart; }", "title": "" }, { "docid": "e449e91b8c9c4d1b3d54f43120fc10e2", "score": "0.65788215", "text": "public function limit($limit, $offset=null){ }", "title": "" }, { "docid": "b2681f483a0a88748befa1d294c9b65e", "score": "0.65494937", "text": "public function getItemsPerPage(): int;", "title": "" }, { "docid": "ec25780b702ab689310f255eea5c0632", "score": "0.65494174", "text": "public function getMaxPage()\n {\n return count($this->pagedDatas);\n }", "title": "" }, { "docid": "a30cbc291c1caa7264f4f68667830e49", "score": "0.6538771", "text": "public function getFeatreudLimit($list_type = 'lb'){\n //create gift featured limit query\n $gift_feature_limit_query = Doctrine_Query::create()\n ->select('COUNT(g.id) gift_limit')\n ->from('Gift g')\n ->where('g.featured = 1');\n //fetch limit\n return $gift_feature_limit_query->fetchArray();\n }", "title": "" }, { "docid": "8d353d7a04d6ec03be6526b7e83cf7f5", "score": "0.6496076", "text": "public function getLimit($name) { }", "title": "" }, { "docid": "f187d230f75bec6ecd9c0cfd245c6d39", "score": "0.6488512", "text": "public function itemsPerPage(): int;", "title": "" }, { "docid": "7d3a74b943d28ba027b17ab369c7e883", "score": "0.6472578", "text": "function getLimitCount() { return $this->_limitcount; }", "title": "" }, { "docid": "ac3bc6d337b4fe4d7bdc2733c3a844bb", "score": "0.6465709", "text": "protected function getLimit()\n {\n return (int)$this->limit > 0 ? (int)$this->limit : '';\n }", "title": "" }, { "docid": "77ea3329efd083e09e5367395c1e92a7", "score": "0.6443479", "text": "function getLastPageOffset($inLimit) {\n\t\t$total = $this->getTotalObjects();\n\t\t\n\t\tif ( $inLimit > 0 ) {\n\t\t\treturn $inLimit*floor($total/$inLimit);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "77ea3329efd083e09e5367395c1e92a7", "score": "0.6443479", "text": "function getLastPageOffset($inLimit) {\n\t\t$total = $this->getTotalObjects();\n\t\t\n\t\tif ( $inLimit > 0 ) {\n\t\t\treturn $inLimit*floor($total/$inLimit);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "77ea3329efd083e09e5367395c1e92a7", "score": "0.6443479", "text": "function getLastPageOffset($inLimit) {\n\t\t$total = $this->getTotalObjects();\n\t\t\n\t\tif ( $inLimit > 0 ) {\n\t\t\treturn $inLimit*floor($total/$inLimit);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "50c8fe5b867a5dd4bdf18eaeb72d0fa5", "score": "0.6431389", "text": "public function higherItems($limit = NULL)\n {\n if($limit === NULL) $limit = $this->listifyList()->count();\n $position_value = $this->getListifyPosition();\n\n return $this->listifyList()\n ->where($this->positionColumn(), \"<\", $position_value)\n ->where($this->positionColumn(), \">=\", $position_value - $limit)\n ->take($limit)\n ->orderBy($this->getTable() . \".\" . $this->positionColumn(), \"ASC\")\n ->get();\n }", "title": "" }, { "docid": "6f17f97c8cf4c2e1dc68b2058fe9470f", "score": "0.6425766", "text": "static function getPageEndRange(){\r\n\t\treturn $_SESSION[\"Pager\"][\"CurrRangeEnd\"];\r\n\t}", "title": "" }, { "docid": "e5d87b1c09b6ed66439734a268e8098d", "score": "0.6409138", "text": "public function paginate($limit = 15);", "title": "" }, { "docid": "e5d87b1c09b6ed66439734a268e8098d", "score": "0.6409138", "text": "public function paginate($limit = 15);", "title": "" }, { "docid": "2bd4df0a9fccef98cfbff10838983676", "score": "0.6405482", "text": "private function _get_limit() {\n if (!isset($this->limit)) {\n return '';\n } else {\n if (isset($this->offset)) {\n return 'LIMIT' . \"\\n\" . \"\\t\" . $this->offset . ', ' . $this->limit . \"\\n\" . '';\n }\n return 'LIMIT' . \"\\n\" . \"\\t\" . $this->limit . \"\\n\" . '';\n }\n }", "title": "" }, { "docid": "8cc0cbf0c6fe36b8e8ea6fb174a144e1", "score": "0.64004374", "text": "public function getPerPage()\n {\n return request('limit') && request('limit') < 100 ? request('limit') : API_QUERY_RESULTS_PER_PAGE;\n }", "title": "" }, { "docid": "a0b1e2d5a39e81a9519d36b8c457afcb", "score": "0.6333396", "text": "public function getLastPage()\n {\n return ceil($this->totalItems / $this->itemsPerPage);\n }", "title": "" }, { "docid": "e2224ec2148c304d209f6cbaa493c811", "score": "0.63331884", "text": "public function readCollectionWithLimit($limit);", "title": "" }, { "docid": "4634379214f1289d55aee6e7d1839bd1", "score": "0.63324445", "text": "public function getSizeLimit(): int;", "title": "" }, { "docid": "bd255e52ccd447f6e8e4cae9d8d48098", "score": "0.63094693", "text": "public function limit( $theCount = NULL )\n\t{\n\t\t//\n\t\t// Set new value.\n\t\t//\n\t\tif( $theCount !== NULL )\n\t\t{\n\t\t\t//\n\t\t\t// Set value.\n\t\t\t//\n\t\t\t$this->mLimit = (int) $theCount;\n\t\t\n\t\t\t//\n\t\t\t// Check if needed.\n\t\t\t//\n\t\t\tif( $theCount < $this->count() )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Get array.\n\t\t\t\t//\n\t\t\t\t$array = iterator_to_array( $this->mCursor );\n\t\t\t\n\t\t\t\t//\n\t\t\t\t// Determine slice.\n\t\t\t\t//\n\t\t\t\t$delta = ((int) $theCount) - count( $array );\n\t\t\n\t\t\t\t//\n\t\t\t\t// Slice.\n\t\t\t\t//\n\t\t\t\tif( $delta > 0 )\n\t\t\t\t\t$array = array_slice( $array, (int) ($delta * -1), FALSE );\n\t\t\n\t\t\t\t//\n\t\t\t\t// Replace.\n\t\t\t\t//\n\t\t\t\t$this->mCursor = new \\ArrayIterator( $array );\n\t\t\t\n\t\t\t} // Limit is less than count.\n\t\t\n\t\t} // Has limit.\n\t\t\n\t\treturn $this->mLimit;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\t\n\t}", "title": "" }, { "docid": "74f2d515bb21b40075fc6f033cf73b91", "score": "0.6305754", "text": "public function offset() {\n return ($this->current_page - 1) * $this->items_per_page;\n }", "title": "" }, { "docid": "eacbc6f6a429a508af382e0ab0943376", "score": "0.62921685", "text": "function jumpoff_limit_posts($limit) {\n // globals\n global $paged, $postOffset;\n\n if (empty($paged)) {\n $paged = 1;\n }\n\n // Posts Per Page\n $ppp = intval( get_option('posts_per_page') );\n\n // Create offset\n $pagedStart = ((intval($paged) -1) * $ppp) + $postOffset . ', ';\n\n // Limit Posts\n $limit = 'LIMIT '.$pagedStart.$ppp;\n\n return $limit;\n}", "title": "" }, { "docid": "d205d7b6914cf028a896e21ba6547767", "score": "0.62864625", "text": "public function getPage(): int {\n if ($this->getLimit() === 0) {\n return 1;\n }\n $result = floor($this->getOffset() / (int)$this->getLimit()) + 1;\n// $result = intdiv($this->getOffset(), (int)$this->getLimit()) + 1;\n return (int)$result;\n }", "title": "" }, { "docid": "a75fe3b06241938f390c6460f4e72517", "score": "0.62679166", "text": "public static function return_limit_for_pagination($limit): int\n {\n return $limit ?? self::DEFAULT_LIMIT;\n }", "title": "" }, { "docid": "d372df13950a4a6026dabbf3b59b672d", "score": "0.6266752", "text": "function get_page_size()\n\t{\n\t\t//default from the config\n\t\t$limit=($this->config->item(\"catalog_records_per_page\")===FALSE) ? 15 : $this->config->item(\"catalog_records_per_page\");\n\n\t\t//check from querystring\n\t\t$ps=(int)$this->input->get_post(\"ps\");\n\n\t\tif (is_numeric($ps))\n\t\t{\n\t\t\t$limit=$ps;\n\t\t}\n\n\t\t//check cookie\n\t\tif(is_numeric($cookie_ps=$this->input->cookie('ps',TRUE)))\n\t\t{\n\t\t\t$limit= $cookie_ps;\n\t\t}\n\n\t\tif (!is_numeric($limit) || $limit<=0)\n\t\t{\n\t\t\treturn 15;\n\t\t}\n\n\t\t//set max size limit\n\t\tif($limit>50000)\n\t\t{\n\t\t\treturn 50000;\n\t\t}\n\n\t\treturn $limit;\n\t}", "title": "" }, { "docid": "18cb38f9723ba3c6dfdabae8e4e23e61", "score": "0.62641454", "text": "public function getPerPage($page_limit = 50)\n {\n if($page_limit==\"all\"){\n $limit=$page_limit;\n }\n else{\n $limit=$page_limit;\n \n if(!$limit){\n\t\t\t\t$limit=Mage::getSingleton('catalog/session')->getLimitPage();\n }\n }\n\t\tif($limit==\"\"){\n\t\t\t$limit = 5;\n\t\t}\n\t\tMage::getSingleton('catalog/session')->setLimitPage($limit);\n\t\t\n return $limit;\n }", "title": "" }, { "docid": "ac56cd191344e3de68e14734a6a16a6f", "score": "0.62377787", "text": "function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "7848ec1431d1a661f286815dc74f1402", "score": "0.6236736", "text": "function getItemsPerPage() {\n return $this->pager_param['itemsPerPage'];\n }", "title": "" }, { "docid": "c797df38abc6c0e64e8e6ecb6745f1af", "score": "0.6226456", "text": "public function limit($value);", "title": "" }, { "docid": "2cd617a1992af2c691e2a6040b79f970", "score": "0.6225299", "text": "public function limitAndPaginate(){\n return $this->Html->div('clearfix','').$this->paginLimit().$this->paginator();\n }", "title": "" }, { "docid": "908f5f4f1920eadd531b1b7da205cf11", "score": "0.62145334", "text": "protected function get_items_query_limit() {\n\t\tglobal $wpdb;\n\n\t\t$per_page = $this->get_items_per_page( $this->package . '_items_per_page', $this->items_per_page );\n\t\treturn $wpdb->prepare( 'LIMIT %d', $per_page );\n\t}", "title": "" }, { "docid": "4a0efe74704828aa7a31a87f10e2d62a", "score": "0.62143236", "text": "public function pageSize(): int\n\t{\n\t\treturn $this->m_pageSize;\n\t}", "title": "" }, { "docid": "429b31e03d28eded3bd6ef210ab381b3", "score": "0.6208969", "text": "function view_limit() {\n\t\treturn [ '5' => '5',\n\t\t\t\t'10' => '10',\n\t\t\t\t'25' => '25', \n\t\t\t\t'50' => '50', \n\t\t\t\t'100' => '100', \n\t\t\t\t'200' => '200', \n\t\t\t\t'500' => '500'\n\t\t\t\t]; \n }", "title": "" }, { "docid": "27c374b828dd8e1545ea30347ac5c55b", "score": "0.62076706", "text": "public function getMallLimit()\n {\n \treturn $this->key('mall_limit');\n }", "title": "" }, { "docid": "c8f694c4c82b154b75c62e587b5c2218", "score": "0.6200265", "text": "public function plimit($limit = 0, $offset = 0)\n\t{\n\t\tglobal $conf;\n\t\tif (empty($limit)) return \"\";\n\t\tif ($limit < 0) $limit=$conf->liste_limit;\n\t\tif ($offset > 0) return \" LIMIT $offset,$limit \";\n\t\telse return \" LIMIT $limit \";\n\t}", "title": "" }, { "docid": "e4bb10b8fca5414fe25eb77334e5d9f9", "score": "0.6182001", "text": "function setMaxPerPage($maxPerPage);", "title": "" }, { "docid": "231b681fbc3c839506f35b63d7506779", "score": "0.6177807", "text": "function limit ($val) {\n return $this->query([\"limit\" => $val]);\n }", "title": "" }, { "docid": "b4b081a86eeff178d88fdc42dbc4fbf4", "score": "0.61733913", "text": "public function getAvailableLimit()\n {\n $currentMode = $this->getCurrentMode();\n if (in_array($currentMode, array('list', 'grid'))) {\n return $this->_getAvailableLimit($currentMode);\n } else {\n return $this->_defaultAvailableLimit;\n }\n }", "title": "" }, { "docid": "a0c1b20eb980a4394a80d4f78ae405c6", "score": "0.61603016", "text": "private function getMaxPerPage(): int\n {\n return $this->maxPerPage;\n }", "title": "" }, { "docid": "4807a1a2e6ea2ae81b1d4bc26172fcaf", "score": "0.6160116", "text": "private function limits()\n {\n # calculam linkul din stanga (pentru a fi linul activ in mijloc)\n $left = $this->current_page - round($this->max / 2);\n\n # calculam inceputul\n $start = $left > 0 ? $left : 1;\n\n # Daca inainte este minim $this->max pagini\n if ($start + $this->max <= $this->amount)\n # seteaza sfarsitul ciclului $this->max paginilor\n $end = $start > 1 ? $start + $this->max : $this->max;\n else {\n # sfarsit n\n $end = $this->amount;\n\n # startul scadem $this->max de la sfarsit\n $start = $this->amount - $this->max > 0 ? $this->amount - $this->max : 1;\n }\n\n # returnam\n return\n array($start, $end);\n }", "title": "" }, { "docid": "c241d1d8d2b68f7206a7905620ef10f1", "score": "0.6133859", "text": "private function getNumberItemsPage() {\n \treturn $this->properties->getWidgetProperty(self::PROPERTY_ITEMS_PAGE, self::DEFAULT_ITEMS_PAGE);\n }", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.6129183", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.6129183", "text": "public function setLimit($limit);", "title": "" }, { "docid": "1d163dcfc95cddaf68bcd4dc8c33b086", "score": "0.6129183", "text": "public function setLimit($limit);", "title": "" }, { "docid": "54c383cac8de129e39c6049fdb9e35cf", "score": "0.61233366", "text": "public function getItemsPerPage() {\n return $this->options['items_per_page'] ?? 0;\n }", "title": "" }, { "docid": "a5d0a94f5bd93cfe08b90b1240d14e3d", "score": "0.61152935", "text": "function limit($request)\n {\n $limit = '';\n\n if (isset($request['start']) && $request['length'] != -1) {\n $limit = \"LIMIT \" . intval($request['start']) . \", \" . intval($request['length']);\n }\n\n return $limit;\n }", "title": "" }, { "docid": "adedfc614e43914fe50e29d2232c71dc", "score": "0.6101723", "text": "abstract public function limit($sql, $count, $offset);", "title": "" }, { "docid": "b2184ed12994d1e934ad325c04b86f87", "score": "0.60989714", "text": "public function offset() {\n return $this->per_page * ($this->current_page - 1);\n }", "title": "" }, { "docid": "e9cda86f1fadfaedca86d647dcfe10d4", "score": "0.60982776", "text": "protected function getPerPage()\n {\n return $this->data['per_page'] ?? 50;\n }", "title": "" } ]
627d35f99097e2af3f15fb3a5ea39508
Open Logfile and copy loglines into LogLinesArray()
[ { "docid": "76f1ea12668b5882280164834f41afe5", "score": "0.4834556", "text": "function getYSFGatewayLog() {\n\t$logLines = array();\n\t$logLines1 = array();\n\t$logLines2 = array();\n\tif (file_exists(YSFGATEWAYLOGPATH.\"/\".YSFGATEWAYLOGPREFIX.\"-\".gmdate(\"Y-m-d\").\".log\")) {\n\t\t$logPath1 = YSFGATEWAYLOGPATH.\"/\".YSFGATEWAYLOGPREFIX.\"-\".gmdate(\"Y-m-d\").\".log\";\n\t\t//$logLines1 = explode(\"\\n\", `egrep -h \"repeater|Starting|Opening YSF|Disconnect|Connect|Automatic|Disconnecting|Reverting|Linked\" $logPath1 | tail -250`);\n\t\t$logLines1 = preg_split('/\\r\\n|\\r|\\n/', `grep -E \"onnection to|onnect to|ink|isconnect|Opening YSF network\" $logPath1 | sed '/Linked to MMDVM/d' | sed '/Link successful to MMDVM/d' | tail -1`);\n\t}\n\t$logLines1 = array_filter($logLines1);\n\t//$logLines1 = array_slice($logLines1, -250);\n\t//if (sizeof($logLines1) < 250) {\n\tif (sizeof($logLines1) == 0) {\n\t\tif (file_exists(YSFGATEWAYLOGPATH.\"/\".YSFGATEWAYLOGPREFIX.\"-\".gmdate(\"Y-m-d\", time() - 86340).\".log\")) {\n\t\t\t$logPath2 = YSFGATEWAYLOGPATH.\"/\".YSFGATEWAYLOGPREFIX.\"-\".gmdate(\"Y-m-d\", time() - 86340).\".log\";\n\t\t\t//$logLines2 = explode(\"\\n\", `egrep -h \"repeater|Starting|Opening YSF|Disconnect|Connect|Automatic|Disconnecting|Reverting|Linked\" $logPath2 | tail -250`);\n\t\t\t$logLines1 = preg_split('/\\r\\n|\\r|\\n/', `grep -E \"onnection to|onnect to|ink|isconnect|Opening YSF network\" $logPath2 | sed '/Linked to MMDVM/d' | sed '/Link successful to MMDVM/d' | tail -1`);\n\t\t}\n\t\t$logLines2 = array_filter($logLines2);\n\t}\n\t//$logLines2 = array_slice($logLines2, -250);\n\t//$logLines = $logLines1 + $logLines2;\n\t//$logLines = array_slice($logLines, -250);\n\t//return $logLines;\n\tif (sizeof($logLines1) == 0) { $logLines = $logLines2; } else { $logLines = $logLines1; }\n return array_filter($logLines);\n}", "title": "" } ]
[ { "docid": "24fbc6370fd0411bbe894bafec455bd2", "score": "0.706037", "text": "public function getLogs() {\n\t\t$logLines = array();\n\t\t$logFile = fopen($this->logDir.\"log\", \"r\");\n\n\t\tif ($logFile) {\n\t\t\twhile (($line = fgets($logFile)) != false) {\n\t\t\t\tarray_unshift($logLines, $line);\n\t\t\t}\n\t\t\tfclose($logFile);\n\t\t}\n\t\t\n\t\treturn $logLines;\n\t}", "title": "" }, { "docid": "2f8d08612fdb9b8871089b5dab184859", "score": "0.62134033", "text": "public function read()\n {\n\n //Read the file log\n $lines = file($this->file);\n\n //Revert the order to get last 10 lines\n $reversed = array_reverse($lines);\n\n $log_display = [];\n\n // Loop through our array, and get first 10 lines\n foreach ($reversed as $line_num => $line) {\n array_push($log_display, htmlentities($line));\n if ($line_num==10) {\n break;\n }\n }\n\n return $log_display;\n }", "title": "" }, { "docid": "e7033baa5ddf7cfea73a36db70d00616", "score": "0.61433166", "text": "public function lines()\n {\n $results = [];\n\n foreach (file($this->filename) as $line_str) {\n $line_obj = $this->parser->stringToMailLogLine($line_str);\n if (!$line_obj) {\n // The line is not relevant, continue\n continue;\n }\n\n $results[] = $line_obj;\n }\n\n return $results;\n }", "title": "" }, { "docid": "4778a8cfe8e83bf9d2169da641acdb01", "score": "0.6074663", "text": "private function read_lines(){\n\t\t$handle = fopen($this->filename, \"r\");\n\t\t$fileSize1 = filesize($this->filename);\n\t\tif ($fileSize1 > 0){\n\t\t\t$contents = fread($handle, $fileSize1);\n\t\t} else {\n\t\t\t$contents = [];\n\t\t}\t\n\t\tfclose($handle);\n\n\t\tif (is_string($contents)){\n\t\t\t$contents = explode(\"\\n\", $contents);\t\n\t\t} \t\n\t\t\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "cc7b1a3d5259c6d4c6404705a681724e", "score": "0.60164404", "text": "public static function getAllLogs()\n {\n $logData = array();\n\n // RegEx to match all heading\n $pattern = '/\\[\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}([\\+-]\\d{4})?\\].*/';\n\n // In case of no log file selected\n if (!self::$logFile) {\n $all_log_file = self::getFiles();\n if (!count($all_log_file)) {\n return [];\n }\n self::$logFile = $all_log_file[0];\n }\n\n // In case of max size exceeded\n if (app('files')->size(self::$logFile) > self::MAX_FILE_SIZE) return null;\n\n\n $file = app('files')->get(self::$logFile);\n preg_match_all($pattern, $file, $headings);\n if (!is_array($headings)) return $logData;\n $log_data = preg_split($pattern, $file);\n if ($log_data[0] < 1) {\n array_shift($log_data);\n }\n\n // Iteration of all log data\n $logData = LogViewer::generateLogData($headings, $log_data);\n return array_reverse($logData);\n }", "title": "" }, { "docid": "f033fbf3fe7925993fa085ad573cb173", "score": "0.6014375", "text": "function readdata($file_lines){\r\n\t//and create array, indexing based on new line\r\n\tforeach($file_lines as $line){\r\n\t\t$array1[]= $line;\r\n\t}\r\n\treturn $array1;\r\n}", "title": "" }, { "docid": "9d722efe8d4d50e2e4f1cd53c30450ca", "score": "0.59418404", "text": "function readArray() {\r\n $handle = fopen ($this->file, \"r\");\r\n $i = 0;\r\n do {\r\n $this->buffer[$i] = fgets($handle);\r\n $this->buffer[$i] = explode($this->separator, $this->buffer[$i]);\r\n $i++;\r\n } while (!feof ($handle));\r\n fclose ($handle);\r\n }", "title": "" }, { "docid": "e5e4c9ff7bd561eb79b4f5ea4f67e1d7", "score": "0.5921604", "text": "protected function splitLogIntoEntries()\n {\n $pattern = \"/(# Time(?:.*\\n))/\";\n $entries = preg_split($pattern, $this->contents, -1);\n\n if (count($entries) == 1) {\n throw new Exception\\ParseErrorException(\"Failed to parse file\");\n }\n return array_filter($entries);\n }", "title": "" }, { "docid": "d20b9e01a6571bec11751b1414553101", "score": "0.5904094", "text": "private function parseLog()\n\t{\n\t\tif (!($matches = Strings::match($this->filename, '&(#[A-Za-z0-9-_.]+)\\.(\\d{4}\\-\\d{2}\\-\\d{2})\\.log&'))) {\n\t\t\tthrow new Nette\\InvalidArgumentException(\"File '$this->filename' has invalid filename. Channel and date must be present.\");\n\t\t}\n\n\t\t$file = Strings::normalizeNewLines(file_get_contents($this->filename));\n\t\t$log = new VisualLog\\Log\\Log($matches[1], new \\DateTime($matches[2]), $file);\n\n\t\tforeach (explode(\"\\n\", $file) as $line) {\n\t\t\tif (!$line) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlist($time, $data) = explode(' ', $line, 2);\n\t\t\t$time = new \\DateTime($time);\n\n\t\t\tif (Strings::startsWith($data, '***')) {\n\t\t\t\t$match = Strings::match($data, '&\\*\\*\\* ([^ ]+) (has quit|has joined|sets mode: ((?:\\+|\\-)(?:[a-z]+)) ?(.+)?|has left|was kicked by (.+) \\((.+)\\)|is now known as (.+)|changes topic to \\\"(.+)\\\")&');\n\n\t\t\t\tif (Strings::startsWith($match[2], 'has quit')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\QuitLine($time, $match[1]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'has joined')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\JoinLine($time, $match[1]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'sets mode')) {\n\t\t\t\t\t// @ is intentional\n\t\t\t\t\t$logLine = new VisualLog\\Log\\ModeLine($time, $match[1], $match[3], @$match[4]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'has left')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\PartLine($time, $match[1]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'was kicked')) {\n\t\t\t\t\t// @ is intentional\n\t\t\t\t\t$logLine = new VisualLog\\Log\\KickLine($time, $match[5], $match[1], @$match[6]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'is now known')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\NickLine($time, $match[1], $match[7]);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($match[2], 'changes topic')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\TopicLine($time, $match[1], $match[8]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlist($nick, $message) = explode(' ', $data, 2);\n\n\t\t\t\tif (Strings::startsWith($data, '*')) {\n\t\t\t\t\tlist($nick, $message) = explode(' ', substr($data, 2), 2);\n\t\t\t\t\t$logLine = new VisualLog\\Log\\ActionLine($time, $nick, $message);\n\t\t\t\t}\n\t\t\t\telse if (Strings::startsWith($data, '-')) {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\NoticeLine($time, trim($nick, '-'), $message);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$logLine = new VisualLog\\Log\\MessageLine($time, trim($nick, '<>'), $message);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$log->addLine($logLine);\n\t\t}\n\n\t\t$this->log = $log;\n\t}", "title": "" }, { "docid": "e7a25e6b11693dbd28fba7fd9acb78db", "score": "0.5826362", "text": "public function getFilelog(){\n\t\t\n\t\tTry{\n\t\t\t\n\t\t\t$select = \" SELECT id, file_name, delimiter, us_id \" .\n\t\t\t\t \" FROM files\" .\n\t\t\t\t \" WHERE us_id=\" . $this->userid;\n\t\t\t$this->connection->query($select);\n\t\t\t\n\t\t\t//check sql \n\t\t $this->connection->checkSQL();\n\t\t \t\n\t\t\twhile($result = $this->connection->fetchNextObject()){\n\t\t\t\tif (!in_array($result->id, $this->arrayFile)){\n\t\t\t\t\t$this->arrayFile[] = new Filelog($result->id, $result->file_name, $result->delimiter , $result->us_id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch (Exception $e) {\n\t\t $this->log->setWarning($e->getMessage());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "6984a07fe3830ccd5657a90a6e1f7765", "score": "0.5824073", "text": "private function processLogs($logs) {\n\n if(is_null($logs)) {\n return null;\n }\n\n $superLog = [];\n\n foreach ($logs as $log) {\n\n //get the logLine Start\n $logLineStart = $this->getLogLineStart($log);\n\n if(!empty($logLineStart)) {\n //this is actually the start of a new log and not just another line from previous log\n $level = $this->getLogLevel($logLineStart);\n $data = [\n \"level\" => $level,\n \"date\" => $this->getLogDate($logLineStart),\n \"icon\" => self::$levelsIcon[$level],\n \"class\" => self::$levelClasses[$level],\n ];\n\n if(strlen($log) > self::MAX_STRING_LENGTH) {\n $data['content'] = substr($log, 0, self::MAX_STRING_LENGTH);\n $data[\"extra\"] = substr($log, (self::MAX_STRING_LENGTH + 1));\n } else {\n $data[\"content\"] = $log;\n }\n\n array_push($superLog, $data);\n\n } else if(!empty($superLog)) {\n //this log line is a continuation of previous logline\n //so let's add them as extra\n $prevLog = $superLog[count($superLog) - 1];\n $extra = (array_key_exists(\"extra\", $prevLog)) ? $prevLog[\"extra\"] : \"\";\n $prevLog[\"extra\"] = $extra . \"<br>\" . $log;\n $superLog[count($superLog) - 1] = $prevLog;\n } else {\n //this means the file has content that are not logged\n //using log_message()\n //they may be sensitive! so we are just skipping this\n //other we could have just insert them like this\n// array_push($superLog, [\n// \"level\" => \"INFO\",\n// \"date\" => \"\",\n// \"icon\" => self::$levelsIcon[\"INFO\"],\n// \"class\" => self::$levelClasses[\"INFO\"],\n// \"content\" => $log\n// ]);\n }\n }\n\n return $superLog;\n }", "title": "" }, { "docid": "203fbdc887fdbd181abb2d3a815744bb", "score": "0.57984847", "text": "public function loadLogs() {\n $cmd = \"journalctl --unit=%s -o json\";\n list($stdout, $stderr) = id(new ExecFuture($cmd, $this->getUnitName()))\n ->resolvex();\n $logs = array();\n $lines = phutil_split_lines($stdout);\n foreach ($lines as $line) {\n $logs[] = phutil_json_decode($line);\n }\n return $logs;\n }", "title": "" }, { "docid": "a53127978fe30c3b674ded0fd29c44dd", "score": "0.56912845", "text": "public static function ReadLog() {\n if(!file_exists(self::$LogFile) || !is_readable(self::$LogFile)) {\n echo \"ERROR: Log file does not exist or is unreadable.\";\n }\n if($file_handle = fopen(self::$LogFile, 'rb')) {\n self::$Content .= \"<ul class=\\\"log-list\\\">\";\n while(!feof($file_handle)) {\n $entry = fgets($file_handle);\n if(trim($entry) != \"\") { // removes EXTRA newline More: note 4\n self::$Content .= \"<li>\" . $entry . \"</li>\";\n }\n\n }\n }\n self::$Content .= \"</ul>\";\n fclose($file_handle);\n echo (self::$Content);\n }", "title": "" }, { "docid": "b56b2d9a4054c376be84e67487f544b2", "score": "0.5668854", "text": "public function readLog () {\n }", "title": "" }, { "docid": "cc16d9d35269805d316c145e83cf5cf7", "score": "0.56535196", "text": "protected function _readSvnLog($log)\n {\n $count = count($log);\n $entries = array();\n $entryBuffer = false;\n $entryBufferComment = '';\n\n for ($i = 0; $i < $count; $i++) {\n $line = $log[$i];\n if (substr($line, 0, 5) == '-----') {\n if ($entryBuffer) {\n // Save the last entry parsed\n $entryBuffer['comment'] = $entryBufferComment;\n $entries[$entryBuffer['revision']] = $entryBuffer;\n\n $entryBuffer = false;\n $entryBufferComment = '';\n }\n\n // parse an entry\n $i++;\n if (!isset($log[$i])) {\n // last line\n break;\n }\n $values = explode(' | ', $log[$i]);\n\n $timestamp = strtotime(substr($values[2], 0, 25));\n $entryBuffer = array(\n 'revision' => $values[0],\n 'user' => $values[1],\n 'datetime' => $values[2],\n 'ts' => $timestamp,\n 'lines' => $values[3],\n );\n } else {\n // gather the comments\n $entryBufferComment .= trim($line);\n }\n }\n\n return $entries;\n }", "title": "" }, { "docid": "53beadf4593b6faee9fcf88acf437c1f", "score": "0.55460876", "text": "public function get_server_entry_array($file) {\n $fp = fopen($file, \"r+\");\n if (flock($fp, LOCK_EX)) {\n if (filesize($file) > 0) {\n while (!feof($fp)){ \n $line = fgets($fp);\n $data = unserialize($line);\n if (is_array($data)) {\n $sql = $this->make_insert_sql($data,'gui_log');\n /* for some reason the CI insert leaks memory or something so I do it direct */\n mysql_query($sql);\n //$this->CI->m_gui_log->insert($data);\n }\n }\n ftruncate($fp, 0);\n }\n flock($fp, LOCK_UN);\n }\n fclose($fp);\n /* older then a day - delete */\n if (filemtime($file) < (time() - 86400)) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "291866fdd7fbc1dec14d0c659f8e14c1", "score": "0.55437565", "text": "public function fileToArray()\r\n {\r\n $array = array();\r\n $archivo = fopen($this->path, \"r\");\r\n while (!feof($archivo)) {\r\n $array[] = fgets($archivo);\r\n }\r\n fclose($archivo);\r\n return $array;\r\n }", "title": "" }, { "docid": "7fc122537bb8e2ef42877dcff7812601", "score": "0.5541316", "text": "public function readLog()\n {\n }", "title": "" }, { "docid": "ec79f0745d2706f27e4817146545450a", "score": "0.55405366", "text": "public function preview($file_name)\n\t{\n\t\tif (!\\Entrust::can('preview-logs')) {\n\t abort(403, 'Unauthorized access - you do not have the necessary permission to preview logs.');\n\t }\n\n\t\t$disk = Storage::disk('storage');\n\n\t\tif ($disk->exists('logs/'.$file_name)) {\n\n\t\t\tself::$file = storage_path().'/logs/'.$file_name;\n\n\t\t\t$log = array();\n\n\t\t\t$log_levels = self::getLogLevels();\n\n\t\t\t$pattern = '/\\[\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\].*/';\n\n\t\t\tif (!self::$file) {\n\t\t\t\t$log_file = self::getFiles();\n\t\t\t\tif(!count($log_file)) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t\t\tself::$file = $log_file[0];\n\t\t\t}\n\n\t\t\tif (File::size(self::$file) > self::MAX_FILE_SIZE) return null;\n\n\t\t\t$file = File::get(self::$file);\n\n\t\t\tpreg_match_all($pattern, $file, $headings);\n\n\n\n\t\t\tif (!is_array($headings)) return $log;\n\n\t\t\t$log_data = preg_split($pattern, $file);\n\n\t\t\tif ($log_data[0] < 1) {\n\t\t\t\tarray_shift($log_data);\n\t\t\t}\n\n\t\t\tforeach ($headings as $h) {\n\t\t\t\tfor ($i=0, $j = count($h); $i < $j; $i++) {\n\t\t\t\t\tforeach ($log_levels as $level_key => $level_value) {\n\t\t\t\t\t\tif (strpos(strtolower($h[$i]), '.' . $level_value)) {\n\n\t\t\t\t\t\t\tpreg_match('/^\\[(\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})\\].*?\\.' . $level_key . ': (.*?)( in .*?:[0-9]+)?$/', $h[$i], $current);\n\n\t\t\t\t\t\t\tif (!isset($current[2])) continue;\n\n\t\t\t\t\t\t\t$log[] = array(\n\t\t\t\t\t\t\t\t'level' => $level_value,\n\t\t\t\t\t\t\t\t'level_class' => self::$levels_classes[$level_value],\n\t\t\t\t\t\t\t\t'level_img' => self::$levels_imgs[$level_value],\n\t\t\t\t\t\t\t\t'date' => $current[1],\n\t\t\t\t\t\t\t\t'text' => $current[2],\n\t\t\t\t\t\t\t\t'in_file' => isset($current[3]) ? $current[3] : null,\n\t\t\t\t\t\t\t\t'stack' => preg_replace(\"/^\\n*/\", '', $log_data[$i])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$log[\"data\"]['file_path'] = 'logs/'.$file_name;\n\t\t\t$log[\"data\"]['file_name'] = $file_name;\n\t\t\t$log[\"data\"]['file_size'] = $disk->size('logs/'.$file_name);\n\t\t\t$log[\"data\"]['last_modified'] = $disk->lastModified('logs/'.$file_name);\n\n\n//\t\t\treturn array_reverse($log);\n\t\t\treturn view(\"logmanager::log_item\", ['logs' => array_reverse($log)]);\n\n//\t\t\treturn array_reverse($log);\n//\n\n\n//\t\t\t$this->data['log'] = [\n//\t\t\t\t\t\t\t\t\t'file_path' => 'logs/'.$file_name,\n//\t\t\t\t\t\t\t\t\t'file_name' => $file_name,\n//\t\t\t\t\t\t\t\t\t'file_size' => $disk->size('logs/'.$file_name),\n//\t\t\t\t\t\t\t\t\t'last_modified' => $disk->lastModified('logs/'.$file_name),\n//\t\t\t\t\t\t\t\t\t'content' => $disk->get('logs/'.$file_name),\n//\t\t\t\t\t\t\t\t\t];\n//\n//\t\t\treturn view(\"logmanager::log_item\", $this->data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tabort(404, \"The log file doesn't exist.\");\n\t\t}\n\t}", "title": "" }, { "docid": "f1cdc364c867d9cb05ef87c08814d256", "score": "0.552017", "text": "public function getLogLine();", "title": "" }, { "docid": "eb8642b1fc1e2782c25776c32f677053", "score": "0.55131936", "text": "public function read() {\n if (!empty($this->log)) {\n if (empty($this->datetimeFilterFrom)) {\n $this->resetDateFromFilter();\n }\n if (empty($this->datetimeFilterTo)) {\n $this->setFilterDateTo(date(self::DATETIME_FORMAT));\n }\n \n foreach ($this->log as $line) {\n $row = $this->toRow($line);\n if (!empty($row)) {\n $row['color'] = $this->getColor($line);\n $output[] = $row;\n }\n }\n }\n \n if (!isset($output)) {\n $output = false;\n }\n \n return $output;\n }", "title": "" }, { "docid": "85204e6d4bab8ca9372a11fbc777a1d0", "score": "0.5486264", "text": "public function parseEntries()\n {\n //split log into separate entries\n $entries = $this->splitLogIntoEntries();\n\n //loop entries and add to $this->entries property\n foreach ($entries as $entry) {\n $this->addEntry($entry);\n }\n\n return $this->getEntries();\n }", "title": "" }, { "docid": "41a828193e7a8d0302bd0f8ca02277ff", "score": "0.5468567", "text": "public function readlog()\n {\n }", "title": "" }, { "docid": "96970a7f39a11ee21d7d160bb268e644", "score": "0.54503834", "text": "private function read_log_file($time_line) \n\t\t{\n\t\t\t// parse datetime info\n\t\t\tpreg_match(\"/^# Time:[ ]+(\\d{6})[ ]+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})/\", $time_line, $matches);\n\t\t\t$time = date(\n\t\t\t\t\"U\",\n\t\t\t\tmktime(\n\t\t\t\t\t$matches[2], // hour\n\t\t\t\t\t$matches[3], // minute\n\t\t\t\t\t$matches[4], // second\n\t\t\t\t\tsubstr($matches[1], 2, 2), // month\n\t\t\t\t\tsubstr($matches[1], 4, 2), // day\n\t\t\t\t\tsubstr($matches[1], 0, 2) // year\n\t\t\t\t)\n\t\t\t);\n\t\t\t$query = array();\n\t\t\t$raw_query = '';\n\t\t\t// read lines until next time section\n\t\t\twhile ($line = fgets($this->fp)) \n\t\t\t{\n\t\t\t\tif (preg_match('/^# Time: (\\d{6}) (\\d{2}):(\\d{2}):(\\d{2})/', $line)) \n\t\t\t\t{\n\t\t\t\t\t$query['query'] = $raw_query;\n\t\t\t\t\t$this->stmt->execute($query);\n\t\t\t\t\t$this->read_log_file($line);\n\t\t\t\t\treturn;\n\t\t\t\t} \n\t\t\t\telseif (preg_match('/^# User@Host: (\\w+)\\[\\w+\\] @ (.+) \\[([^\\[]*)\\]/', $line, $matches)) \n\t\t\t\t{\n\t\t\t\t\tif (!empty($raw_query)) \n\t\t\t\t\t{\n\t\t\t\t\t\t$query['query'] = $raw_query;\n\t\t\t\t\t\t$this->stmt->execute($query);\n\t\t\t\t\t\t$query = array();\n\t\t\t\t\t\t$raw_query = '';\n\t\t\t\t\t}\n\t\t\t\t\t$query['time'] = $time;\n\t\t\t\t\t$query['user'] = $matches[1];\n\t\t\t\t\t$query['host'] = $matches[2];\n\t\t\t\t\t$query['ip'] = $matches[3];\n\t\t\t\t} \n\t\t\t\telseif (preg_match('/^# Query_time: ([\\d|\\.]+)\\s+Lock_time: ([\\d|\\.]+)\\s+Rows_sent: (\\d+)\\s+Rows_examined: (\\d+)/', $line, $matches)) \n\t\t\t\t{\n\t\t\t\t\t$query['execute_time'] = $matches[1];\n\t\t\t\t\t$query['lock_time'] = $matches[2];\n\t\t\t\t\t$query['rows_sent'] = $matches[3];\n\t\t\t\t\t$query['rows_examined'] = $matches[4];\n\t\t\t\t} \n\t\t\t\telseif (!preg_match('/^SET timestamp=/', $line) && !preg_match('/^use /', $line) && !preg_match('/^#/', $line)) \n\t\t\t\t{\n\t\t\t\t\t// we want to get rid of SET timestamp\n\t\t\t\t\t// Percona adds extra data, for now let's ignore it\n\t\t\t\t\t$raw_query .= preg_replace('/^(\\s{16}|\\t{4})/', '', $line);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0233fa90aae1e1ef53d5724299607d94", "score": "0.5444554", "text": "public function getLogData(): array;", "title": "" }, { "docid": "4f53653a0f2e9089804d11d410a02b31", "score": "0.5434876", "text": "public function readAsArray($fromLine, $toLine) {\r\n\t\tif($fromLine > $toLine){\r\n\t\t\treturn 'From Line should not larger than To Line';\r\n\t\t}\r\n\t\t$content = array();\r\n\t\t$fh = fopen($this->file, $this->readMode); \r\n\t\t$index = 0;\r\n\t\twhile ($line = fgets($fh)) {\r\n\t\t\tif(($index >= $fromLine && $index <= $toLine) || ($fromLine == -1 && $toLine == -1)){\r\n\t\t\t\t$content[] = $line;\t\t\r\n\t\t\t}\t\t \r\n\t\t\t$index++;\r\n\t\t\tif($index > $toLine && ($toLine != -1))\r\n\t\t\t\tbreak;\r\n\t\t}\t\r\n\t\tfclose($fh);\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "e02ccf70b0e3c3870c1c45e50b88728a", "score": "0.5429698", "text": "public function actionLogs()\n\t{\n\t\tcraft()->config->maxPowerCaptain();\n\n\t\tif (IOHelper::folderExists(craft()->path->getLogPath()))\n\t\t{\n\t\t\t$dateTimePattern = '/^[0-9]{4}\\/[0-9]{2}\\/[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/';\n\n\t\t\t$logEntries = array();\n\n\t\t\t$currentLogFileName = $this->currentLogFileName;\n\t\t\t$currentFullPath = craft()->path->getLogPath().$currentLogFileName;\n\n\t\t\tif (IOHelper::fileExists($currentFullPath))\n\t\t\t{\n\t\t\t\t// Split the log file's contents up into arrays of individual logs, where each item is an array of\n\t\t\t\t// the lines of that log.\n\t\t\t\t$contents = IOHelper::getFileContents(craft()->path->getLogPath().$currentLogFileName);\n\n\t\t\t\t$requests = explode('******************************************************************************************************', $contents);\n\n\t\t\t\tforeach ($requests as $request)\n\t\t\t\t{\n\t\t\t\t\t$logChunks = preg_split('/^(\\d{4}\\/\\d{2}\\/\\d{2} \\d{2}:\\d{2}:\\d{2}) \\[(.*?)\\] \\[(.*?)\\] /m', $request, null, PREG_SPLIT_DELIM_CAPTURE);\n\n\t\t\t\t\t// Ignore the first chunk\n\t\t\t\t\tarray_shift($logChunks);\n\n\t\t\t\t\t// Loop through them\n\t\t\t\t\t$totalChunks = count($logChunks);\n\t\t\t\t\tfor ($i = 0; $i < $totalChunks; $i += 4)\n\t\t\t\t\t{\n\t\t\t\t\t\t$logEntryModel = new LogEntryModel();\n\n\t\t\t\t\t\t$logEntryModel->dateTime = DateTime::createFromFormat('Y/m/d H:i:s', $logChunks[$i]);\n\t\t\t\t\t\t$logEntryModel->level = $logChunks[$i+1];\n\t\t\t\t\t\t$logEntryModel->category = $logChunks[$i+2];\n\n\t\t\t\t\t\t$message = $logChunks[$i+3];\n\t\t\t\t\t\t$rowContents = explode(\"\\n\", $message);\n\n\t\t\t\t\t\t// This is a non-devMode log entry.\n\t\t\t\t\t\t$logEntryModel->message = str_replace('[Forced] ', '', $rowContents[0]);\n\n\t\t\t\t\t\t// Convert model to array\n\t\t\t\t\t\t$logEntryArray = ArrayHelper::flattenArray($logEntryModel);\n\n\t\t\t\t\t\t// Check for custom markers\n\t\t\t\t\t\t$response = explode('[response] ', $logEntryArray['message']);\n\n\t\t\t\t\t\tif(!empty($response[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$logEntryArray['response'] = json_decode($response[1]);\n\t\t\t\t\t\t \t$logEntryArray['message'] = $response[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$request = explode('[request] ', $logEntryArray['message']);\n\n\t\t\t\t\t\tif(!empty($request[1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$logEntryArray['request'] = json_decode($request[1]);\n\t\t\t\t\t\t \t$logEntryArray['message'] = $request[0];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// And save the log entry.\n\t\t\t\t\t\tarray_unshift($logEntries, $logEntryArray);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->renderTemplate('avataxtaxadjuster/settings/logs', array(\n\t\t\t'logEntries' => $logEntries\n\t\t));\n\t}", "title": "" }, { "docid": "66d6e8bc69bcd717ffee306427db2d05", "score": "0.54065007", "text": "private function getLogs(): array\n {\n $convert = static function ($record) {\n $lower = static function ($match) {\n return \\strtolower($match[0]);\n };\n\n return \\preg_replace_callback('{^[A-Z]+}', $lower, $record['formatted']);\n };\n\n return \\array_map($convert, $this->handler->getRecords());\n }", "title": "" }, { "docid": "6ad6232f1bcc633a7ec19eeadd6ccc5f", "score": "0.5399107", "text": "private function getLogs($fileName) {\n $size = filesize($fileName);\n if(!$size || $size > self::MAX_LOG_SIZE)\n return null;\n return file($fileName, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n }", "title": "" }, { "docid": "a2b8572940c05cd6b5c6abe04cabd818", "score": "0.53722113", "text": "private function getResultFromFile() {\n\n // checking file existence\n if (!file_exists($this->resultFilePath)) {\n // throw new FileNotFoundException(\"Report file: {$this->resultFilePath} is not available.\");\n\n // creating the empty report file\n $this->createFile($this->resultFilePath);\n }\n\n // getting raw file content\n $fileContent = file_get_contents($this->resultFilePath);\n\n // formatting array\n $fileContent = explode(\"\\n\", $fileContent);\n\n // removing last blank item\n array_pop($fileContent);\n\n $this->resultData = array_map(function($logLine) {\n\n return $this->splitLogEntry($logLine);\n\n }, $fileContent);\n }", "title": "" }, { "docid": "bcfc4a7c10351c57e117a8cf66ebc130", "score": "0.53627974", "text": "public function getLogEntries($file, $timeStart, $timeEnd, $term) {\n\t\t$entries = array();\n\n\t\t$fileArr = explode(\".\", $file);\n\t\tif ($fileArr[count($fileArr) - 1] === 'gz') {\n\t\t\t$entries = $this->_getCompressedLogEntries($file, $timeStart, $timeEnd, $term);\n\t\t} else {\n\t\t\t$entries = $this->_getNormalLogEntries($file, $timeStart, $timeEnd, $term);\n\t\t}\n\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "4a884b14921f203774bb2422e1fe4de2", "score": "0.53555924", "text": "protected function _getNormalLogEntries($file, $timeStart, $timeEnd, $term) {\n\t\t$handle = fopen($file, \"r\");\n\t\tif ($handle === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$entries = array();\n\t\twhile (!feof($handle)) {\n\t\t\t$line = fgets($handle);\n\t\t\tif ($line === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$result = $this->_getEntry($line, $timeStart, $timeEnd, $term);\n\t\t\tif (is_array($result)) {\n\t\t\t\t$entries[] = $result;\n\t\t\t}\n\t\t}\n\t\tfclose($handle);\n\t\t\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "2bfbe8fb01b5f13e04609f084a77d41f", "score": "0.5347818", "text": "function Process($file){\r\n\t$logTimestamp = GetTimeStamp($file);\r\n\techo \"\\nlogTimestamp:$logTimestamp\\n\";\r\n\r\n\t//create file resource handler\r\n\t$handle = fopen(LOGS_DIR . $file, \"r\");\r\n\r\n\tif($handle == false){\r\n\t\techo \"fail\\n\";\r\n\t}\r\n\telse{\r\n\t\techo \"success\\n\";\r\n\t}\r\n\r\n\t$line1 = fgets($handle);\r\n\t$prevLineHour = -1;\r\n\t$prevLine = null;\r\n\t$days = 0;\r\n\t$line = null;\r\n\r\n\r\n\twhile(($line = fgets($handle)) != false ){\t\r\n\t\t\r\n\t\t//fix for blank lines in log\r\n\t\tif($line == \"\\n\"||$line == \"\\r\\n\"){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\r\n\t\t//fix - skip lines without timestamp\r\n\t\tif(is_numeric(substr($line,0,2)) == false){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\r\n\t\t$lineHour = intVal(substr($line,0,2));\t\t\r\n\t\t\r\n\t\tif($lineHour < $prevLineHour){\r\n\t\t\t//echo \"$lineHour\t$prevLineHour\t\\n\";\r\n\t\t\t$days++;\r\n\t\t}\r\n\t\t\r\n\t\t$prevLineHour = $lineHour;\r\n\t\t$prevLine = $line;\r\n\t}\r\n\r\n\t$line = $prevLine;\r\n\r\n\techo \"$line\\ndays:$days\\n\";\r\n\r\n\t$pos = strpos($line,\"\\t\");\r\n\t$atime = substr($line,0,$pos);\r\n\t$timeArray = explode(\":\",$atime);\r\n\r\n\t//$tStamp1 = strtotime(\"23.55.04.726\");\r\n\t\r\n\tdate_default_timezone_set('Europe/London');//needed for procedural\r\n\t\r\n\t$startDateTime = new DateTime();\r\n\t$startDateTime->setTimestamp($logTimestamp);\r\n\t$startDateTime->setTimezone(new DateTimeZone('Europe/London'));\r\n\t\r\n\t$endDateTime = new DateTime();\r\n\t$endDateTime->setTimestamp($logTimestamp);\r\n\t$endDateTime->setTimezone(new DateTimeZone('Europe/London'));\t\r\n\t$endDateTime->modify(\"today\");\r\n\t$endDateTime->add(new DateInterval('P'. $days . 'D' ));\r\n\t$endDateTime->setTime ( intval($timeArray[0]) , intval($timeArray[1]) ,intval($timeArray[2]), intval($timeArray[3])*1000 );\t\r\n\t//$endDateTime->setTimestamp(strtotime(\"$timeArray[0].$timeArray[1].$timeArray[2].$timeArray[3]\", $endDateTime->getTimestamp()));\r\n\t\r\n\techo $startDateTime->format(\"c\") . \" then \" . $endDateTime->format(\"c\") . \"\\n\";\r\n\t\r\n\t$interval = $startDateTime->diff($endDateTime);\r\n\t//echo $interval->format('%h hours %i mins %s seconds').\"\\n\";\r\n\t\r\n\t//find how much proportion off-peak\r\n\t$propOfPeak = ProportionOffPeak($startDateTime,$endDateTime);\r\n\techo \"$propOfPeak\\n\";\r\n\r\n\t//the duration in hours\r\n\t$duration = $endDateTime->getTimestamp() - $startDateTime->getTimestamp();\r\n\t//$duration = $duration /60 / 60;\r\n\t$kwhQty = $duration / SECONDS_FOR_1_KWH;\r\n\t$kwhQtyOffpeak = $propOfPeak * $kwhQty;\r\n\t$kwhQtyNormal = $kwhQty - $kwhQtyOffpeak;\r\n\t$priceOffPeak = $kwhQtyOffpeak * OFF_PEAK_RATE;\r\n\t$priceNormal = $kwhQtyNormal * NORMAL_RATE;\r\n\techo \"file:$file\";\r\n\techo \"\\nduration:$duration\\n--------------offpeak:$priceOffPeak\tnormal:$priceNormal \\n\";\r\n\r\n\t//close file resource handler\r\n\tfclose($handle);\r\n\r\n\t$alog = new ResultALog();\r\n\t$alog->start = $startDateTime;\r\n\t$alog->end = $endDateTime;\r\n\t$alog->propOffPeak = $propOfPeak;\r\n\t$alog->priceOffPeak = $priceOffPeak;\r\n\t$alog->PriceNormal = $priceNormal;\r\n\t$alog->logFName = $file;\t\r\n\t\t\r\n\t//return File Result\r\n\treturn $alog;\r\n}", "title": "" }, { "docid": "9e67f6b0ed41bf8b586f4878613c2c9d", "score": "0.53324926", "text": "public function fromLog( $categorisation = null ) {\n // $this->stopLog(); //lock\n $logList = array() ;\n\n if ( $categorisation === null )\n $categorisation = SCA_LOGGER_ALL ;\n\n $logList = $this->_getMsg(null, $this->logfile, $categorisation );\n\n // $this->startLog(); //unlock\n\n return $logList ;\n\n }", "title": "" }, { "docid": "9699be6e4540ec4eb2be22e3f961e69e", "score": "0.5322421", "text": "private function getLogLines($hp_source) {\n list($query_line_id, $query_timestamp) = $this->getLineIDOrTimestamp();\n $query = $this->makeQuery($query_line_id, $query_timestamp);\n\n $next_line_id = self::NOT_A_LINE_ID;\n $stream_to_lines_lists = array();\n $is_ascending = $this->prefs->get(BistroTaskLogPrefs::PREF_ASCENDING);\n\n // Use MultiCurl to fetch logs from all Bistro instances in parallel.\n $multi_curl_fetcher = new BistroMonitor2HTTPMultiCurlClient();\n foreach ($multi_curl_fetcher->getSuccessfulHostportResponses(\n $this->prefs, $this->getHostports($hp_source), json_encode($query))\n as $hp => $response_str) {\n\n list($response, $_is_complete) =\n parse_monitor2_response($query, $hp, $response_str);\n // Even if some streams had errors, there's a chance the others did not.\n foreach ($response as $stream => $subresponse) {\n if (!$subresponse) {\n continue; // In the absence of lines, Bistro returns {}\n }\n $stream_to_lines_lists[$stream][] = $subresponse['lines'];\n $cur_next_line_id = intval($subresponse['next_line_id']);\n // Pick the most restrictive next_line_id of all the Bistro hosts.\n if (\n // Bistro returns NOT_A_LINE_ID to mark \"no more lines\", so we\n // must not use it to restrict the \"next line ID\".\n ($cur_next_line_id !== self::NOT_A_LINE_ID) && (\n // Only matches initially, due to the previous test.\n ($next_line_id === self::NOT_A_LINE_ID) ||\n ($is_ascending && $next_line_id > $cur_next_line_id) ||\n (!$is_ascending && $next_line_id < $cur_next_line_id)\n )\n ) {\n $next_line_id = $cur_next_line_id;\n }\n }\n }\n\n // Filter out log lines that are beyond the most restrictive \"next line ID\"\n $out_lines = array();\n foreach ($stream_to_lines_lists as $stream => $lines_lists) {\n foreach ($lines_lists as $lines) {\n foreach ($lines as $line) {\n $line[4] = intval($line[4]);\n if (\n ($next_line_id === self::NOT_A_LINE_ID) ||\n ($line[4] === self::NOT_A_LINE_ID) ||\n ($is_ascending && $line[4] < $next_line_id) ||\n (!$is_ascending && $line[4] > $next_line_id)\n ) {\n array_unshift($line, $stream);\n $out_lines[] = $line;\n }\n }\n }\n }\n\n // Always display lines from oldest to newest\n return array(\n $query_line_id === null && $query_timestamp === null,\n $next_line_id,\n isort($out_lines, 5));\n }", "title": "" }, { "docid": "c4f3b4aac0afd1846132812778184ba4", "score": "0.528917", "text": "public function readFileintoArray($file)\n {\n if($this->isFileExists($file))\n {\n echo 'file path '.$file;\n if($this->isReadble($file))\n {\n $file_handle = file($file, FILE_USE_INCLUDE_PATH | FILE_SKIP_EMPTY_LINES);\n if (!$file_handle)\n {\n throw new GeneralException('Unable to read file into Array.'); \n }\n foreach ( $file_handle as $line ) \n echo $line . \"<br />\";\n }\n }\n }", "title": "" }, { "docid": "6273f5a6bee39da966ff15cbb50dddde", "score": "0.52582955", "text": "public function parse($fileName, $level = 'all')\n {\n\n\t\tApp::maxPowerCaptain();\n\n $this->setLevel($level);\n\n $logPath = Craft::$app->path->getLogPath();\n\n // @todo: move to settings\n // => $levelsToExclude = LogReader::$plugin->getSettings()->levelsToExclude;\n $excludeLevels = ['profile end', 'profile begin', 'trace'];\n\n // $lines = [];\n $output = [];\n\n // matches the parts of a typical log line\n // eg: 2021-02-01 11:24:59 [-][-][-][info][modules\\winorgdonationformmodule\\WinorgDonationFormModule::init] Winorg Donation Form module loaded\n // [date][time][level][context][description]\n\t\t$pattern = '/^(\\d{4}(?:-\\d{2}){2}) ((?:\\d{2}:){2}\\d{2}) (?:(?:\\[[^\\]]+\\]){3})\\[([^\\]]+)\\]\\[([^\\]]+)\\] (.+)/i';\n\n\t\tif (@file_exists($logPath)) {\n\t\t $logFile = $logPath . '/' . $fileName;\n\n\t\t\tif (@file_exists($logFile)) {\n\n\t\t\t\t$fh = fopen($logFile,'r') or error_log(\"Can't open file\");\n\n $i = 1;\n\n while (! feof($fh)) {\n // read each line and trim off leading/trailing whitespace\n if ($s = trim(fgets($fh,16384))) {\n // match the line to the pattern\n if (preg_match($pattern,$s,$matches)) {\n\n // put each part of the match in an appropriately-named variable\n list($whole_match,$date,$time,$level,$context,$description) = $matches;\n\n // drop string of 'whole_match' and only keep the parts\n // array_shift($matches);\n // var_dump($this->logFileLevel); die();\n\n // exclude some levels\n if(in_array($level, $excludeLevels)) {\n continue;\n }\n\n // filter by level\n if($this->logFileLevel !== 'all') {\n if($level === $this->logFileLevel) {\n $output[] = [\n 'date' => $date,\n 'time' => $time,\n 'level' => $level,\n // 'context' => $context,\n 'description' => $description,\n ];\n }\n } else {\n $output[] = [\n 'date' => $date,\n 'time' => $time,\n 'level' => $level,\n // 'context' => $context,\n 'description' => $description,\n ];\n }\n\n // LogReader::$plugin->getLogContent()->setAttributes($output);\n } else {\n // complain if the line didn't match the pattern\n error_log(\"Can't parse line $i: $s\");\n }\n }\n $i++;\n }\n\n fclose($fh) or die($php_errormsg);\n\t\t\t}\n }\n // var_dump($lines);die();\n\n // reverse to get latest at top\n $output = array_reverse($output);\n\n return $output;\n\t}", "title": "" }, { "docid": "8f39efeab6f4ab7d0926e6fb4f82dc1b", "score": "0.5253747", "text": "function getLogs() {\n\n\t\t$fs = new FileSystem();\n\t\t$log_files = $fs->files(LOG_FILE_PATH);\n\n// \t\t$query = new Query();\n// \t\t$sql = \"SELECT tags.id as id, tags.context as context, tags.value as value, count(taggings.id) as tag_count FROM \".UT_TAG.\" as tags LEFT JOIN \".UT_TAGGINGS.\" as taggings ON tags.id = taggings.tag_id GROUP BY tags.id ORDER BY tags.context, tags.value\";\n// //\t\tprint $sql;\n// \t\tif($query->sql($sql)) {\n//\n// \t\t\treturn $query->results();\n// \t\t}\n\n\t\treturn $log_files;\n\t}", "title": "" }, { "docid": "ddf8434ae2fe814c2b9e0872f969a56f", "score": "0.5237351", "text": "protected function readLinesFromEnd($lines, $page = 1)\n {\n $lineLimit = app(LogViewer::class)->config('max_line_length');\n\n $file = $this->handle();\n $arr = [];\n $i = 0;\n try {\n $start = max($this->linesCount() - $page * $lines, 0);\n $file->seek($start);\n while ($i < $lines) {\n $line = $file->fgets();\n $arr[] = !is_null($lineLimit) ? mb_substr($line, 0, $lineLimit) : $line;\n $i++;\n }\n } catch (RuntimeException $e) {\n // File is empty or it cannot be read.\n }\n\n return $arr;\n }", "title": "" }, { "docid": "25bcfc7abec39f6a652cd23898064cfe", "score": "0.5231249", "text": "function parseLogLine($str){\n preg_match_all($this->re_raw_line, $str, $mt);\n $rez = array();\n foreach($mt[1] as $k=>$id) {\n $rez[$id] = $mt[2][$k];\n }\n return $rez;\n }", "title": "" }, { "docid": "3f73ed1e87de222b61a4aa0a8b1598aa", "score": "0.5220987", "text": "private function parse($file)\n {\n $xml = simplexml_load_file($file);\n\n // halt if loading produces an error\n if (!$xml) {\n return false;\n }\n\n // Initial logs array\n $logs = array();\n foreach ($xml->xpath('/logs/item') as $logObj) {\n $log = $logObj->children();\n $logId = (int) $log->log_id;\n\n $logs[$logId] = [\n 'user_id' => (int) $log->user_id,\n 'object_id' => (int) $log->object_id,\n 'object_type' => (string) $log->object_type,\n 'activity' => (string) $log->activity,\n 'activity_date' => (string) $log->activity_date,\n ];\n }\n\n return $logs;\n }", "title": "" }, { "docid": "33abce64f1598af3cf5d44263b3cf6dc", "score": "0.51827496", "text": "public static function openFile()\n\t\t{\n\t\t\tif (isset(self::$logFile)) {\n\t\t\t\tself::$file = new SplFileObject(self::$logFile, 'w');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "acecff625b49730e0f74ecf1b1b49c9a", "score": "0.5182338", "text": "protected function indexFile() {\n $this->csv = [];\n fseek($this->fp, $this->options['fileDataStartPos']);\n for ($pos = $this->options['fileDataStartPos']; $buf = fgets($this->fp); $pos += strlen($buf)) {\n $this->csv[] = $pos;\n }\n }", "title": "" }, { "docid": "106d901f6821f10f250289ae7edd4b5f", "score": "0.51491165", "text": "public static function get_logs($lines = null) {\n\n\t\tif (!file_exists(self::LOG_FILE)) {\n\t\t\treturn __('The log file is empty', 'wc_colissimo');\n\t\t}\n\n\t\tif (null == $lines) {\n\t\t\t$lines = self::LOG_LINES_NB;\n\t\t}\n\n\t\t$f = fopen(self::LOG_FILE, 'rb');\n\t\tfseek($f, -1, SEEK_END);\n\t\tif (fread($f, 1) != PHP_EOL) {\n\t\t\t$lines--;\n\t\t}\n\n\t\t$logFile = '';\n\t\twhile (ftell($f) > 0 && $lines >= 0) {\n\t\t\t// Figure out how far back we should jump\n\t\t\t$seek = min(ftell($f), 4096);\n\t\t\tfseek($f, -$seek, SEEK_CUR);\n\n\t\t\t// Get the line\n\t\t\t$logFile = ($chunk = fread($f, $seek)) . $logFile;\n\t\t\tfseek($f, -mb_strlen($chunk, '8bit'), SEEK_CUR);\n\n\t\t\t// Move to previous line\n\t\t\t$lines -= substr_count($chunk, PHP_EOL);\n\t\t}\n\n\t\tfclose($f);\n\n\t\treturn trim(implode('<br><br>', array_reverse(explode(\"\\r\\n<log>\", $logFile))));\n\t}", "title": "" }, { "docid": "2e76e5fa4286689033d01d6c8dbd9272", "score": "0.514613", "text": "function view(){\n\t$viewRawLog = fopen($GLOBALS['logfile'], \"r\");\n\t#echo fread($viewRawLog, filesize($GLOBALS['logfile']));\n\n\tif($viewRawLog){\n\t\twhile (($buffer = fgets($viewRawLog)) !== false){\n\t\t\techo \"<br>\" . $buffer ;\n\t\t}\n\t\tif (!feof($viewRawLog)){\n\t\t\techo \"Error: unexpected end of file\\n\";\n\t\t}\n\t\tfclose($viewRawLog);\n\t}\n}", "title": "" }, { "docid": "8ea4cb4f726f5ffd530621be7e140f3b", "score": "0.5128302", "text": "public static function getLogFrom(array $log): array\n\t{\n\t\treturn [\n\t\t\t'<pre class=\"debug\" style=\"font-family: monospace; white-space: pre-wrap;\">',\n\t\t\timplode(PHP_EOL, $log),\n\t\t\t'</pre>',\n\t\t];\n\t}", "title": "" }, { "docid": "2d1ebb047b99e27478f561152ce48cea", "score": "0.5093468", "text": "public function load_cache( )\n {\n if( !file_exists($this->log_cache_filename() ) )\n return array();\n\n $content = file_get_contents( $this->log_cache_filename() );\n \n if( $content === false )\n return array();\n\n $data =unserialize($content); \n \n if( $data === false )\n return array();\n\n return $data;\n }", "title": "" }, { "docid": "0245b7e4be4e315fe843e348309f606b", "score": "0.5079411", "text": "function parse_tracklog($file)\r\n{\r\n // fail gracefully if file is not read\r\n if(!$track = file_get_contents($file))\r\n {\r\n print \"Unable to read tracklog [$file].\";\r\n return false;\r\n }\r\n\r\n // explode by newline and remove header lines\r\n $lines = array_slice(explode(\"\\n\",trim($track)),9);\r\n\r\n // determine number of entries\r\n $count = count($lines);\r\n\r\n // initialize array to save track data\r\n $data = array();\r\n\r\n // loop over track data\r\n for($i=0;$i<$count;$i++)\r\n {\r\n // get data for current line\r\n $coord = explode(\"\\t\",$lines[$i]);\r\n\r\n // skip lines that don't have the right amount of columns\r\n if(count($coord) != 10) continue;\r\n\r\n // store converted lat/lng (could also get altitude, speed etc)\r\n $row = array\r\n (\r\n \"lat\" => convert_coord(substr($coord[1],0,10)),\r\n \"lng\" => convert_coord(substr($coord[1],11))\r\n );\r\n\r\n // append parsed row to data array\r\n $data[] = $row;\r\n }\r\n\r\n // return the array of points\r\n return $data;\r\n}", "title": "" }, { "docid": "387cc3dd2217f45da201ffa1a98191da", "score": "0.506578", "text": "public function getLocalResourceFileContentAsArray(): array\n {\n return array_filter(\n array_map('trim', explode(\"\\n\", $this->getLocalResourceFileContent()))\n );\n }", "title": "" }, { "docid": "ca65df5d23b0f7ce2153cb5e757bbed2", "score": "0.506274", "text": "public function read_file_by_line($filename){\n $hasil = [];\n\n $handle = @fopen(\"assets/doc/$filename.txt\", \"r\");\n if ($handle) {\n while (($buffer = fgets($handle, 4096)) !== false) {\n $hasil[] = preg_replace( \"/\\r|\\n/\", \"\", $buffer);\n }\n if (!feof($handle)) {\n echo \"Error: unexpected fgets() fail\\n\";\n }\n fclose($handle);\n }\n\n return $hasil;\n }", "title": "" }, { "docid": "cf5c97988ff11b4e06a22e57a70fef35", "score": "0.5056389", "text": "protected function readLines()\n {\n $autodetect = ini_get('auto_detect_line_endings');\n ini_set('auto_detect_line_endings', '1');\n $lines = file($this->filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n ini_set('auto_detect_line_endings', $autodetect);\n\n $this->lines = $lines;\n\n return $this;\n }", "title": "" }, { "docid": "9284ddc6667dbb0b7e030965f9d87794", "score": "0.5048611", "text": "function logparse($logloc = null, $start = 0){\r\n\t//$start--;//subtract one since this is 0 indexed //disregard that\r\n\t//using ?: only works in php 5.3+ \r\n\t$logloc = $logloc ?: LOGLOC; //use $logloc = $logloc ? $logloc : LOGLOC on lower versions\r\n\t$file = file($logloc);\r\n\t$i = 0;\r\n\tforeach($file as $f){\r\n\t\tif($i >= $start){\r\n\t\t\t$ofile[] = explode(\" \", $f);\r\n\t\t}\r\n\t\t$i++;\r\n\t\t/*\r\n\t\t$ofile[0] = date\r\n\t\t$ofile[1] = time\r\n\t\t$ofile[2] = hostname\r\n\t\t$ofile[3] = glinkd-id\r\n\t\t$ofile[4] = chat (the word chat)\r\n\t\t$ofile[5] = : (yes a colon)\r\n\t\t$ofile[6] = Chat type\r\n\t\t$ofile[7] = src=id\r\n\t\t$ofile[8] = chl=id OR (if whisper) dst=\r\n\t\t$ofile[9] = msg=\r\n\t\t*/\r\n\t}\r\n\t$i = 0;\r\n\tforeach($ofile as $o){\r\n\t//clean up the array a bit\r\n\t\t$out[] = array('date' => $o[0].\" \".$o[1],\r\n\t\t\t\t\t\t'type' => str_replace(\":\", \"\", $o[6]),\r\n\t\t\t\t\t\t'uid' => substr($o[7], 4),\r\n\t\t\t\t\t\t'chldst' => substr($o[8], 4),\r\n\t\t\t\t\t\t'msg' => base64_encode(iconv(\"UCS-2LE\", \"UTF-8\", base64_decode(substr($o[9], 4)))));\r\n\t\t//delete array entry after it moves it into the cleaned up array\r\n\t\t//it does seem to save a small amount of memory but hey... it something\r\n\t\tunset($ofile[$i]);\r\n\t}\r\n\treturn array('filelen' => count($file), 'data' => $out);\r\n}", "title": "" }, { "docid": "364dc865c46fe084d7dd93ed931fa6e3", "score": "0.5034021", "text": "function feedToArr($fileName, $feedStart)\r\n{\r\n if(!filter_var($fileName, FILTER_VALIDATE_URL)) $fileName = FEED_PATH.$fileName; // appending file path if not a url\r\n try\r\n {\r\n $file = fopen($fileName, 'r');\r\n $cc = 1;\r\n $result = [];\r\n while (($line = fgetcsv($file, 1000000, \";\", '\"')) !== FALSE) {\r\n //$line is an array of the csv elements\r\n if($cc > 1 && $cc >= $feedStart)$result[] = $line;\r\n $cc++;\r\n }\r\n fclose($file);\r\n }\r\n catch(Exception $e)\r\n {\r\n die(\"Invalid File\");\r\n }\r\n return $result;\r\n}", "title": "" }, { "docid": "49bfd4f17d6f8ea0afdaf5d740607fce", "score": "0.5031259", "text": "private function getStorageLogs($max=24)\n\t{\n\t\t$file = \"\";\n\t\t$log = array();\n\t\t// Search for lines starting with [Y-m-d H:i:s]\n\t\t$pattern = \"/\\[\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}.*/\";\n\t\t// Include the below levels in output\n\t\t$log_levels=array(\n\t\t\t'emergency' =>\t'EMERGENCY',\n\t\t\t'alert' =>\t\t'ALERT',\n\t\t\t'critical' =>\t'CRITICAL',\n\t\t\t'error' =>\t\t'ERROR',\n\t\t\t'warning' =>\t'WARNING'\n\t\t\t//'notice' =>\t'NOTICE',\n\t\t\t//'info' =>\t\t'INFO',\n\t\t\t//'debug' =>\t'DEBUG'\n\t\t);\n\t\t// path to webserver logfile for current day\n\t\t$log_file = app_path().'/storage/logs/log-'.php_sapi_name().'-'.date('Y-m-d').'.txt';\n\t\tif ( file_exists($log_file))\n\t\t{\n\t\t\t// get logfile\n\t\t\t$file = \\File::get($log_file);\n\t\t\t// scan logfile using $pattern and store lines in $headings\n\t\t\tpreg_match_all($pattern, $file, $headings);\n\t\t\t// create array containing all logile entries, split using $pattern\n\t\t\t$log_data = preg_split($pattern, $file);\n\t\t\t// delete first array element, if empty\n\t\t\tif (empty($log_data[0]))\n\t\t\t{\n\t\t\t\tunset($log_data[0]);\n\t\t\t}\n\t\t\t// loop through all found lines\n\t\t\tforeach ($headings as $h)\n\t\t\t{\n\t\t\t\tfor ($i=0; $i < count($h); $i++)\n\t\t\t\t{\n\t\t\t\t\t// Compare all found lines to specified log levels and store in $log array, containing error level, error description and stack trace, if match\n\t\t\t\t\tforeach ($log_levels as $ll)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (strpos(strtolower($h[$i]), strtolower('log.' . $ll)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$log[$i+1] = array('level' => $ll, 'header' => $h[$i], 'stack' => $log_data[$i+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}\n\t\t// Cleanup\n\t\tunset($headings);\n\t\tunset($log_data);\n\t\t// Sort from old to new and restrict to 24 entries\n\t\t$log = array_slice(array_reverse($log), 0, $max);\n\t\t// Return log entries\n\t\treturn $log;\n\t}", "title": "" }, { "docid": "d8698efda190976e2ad5c45166139337", "score": "0.50250024", "text": "public function getLines(array $lines = array(), $updateLineSep = true){\n\t\t$this->checkLoad();\n\t\tif (!$this->lineContent) $this->explodeLines($updateLineSep);\n\n\t\tif(!empty($lines)) return call_user_func_array('array_slice', array_merge(array( 0 => $this->lineContent), $lines) );\n\t\telse return $this->lineContent;\n\t}", "title": "" }, { "docid": "0d90ab80923c90f96ffe814335959480", "score": "0.5001488", "text": "public function getLogs();", "title": "" }, { "docid": "0d90ab80923c90f96ffe814335959480", "score": "0.5001488", "text": "public function getLogs();", "title": "" }, { "docid": "2e382a512eadcbfc0401a0bd31539c6f", "score": "0.499493", "text": "public function parse_entries($lines)\n {\n $entries = [];\n $entry_id = 0;\n\n foreach ($lines as $index => $line) {\n // removes ADA-like comments\n list($line) = explode('--', $line);\n\n if (! $line = trim($line)) {\n // ignores empty lines\n continue;\n }\n\n $this->line_number = $index + 1;\n $entry_id++;\n\n $entries[] = $this->parse_entry($line, $entry_id);\n }\n\n return $entries;\n }", "title": "" }, { "docid": "275c4989d3e3cee6f6fff62c00d68349", "score": "0.4993877", "text": "function openFile($filename){\n\t$readsize=4096;\n \n\t//open file and aquire shared lock\n\t$fv=fopen($filename, 'r');\n\tflock($fv, LOCK_SH);\n \n\t//initialize vars and get array of file\n\t$temp=array();\n\t$counter=0;\n\twhile ($line=fgets($fv, $readsize)) {\n $temp[$counter] = $line;\n $counter=$counter+1;\n\t}\n \n\t//relinquish lock and close file\n\tflock($fv, LOCK_UN);\n\tfclose($fv);\n \n\t//return our array\n\treturn $temp;\n}", "title": "" }, { "docid": "f3884f029ff1f2c5c4c512dc6013fa2e", "score": "0.4990594", "text": "public function getLines($key){\n $lines = [];\n foreach($this->doc_lines as $line){\n if(strpos($line, $key) === 0){\n $lines[] = $line;\n }\n }\n return $lines;\n }", "title": "" }, { "docid": "1f0feb19c2899fcee8646f135bbd5e29", "score": "0.49867588", "text": "public function bulkWrite(array $logLines): void;", "title": "" }, { "docid": "1fd82fe8bd21a3fbeb2c2e88b3d1dd82", "score": "0.4984033", "text": "public function getLog() : array\n {\n return $this->log;\n }", "title": "" }, { "docid": "0b8dc348b543f5ff0bad8d3adfa11571", "score": "0.49428016", "text": "public function loadFile($file='')\n {\n $lines = array();\n if ( !($lines = file($file)) ) {\n $fh = fopen($file,\"r\");\n do {\n $temp = trim(fgets($fh)); // read line to line\n // Delete UTF-8 Character BOM from line text\n if (substr($temp,0,3) == pack(\"CCC\",0xef,0xbb,0xbf)) $line = substr($temp,3); \n else $line = $temp;\n\n $lines[] = $line;\n } while (!feof($fh)); \n fclose($fh); \n }\n return $lines;\n }", "title": "" }, { "docid": "6db9b6af9844e5854a0b08d0f9f1d34e", "score": "0.4937868", "text": "public function getAuditLogEntries(): array\n {\n return $this->audit_log_entries;\n }", "title": "" }, { "docid": "8383e248b62a6462d142797930bc753f", "score": "0.4934653", "text": "function file_lines(FileStreamInterface $instance)\n\t{\n\t\treturn $instance->fileLines();\n\t}", "title": "" }, { "docid": "8c8bba3c7c349ee71cb896faaa2f568f", "score": "0.4909362", "text": "public function getStorageLogs()\n {\n\n //Default log location (single file)\n $path = storage_path() . '/logs/laravel.log';\n\n //Rotating logs (Laravel 4.0)\n if (!file_exists($path)) {\n $path = app_path() . '/storage/logs/log-' . php_sapi_name() . '-' . date('Y-m-d') . '.txt';\n }\n\n $logs = array();\n if (file_exists($path)) {\n foreach ($this->tailFile($path, $this->lines) as $log) {\n $data = $this->parseLine($log);\n if ($data) {\n $context = $data['context'];\n $log = '['.$data['date']->format('Y-m-d H:i:s').'] '. $data['logger'].\".\".$data['level'].\": \" . $data['message'] . (!empty($context) ? ' '.print_r($context, true) : '');\n $this->addMessage($log, $data['level']);\n }\n }\n }\n\n }", "title": "" }, { "docid": "66c084268a3d755c865c69325b54e291", "score": "0.4899168", "text": "public function getLogData($name, $path)\n {\n if (is_file($path.$name)) {\n $content = FileSystem::getContent($path.$name);\n\n $lines = explode($this->lineSperator, $content);\n\n $data = array();\n\n foreach ($lines as $line) {\n if (preg_match($this->dateFormat, $line, $matches)) {\n $date = (substr($line, 0, strlen($matches[0])));\n $date = str_replace(array('[', ']'), '', $date);\n\n $str = trim(substr($line, strlen($matches[0])), ']');\n $str = str_replace($this->typePrefix.'.', '', $str);\n\n if (preg_match('/(\\w)+:/', $str, $m)) {\n $str = substr($str, strlen($m[0])+2);\n $type = substr($m[0], 0, -1);\n }\n\n $data[] = array('time' => $date, 'message' => $str, 'type' => $type);\n }\n }\n\n return $data;\n }\n\n return false;\n }", "title": "" }, { "docid": "43965ae9e74dca57d7b7f1de8ab8a5d9", "score": "0.48985466", "text": "private function lopen() {\n\t\t// in case of Windows set default log file\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n\t\t\t$log_file_default = 'c:/php/logfile.txt';\n\t\t}\n\t\t// set default log file for Linux and other systems\n\t\telse {\n\t\t\t$log_file_default = '/tmp/logfile.txt';\n\t\t}\n\t\t// define log file from lfile method or use previously set default\n\t\t$lfile = $this->log_file ? $this->log_file : $log_file_default;\n\t\t// open log file for writing only and place file pointer at the end of the file\n\t\t// (if the file does not exist, try to create it)\n\t\t$this->fp = fopen($lfile, 'a') or exit(\"Can't open $lfile!\");\n\t}", "title": "" }, { "docid": "4bad2c46bf0b7ad8bc4f10f33a0768a4", "score": "0.48967907", "text": "function file_get_content_array($file) {\n return @file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);\n}", "title": "" }, { "docid": "f8783c8b821248d050624eff8dbbe32f", "score": "0.48928237", "text": "public function readAllWithoutDuplicatedLines(){\t\t\r\n\t\t$content = $this->readAllAsArray();\r\n\t\t$result = array();\r\n\t\tforeach ($content as $key => $line) {\r\n\t\t\tif(!in_array($line, $result)){\r\n\t\t\t\t$result[] = $line;\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn $result;\t\t\t\r\n\t}", "title": "" }, { "docid": "07fc3bee41cfedc7f5adcfd2f0d47b90", "score": "0.4891491", "text": "public function __construct($file) {\n if($this->valid_file($file)) {\n // Open and process CSV file\n $file = fopen($file['uploadedfile']['tmp_name'], 'r');\n while (($line = fgetcsv($file)) !== FALSE) {\n // $line is an array of the CSV elements\n $lines[] = $line;\n }\n fclose($file);\n return $lines;\n }\n }", "title": "" }, { "docid": "82a0a8189ba27ef9c876a3be6bfe5a92", "score": "0.48903105", "text": "public function get_log() {\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Server must be in directory before log entries can be listed');\n\t\t$stmt = $this->database->prepare(\"\n\t\t\tSELECT *\n\t\t\tFROM server_event\n\t\t\tWHERE server_id = ?\n\t\t\tORDER BY id DESC\n\t\t\");\n\t\t$stmt->bind_param('d', $this->id);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\t$log = array();\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t$log[] = new ServerEvent($row['id'], $row);\n\t\t}\n\t\t$stmt->close();\n\t\treturn $log;\n\t}", "title": "" }, { "docid": "e514dc290d34682fc9cc36313e8e3ce0", "score": "0.4873374", "text": "public function readHistory($invtnum, $date) {\n\t\t$result = array();\n\t\t$filename = Util::getDataDir($invtnum).\"/csv/\" . $date . \".csv\";\n\t\t$lines = $this->readCsvData($filename);\n\t\tforeach ($lines as $line) {\n\t\t\t$result[] = $this->parseCsvToLive($line);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "fa0f62b08720ff5b7e115ed36631740a", "score": "0.48529723", "text": "public static function log(\\CArray $a): \\CArray\n {\n return parent::log($a);\n }", "title": "" }, { "docid": "59b273d981530ab86685bfa517f7f447", "score": "0.48481488", "text": "protected function _getCompressedLogEntries($file, $timeStart, $timeEnd, $term) {\n\t\t$handle = gzopen($file, \"r\");\n\t\tif ($handle === false) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$entries = array();\n\t\twhile (!gzeof($handle)) {\n\t\t\t$line = gzgets($handle, 4096);\n\t\t\tif ($line === false) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$result = $this->_getEntry($line, $timeStart, $timeEnd, $term);\n\t\t\tif (is_array($result)) {\n\t\t\t\t$entries[] = $result;\n\t\t\t}\n\t\t}\n\t\tgzclose($handle);\n\t\t\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "8a7801ed587c51f2c4ff9502519c3461", "score": "0.48478416", "text": "public function getAllLog($username, $foodData) {\n // first read the whole of the log\n $arrExsitingLog = $this->getLog($username);\n\n $arrLogs = array();\n $dao = new DAO();\n\n // find the key i.e. the date on which the log is to be changed\n if ( !is_null($arrExsitingLog) ) {\n foreach ($arrExsitingLog as $arrLog) {\n $log = new Log();\n $log->setDate($arrLog['date']);\n\n $arrConsumptioObj = $dao->getComsumption($arrLog['consumption'], $foodData);\n\n $log->setConsumption($arrConsumptioObj);\n $arrLogs[] = $log;\n }\n }\n return $arrLogs;\n }", "title": "" }, { "docid": "40e2d2a861a77e8198835dbe0aeb69f7", "score": "0.48477215", "text": "public function getAnalyzableLines();", "title": "" }, { "docid": "e54928da8c4b88d6e4840416c3fdc0dc", "score": "0.4844706", "text": "function getContentsArray() {\n\t\t$fileContentsArray = file($this->filename);\n\t\treturn $fileContentsArray;\n\t}", "title": "" }, { "docid": "8995105ac766e515088f3cee8aedea07", "score": "0.48350257", "text": "private function lopen() {\n // in case of Windows set default log file\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n $log_file_default = 'c:/php/logfile.txt';\n }\n // set default log file for Linux and other systems\n else {\n $log_file_default = '/tmp/logfile.txt';\n }\n // define log file from lfile method or use previously set default\n $lfile = $this->log_file ? $this->log_file : $log_file_default;\n // open log file for writing only and place file pointer at the end of the file\n // (if the file does not exist, try to create it)\n $this->fp = fopen($lfile, 'a') or exit(\"Can't open $lfile!\");\n }", "title": "" }, { "docid": "8995105ac766e515088f3cee8aedea07", "score": "0.48350257", "text": "private function lopen() {\n // in case of Windows set default log file\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {\n $log_file_default = 'c:/php/logfile.txt';\n }\n // set default log file for Linux and other systems\n else {\n $log_file_default = '/tmp/logfile.txt';\n }\n // define log file from lfile method or use previously set default\n $lfile = $this->log_file ? $this->log_file : $log_file_default;\n // open log file for writing only and place file pointer at the end of the file\n // (if the file does not exist, try to create it)\n $this->fp = fopen($lfile, 'a') or exit(\"Can't open $lfile!\");\n }", "title": "" }, { "docid": "ecefa2e78bdfdfab34a70976febc3846", "score": "0.48344058", "text": "public function getLinesNewerThan(DateTime $newer_than)\n {\n if (!$this->fileNewerThan($newer_than)) {\n return [];\n }\n\n $results = [];\n\n foreach (file($this->filename) as $line_str) {\n $line_obj = $this->parser->stringToMailLogLine($line_str);\n if (!$line_obj) {\n // The line is not relevant, continue\n continue;\n }\n\n if ($line_obj->loggedAt() <= $newer_than) {\n // the line is outdated, continue\n continue;\n }\n\n $results[] = $line_obj;\n }\n\n return $results;\n }", "title": "" }, { "docid": "b055f94d5c52f9ab9b440f73a058f962", "score": "0.4834319", "text": "public function getLogEntries()\n\t{\n\t\t$collection = new Varien_Data_Collection();\n\t\t\n\t\tforeach ($this->getIds() as $_id) {\n\t\t\ttry {\n\t\t\t\t$model = Mage::getModel('logging/log')->load($_id);\n\t\t\t\t$collection->addItem($model);\n\t\t\t\t\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->_getSession()->addError(Mage::helper('logging')->__('Could not load log entry with id %s', $_id));\n\t\t\t}\n\t\t}\n\t\treturn $collection;\t\t\n\t}", "title": "" }, { "docid": "ff0f91bc897cf3df0a81f9854a40c31c", "score": "0.4817641", "text": "function get_line_context($entry) {\n if (!isset($entry['file'])) return array();\n if (file_exists($entry['file'])) {\n $file = explode(\"\\n\",file_get_contents($entry['file']));\n }else{\n $file = array();\n }\n $context = array();\n $start = max(1, $entry['line']-2);\n\n // Correct the keys of the file\n array_unshift($file, '');\n\n // Return an array of the lines, with keys preserved\n return array_slice($file, $start, 5, True);\n }", "title": "" }, { "docid": "09cd9152f8ab661e7a55a52762cd62bc", "score": "0.47995952", "text": "public function getLogContents($allowTruncate = true)\n {\n $path = $this->getLogPath();\n $content = '';\n\n if (file_exists($path)) {\n if ($allowTruncate && $this->isLogTooLarge()) {\n $content = $this->_tail($path, self::TAIL_SIZE);\n } else {\n $content = file_get_contents($path);\n }\n }\n\n return $content;\n }", "title": "" }, { "docid": "40941c384a0f137d31307767778a80dc", "score": "0.4790985", "text": "function getContentAsArray()\n {\n $data = array();\n $nb = count($this->header);\n while (($line = $this->readLine()) !== false) {\n $dl = array();\n for ($i = 0; $i < $nb; $i ++) {\n $dl[$this->header[$i]] = $line[$i];\n }\n $data[] = $dl;\n }\n return $data;\n }", "title": "" }, { "docid": "1870569779044fc8de651d464ae06b00", "score": "0.47890183", "text": "function readRows(string $filename): array\n{\n return file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n}", "title": "" }, { "docid": "72bc03491d86d61cc9b10f417f4feab1", "score": "0.47814977", "text": "function log_line($message, $lines = null, $write = false, $echo = true, $max_entries = 5000, $filename = CEDB_PATH . 'Logs/Script.log')\n{\n\tif(isset($_SERVER['REMOTE_ADDR']))\t$lb = \"<br>\";\n\telse $lb = \"\\n\";\n\n\tif(!$lines) $lines = file($filename);\n\t$lines[] = \"[\" . date('d-M-Y H:i:s', time()) . \"] \" . $message . \"\\r\\n\";\n\n\tif($echo) echo $message . $lb;\n\tif($write)\n\t{\n\t\t$handle = fopen($filename, \"w+\");\n\t\tif(count($lines) >= $max_entries) $lines = array_slice($lines, count($lines) - $max_entries + 2);\n\t\t$contents = implode($lines);\n\t\tfwrite($handle, $contents);\n\t\tfclose($handle);\n\t}\n\treturn $lines;\n}", "title": "" }, { "docid": "833b46f259fde4339b526a33a3ab37ab", "score": "0.47781655", "text": "function get_file_lines($f, $n, $s=0)\n\t{\n\t\t$fh\t= fopen($f, 'r');\n\t\tfor($i=$s; $i<$n; $i++) {\n\t\t\t$file[$i]\t= fgets($fh);\n\t\t}\n\t\tfclose($fh);\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "575ec0bdc814cbee6d9f5cbb6e14d1e3", "score": "0.4777285", "text": "function getContentAsArray()\n {\n $data = array();\n $nb = count($this->header);\n while (($line = $this->readLine()) !== false) {\n $dl = array();\n for ($i = 0; $i < $nb; $i++) {\n $dl[$this->header[$i]] = $line[$i];\n }\n $data[] = $dl;\n }\n return $data;\n }", "title": "" }, { "docid": "6b8d1e4b6c6239a7efb27ec269998c2d", "score": "0.4769934", "text": "function readFileLines($filename, $absolute = false)\n {\n $lines = false;\n if ($data = FileUtil::readFile($filename, $absolute)) {\n $lines = explode(\"\\n\", $data);\n }\n return $lines;\n }", "title": "" }, { "docid": "81316e1fc0f2a872928af6663d6f5b7f", "score": "0.47597635", "text": "function get_log($logId)\n {\n return $this->db->get_where('log',array('logId'=>$logId))->row_array();\n }", "title": "" }, { "docid": "4815d5cffb1eff62200ce935715f459c", "score": "0.47541937", "text": "public function getLogs(): array\n {\n return $this->logs;\n }", "title": "" }, { "docid": "870c46d1e4acc07c525ad83eb1a77dbe", "score": "0.47525695", "text": "public function getLogs($fiId){\n\t\t\n\t\tTry{\n\t\t\t$result = array();\n\t\t\t$select = \"SELECT id, line, fi_id \" .\n\t\t\t\t \" FROM resultimport\" .\n\t\t\t\t \" WHERE us_id=\" . $fiId;\n\t\t\t$this->connection->query($select);\n\t\t\t\n\t\t\t//check sql \n\t\t $this->connection->checkSQL();\n\t\t \t$i=0;\n\t\t\twhile($result = $this->connection->fetchNextObject()){\n\t\t\t\t\n\t\t\t\t$result[$i]['id'] = $result->id;\n\t\t\t\t$result[$i]['line'] = $result->line;\n\t\t\t\t$result[$i]['fi_id']= $result->fi_id;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}catch (Exception $e) {\n\t\t $this->log->setWarning($e->getMessage());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "aa8e9b5d501d30a1ed1139355bda03ed", "score": "0.47500485", "text": "function get_csv_array()\n{\n$row = 0;\nif (($handle = fopen($this->file_path, \"r\")) !== FALSE)\n{\nwhile (($data = fgetcsv($handle, 1000, \"\\t\")) !== FALSE)\n{\n$final_array[$row] = $data;\n$row++;\n}\nfclose($handle);\n}\nreturn $final_array;\n}", "title": "" }, { "docid": "8fac579218b88d4342050aca3f47fe96", "score": "0.47499537", "text": "public function setLog($logRequest )\n\t{\n\t\t$arrayResponse = array();\n\t\ttry {\n\t\t\tforeach($logRequest as $item)\n\t\t\t{\n\t\t\t\t$model = new Log();\n\t\t\t\t$model->description = $item->description;\n\t\t\t\t$model->username = $item->username;\n\t\t\t\t$model->log_date = $item->log_date;\n\t\t\t\t$model->Id_log_type = $item->Id_log_type;\n\t\t\t\t$model->Id_customer = $item->Id_customer;\n\t\t\t\t$model->Id_log_customer = $item->Id_log_customer;\n\t\t\t\tif($model->save())\n\t\t\t\t{\n\t\t\t\t\t$logResponse = new LogResponse();\n\t\t\t\t\t$logResponse->Id_log_customer = $item->Id_log_customer;\n\t\t\t\t\t$arrayResponse[]=$logResponse;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t}\n\t\treturn $arrayResponse;\n\t}", "title": "" }, { "docid": "8466de4cb454e8076f56b1ccc1049b42", "score": "0.47457892", "text": "private function logOpen() {\r\n $today = date('Ymd'); // Fecha Actual\r\n // Abro el archivo, si no existe, entonces lo agrega.\r\n $fullFileName = $this->lPath . $today . '_' . $this->lName . '.' . $this->lExtension;\r\n $this->handle = fopen($fullFileName, 'a') or exit(\"No es posible abrir el archivo de log: \" . $fullFileName);\r\n }", "title": "" }, { "docid": "323453c07727ebc927541346ef4084ef", "score": "0.4745781", "text": "private function _lines2array($lines) {\n\t\t\n\t\t// Output array\n\t\t$a = array();\n\t\t\n\t\t// Line count\n\t\t$c = count($lines);\n\t\t\n\t\t// Current line\n\t\t$l = 0;\n\t\t\n\t\t$i = -1;\n\t\t\n\t\t// Line walker\n\t\tfor ($l; $l < $c; $l++) {\n\t\t\t\n\t\t\t// Comment\n\t\t\tif (preg_match($this->patternComment,$lines[$l],$m) === 1) {\n\t\t\t\t$i++;\n\t\t\t\t$a[$i] = array('text'=>trim($m[1]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Parameter\n\t\t\tif (preg_match($this->patternParameter,$lines[$l],$m) === 1) {\n\t\t\t\t$i++;\n\t\t\t\t$a[$i] = array('key'=>trim($m[1]),'value'=>trim($m[2]));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Group start\n\t\t\tif (preg_match($this->patternGroupStart,$lines[$l],$m) === 1) {\n\t\t\t\t$i++;\n\t\t\t\t$s = $i;\n\t\t\t\t$a[$i] = $this->_lines2arrayGroup($lines,$l,$c,$m);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Group end\n\t\t\tif (preg_match($this->patternGroupEnd,$lines[$l],$m) === 1) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return result\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "ae55b49e90f75da4630a7ab63ef54fea", "score": "0.47455803", "text": "public function getAllLogs() : array\n {\n return $this->begin()\n ->run(\n 'git log ' .\n '--pretty=format:\"[%H][%h][%P][%ad][%an]%s\"' .\n ' --date=format:\"%Y/%m/%d %H:%M:%S\" --name-status'\n )->end()\n ->pareseCommitLog();\n }", "title": "" }, { "docid": "99d3ee8ba260721f34a9ee1c6f778bf5", "score": "0.47444212", "text": "public static function import_logs($logsfile, $formdata, $courseid, $db) {\n $iid = \\csv_import_reader::get_new_iid('logsfile');\n $csvreader = new \\csv_import_reader($iid, 'logsfile');\n\n $csvreader->load_csv_content($logsfile, $formdata->encoding, $formdata->delimiter_name);\n\n $csvreader->init();\n\n $fields = $csvreader->get_columns();\n\n while ($fields) {\n $userid = $fields[0];\n $resourcename = $fields[1];\n $resourcetype = $fields[2];\n $resourceid = $fields[3];\n $views = $fields[4];\n $timecreated = $fields[5];\n\n $db->insert_historic_logs($userid, $courseid, $resourcename, $resourcetype, $resourceid, $views, $timecreated);\n self::$lastinsertedlogs++;\n\n $fields = $csvreader->next();\n }\n\n $csvreader->close();\n }", "title": "" }, { "docid": "40add92f9d0d0dba412410e2548b8ea8", "score": "0.47413713", "text": "public function getTestParseLineData()\n {\n return [\n [\n '[Sat Dec 14 21:07:07 2013] [error] [client 127.0.0.1] ' .\n 'File does not exist: /home/user/project/skin/base',\n [\n 'time' => 'Sat Dec 14 21:07:07 2013',\n 'error_level' => 'error',\n 'client_ip' => '127.0.0.1',\n 'message' => 'File does not exist: /home/user/project/skin/base',\n ],\n ],\n [\n '[Sat Dec 21 17:33:53 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with ' .\n 'Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations',\n [\n 'time' => 'Sat Dec 21 17:33:53 2013',\n 'error_level' => 'notice',\n 'message' => 'Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with ' .\n 'Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations',\n ],\n ],\n [\n '[Sat Dec 28 16:55:56 2013] [error] [client 192.168.5.1] File does not exist: ' .\n '/var/www/favicon.ico, referer: http://server.vm/',\n [\n 'time' => 'Sat Dec 28 16:55:56 2013',\n 'error_level' => 'error',\n 'client_ip' => '192.168.5.1',\n 'message' => 'File does not exist: /var/www/favicon.ico',\n 'referer' => 'http://server.vm/',\n ],\n ],\n ];\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "794fa5c7611811477ec7f5f0c9060fcb", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n $categoria = categoria::where('id', $request->input('categoria_id'))->with('institucion')->get();\n $codigo = $categoria[0]->institucion->codigo.'-'.$categoria[0]->codigo.'-'.$request->input('numeroLibro');\n\n $libro = new libro();\n $libro->autor_id = $request->input('autor_id');\n $libro->titulo = ucfirst($request->input('titulo'));\n $libro->numeroEdicion = $request->input('numeroEdicion');\n $libro->lugarEdicion = $request->input('lugarEdicion');\n $libro->anioEdicion = $request->input('anioEdicion');\n $libro->descripcion = $request->input('descripcion');\n $libro->codigo = $codigo;\n // $libro->coleccion_id = \"\";\n $libro->categoria_id = $request->input('categoria_id');\n $libro->enabled = '1';\n $imagen_file = $request->file('imagen');\n if ($imagen_file) {\n $ruta_imagen = Str::random(10).$imagen_file->getClientOriginalName();\n \\Storage::disk('images')->put($ruta_imagen, \\File::get($imagen_file));\n $libro->imagen = $ruta_imagen;\n }else {\n $libro->imagen = 'noImg';\n // return response()->json('La Imagen del Libro es requerido', 404);\n }\n $pdf_file = $request->file('archivo');\n if ($pdf_file) {\n $ruta_pdf = Str::random(10).$pdf_file->getClientOriginalName();\n \\Storage::disk('pdf')->put($ruta_pdf, \\File::get($pdf_file));\n $libro->archivo = $ruta_pdf;\n }\n $libro->save();\n\n // $id_libro = $libro->id;\n // $libro = libro::find($id_libro);\n // $libro->codigo = $codigo.'-'.$id_libro;\n // $libro->save();\n\n return response()->json($libro, 200);\n }", "title": "" } ]
[ { "docid": "6fd12939ad43e0b8465f714deb95dc17", "score": "0.6832439", "text": "protected function storeResources()\n {\n try {\n $this->storage->get('version');\n } catch (\\Exception $e) {\n $this->storeVersion();\n }\n\n $resources = $this->resources(['format' => 'json']);\n $this->storage->put('resources', $resources);\n }", "title": "" }, { "docid": "d0bfac5fb1dbb1b2eafc131014133a72", "score": "0.67528874", "text": "public function store()\n\t{\n $this->resourceForm->validate(Input::all());\n $resource = Resource::create(\n Input::only('id_number', 'first_name', 'last_name', 'time_zone', 'extension_num', 'extension_pin', 'primary_phone', 'secondary_phone', 'active')\n );\n return Redirect::to('resources');\n\t}", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.6526506", "text": "public function store() {}", "title": "" }, { "docid": "35ea40baf62f42e40aaed808f3011b13", "score": "0.647742", "text": "public function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "14f9113e10ab16db8b93522fa5bed4d4", "score": "0.6435615", "text": "public function store() {\n // TODO: Implement store() method.\n }", "title": "" }, { "docid": "26fc32d420262b338412a368e56f3c24", "score": "0.6427251", "text": "protected function store() {\n if (count($this->storage) > 0) {\n set_transient($this->hash, $this->storage, self::$expire);\n } else {\n delete_transient($this->hash);\n }\n }", "title": "" }, { "docid": "6cd571f4466b5901b43a82652b434634", "score": "0.6414005", "text": "public function store(CreateRequest $request)\n {\n Resource::create($request->only(['name', 'type','resource_starts','resource_ends','exclude_weekends']));\n\n return redirect(route('resources.index'))->withSuccess('Resource created!');\n }", "title": "" }, { "docid": "635cb61885cca5673270994e1d7049ef", "score": "0.6410329", "text": "public function store()\n {\n return $this->sendResponse(\n new $this->resource($this->model->create($this->request->all())),\n 'successfully created.',\n true,\n 201\n );\n }", "title": "" }, { "docid": "8f52d18a0b337a866245dca6174b31f7", "score": "0.6383107", "text": "public function store()\n {\n $data = request()->validate([\n 'name' => 'required|unique:storage_locations',\n 'nickname' => 'nullable',\n 'description' => 'required',\n 'storage_type_id' => 'exists:storage_types,id'\n ]);\n\n $location = StorageLocation::create($data);\n\n session()->flash('flash', ['message' => 'Storage Location added successfully!', 'level' => 'success']);\n\n return redirect(route('storage.locations.index'));\n }", "title": "" }, { "docid": "e6a2ecff8be90a692566c0ac3bcd7773", "score": "0.63653415", "text": "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6364561", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.634122", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
1fead1c413fa24876f5169652faf0305
Get all invoices of this template
[ { "docid": "66ccb72a8794c4d1ed8cc39d689b59c6", "score": "0.6822103", "text": "public function getInvoices(Invoice_Service $service, $filter = null) {\n\t\treturn $service->getAll($filter, $this);\n\t}", "title": "" } ]
[ { "docid": "f3d349d1c74ccae7c084ae6d619bf24c", "score": "0.81942123", "text": "public function getInvoices(): Invoices\n {\n return $this->get('invoices');\n }", "title": "" }, { "docid": "139a00adad496ecbd513ea92b5ef8445", "score": "0.8123556", "text": "public function getInvoices()\n {\n return $this->getApi()->invoice()->query(['project' => $this->getUrl()]);\n }", "title": "" }, { "docid": "fb435f75b25649211c800b04fb19a991", "score": "0.79090685", "text": "function get_all_invoices()\n {\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result_array();\n }", "title": "" }, { "docid": "0c4921a4467bc28505862de4083e5661", "score": "0.78199637", "text": "public function getInvoices() {\n\t\t$query = new Service_Freshbooks_Query_Invoice('list');\n\t\t$query->addParam('client_id', $this->get('client_id'));\n\t\t$response = $this->getService()->execute($query);\n\t\treturn $response->getInvoices();\n\t}", "title": "" }, { "docid": "2053143ee404609f0c9dfc3c45a706e7", "score": "0.7675858", "text": "public function allInvoices()\n {\n $invoices = Invoices::where('cl_id', Auth::guard('client')->user()->id)->orderBy('updated_at', 'DESC')->get();\n $invoices_type=\"All Invoice\";\n\n return view('client1.all-invoices', compact('invoices','invoices_type'));\n }", "title": "" }, { "docid": "3cb83d5fa5d92a5830e573ba78ed981e", "score": "0.7641291", "text": "public function getInvoices()\n {\n return $this->getLaboratories()->map(function ($laboratory) {\n if (!$laboratory instanceof Laboratory) { return abort(500); }\n return $laboratory->getInvoices();\n })->flatten()->sortByDesc(function ($item) {\n return $item['created_at'];\n });\n }", "title": "" }, { "docid": "054fcae407227124be4a6c3bcba9d4d0", "score": "0.7640344", "text": "static function getInvoices(){\n\n $configEntity = self::getConfigEntity();\n $url = $configEntity['apiurl'] . 'v3/cfdi40/list';\n $request = 'GET';\n\n return WrapperApi::callCurl($url, $request);\n }", "title": "" }, { "docid": "9827fe2a0e71e8f5941eb16f19c9dbba", "score": "0.7612906", "text": "public function getInvoices()\n {\n return Checkout::with([\n 'review',\n 'product.agriculture.commodity', 'product.store.user',\n 'product.store.city', 'user.store.city', 'order_detail', 'address.city'\n ])->where('user_id', auth()->id());\n }", "title": "" }, { "docid": "00beeb31246a722f642da40aa836ee28", "score": "0.7546149", "text": "public function getInvoices()\n {\n return $this->hasMany(Invoice::className(), ['userId' => 'id']);\n }", "title": "" }, { "docid": "206c29132019d35376b8327e4ea3a823", "score": "0.74640256", "text": "public function invoices()\n {\n return $this->hasMany( 'Invoice');\n }", "title": "" }, { "docid": "a51eb373c494422d57efa00399de67f3", "score": "0.74556327", "text": "public function actionInvoices() {\n\t\t//unset($this->invoices); //??\n\n\t\t$findParams = \\GO\\Base\\Db\\FindParams::newInstance()->debugSql();\n\t\t$webshop = \\GO\\Webshop\\Model\\Webshop::getBySite();\n\n\t\t$whereCriteria = \\GO\\Base\\Db\\FindCriteria::newInstance()\n\t\t\t\t\t\t->addCondition('user_id', \\GO::user()->id)\n\t\t\t\t\t\t->addCondition('status_id', $webshop->order_success_status_id, '!=')\n\t\t\t\t\t\t->addCondition('status_id', 0, '>');\n\t\t$findParams->criteria($whereCriteria)->debugSql()->order('btime', 'DESC');\n\n\t\t//$this->invoices = \\GO\\Billing\\Model\\Order::model()->find($findParams)->fetchAll();\n\n\t\t$pager = new \\GO\\Site\\Widgets\\Pager('p', $_GET, \\GO\\Billing\\Model\\Order::model(), $findParams, \\GO::user()->max_rows_list, 2);\n\n\t\t//$site = $this->getSite();\n\t\t//if(!empty($site->id))\n\t\t//$this->webshop = \\GO\\Webshop\\Model\\Webshop::model()->findSingleByAttribute('site_id',$site->id);\n\t\t//$params['pager'] = $pager;\n\t\t$this->render('invoices', array('pager' => $pager));\n\t}", "title": "" }, { "docid": "180c1fb977f8a0691248c2a511cf4700", "score": "0.7387756", "text": "public function getInvoices(){\n\t\t$query = $this->myDB->query(\"SELECT i.*, a.agent_name AS name FROM invoices AS i JOIN agents AS a ON agent_id = i.agent_fk ORDER BY i.invoice_id DESC\");\n\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "61509122170fa92bf2c5e344e4e0b6f8", "score": "0.7369732", "text": "public function invoices()\n {\n return $this->morphToMany(\\Bimmunity\\Invoice\\Models\\Invoice::class, 'invoiceable')->withTimestamps();;\n }", "title": "" }, { "docid": "5783982438e9ce8e84260e2f1ca199a9", "score": "0.7332125", "text": "public function invoices()\n {\n return $this->hasMany('App\\Http\\Models\\Invoice');\n }", "title": "" }, { "docid": "ec509c77ca31bd76f0cb9d7708afb6f4", "score": "0.73081523", "text": "public function getInvoiceList()\n\t{\n\t\t\n\t\t$invoiceList=$this->InvoiceModel->getInvoiceList();\n\t\treturn $invoiceList;\n\t}", "title": "" }, { "docid": "8b56ebbe8bfb10ae2c7cb026d6168159", "score": "0.718449", "text": "function get_invoices($id)\n {\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row_array();\n }", "title": "" }, { "docid": "5e59df9454e64bc3397ca37be436814e", "score": "0.7153191", "text": "function all_invoices() {\n $config['base_url'] = site_url('/fb_fabrics/all_invoices');\n $config['total_rows'] = $this->fb_fabrics_model->count_all_invoice();\n $config['per_page'] = '20';\n $config['uri_segment'] = 3;\n $this->pagination->initialize($config);\n $data['results'] = $this->fb_fabrics_model->get_all_invoice($config['per_page']);\n $data['links'] = $this->pagination->create_links();\n $this->load->view('fb_common/header');\n $this->load->view('fb_fabrics/invoices', $data);\n $this->load->view('fb_common/footer');\n }", "title": "" }, { "docid": "2b6f86e4d250cea42858d85e18164b91", "score": "0.70561945", "text": "public function allInvoices()\n { \n \n $invoices = Invoice::all();\n \n for($i = 0; $i < sizeof($invoices); $i++)\n { \n $invoices[$i]->items; \n $array[] = $invoices[$i];\n \n }\n if(sizeof($invoices) == 0)\n {\n return response()->json(['message'=>\"No hay facturas\"],404);\n }else{\n return response()->json(['invoices'=>$array],200);\n }\n\n }", "title": "" }, { "docid": "2746dfc3ce666d6ee4ea6a3011971fdd", "score": "0.7035163", "text": "public function invoices()\n {\n return $this->belongsToMany(Invoice::class)->using(Paymentable::class);\n }", "title": "" }, { "docid": "378f699a9558d5fa8b202a6f2ca88dff", "score": "0.7027761", "text": "public function getInvoices0()\n {\n return $this->hasMany(Invoice::className(), ['createdBy' => 'id']);\n }", "title": "" }, { "docid": "914a0b60d58c8b5cbd9f38f8e33c5107", "score": "0.6974554", "text": "public function invoices(): HasMany\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "914a0b60d58c8b5cbd9f38f8e33c5107", "score": "0.6974554", "text": "public function invoices(): HasMany\n {\n return $this->hasMany(Invoice::class);\n }", "title": "" }, { "docid": "8fe78e570e980b35df0a5937931cecaa", "score": "0.69344133", "text": "public function invoices()\n {\n return $this->hasMany('App\\Invoice');\n }", "title": "" }, { "docid": "fc8883668ea6dcddaf4d0947ed36c235", "score": "0.685527", "text": "public function getInvoicePhotos()\n {\n return $this->hasMany(InvoicesPhoto::class, ['purchase_invoices_id' => 'id']);\n }", "title": "" }, { "docid": "0da72ef1bc15dccb88c8bd6134778026", "score": "0.68429667", "text": "public function invoices($id)\n {\n return new Collection(Invoice::all([\n 'subscription' => $id,\n ])->data);\n }", "title": "" }, { "docid": "73895087ce6de740b6a59ca647656abe", "score": "0.67967147", "text": "public function recurringInvoices()\n {\n\n $invoices = Invoices::where('cl_id', Auth::guard('client')->user()->id)->where('recurring', '!=', '0')->orderBy('updated_at', 'DESC')->get();\n $invoices_type=\"Paid Invoice\";\n return view('client.all-invoices', compact('invoices','invoices_type'));\n }", "title": "" }, { "docid": "d2c305fdab67c2b0f7f53f1b303cfbf9", "score": "0.6783359", "text": "public function invoices()\n {\n return $this->belongsToMany('App\\CustomerInvoice', 'parent_child', 'parentable_id', 'childable_id')\n ->wherePivot('parentable_type', 'aBillander\\WooConnect\\WooOrder')\n ->wherePivot('childable_type', 'App\\CustomerInvoice')\n ->withTimestamps();\n }", "title": "" }, { "docid": "021de27868040b95a14f657d1c04560f", "score": "0.66776675", "text": "abstract public function getInvoices($clientId);", "title": "" }, { "docid": "2fc8fc0f1b3cef87012b8c3311db689a", "score": "0.66279745", "text": "public function invoiceListAction(){\n\t\t$customer = Mage::getSingleton('customer/session')->getCustomer();\n\t\tif (!$customer->getId()) {\n\t\t echo json_encode ( array (\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'code' => 1,\n\t\t\t\t\t'message' => 'customer_not_login'\n\t\t\t));\n\t\t\treturn ;\n\t\t}\n\t\t$customer_id = $customer->getId();\n\n\t\t$invoices = array();\n /** @var $invoiceCollection Mage_Sales_Model_Mysql4_Order_Invoice_Collection */\n $invoiceCollection = Mage::getResourceModel('sales/order_invoice_collection');\n $invoiceCollection->addAttributeToSelect('entity_id')\n ->addAttributeToSelect('*');\n\t\t$filters = $this->getRequest()->getParams();\n /** @var $apiHelper Mage_Api_Helper_Data */\n $apiHelper = Mage::helper('api');\n try {\n $filters = $apiHelper->parseFilters($filters, $this->_attributesMap['invoice']);\n foreach ($filters as $field => $value) {\n $invoiceCollection->addFieldToFilter($field, $value);\n }\n\t\t\t$invoiceCollection->setOrder('created_at','desc');\n } catch (Mage_Core_Exception $e) {\n\t\t\techo json_encode ( array (\n\t\t\t\t\t'status' => false,\n\t\t\t\t\t'code' => 2,\n\t\t\t\t\t'message' => $e->getMessage()\n\t\t\t));\n\t\t\treturn ;\n }\n foreach ($invoiceCollection as $invoice) {\n\t\t\t$invoi = $this->_getAttributes($invoice, 'invoice');\n\t\t\t$invoi['order_increment_id'] = $invoice->getOrderIncrementId();\n\t\t\t$orderid = $invoice->getOrderId();\n\t\t\t$order = Mage::getModel('sales/order')->load($orderid);\n\t\t\tif($order->getCustomerId() == $customer_id){\n\t\t\t\t$productname = array();\n\t\t\t\tforeach ($order->getAllItems() as $i=>$item){\n\t\t\t\t\t$productid = $item->getProduct()->getId();\n\t\t\t\t\t$_product = Mage::getModel('catalog/product')->load($productid);\n\t\t\t\t\t//print_r($_product->getData());exit;\n\t\t\t\t\t$productname[$i]['name']= $item->getName();\n\t\t\t\t\t$productname[$i]['price']= $item->getPrice();\n\n\n\t\t\t\tif(($_product->getImage() == 'no_selection') || (!$_product->getImage())){\n\t\t\t\t\t$productname[$i]['image_url']= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'frontend/base/default/images/catalog/product/placeholder/image.jpg';\n\t\t\t\t $productname[$i]['image_thumbnail_url']= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'frontend/base/default/images/catalog/product/placeholder/image.jpg';\n\t\t\t\t}else{\n\t\t\t\t\t$productname[$i]['image_url']= Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $_product->getImage();\n\t\t\t\t\t$productname[$i]['image_thumbnail_url'] = Mage::getModel ( 'catalog/product_media_config' )->getMediaUrl( $_product->getThumbnail() );\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$invoi['products'] = $productname;\n\t\t\t\t$invoices[] = $invoi;\n\t\t\t}\n }\n\t\techo json_encode($invoices);\n\t}", "title": "" }, { "docid": "0b8fd2c993bc5b15d9f2aab35a5b2686", "score": "0.6615541", "text": "public function getOtherInvoices(){\n\t\t$query = $this->myDB->query(\"SELECT * FROM other_invoices ORDER BY invoice_id DESC\");\n\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "ea6255e861ec190a0a4df110a551a895", "score": "0.658115", "text": "public static function invoices()\n {\n $res = Facturacion::with(['reserva.vehiculo.descuento','reserva.apartados','pagos', 'comision', 'facturas'])->get();\n $res->transform(function ($r, $key)\n {\n $item = [];\n $item['id'] = $r->id;\n $item['id_vehiculo'] = $r->reserva->vehiculo->id;\n $item['vin'] = $r->vin;\n $item['ffact'] = $r->ffact;\n $item['modelo'] = $r->reserva->vehiculo->modelo;\n $item['agencia'] = $r->reserva->vehiculo->agencia;\n $item['comprador'] = $r->reserva->comprador;\n $item['vendedor'] = $r->reserva->vendedor;\n if ($r->reserva->vehiculo->descuento->tipo == 'porcentaje') {\n $precio = $r->reserva->vehiculo->precio*(100-$r->reserva->vehiculo->descuento->cantidad)/100;\n } else {\n $precio = $r->reserva->vehiculo->precio - $r->reserva->vehiculo->descuento->cantidad;\n }\n $totalApartados = 0;\n $totalPagos = 0;\n $totalApartados = $r->reserva->apartados->reduce(function ($val, $a) {\n return $val + $a->cantidad;\n }, 0);\n $totalPagos = $r->pagos->reduce(function ($val, $p)\n {\n return $val + $p->monto;\n }, 0);\n $item['precio'] = $precio;\n $item['totalApartados'] = $totalApartados;\n $item['totalPagos'] = $totalPagos;\n $item['precioRestante'] = $precio - $totalPagos - $totalApartados;\n $item['pagos'] = $r->pagos;\n $item['comision'] = $r->comision;\n $item['facturas'] = $r->facturas;\n return $item;\n });\n return R::success($res);\n }", "title": "" }, { "docid": "dea1b71078934c919d22415b6151a96a", "score": "0.6569925", "text": "public function index()\n {\n\n if (Auth::user()->is_employee) {\n return new UnpaidInvoiceCollection(UnpaidInvoice::all());\n } else {\n\n return new UnpaidInvoiceCollection(UnpaidInvoice::where('CLIENT_ID', Client::where('C_Email', Auth::user()->email)->first()->Client_id)->get());\n }\n }", "title": "" }, { "docid": "65ac2a174bfbe6d69d31591dc813b683", "score": "0.6568917", "text": "public function index()\n {\n return view(\n 'invoices.index', [\n 'model' => $this->_invoice->getAll()\n ]\n );\n }", "title": "" }, { "docid": "bba83db26153e4de54885385dc61c5cc", "score": "0.653529", "text": "public function getInvoices(){\n $invoices = [];\n foreach ($this->data as $invoice) {\n $newInvoice = [];\n $newInvoice['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('InvoiceID', $invoice);\n $newInvoice['status'] = $this->parseStatus(IndexSanityCheckHelper::indexSanityCheck('Status', $invoice));\n $newInvoice['sub_total'] = IndexSanityCheckHelper::indexSanityCheck('SubTotal', $invoice);\n $newInvoice['total_tax'] = IndexSanityCheckHelper::indexSanityCheck('TotalTax', $invoice);\n $newInvoice['total'] = IndexSanityCheckHelper::indexSanityCheck('Total', $invoice);\n $newInvoice['currency'] = IndexSanityCheckHelper::indexSanityCheck('CurrencyCode', $invoice);\n $newInvoice['type'] = IndexSanityCheckHelper::indexSanityCheck('Type', $invoice);\n $newInvoice['invoice_number'] = IndexSanityCheckHelper::indexSanityCheck('InvoiceNumber', $invoice);\n $newInvoice['amount_due'] = IndexSanityCheckHelper::indexSanityCheck('AmountDue', $invoice);\n $newInvoice['amount_paid'] = IndexSanityCheckHelper::indexSanityCheck('AmountPaid', $invoice);\n $newInvoice['currency_rate'] = IndexSanityCheckHelper::indexSanityCheck('CurrencyRate', $invoice);\n $newInvoice['discount_total'] = IndexSanityCheckHelper::indexSanityCheck('TotalDiscount', $invoice);\n $newInvoice['date'] = IndexSanityCheckHelper::indexSanityCheck('Date', $invoice);\n $newInvoice['gst_inclusive'] = $this->parseTaxCalculation(IndexSanityCheckHelper::indexSanityCheck('LineAmountTypes', $invoice));\n $newInvoice['updated_at'] = IndexSanityCheckHelper::indexSanityCheck('UpdatedDateUTC', $invoice);\n\n if (IndexSanityCheckHelper::indexSanityCheck('Contact', $invoice)) {\n $newInvoice = $this->parseContact($invoice['Contact'], $newInvoice);\n }\n if (IndexSanityCheckHelper::indexSanityCheck('LineItems', $invoice)) {\n $newInvoice = $this->parseLineItems($invoice['LineItems'], $newInvoice);\n }\n\n if (($newInvoice['amount_paid'] > 0 && $newInvoice['amount_due'] > 0) && $newInvoice['status'] !== 'DELETED') {\n $newInvoice['status'] = 'PARTIAL';\n }\n\n array_push($invoices, $newInvoice);\n }\n\n return $invoices;\n }", "title": "" }, { "docid": "f8494333cdbc8e7a623b004f35ae32c4", "score": "0.6520024", "text": "function admin_invoices() {\n $config['base_url'] = site_url('/fb_fabrics/all_invoices');\n $config['total_rows'] = $this->fb_fabrics_model->count_all_invoice_admin();\n $config['per_page'] = '20';\n $config['uri_segment'] = 3;\n $this->pagination->initialize($config);\n $data['results'] = $this->fb_fabrics_model->get_all_invoice_admin($config['per_page']);\n $data['links'] = $this->pagination->create_links();\n $this->load->view('fb_common/header');\n $this->load->view('fb_fabrics/admin_invoices_view', $data);\n $this->load->view('fb_common/footer');\n }", "title": "" }, { "docid": "8a0d17011dae86bf3202ab4fbca536ca", "score": "0.65084654", "text": "public function invoiceList()\n\t{\n\t\t$data['invoiceList']=$this->InvoiceModel->invoiceList();\n\t\t$data['clientsList']=$this->InvoiceModel->clientsList();\n\t\t$this->load->view('invoiceList', $data); \n\t}", "title": "" }, { "docid": "cb25d6c7ca79385aa310b67fb569d966", "score": "0.64913255", "text": "public function viewInvoices(Request $request, $id)\n {\n $invoices = Invoice::where('subscription_id', $id)->get();\n return view('subscriptions/view-invoices', [\n 'invoices' => $invoices\n ]);\n\n }", "title": "" }, { "docid": "415c4f263e75e66229955f6f5ce4cd00", "score": "0.64889693", "text": "public function invoice()\n {\n return $this->invoice;\n }", "title": "" }, { "docid": "03a35d4258ebca57681d6c34038baa35", "score": "0.6463213", "text": "public function getInvoice() {\n return $this->invoice;\n }", "title": "" }, { "docid": "e3887c5261685585f83b09dce777518b", "score": "0.64627844", "text": "public function all()\n {\n $hasil = $this->db->get('invoices');\n if($hasil->num_rows() > 0){\n return $hasil->result();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "88ec3ba81cf5023758101f138399eb5a", "score": "0.6441535", "text": "private function invoices_all($id = null) {\n $this->recursive = 2;\n $this->ClientsContract->unbindModel(array('hasAndBelongsToMany' => array('ClientsManager'),),false);\n $this->ClientsContract->unbindModel(array('hasMany' => array('Invoice'),),false);\n $this->ClientsContract->Invoice->unbindModel(array('hasMany' => array('InvoicesItem',\n 'EmployeesPayment','InvoicesTimecardReminderLog','InvoicesPostLog'),),false);\n $this->ClientsCheck->unbindModel(array('hasMany' => array('InvoicesPayment'),),false);\n $this->ClientsCheck->InvoicesPayment->unbindModel(array('belongsTo' => array('Invoice','ClientsCheck'),),false);\n $this->unbindModel(array('hasMany' => array('ClientsCheck','ClientsContract','ClientsManager','ClientsMemo','ClientsSearch',),),false);\n $this->State->unbindModel(array('hasMany' => array('Client','Employee','Vendor'),),false);\n\n $this->ClientsContract->Invoice->ClientsContract->unbindModel(array('belongsTo' => array('Client','Period'),),false);\n $this->ClientsContract->Invoice->ClientsContract->unbindModel(array('hasMany' => array('ContractsItem'),),false);\n $this->ClientsContract->Invoice->ClientsContract->unbindModel(array('hasAndBelongsToMany' => array('User'),),false);\n $this->data = $this->read(null, $id);\n $this->ClientsContract->Invoice->recursive = 2;\n $invoices = $this->ClientsContract->Invoice->find('all',\n array('order' =>'date DESC',\n 'conditions'=>array('ClientsContract.client_id'=>$id,\n 'Invoice.voided'=>0,'Invoice.posted'=>1,'Invoice.amount > 0'),\n array('order'=>array('date desc'))\n ));\n $res = array();\n $count = 0;\n foreach ($invoices as $invoice):\n if(!$invoice['Invoice']['voided']) # only go through expense of calculating 'cleared' or 'pastdue' if not cleared\n {\n $res[] = $invoice['Invoice']['id'];\n }\n $count++;\n endforeach;\n return ($res);\n }", "title": "" }, { "docid": "3be22d47f77af199daf841d797e2b0eb", "score": "0.64261913", "text": "public function index($id = false)\r\n {\r\n $this->list_invoices($id);\r\n }", "title": "" }, { "docid": "835610c64eaf97b3696831c5e4e9ed9c", "score": "0.6419895", "text": "public function index(ShowInvoices $request)\n {\n try {\n return $this->respond([\n 'invoices' => $this->invoices_service->getAllInvoices(\n $request->only['filters']\n ),\n ]);\n } catch (\\Stripe\\Error\\Base $e) {\n log_error($e);\n return $this->respondError(Lang::getFromJson('Error loading invoices.'));\n } catch (\\Exception $e) {\n log_error($e);\n return $this->respondInternalError();\n }\n }", "title": "" }, { "docid": "822c0420db3a9501279575f384eac50d", "score": "0.63998", "text": "public function paymentInvoices()\n {\n $checkouts = $this->getInvoices();\n $invoices = $checkouts->latest()->paginate(10);\n $countInvoice = $checkouts->count();\n\n $transactionsOrigin = $this->getTransactions();\n $countTransactions = $transactionsOrigin->count();\n\n return view('checkouts.index', compact('invoices', 'countInvoice', 'countTransactions'));\n }", "title": "" }, { "docid": "53348415b17757ed166fa307f5cceed5", "score": "0.6362475", "text": "public function index() \n {\n $invoices = invoice::all();\n return view('invoice.index')->with('invoices', $invoices);\n\n // return invoice::All();\n }", "title": "" }, { "docid": "f04f6918ffb7149882443ae862ce427c", "score": "0.63286746", "text": "public function invoice(){\n\t\treturn $this->hasMany('App\\invoice','order_id','id');\n\t}", "title": "" }, { "docid": "e2f8252b62969a2a96f87952b2ef025e", "score": "0.63096005", "text": "public function getPurchaseInvoices() : ActiveQuery\r\n {\r\n return $this->hasMany(PurchaseInvoices::class, ['company_id' => 'id']);\r\n }", "title": "" }, { "docid": "36e2e8994affbcc13dbfd8b32b09d829", "score": "0.62945116", "text": "public function index()\n {\n //\n $invoices = Invoice::all();\n return view('invoices.index', compact('invoices'));\n }", "title": "" }, { "docid": "1c59023758ebf62a158f3ff863b28e06", "score": "0.6287612", "text": "public function fetchInvoicesById(Request $request,$id)\n {\n $user = auth()->setRequest($request)->user();\n // Get user from $request token.\n if (!$user->role == 'store' || $user->status === '0') {\n return $this->responseUnauthorized();\n }\n\n $invoices = Invoice::where('user_id',$id);\n\n $collection = $invoices->latest()->paginate();\n\n return new InvoiceCollection($collection);\n }", "title": "" }, { "docid": "e7fd598990d78360fe53f3a33c292097", "score": "0.6256654", "text": "public function getInvoiceitems()\n {\n return $this->hasMany(Invoiceitems::className(), ['createdBy' => 'id']);\n }", "title": "" }, { "docid": "cfdecea32e58f21067f2d18acf1e05ff", "score": "0.6239319", "text": "public function invoices($fromLocal = true, $page = 1, $limit = 10)\n\t{\n\t\tif( ! $this->subscription)\n\t\t\tthrow new CashewExceptions\\NoSubscriptionException;\n\n\t\t// we are allowing invoices to be fetched from local copy because that is super fast\n\t\treturn $fromLocal\n\t\t\t? $this->storage->getInvoices($this->subscription['user_id'], $page, $limit)\n\t\t\t: $this->gateway->invoices($this->subscription['customer_id']);\n\t}", "title": "" }, { "docid": "e39fcf9930a0d73c07ada7121dc15027", "score": "0.62100244", "text": "public function allIncidents()\n {\n $DbOutput = $this->incidents->paginate(15);\n }", "title": "" }, { "docid": "534d0b008549d27b65f387ee24a7cc5f", "score": "0.6207357", "text": "public function index()\n {\n if (!request()->user()->can('sales.invoices')) {\n abort(403, 'Unauthorized action.');\n }\n\n $rowsPerPage = (request()->get('rowsPerPage') > 0) ? request()->get('rowsPerPage') : 0;\n $sort_by = request()->get('sort_by');\n $descending = request()->get('descending');\n\n if ('false' == $descending) {\n $orderby = 'asc';\n } elseif ('true' == $descending) {\n $orderby = 'desc';\n } elseif ('' == $descending) {\n $orderby = 'desc';\n $sort_by = 'id';\n }\n\n $invoice_schemes = InvoiceScheme::orderBy($sort_by, $orderby)\n ->paginate($rowsPerPage);\n\n return $invoice_schemes;\n }", "title": "" }, { "docid": "d22b424e701b18b8238583528ea4f65a", "score": "0.61933875", "text": "private function transfer_invoices() {\r\n\t\t$res = mysql_query(\"SELECT * FROM `invoices` WHERE 1\", $this->sql);\r\n\t\twhile ($row = mysql_fetch_array($res)) {\r\n\t\t\tif (\r\n\t\t\t\tarray_key_exists($row['restaurant_id'], $this->restaurants)\r\n\t\t\t\t&& array_key_exists($row['location_id'], $this->locations)\r\n\t\t\t) {\r\n\t\t\t\t$row = $this->toText($row);\r\n\t\t\t\t$data = array(\r\n\t\t\t\t\t'Invoice' => array(\r\n\t\t\t\t\t\t'from_date' => $row['from_date'],\r\n\t\t\t\t\t\t'invoice_number' => $row['invoice_no'],\r\n\t\t\t\t\t\t'location_id' => $this->locations[$row['location_id']],\r\n\t\t\t\t\t\t'paid_amount' => $row['paid_amount'],\r\n\t\t\t\t\t\t'pdf_name' => $row['pdf_name'],\r\n\t\t\t\t\t\t'restaurant_id' => $this->restaurants[$row['restaurant_id']],\r\n\t\t\t\t\t\t'status' => $row['status'],\r\n\t\t\t\t\t\t'total_amount' => $row['total_amount'],\r\n\t\t\t\t\t\t'to_date' => $row['to_date']\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t\t$this->Invoice->create();\r\n\t\t\t\t$this->Invoice->save($data, false);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8c3f711ce3efcdb6e273bfde65256356", "score": "0.61913455", "text": "public function index()\n {\n if(Auth::user()->type=='representative') {\n $id = Auth::user()->id;\n// $rep = Representative::where(['user_id' => $id])->take(1)->get();\n $invoices = Invoice::where('clients.representative_id','=',$id)\n ->join('clients','clients.id','=','invoices.client_id')\n ->paginate($this->pagination_No)\n ->setPath(url() . '/invoice');\n }\n else\n {\n $invoices = Invoice::paginate($this->pagination_No)\n ->setPath(url() . '/invoice');\n }\n return view('invoice.all')->with(['invoices' => $invoices]);\n }", "title": "" }, { "docid": "cda6d4493d54385883d917b139ee6503", "score": "0.6187223", "text": "public function index()\n {\n $invoices = Invoice::all();\n\n return view('invoice/index', compact('invoices'));\n }", "title": "" }, { "docid": "a46d836808356e744572789357169054", "score": "0.61681837", "text": "public function index()\n {\n $invoices = Invoice::all()->toArray();\n return array_reverse($invoices);\n\n\n }", "title": "" }, { "docid": "008acdc9b0184c0a838f3dbd91151e04", "score": "0.61598974", "text": "public function findAll(array $data = array())\n {\n $this->settings(array(\n 'url' => !empty($data) ? 'invoices?' . http_build_query($data) : 'invoices',\n 'method' => 'GET'\n ));\n\n return $this->result();\n }", "title": "" }, { "docid": "693796bedfcd5b56c91be5563b486ba8", "score": "0.6129156", "text": "public function index() {\r\n\r\n $invoiceDetails = $this->Invoices->find('all', [\r\n 'conditions' => [\r\n 'Invoices.id IS NOT NULL'\r\n ],\r\n 'contain' => [\r\n 'Restaurants'\r\n ],\r\n 'order' => [\r\n 'Invoices.id' => 'DESC'\r\n ]\r\n ])->hydrate(false)->toArray();\r\n\r\n $this->set(compact('invoiceDetails'));\r\n\r\n //pr($invoiceDetails);die();\r\n }", "title": "" }, { "docid": "f6e4b745e328515801f7e84550cb622c", "score": "0.61282665", "text": "public function getPracticeInvoices( Request $request ) {\n\t\ttry {\n\t\t\t$owner = JWTAuth::parseToken()->authenticate();\n\t\t} catch(TokenExpiredException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(TokenInvalidException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(JWTException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(\\Exception $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t}\n\t\t$invoices = Invoice::with( 'user', 'practice', 'job.percentages' )->whereHas( 'user', function( $query ) use ( $request ) {\n\t\t\t$query->where( 'name', 'like', '%' . $request->locum_name . '%' )->where( 'role', Constant::ROLE_USER );\n\t\t} )->where( 'practice_id', $owner->practice()->first()->id );\n\t\t\n\t\tif($request->paid_status != NULL) {\n\t\t\tswitch($request->paid_status) {\n\t\t\t\tcase 'paid':\n\t\t\t\t\t$invoices->where( 'paid_status', TRUE );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'not_paid':\n\t\t\t\t\t$invoices->where( 'paid_status', FALSE );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($request->job_start != NULL && $request->job_end != NULL) {\n\t\t\t$invoices->whereHas( 'job', function( $query ) use ( $request ) {\n\t\t\t\t$query->where( 'job_start', '>=', $request->job_start )->where( 'job_end', '<=', $request->job_end );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t$invoices = $invoices->paginate( 5 );\n\t\t\n\t\tif($invoices->count() > 0) {\n\t\t\treturn response()->myJson( 200, 'Successfully retrived invoice.', $invoices );\n\t\t} else {\n\t\t\treturn response()->myJson( 404, 'Cant\\'t find invoice.', NULL );\n\t\t}\n\t}", "title": "" }, { "docid": "17b544e4204ced55c810f8639f14ced1", "score": "0.61006063", "text": "public function index(Request $request)\n {\n $this->authorize('glance', Invoice::class);\n $invoices = $this->invoice->all(array('*'), $request->scope);\n return view('invoice.view_invoices')->with(compact('invoices'));\n }", "title": "" }, { "docid": "773390c59b46375ccb6fbabc1620a606", "score": "0.6092037", "text": "public function getContentInvoice() {\n\t\t\treturn $this->_contentInvoice;\n\t\t}", "title": "" }, { "docid": "54068970977dda4d3925193b25ff9e58", "score": "0.60852957", "text": "public function getInvoices($accountID, $page = 1)\n {\n return $this->httpHelper->get(\"accounts/\" . intval($accountID) . \"/invoices\", $page);\n }", "title": "" }, { "docid": "b29ac6653c78e1b7abe0ed6a0f0b6f21", "score": "0.6062269", "text": "public function index(Request $request){\n $Invoices = invoices::with(['registered_devices', 'users'])->get();\n\n if($request['user_name'] != null){\n $Invoices->where('users.name', 'like', '%' . $request['user_name'] . '%' ); \n }\n if($request['device_imei'] != null){\n $device = registered_devices::where('IMEI', 'like', '%' . $request['device_imei'] . '%')->first();\n $Invoices->where('registered_devices_id', '=', $device->id);\n }\n if($request['created_at'] != null){\n $Invoices->where('created_at', '=', $request['created_at']);\n }\n if($request['condition'] != null){\n $Invoices->where('condition', '=', $request['condition']);\n }\n // dd($Invoices);\n return view('Invoice')->with('Invoices', $Invoices);\n }", "title": "" }, { "docid": "dcb5434aa9256f7598494704aabc728b", "score": "0.6050752", "text": "public function getLocumInvoices( Request $request ) {\n\t\ttry {\n\t\t\t$user = JWTAuth::parseToken()->authenticate();\n\t\t} catch(TokenExpiredException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(TokenInvalidException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(JWTException $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t} catch(\\Exception $e) {\n\t\t\treturn response()->myJson( 400, $e->getMessage(), NULL );\n\t\t}\n\t\t\n\t\t$invoices = Invoice::with( 'user', 'practice', 'job.percentages' )->whereHas( 'practice', function( $query ) use ( $request ) {\n\t\t\t$query->where( 'practice_name', 'like', '%' . $request->practice_name . '%' );\n\t\t} )->where( 'user_id', $user->id );\n\t\tif($request->paid_status != NULL) {\n\t\t\tswitch($request->paid_status) {\n\t\t\t\tcase 'paid':\n\t\t\t\t\t$invoices->where( 'paid_status', TRUE );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'not_paid':\n\t\t\t\t\t$invoices->where( 'paid_status', FALSE );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($request->job_start != NULL && $request->job_end != NULL) {\n\t\t\t$invoices->whereHas( 'job', function( $query ) use ( $request ) {\n\t\t\t\t$query->where( 'job_start', '>=', $request->job_start )->where( 'job_end', '<=', $request->job_end );\n\t\t\t} );\n\t\t}\n\t\t\n\t\t$invoices = $invoices->paginate( 5 );\n\t\t\n\t\tif(!$invoices->isEmpty()) {\n\t\t\treturn response()->myJson( 200, 'Successfully retrived invoices.', $invoices );\n\t\t} else {\n\t\t\treturn response()->myJson( 400, 'Cant\\'t find invoices.', NULL );\n\t\t}\n\t}", "title": "" }, { "docid": "b29f1d9a2c07dcfa89c317768ae48135", "score": "0.60423464", "text": "public function actionIndex()\n {\n $searchModel = new InvoiceSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "b29f1d9a2c07dcfa89c317768ae48135", "score": "0.60423464", "text": "public function actionIndex()\n {\n $searchModel = new InvoiceSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "c4280d2c77df8bd0e62b88166697fb99", "score": "0.60413295", "text": "public function getProjectInvoices($projectId): array\n {\n $invoices = [];\n $result = $this->collectPaginatedResults('invoices?project_id=' . $projectId);\n\n foreach ($result as $invoiceData)\n {\n $invoices[] = new HarvestInvoice($invoiceData);\n }\n\n return $invoices;\n }", "title": "" }, { "docid": "d39e89cec8537b90a418b716f5f742cd", "score": "0.6036043", "text": "public function getAll()\n {\n return IndicacaoCollection::collection($this->indicacao->all());\n }", "title": "" }, { "docid": "75d673a0399a2e81d53fb92c774157ee", "score": "0.60206777", "text": "public function getInvoices()\n {\n \\DB::transaction(function() {\n //Select all invoices where due date is passed and status is not paid\n $invoices = \\DB::select(\"SELECT * FROM ta_invoices WHERE due_date < CURDATE() AND status_id = 1\");\n \n //Set the status of all these invoices to Overdue\n foreach($invoices as $i)\n {\n \\DB::table('ta_invoices')\n ->where('invoice_id', $i->invoice_id)\n ->update(['status_id' => '4',\n 'updated_at' => Carbon::now('Asia/Beirut')]);\n }\n });\n\n \\DB::transaction(function() {\n //Select all invoices where next payment date is passed\n $invoices = \\DB::select(\"SELECT * FROM ta_invoices WHERE next_payment <= CURDATE()\");\n\n foreach ($invoices as $i) {\n \\DB::table('ta_invoices')->insert([\n 'client_id' => $i->client_id,\n 'amount' => $i->amount, \n 'status_id' => '6',\n 'paid' => '0',\n 'hidden' => '0',\n 'created_at' => Carbon::now('Asia/Beirut')\n ]);\n\n\n \\DB::table('ta_invoices')\n ->where('invoice_id', $i->invoice_id)\n ->update(['next_payment' => NULL,\n 'updated_at' => Carbon::now('Asia/Beirut')]);\n }\n });\n\n $q = \\DB::select(\"SELECT A.invoice_id, A.client_id, A.amount, A.due_date, A.next_payment, DATE(A.created_at) as created_at, A.status_id, C.name as status, \n A.paid, B.name, B.email, C.color_code\n FROM ta_invoices as A \n JOIN ta_sources as B ON A.client_id = B.source_id \n JOIN ta_status as C ON A.status_id = C.status_id\n WHERE A.hidden = '0'\");\n\n return $q;\n }", "title": "" }, { "docid": "441ee3d8c29000d57b7030ab1b8fefd3", "score": "0.60192245", "text": "public function index()\n {\n //\n return view('invoices.index');\n }", "title": "" }, { "docid": "9c68add613718333049cdb800d37f645", "score": "0.60129714", "text": "public function index()\n {\n\n $invoices = Invoice::with(['customer', 'status', 'items', 'payments', 'histories'])->collect(['invoice_number'=> 'desc']);\n \n $customers = collect(Customer::enabled()->orderBy('name')->pluck('name', 'id'));\n\n $categories = collect(Category::enabled()->type('income')->orderBy('name')->pluck('name', 'id'));\n\n $statuses = collect(InvoiceStatus::get()->each(function($item) {\n $item->name = trans('invoices.status.' . $item->code);\n return $item;\n })->pluck('name', 'code'));\n\n return view('incomes.invoices.index', compact('invoices', 'customers', 'categories', 'statuses'));\n }", "title": "" }, { "docid": "f46efe6a432e614233d030a624c33019", "score": "0.60124946", "text": "public function getInvoice() : string\n {\n return $this->get('invoice', 'orders');\n }", "title": "" }, { "docid": "dee7e2df66aed0c68fc1f9f65270936e", "score": "0.6007205", "text": "public function findAllInvoicesFromTheUser(User $user) {\n $query = $this->createQueryBuilder('b')\n ->where('b.user = :user')\n ->setParameter('user', $user->getId())\n ->orderBy('b.invoicedate', 'ASC')\n ->getQuery();\n\n return $query->getResult();\n }", "title": "" }, { "docid": "ec002e7c4f2eca1b0c3807d5a2d42ab0", "score": "0.60018855", "text": "public function index()\n {\n if (request('start_date') && request('end_date')) {\n $invoices = auth()->user()->invoices()->whereBetween('invoice_date', [date('d-m-Y', strtotime(request('start_date'))), date('d-m-Y', strtotime(request('end_date')))])->get();\n }else{\n $invoices = auth()->user()->invoices;\n }\n return view('sales.invoices.index', compact('invoices'));\n }", "title": "" }, { "docid": "0edb6aa3a26484ea6cb3423781a340af", "score": "0.5991347", "text": "public function index()\n {\n return \\View::make(\"Backoffice.InvoiceList\");\n }", "title": "" }, { "docid": "816b7c0c7411b6b1e08fff93b914f2d6", "score": "0.59772044", "text": "public static function getInvoicesForEntry($entryId) {\r\n\t\t\t$result = ServiceProvider::getInstance()->db->fetchAll('SELECT * FROM '.ServiceProvider::getInstance()->db->prefix.'bookie_invoices WHERE `entry_id` = \\''.ServiceProvider::getInstance()->db->escape($entryId).'\\';');\r\n\t\t\t$out = array();\r\n\t\t\tforeach($result as $invoice) {\r\n\t\t\t\t$ivo = new Invoice($invoice['entry_id'], $invoice['alt_src_adr'], $invoice['alt_dst_adr'], $invoice['number'], ($invoice['pay_date'] == '0000-00-00')?null:new DateTime($invoice['pay_date']), ($invoice['reminder_date'] == '0000-00-00 00:00:00')?null:new DateTime($invoice['reminder_date']), $invoice['dunnings']);\r\n\t\t\t\t$ivo->setId($invoice['id']);\r\n\t\t\t\t$out[] = $ivo;\r\n\t\t\t}\r\n\t\t\treturn $out;\r\n\t\t}", "title": "" }, { "docid": "d76a984ef2686a894d6d143e8bc2fd01", "score": "0.5965425", "text": "public function invoice();", "title": "" }, { "docid": "5fa464e2d07ac607a488d39a4c2a2452", "score": "0.5960539", "text": "public function getGatewayInvoice();", "title": "" }, { "docid": "75358f6e88555d09bc7acef29d107aed", "score": "0.5944791", "text": "public function index (Request $request)\n {\n $invoices = []; // $this->fortie->invoices()->all();\n \n return response()->json([\n 'status' => 200,\n 'data' => $invoices,\n 'heading' => 'Invoices',\n 'messages' => null\n ], 200);\n }", "title": "" }, { "docid": "3bd47be531977cd3e25c6c002abe515b", "score": "0.5943803", "text": "public function getInvoice()\n {\n return $this->_coreRegistry->registry('current_invoice');\n }", "title": "" }, { "docid": "9d6f50f4f6b24245a38d5a0da29eaeb4", "score": "0.59315467", "text": "public function invoices($criteria = null): InvoiceQuery\n {\n $query = Invoice::find();\n if ($criteria) {\n Craft::configure($query, $criteria);\n }\n return $query;\n }", "title": "" }, { "docid": "8d0106889f7bfe7679f8d25032239892", "score": "0.59287447", "text": "public function list(Request $request)\n {\n try {\n\n if(!check_access(['A_VIEW_INVOICE_LISTING'], true)){\n throw new Exception(\"Invalid request\", 400);\n }\n\n $list = new InvoiceCollection(InvoiceModel::select('*')\n ->orderBy('created_at', 'desc')->paginate());\n\n return response()->json($this->generate_response(\n array(\n \"message\" => \"Invoices loaded successfully\", \n \"data\" => $list\n ), 'SUCCESS'\n ));\n\n }catch(Exception $e){\n return response()->json($this->generate_response(\n array(\n \"message\" => $e->getMessage(),\n \"status_code\" => $e->getCode()\n )\n ));\n }\n }", "title": "" }, { "docid": "b63f755318070384bc098d108ad7f296", "score": "0.5926587", "text": "public function searchInvoice()\n {\n $input = Request::all();\n // $validator = Validator::make($input, ['invoice_id' => 'required']);\n // if ($validator->fails()) {\n // return ApiResponse::validation($validator);\n // }\n\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n $invoices = $this->invoiceService->getFilteredInvoice($input);\n\n if (!$limit) {\n $invoices = $invoices->get();\n\n return ApiResponse::success($this->response->collection($invoices, new JobInvoiceTransformer));\n }\n $invoices = $invoices->paginate($limit);\n\n return ApiResponse::success($this->response->paginatedCollection($invoices, new JobInvoiceTransformer));\n }", "title": "" }, { "docid": "db3449eb60b061b3005d5bef9e75176a", "score": "0.59189373", "text": "public function get_all_invoices($table, $where, $per_page, $page, $order = 'order_created', $order_method = 'DESC')\n\t{\n\t\t//retrieve all orders\n\t\t$this->db->from($table);\n\t\t$this->db->select('orders.*, orders.order_status_id AS status,customer.customer_first_name AS first_name, customer.customer_surname AS other_names, order_status.order_status_name');\n\t\t$this->db->where($where);\n\t\t$this->db->order_by('orders.order_created, orders.order_number');\n\t\t$query = $this->db->get('', $per_page, $page);\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "c1ca5fb327c3df704fe3c500eccc0b8b", "score": "0.59171313", "text": "public function items()\n {\n return $this->hasMany('InvoiceItem');\n }", "title": "" }, { "docid": "d51e1595d6c2564948a7e081f1705a9a", "score": "0.5911542", "text": "public function index()\n {\n $view = view('point-purchasing::app.purchasing.point.inventory.invoice.index');\n $list_invoice = Invoice::joinFormulir()->joinSupplier()->notArchived()->selectOriginal();\n\n $list_invoice = InvoiceHelper::searchList($list_invoice, \\Input::get('order_by'), \\Input::get('order_type'), \\Input::get('status'), \\Input::get('date_from'), \\Input::get('date_to'), \\Input::get('search'));\n $view->list_invoice = $list_invoice->paginate(100);\n \n $array_invoice_id = [];\n $view->array_invoice_id = $array_invoice_id;\n return $view;\n }", "title": "" }, { "docid": "f41205d925b4200472d8f184ab59d652", "score": "0.58831733", "text": "public function transactions()\n {\n $transactionIds = [];\n foreach ($this->invoices as $invoice) {\n foreach ($invoice->transactions()->get() as $transaction) {\n $transactionIds[] = $transaction->id;\n }\n }\n return Transaction::whereIn('id', $transactionIds);\n }", "title": "" }, { "docid": "bbaa59fcc8cee0a810ab301c3b1056fd", "score": "0.58824897", "text": "public function index()\n {\n $website = app(\\Hyn\\Tenancy\\Environment::class)->tenant();\n $invoices = $website->invoicesIncludingPending();\n \n return view('home')->with( ['invoices' => $invoices ] );\n }", "title": "" }, { "docid": "7debd545fb6c7eb3ce8b589e7778e79b", "score": "0.58820647", "text": "public function index()\n {\n list($period_start, $period_end) = Task::getThisMonth();\n\n $staff_array = Task::getStaffArray($period_start, $period_end);\n $invoices = Invoice::getInvoiceArray($staff_array, $period_start, $period_end);\n\n $scope = Task::getScope($period_end);\n\n return view('invoices.index', [\n 'invoices' => $invoices,\n 'scope' => $scope,\n ]);\n }", "title": "" }, { "docid": "2c5fb21810c571d87994b10ce7e0f809", "score": "0.58765453", "text": "public function index(Request $request)\n\t{\n\t\t$clients = Client::with('invoice')->get();\n\t\treturn view('invoice.index', compact('clients'));\t\t\n\t}", "title": "" }, { "docid": "632c3d046305017af07b62746a8d62c1", "score": "0.58740866", "text": "public function read($custid = null) {\n if(isset($_REQUEST['sort']) && !empty($_REQUEST['sort'])) {\n $sortby = filter_var($_REQUEST['sort'], FILTER_SANITIZE_STRING);\n $desc = (isset($_REQUEST['desc'])) ? 'Desc' : '';\n } else {\n $sortby = 'invdt';\n $desc = 'Desc';\n }\n\n if(isset($custid)) { //grab customer's invoices\n $user = Auth::user()\n ->with('customer.invoice')\n ->get();\n foreach($user[0]->customer as $cust)\n if($cust->id == $custid)\n $invoices = $cust->invoice;\n if(isset($invoices))\n $invoices = call_user_func(array($invoices, 'sortBy'.$desc), $sortby); //sort\n else\n return response('No invoices for this customer', 404);\n } else { //grab all customers' invoices\n $user = Auth::user()\n ->with('customer.invoices')\n ->get();\n $invoices = new Collection();\n foreach($user[0]->customer as $cust) {\n $invoices = $cust->invoice;\n //sort\n $invoices = call_user_func(array($invoices, 'sortBy'.$desc), $sortby);\n $invoices->push($invoices);\n }\n if($invoices->isEmpty())\n return response('There are no invoices.', 404);\n }\n\n //paginate\n $total = count($invoices->flatten());\n $currentPage = (isset($_REQUEST['page']) && preg_match('/\\d+/', $_REQUEST['page'])) ? $_REQUEST['page'] : 1;\n $perPage = 5;\n $max = ceil($total / $perPage);\n if($currentPage > $max)\n $currentPage = $max;\n $offset = ($currentPage * $perPage) - $perPage;\n $invoices = new LengthAwarePaginator(array_slice($invoices->toArray(), $offset, $perPage), $total, $perPage, $currentPage);\n\n return $invoices;\n }", "title": "" }, { "docid": "538631f3e43b6598a3e41381e15f3413", "score": "0.5873468", "text": "public function invoice()\n {\n return $this->hasOne(Invoice::class);\n }", "title": "" }, { "docid": "50234827853144b207c0f78990214dc6", "score": "0.5866139", "text": "public function index()\n\t{\n\t\t$invoice = new Invoice;\n\t\t$data['outstanding_rows'] = $invoice::whereNested(function($query){\n\t\t\t$query->where('users.id', '=', Auth::user()->id);\n\t\t\t$query->where('invoices.is_paid', '=', 0);\n\t\t})\n\t\t->join('clients', 'clients.id', '=', 'invoices.client_id')\n\t\t->join('users', 'users.id', '=', 'clients.user_id')\n\t\t->select(\n\t\t\t\"clients.name as client_name\", \n\t\t\tDB::raw(\"DATE_FORMAT(invoices.date_sent, '%m/%d/%Y') as 'sent_on'\"),\n\t\t\tDB::raw(\"DATEDIFF(CURDATE(), invoices.date_sent) as 'days_passed'\"),\n\t\t\tDB::raw(\"CONCAT('$', FORMAT(invoices.amount, 2)) as 'amount'\"),\n\t\t\t\"invoices.file_url\",\n\t\t\t\"invoices.id\"\n\t\t\t)\n\t\t->get();\n\n\t\t$this->layout->content = View::make('dashboard.index', $data);\n\t}", "title": "" }, { "docid": "c9ad51feebbcdd644b629abb30970b98", "score": "0.58607507", "text": "public function newInvoice()\n {\n return new Invoice();\n }", "title": "" }, { "docid": "33535330847f8e0240c05e9f069f02fa", "score": "0.5854229", "text": "public function invoice()\n {\n return $this->belongsTo(Invoice::class);\n }", "title": "" }, { "docid": "33535330847f8e0240c05e9f069f02fa", "score": "0.5854229", "text": "public function invoice()\n {\n return $this->belongsTo(Invoice::class);\n }", "title": "" }, { "docid": "7c5033f80581265650e5d839bfa286d6", "score": "0.5848457", "text": "public function invoiceLineItems()\n {\n return $this->hasMany(InvoiceLineItem::class);\n }", "title": "" }, { "docid": "e5c6d2b2f3de85bf5f34b8e6965aca3a", "score": "0.5817096", "text": "public function getInvoicesByDate($from, $to)\n {\n return $this->_processInvoiceQueryResponse(\n $this->_createInvoiceQuery(null, null, array('from' => $from, 'to' => $to))\n );\n }", "title": "" }, { "docid": "841b99df355d7969aebbd70f8c3e813b", "score": "0.58158785", "text": "public function GetInvoiceItems(Request $request, $invoice_id){\n $returnModel = ReturnModel::Instance();\n $status = $request->input('status', '');\n\n $getResult = InvoiceItemLogic::Instance()->GetInvoiceItemsForInvoice($invoice_id, $status);\n\n $returnModel->status = \"200\";\n $returnModel->data = $getResult;\n return json_encode($returnModel);\n }", "title": "" } ]
1204cb18091a1569421fe70d312eb412
Returns this context's root logger which, if not null and if the context requires default loggers, will be added to the context logger's tree.
[ { "docid": "6e476f0c4ba754a5422847287eb782f3", "score": "0.7555973", "text": "public final function getRootLogger() {\n\t\treturn $this->getOwner()->getRootLogger();\n\t}", "title": "" } ]
[ { "docid": "725d065dc274237e23365f3af4b6ac82", "score": "0.709067", "text": "function &getRoot()\r\n {\r\n return LoggerManager::getRootLogger();\r\n }", "title": "" }, { "docid": "71b5372b9ea010847ff91406445c2b04", "score": "0.67476624", "text": "public static function getLogger()\n {\n if (self::$logger === null)\n {\n try\n {\n $result = Hook::execute(\n \"Wedeto.Util.GetLogger\", \n [\"logger\" => null, \"class\" => static::class]\n );\n }\n catch (RecursionException $e)\n {\n // Apparently the hook is calling getLogger which is failing, so\n // use an emergency logger to log anyway.\n $result = ['logger' => new EmergencyLogger];\n }\n\n self::$logger = $result['logger'] ?? new NullLogger();\n }\n return self::$logger;\n }", "title": "" }, { "docid": "ad04e6a5f566cb220118c010a4af3fb6", "score": "0.66365284", "text": "protected function getLogger() {\n if (is_null($this->logger)) {\n $this->logger = Logger::getLogger('leave.LeaveEntitlementDao');\n }\n\n return($this->logger);\n }", "title": "" }, { "docid": "dd1760a046f0dda3950b34bbb701eb44", "score": "0.66324353", "text": "public function getLogger()\n {\n if ($this->logger) {\n return $this->logger;\n }\n $this->setLogger( NullLogger::getInstance() );\n return $this->logger;\n }", "title": "" }, { "docid": "550129c5139d4ae11587876da3718e75", "score": "0.6492552", "text": "public function getLogger()\n {\n return $this->_logger;\n }", "title": "" }, { "docid": "83de97266ad4ef72f13c13325a0f9f5e", "score": "0.64791137", "text": "public function getLogger() {\n return $this->logger;\n }", "title": "" }, { "docid": "1152659bd9a3a2e927db6f03543dfd8f", "score": "0.6475284", "text": "public function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "1152659bd9a3a2e927db6f03543dfd8f", "score": "0.6475284", "text": "public function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "1152659bd9a3a2e927db6f03543dfd8f", "score": "0.6475284", "text": "public function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "1152659bd9a3a2e927db6f03543dfd8f", "score": "0.6475284", "text": "public function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "6eb334dffe0a80e13fea97f1de2446b8", "score": "0.6473984", "text": "protected function getLogger()\n {\n return $this->_logger;\n }", "title": "" }, { "docid": "1ae4cf1173c6f10def14d4ba802101a4", "score": "0.6473463", "text": "protected function getLogger() {\r\n return $this->_logger;\r\n }", "title": "" }, { "docid": "d43aa15f0e68472a4d7fe44c549d42e9", "score": "0.6452", "text": "public function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "d53155cdbaaf84045c6167214f810f65", "score": "0.6448509", "text": "public function getLoggerManager() {\n return $this->logger;\n }", "title": "" }, { "docid": "fb59a5170c7d9971066219c0d7fed717", "score": "0.6447438", "text": "protected function getLogger()\n {\n return $this->logger;\n }", "title": "" }, { "docid": "340932e1b5585a1976b8e95b74346b17", "score": "0.64432395", "text": "public function getLogger()\r\n\t{\r\n\t\treturn $this->logger;\r\n\t}", "title": "" }, { "docid": "bb1f784fa439615702a00253370347f4", "score": "0.6407073", "text": "public static function getLogger()\n {\n return self::$logger ?: self::$logger = self::createDefaultLogger();\n }", "title": "" }, { "docid": "29966c9fc5fd422c7eb46f86d9521ef7", "score": "0.63750255", "text": "public function getLogger()\n\t{\n\t\treturn $this->logger;\n\t}", "title": "" }, { "docid": "13503782860a7bc045d2f1e762d23ccc", "score": "0.63363445", "text": "function getDefaultHierarchy()\r\n {\r\n return LoggerManager::getLoggerRepository();\r\n }", "title": "" }, { "docid": "4fc723bb87ac6642bef57ebe259687a4", "score": "0.63299876", "text": "public function getLoggerNew() {\n if (is_null($this->concreteLogger)) {\n return $this->nullLogger;\n } else {\n return $this->concreteLogger;\n }\n }", "title": "" }, { "docid": "44b392a0ba6dc9d32d8a29a837ebb5cf", "score": "0.63213116", "text": "public function getLogger() {\n return $this->container[self::LOGGER];\n }", "title": "" }, { "docid": "ae1d5ee89a9ceeb588ded5c37ea54943", "score": "0.62901026", "text": "public function logger() : ?LoggerInterface\n {\n return $this->logger;\n }", "title": "" }, { "docid": "8a60226c6008f871e90a7116ea833f75", "score": "0.6281699", "text": "public static function getLogger()\n {\n return self::$logger;\n }", "title": "" }, { "docid": "bd5faacb048aafa1d583026293a22ad3", "score": "0.62582785", "text": "public function getLogger()\n {\n if ($this->_logger === null) {\n $engine = Log::engine('elasticsearch') ?: Log::engine('debug');\n\n if (!$engine) {\n $engine = new ElasticaLog;\n }\n\n $this->setLogger($engine);\n }\n\n return $this->_logger;\n }", "title": "" }, { "docid": "971ae31d291eb4bdca4dd5b33c0df36b", "score": "0.6251725", "text": "public function getLogger()\n {\n return logger();\n }", "title": "" }, { "docid": "920afb9ac38edff40227f8d25a636b6e", "score": "0.62507504", "text": "public function logger()\n\t\t\t{\n\t\t\t\treturn $this->logger;\n\t\t\t}", "title": "" }, { "docid": "ce9feb9d4140c77d1719862782a1840c", "score": "0.62502784", "text": "private static function getLogger() {\n if (is_null(self::$logger))\n self::$logger = new Log();\n return self::$logger;\n }", "title": "" }, { "docid": "7eec27b89e120144b97c8ead64e4a9db", "score": "0.6245992", "text": "public function getLogger()\n {\n if (!$this->logger) {\n // See testGetLoggerRunFromStdin\n // @codeCoverageIgnoreStart\n $stderr = defined('\\STDERR') && !is_null(\\STDERR)\n ? \\STDERR : fopen('php://stderr', 'w');\n // @codeCoverageIgnoreEnd\n $handler = new StreamHandler($stderr, Logger::DEBUG);\n $handler->setFormatter(new LineFormatter(\"%datetime% %level_name% %message% %context%\\n\"));\n $this->logger = new Logger(get_class($this));\n $this->logger->pushHandler($handler);\n }\n return $this->logger;\n }", "title": "" }, { "docid": "caca0475ee2814dffb1ec4a159183652", "score": "0.62083757", "text": "public static function logger(): ?LoggerInterface\n {\n return self::$logger;\n }", "title": "" }, { "docid": "683ba0fde79cd4f290a69630644f4679", "score": "0.6118031", "text": "public static function getLogger() {\n return static::$instance->get('logger');\n }", "title": "" }, { "docid": "a07099a5af3424bb69346143c4a7ea07", "score": "0.6115361", "text": "protected function getLogger()\n {\n $logger = parent::getLogger();\n $logger->popHandler();\n return $logger;\n }", "title": "" }, { "docid": "9082a2da2f497c8150413ebbe67ef26c", "score": "0.6114636", "text": "public function getMonolog()\n {\n return $this->get('logger');\n }", "title": "" }, { "docid": "e6dbe8916ec488954235cdb9ebf58cec", "score": "0.6100655", "text": "public static function logger()\n {\n return static::$logger;\n }", "title": "" }, { "docid": "f68f58a2b749922c4cb19778a2bc1102", "score": "0.6095742", "text": "public function getLogger() {\n return $this->logger ?: \\Drupal::logger('search_api');\n }", "title": "" }, { "docid": "f8d454d5f67e2e96d5edffb7d9c25bf3", "score": "0.60528976", "text": "public static function getLogger()\n {\n if (self::$logger) {\n return self::$logger;\n }\n\n /**\n * @var \\Phalcon\\Di $di\n */\n $di = Di::getDefault();\n $logger = $di->has('logger') ? $di->get('logger') : new \\Phalcon\\Logger\\Adapter\\Syslog(null);\n\n self::$logger = $logger;\n return $logger;\n }", "title": "" }, { "docid": "9d56a18cfcc48cdcd26fcc48b3314070", "score": "0.60491186", "text": "public function getLogger()\n\t{\n\t\t$container = \\Phrank\\Base\\Container::getInstance();\n\t\treturn $container['logger'];\n\t}", "title": "" }, { "docid": "54d2fcf49025f80e96a54a4582ae9793", "score": "0.6018221", "text": "public function getLogger(): ?LoggerInterface\n {\n return $this->logger;\n }", "title": "" }, { "docid": "298d647dc038afe12b2964ec06669b45", "score": "0.6011501", "text": "protected function log() {\n return $this->logger;\n }", "title": "" }, { "docid": "c09b008340e2fa839fa1c3fcc36c240d", "score": "0.5982144", "text": "public function getLogger() : LoggerInterface\n {\n return $this->logger;\n }", "title": "" }, { "docid": "e51896990a90f858b9c31ab0fab116cd", "score": "0.59418166", "text": "protected function _getLogger()\n {\n \treturn $this->_logger;\n }", "title": "" }, { "docid": "d4f5614489af2112a51880c479e49e65", "score": "0.5922911", "text": "public function getLog()\n {\n if($this->app->exists(LoggerInterface::class)) {\n return $this->app->get(LoggerInterface::class);\n }\n $var_dir = $this->vars_dir . '/log/app.log';\n $logger = new Logger('log');\n $logger->pushHandler(\n new FingersCrossedHandler(new StreamHandler($var_dir, Logger::DEBUG))\n );\n $this->app->set(LoggerInterface::class, $logger, true);\n return $logger;\n }", "title": "" }, { "docid": "ec2bfa097f76c476179b9aad3783712f", "score": "0.5917599", "text": "public function getInstance()\n\t{\n\t\treturn $this->logger;\n\t}", "title": "" }, { "docid": "7d6df61d099d17ac94ab6f51d95d0c58", "score": "0.58488536", "text": "public function getLogger()\n\t{\n\t\treturn Mage::helper('solr/logger');\n\t}", "title": "" }, { "docid": "1e94b6ef883b89635055a7fd396b379c", "score": "0.58334804", "text": "public function getLogger(): LoggerInterface\n {\n return $this->logger;\n }", "title": "" }, { "docid": "a4d194887346203e28498e630f73609a", "score": "0.57900053", "text": "private function getLogger()\n {\n $app = $this->getContainer();\n\n return $app['audit.logger'];\n }", "title": "" }, { "docid": "2373089a585dc32a781d852568d65f9e", "score": "0.5741048", "text": "private static function createDefaultLogger()\n {\n $log = new Logger('EasyOpenWeChat');\n\n if (defined('PHPUNIT_RUNNING')) {\n $log->pushHandler(new NullHandler());\n } else {\n $log->pushHandler(new ErrorLogHandler());\n }\n\n return $log;\n }", "title": "" }, { "docid": "156b406cfc45e67ddffb724696427c09", "score": "0.57383996", "text": "public static function getLogger(): logger\n {\n static $logger = null;\n if ($logger === null) {\n $classType = self::get('log', 'class');\n $logger = new $classType;\n }\n return $logger;\n }", "title": "" }, { "docid": "0167614d8e32cdfc67ff893ce1bba862", "score": "0.56946117", "text": "public function getLoggingConfig()\n {\n return $this->logging_config;\n }", "title": "" }, { "docid": "d6798fd31437ae2d7b8674de757ded55", "score": "0.5680582", "text": "public function getMonolog(): MonologLogger\n {\n if ($this->monolog === null) {\n $this->monolog = $this->setupMonolog();\n }\n\n return $this->monolog;\n }", "title": "" }, { "docid": "60cf5913e1336cd1f57d85e00e6467ab", "score": "0.5669622", "text": "public function loggerFactory()\n\t{\n\t\tif(!isset($this->_loggerFactory))\n\t\t{\n\t\t\t$this->_loggerFactory = new Ergo_Logging_DefaultLoggerFactory();\n\t\t}\n\n\t\treturn $this->_loggerFactory;\n\t}", "title": "" }, { "docid": "8b3d61d49fdf4936808c3ab132c9a919", "score": "0.5663041", "text": "public function logger()\n {\n $config = $this->config();\n $logger = Mage::getModel('kash_gateway/logger', array($config->x_shop_name));\n return $logger;\n }", "title": "" }, { "docid": "7f1d8c2b0942eaf3d72e21a116196f1d", "score": "0.5661036", "text": "protected function _getLoggerInstance()\n {\n return MyProject_Registry::getInstance()->registry('log');\n }", "title": "" }, { "docid": "2e5c83eb682b6208998ae5b0a510655b", "score": "0.56583405", "text": "protected function initBillerfoxLog()\n {\n if (!$this->logger) {\n $this->logger = new Logger('flexcharge');\n $this->logger->pushHandler(new StreamHandler($this->rootDirectory.'/logs/flexcharge.log', Logger::INFO));\n }\n\n return $this->logger;\n }", "title": "" }, { "docid": "3419083066cf94c405b40373b09d987e", "score": "0.5657765", "text": "protected function getLoggerService()\n {\n $this->services['logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->pushHandler($this->get('monolog.handler.firephp'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n $instance->pushHandler($this->get('monolog.handler.debug'));\n\n return $instance;\n }", "title": "" }, { "docid": "57324f171e31b31359750adef04512f0", "score": "0.5598142", "text": "public static function getLogger() {\r\n\t\tif (Zend_Registry::isRegistered ( 'logger' )) {\r\n\t\t\t$logger = Zend_Registry::get ( 'logger' );\r\n\t\t\treturn $logger;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "737e353af1e5994aa5bff8262c448398", "score": "0.5597059", "text": "public function logger(Logger $logger = null)\n {\n if(null === $logger)\n {\n return $this->child('logger');\n }\n return $this->child('logger', $logger);\n }", "title": "" }, { "docid": "713423321b89e3906a05a493d8ca1f8c", "score": "0.5582936", "text": "public function getSystemLogger();", "title": "" }, { "docid": "b2a8168b4efd8c6e56abc2b3b470e19f", "score": "0.5578617", "text": "protected function getLoggerService()\n {\n $this->services['logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }", "title": "" }, { "docid": "09cc1de703a79018d355936b93183a01", "score": "0.5575271", "text": "public function getLoggerClass()\n {\n return $this->logger_class;\n }", "title": "" }, { "docid": "4573dec70f7fe9f9d0b580d2e5a174bb", "score": "0.556323", "text": "function &getHierarchy()\r\n {\r\n return $this->getLoggerRepository();\r\n }", "title": "" }, { "docid": "50240d21cbad3a9d95236e308c30a06d", "score": "0.55363727", "text": "public static function getLogger()\n {\n if (!self::$logHandlers) {\n $logPath = Config::get('log.log_file') ?: dirname(dirname(dirname(__DIR__))) . '/logs/swoole.log';\n $logPrefix = Config::get('log.log_prefix') ?: self::DEFAULT_LOG_NAME ;\n $logHandler = new RotatingFileHandler($logPath, 0, self::getLevel(Config::get('log.log_level')));\n return new Logger($logPrefix, [$logHandler]);\n }\n return new Logger(self::DEFAULT_LOG_NAME, self::$logHandlers);\n }", "title": "" }, { "docid": "9d7bbe20f3c0c1e66b80cbaaa8521291", "score": "0.5478227", "text": "public function getLogger(\n \t$logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getContainer()->getLogger();\n }", "title": "" }, { "docid": "1bca0faaa4cfbb778c3f319cb16155c1", "score": "0.5425704", "text": "static public function getLogger(): \\Monolog\\Logger\n {\n $me = self::getInstance();\n return $me->logger;\n }", "title": "" }, { "docid": "bc094bcab0deac78379f92441b993bbe", "score": "0.5416737", "text": "public static function getMonologConfigurator(){\n return \\Illuminate\\Foundation\\Application::getMonologConfigurator();\n }", "title": "" }, { "docid": "3bc70d022c62b1f0d80d5026221e0da6", "score": "0.5413816", "text": "protected function _getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n \treturn $this->getLogger();\n }", "title": "" }, { "docid": "898dc37bbc0ba15f1cb5072889fe0bd6", "score": "0.5396587", "text": "public function logger($name = null)\n\t{\n\t\t$name = $name ?: $this->getDefaultLog();\n\n\t\t// If the given driver has not been created before, we will create the instances\n\t\t// here and cache it so we can return it next time very quickly. If there is\n\t\t// already a driver created by this name, we'll just return that instance.\n\t\tif (! isset($this->loggers[$name]))\n\t\t{\n\t\t\t$this->loggers[$name] = $this->createLog($name);\n\t\t}\n\n\t\treturn $this->loggers[$name];\n\t}", "title": "" }, { "docid": "69cb3d8fbeed01f42cddae03d8e73aca", "score": "0.5371356", "text": "function &getLog()\r\n\t{\r\n\t\t$logger =& Logger::getLogger('stratus.servlets.DefaultServlet');\r\n\t\treturn $logger;\r\n\t}", "title": "" }, { "docid": "d923da77f43400f5d18ca5c7dc391ecd", "score": "0.536908", "text": "public function logger($instance = null)\n {\n if ($instance === null) {\n return $this->_logger;\n }\n\n return $this->_logger = $instance;\n }", "title": "" }, { "docid": "6e06e706cf3506ef02000d58eaa78d4b", "score": "0.5358564", "text": "public function getLogger();", "title": "" }, { "docid": "dbd3ba39da1cd950a61e4f5443270bca", "score": "0.5303944", "text": "public function getEsLogger()\n {\n if ($this->_esLogger === null) {\n $this->_esLogger = new ElasticLogger($this->getLogger(), $this);\n }\n\n return $this->_esLogger;\n }", "title": "" }, { "docid": "76ca0c8073654c6824985a205f6993ce", "score": "0.5301404", "text": "public final function requiresDefaultLoggers() {\n\t\t$requiresDefaultLoggers = ($this->getOwner() === $this->manager);\n\t\tif ($requiresDefaultLoggers) {\n\t\t\t$this->getOwner()->ensureLogManagerInitialized();\n\t\t}\n\t\treturn $requiresDefaultLoggers;\n\t}", "title": "" }, { "docid": "0e13d8138d501d0f0b43b940a5819528", "score": "0.5300358", "text": "public function getLogger(?string $name = null): LoggerInterface\n {\n if ($name === null) {\n $name = 'defaultLogger';\n }\n\n if (!isset($this->loggers[$name])) {\n $this->loggers[$name] = $this->buildLogger($name);\n }\n\n return $this->loggers[$name];\n }", "title": "" }, { "docid": "32410500b47f16d14d78de5ec87ec9a8", "score": "0.5298954", "text": "private function ensureDefaultLogger(Logger $logger = null) {\n\t\t// This check is simple sanity. We do not want that this method be called for anything else\n\t\t// than owner.rootLogger().\n\t\tif (!$this->requiresDefaultLoggers() || $logger == null ||\n\t\t\t $logger != $this->getOwner()->getRootLogger()) {\n\t\t\t// The case where we have a non-null logger which is not manager.rootLogger indicates a\n\t\t\t// serious issue - as ensureDefaultLogger should never be called with any other loggers\n\t\t\t// than this one (or null if manager.rootLogger is not yet initialized).\n\t\t\tassert( $logger == null );\n\t\t\treturn;\n\t\t}\n\t\t// Adds the logger if it is not already there.\n\t\tif (!$this->namedLoggers->containsKey( $logger->getName() )) {\n\t\t\t// It is important to prevent addLocalLogger() to call ensureDefaultLoggers() when we're\n\t\t\t// in the process of adding one of those default loggers as this would immediately cause\n\t\t\t// a stack overflow. Therefore we must pass addDefaultLoggersIfNeeded - false even if\n\t\t\t// requiresDefaultLoggers() is true.\n\t\t\t$this->addLocalLogger( $logger, false );\n\t\t}\n\t}", "title": "" }, { "docid": "52938b77dff77c187c06fe405048b7ad", "score": "0.52945006", "text": "public function getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n\t{\n\t return $this->_getLogger($logType);\n\t}", "title": "" }, { "docid": "2b06350c0e8d9c3566a79060f4ca200e", "score": "0.52665436", "text": "protected function getLoggerService()\n {\n $class = $this->getParameter('logger.class');\n $instance = new $class($this);\n\n return $instance;\n }", "title": "" }, { "docid": "28c243da196b9b464dc02928a96f2d14", "score": "0.524888", "text": "public function getLoggingOperation()\n {\n if (is_null($this->loggingOperation)) {\n $this->setLoggingOperation(new TextualLogger());\n }\n \n return $this->loggingOperation;\n }", "title": "" }, { "docid": "044cba87931050b74766264476ee8788", "score": "0.52336687", "text": "protected function getMonolog_LoggerService()\n {\n $this->privates['monolog.logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->useMicrosecondTimestamps(true);\n $instance->pushHandler(($this->privates['monolog.handler.main'] ?? $this->getMonolog_Handler_MainService()));\n\n return $instance;\n }", "title": "" }, { "docid": "0c81c75ca5f8d0910f41f526b2088680", "score": "0.5233626", "text": "function getCurrentCategories()\r\n {\r\n return LoggerManager::getCurrentLoggers();\r\n }", "title": "" }, { "docid": "3853df9f0bb725592ade7fe6d6ab2c40", "score": "0.5219204", "text": "protected function withDebugLogger()\n {\n $logger = new DebugLogger();\n Logger::set($logger);\n return $logger;\n }", "title": "" }, { "docid": "68d3edb3b3249237b2970b76727da032", "score": "0.52180564", "text": "public function getLogDir()\n {\n return $this->_logDir;\n }", "title": "" }, { "docid": "e7e05c08da8dcb8126f20b42c37e485e", "score": "0.5217041", "text": "private function setupMonolog(): MonologLogger\n {\n $monolog = new MonologLogger($this->channelName);\n $handler = new ErrorLogHandler(\n ErrorLogHandler::OPERATING_SYSTEM,\n $this->logLevel,\n true\n );\n $formatter = new LineFormatter($this->logFormat, null);\n $formatter->includeStacktraces();\n $handler->setFormatter($formatter);\n $monolog->pushHandler($handler);\n\n return $monolog;\n }", "title": "" }, { "docid": "4aa361d1306b146f80a0467ce9c4b12b", "score": "0.5216735", "text": "public function TaskLogManager()\n\t{\n\t\treturn $this->taskLogManager;\n\t}", "title": "" }, { "docid": "68cce690be0fb6026ea881038d5bb284", "score": "0.5216188", "text": "protected function getMonologHandler()\n {\n return (new RotatingFileHandler(storage_path('logs/wordpress.log'), 5, Logger::DEBUG))\n ->setFormatter(new LineFormatter(null, null, true, true));\n }", "title": "" }, { "docid": "2e6a1f094f8b23d0a60d32cbb545e6e2", "score": "0.51986355", "text": "protected function initMessagesLog()\n {\n if (!$this->log) {\n $this->log = new Logger('messages');\n $this->log->pushHandler(new StreamHandler($this->rootDir.'/logs/clickatell.log', Logger::INFO));\n }\n\n return $this->log;\n }", "title": "" }, { "docid": "089e5bee5c6ebbd6dca5c9527ac59f3c", "score": "0.5192196", "text": "public function getRoot()\n {\n return (null !== $this->parent) ? $this->parent->getRoot() : $this;\n }", "title": "" }, { "docid": "d0a0602306e729c899cef20e290c5b1f", "score": "0.5189293", "text": "public function getLog() {\n return $this->get('log');\n }", "title": "" }, { "docid": "361f2613758a553ceb6f8353312a1eb7", "score": "0.51887", "text": "protected function _getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n\t\treturn $this->getApp()->getLogger($logType);\n }", "title": "" }, { "docid": "cced61f9a9c41525f395723c048e9cbb", "score": "0.5184404", "text": "public static function getLogger(): LoggerInterface\n {\n $prefix = str_replace(array('.json', '.dist'), '', getenv('BARTLETTRC'));\n return self::getContainer()->get($prefix . '.logger');\n }", "title": "" }, { "docid": "465277fddef3c274180a244597ccfb5b", "score": "0.51818", "text": "public static function getInstance()\n {\n return new LoggerBuilder();\n }", "title": "" }, { "docid": "3cf36da20a4016211b80aa65013b90c7", "score": "0.51751035", "text": "protected final function getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n return $this->getLogger($logType);\n\t}", "title": "" }, { "docid": "02d231b07ee0c9cd5e79274860d82306", "score": "0.5174844", "text": "public function getLogger(): \\Yana\\Log\\IsLogHandler;", "title": "" }, { "docid": "deb2ff751e3cc26cbbeff18d09f4f319", "score": "0.5157383", "text": "protected final function _getLogger(\n $logType = TechDivision_Logger_System::LOG_TYPE_SYSTEM)\n {\n\t\treturn $this->getApp()->getLogger($logType);\n\t}", "title": "" }, { "docid": "b51ba90069cda9a3174233fc19ab40c5", "score": "0.51505995", "text": "protected static function initLogger ()\n\t{\n\t\tif (!self::$logger)\n\t\t{\n\t\t\t$user = User::instance();\n\t\t\t$username = $user->isLogged() ? $user->getName() : '[not logged in]';\n\t\t\t$remoteAddr = ($_SERVER['REMOTE_ADDR'] != '::1')\n\t\t\t\t\t? $_SERVER['REMOTE_ADDR'] : '[localhost]';\n\t\t\t$remoteHost = isset($_SERVER['REMOTE_HOST'])\n\t\t\t\t\t? $_SERVER['REMOTE_ADDR'] : '[no lookup]';\n\t\t\tself::$logger = Logger::create(Config::get('paths', 'log'))\n\t\t\t\t->setMaxFileSize(2097152)\t// 2 * 1024 * 1024\n\t\t\t\t->setMaxFileCount(5)\n\t\t\t\t->setEntrySeparator(\"\\n\\n\")\n\t\t\t\t->setLineSeparator(\"\\n\")\n\t\t\t\t->setDatetimeFormat('Y-m-d H:i:s')\n\t\t\t\t->setHeader(\"User \" . $username . \", IP \" . $remoteAddr . \", host \" . $remoteHost . \", request \" . self::$request);\n\t\t}\n\t}", "title": "" }, { "docid": "07051edfe03eae5b3d7135c60afcd63c", "score": "0.5146117", "text": "private function getLogger(string $log_dir = null): LoggerInterface\n {\n if (!$log_dir) {\n return new NullLogger();\n }\n\n $logger = new Logger(self::NAME);\n $handler = new StreamHandler($log_dir);\n $handler->setFormatter(new ColoredLineFormatter());\n $logger->pushHandler($handler);\n $logger->pushProcessor(new PsrLogMessageProcessor());\n return $logger;\n }", "title": "" }, { "docid": "498f05326d8bb081c897c09a14b1d5ab", "score": "0.51454914", "text": "public function getLogPath() {\n if (! $this->id) {\n // no id, no specific logger to write to\n return null;\n }\n\n $storageConfig = Config::get('app.storage');\n $globalLogPath = array_key_exists('logs', $storageConfig) ? $storageConfig['logs']['path'] : null;\n if (!$globalLogPath) {\n return null;\n }\n\n return rtrim($globalLogPath, '/') . \"/tasks/$this->id.log\";\n }", "title": "" }, { "docid": "fa80c79fae1c7ee0c880503f37417fb8", "score": "0.5141882", "text": "protected function getMonolog_LoggerService()\n {\n $this->privates['monolog.logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->useMicrosecondTimestamps(true);\n $instance->pushHandler(($this->privates['monolog.handler.console'] ?? ($this->privates['monolog.handler.console'] = new \\Symfony\\Bridge\\Monolog\\Handler\\ConsoleHandler(NULL, true, array()))));\n $instance->pushHandler(($this->privates['monolog.handler.main'] ?? $this->getMonolog_Handler_MainService()));\n\n return $instance;\n }", "title": "" }, { "docid": "91917d19a318b433808dbfe556d05c83", "score": "0.5122498", "text": "public function getLoggers()\n\t{\n\t\treturn $this->loggers;\n\t}", "title": "" }, { "docid": "4d8595cfc8d536067c51be8c2e67bbe4", "score": "0.5111756", "text": "public static function logs($value=null) {\n if($value!==null) {\n self::$_directoryLogs=$value;\n }\n return self::$_directoryLogs;\n }", "title": "" }, { "docid": "91473f07b328ccdb059142fbf7a971ee", "score": "0.5111088", "text": "public function getRoot()\n {\n return $this->parent ? $this->parent->getRoot() : $this;\n }", "title": "" }, { "docid": "13878bfde387a90479c4e5890d8745e2", "score": "0.5102147", "text": "protected function createDefaultPsrLogger()\n {\n return new \\Neos\\Flow\\Log\\Psr\\Logger($this->backends);\n }", "title": "" } ]
721395f06459fcb88de555435cec2514
// setValue // setValue() Change the Selected CustomerGroup Type Change the Selected CustomerGroup Type to another CustomerGroup Type
[ { "docid": "63f49d49806575273c3ee9597d4870d7", "score": "0.5555175", "text": "public function setValue ($intCustomerGroup)\n\t\t{\n\t\t\t$strVarName = \"_{$intCustomerGroup}\";\n\t\t\t\n\t\t\tif (isset($this->$strVarName))\n\t\t\t{\n\t\t\t\t$this->Select($this->$strVarName);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The CustomerGroup could not be found\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "8e6693602b1328513a3a1985454d1ed5", "score": "0.6077137", "text": "protected function setGroupType() {}", "title": "" }, { "docid": "71ff46bd315a683a2a3baa42f7d2ffdf", "score": "0.58613753", "text": "public function setType($value){\n $this->_type = $value;\n }", "title": "" }, { "docid": "219eadbc3cf0b4eb1071cc3a1f315951", "score": "0.5623302", "text": "public function setGroupType($val)\n {\n $this->_propDict[\"groupType\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "dcb9bed37db08d55fc246b6d5687dc82", "score": "0.5529016", "text": "public function setGroup(?Group $value): void {\n $this->getBackingStore()->set('group', $value);\n }", "title": "" }, { "docid": "e665aedf3cae9742be0f7cb9833a2f06", "score": "0.5369493", "text": "public function setRoleGroup(?RoleGroup $value): void {\n $this->getBackingStore()->set('roleGroup', $value);\n }", "title": "" }, { "docid": "8907bdfad3195979d81fe2045011a9b8", "score": "0.5356939", "text": "public function type_set(string $type );", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "12e4bb75db29bdb7784ba0d36e01b28b", "score": "0.5313647", "text": "public function setType(?string $value): void {\n $this->getBackingStore()->set('type', $value);\n }", "title": "" }, { "docid": "aef6b1fbefbd6c256ff146b356fd3cca", "score": "0.53060424", "text": "function tep_set_customers_groups($group_id, $flag, $type) {\n $sql_data = array();\n switch ($type) {\n case 'access':\n $sql_data['group_access'] = $flag;\n break;\n case 'price':\n $sql_data['group_price'] = $flag;\n break;\n case 'status':\n $sql_data['group_status'] = $flag;\n break;\n }\n if (tep_not_null($sql_data)) {\n tep_db_perform(TABLE_CUSTOMERS_GROUPS, $sql_data, 'update', \"customers_group_id = '\" . $group_id . \"'\");\n }\n }", "title": "" }, { "docid": "a5de407ee42d05054dd37e629eb052c4", "score": "0.52959216", "text": "public function setUserType(?string $value): void {\n $this->getBackingStore()->set('userType', $value);\n }", "title": "" }, { "docid": "2cc741ce48af334aa19539b23153bff0", "score": "0.5291965", "text": "public function setCode( $value )\n\t{\n\t\tif( (string) $value !== $this->getCode() )\n\t\t{\n\t\t\t$this->values['customer.group.code'] = (string) $value;\n\t\t\t$this->setModified();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "684eb4575f76b6cf4b1d914c3aabb063", "score": "0.5286043", "text": "function setValue($value)\n {\n $this->setSelected($value);\n }", "title": "" }, { "docid": "786d233f7b5cbc0ef230e60837fcb5c4", "score": "0.52570486", "text": "public function setType($value) \n {\n $this->_fields['Type']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "55783d4a40d135bf8a294bbe69120952", "score": "0.52402145", "text": "public function setTypeAttribute($value)\n {\n $this->attributes['type'] = ucfirst(strtolower($value));\n }", "title": "" }, { "docid": "f233ba8f3ee98e3283652a3aa07adf28", "score": "0.5203301", "text": "protected function _type_assignment_set( $type, $value )\n\t{\n\t\tswitch ( $type ) \n\t\t{\n\t\t\tcase 'int':\n\t\t\tcase 'timestamp':\n\t\t\t\treturn (int) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\t\treturn (string) $value;\n\t\t\tbreak;\n\n\t\t\tcase 'bool':\n\t\t\t\treturn (bool) $value;\n\t\t\tbreak;\n\n\t\t\t// json datatype simply encode\n\t\t\tcase 'json':\n\t\t\t\treturn json_encode( $value );\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "1718e494a924285822bd50295ed5b1ef", "score": "0.5186103", "text": "public function setType($value) \n\t{\n\t $this->type = $value;\n\t return $this;\n\t}", "title": "" }, { "docid": "f3067f3a1d3ea47e2d9c8f00e9c3004c", "score": "0.51775557", "text": "public function setType($value)\n {\n return $this->set('Type', $value);\n }", "title": "" }, { "docid": "f3067f3a1d3ea47e2d9c8f00e9c3004c", "score": "0.51775557", "text": "public function setType($value)\n {\n return $this->set('Type', $value);\n }", "title": "" }, { "docid": "ab8a8741248e0cac562e7c46a547dc36", "score": "0.5151878", "text": "private function setType(Customer $customer, array $data)\n {\n if (isset($data['type'])) {\n $customer->setType($data['type']);\n }\n\n return $customer;\n }", "title": "" }, { "docid": "c1d9d6c46d4e454287b631b21677151c", "score": "0.51382834", "text": "function setType( $new_type ) {\n\t\t$this->type = $new_type;\n\t}", "title": "" }, { "docid": "274f8caef7421250b11c765c9cd18756", "score": "0.5102951", "text": "public function setType($value)\n {\n return $this->set(self::type, $value);\n }", "title": "" }, { "docid": "2741dc67ba3c390405aa060addbf020a", "score": "0.50919014", "text": "public function setType($value)\n\t{\n\t\t$this->type = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f7b955c9288991a843c882eb60e33297", "score": "0.5081101", "text": "public function setType($value)\n\t{\n\t\t$this->setViewState('Type',TPropertyValue::ensureString($value),'Bar');\n\t}", "title": "" }, { "docid": "37702c6a79effc5b48ede4829391274e", "score": "0.50505", "text": "public function type_set(string $type )\n {\n $this->_type = $type;\n }", "title": "" }, { "docid": "59acbeb73aedb9abac0ddd34e56227fd", "score": "0.5046112", "text": "public function setServicePrincipalType($value)\n {\n $this->setProperty(\"ServicePrincipalType\", $value, true);\n }", "title": "" }, { "docid": "ea951fe55f80d6289da3c6a17ccc4f97", "score": "0.5028545", "text": "public function setType (string $type);", "title": "" }, { "docid": "4276ba0ea3df1281f18babb963ed9966", "score": "0.50282836", "text": "public function set_bank_account_type( $value ) {\n\t\t$this->add_meta_data( 'bank_account_type', $value, true );\n\t}", "title": "" }, { "docid": "37b430f6af3a6021278601eb5af51334", "score": "0.50131375", "text": "public function setType($value) {\n return $this->set(self::TYPE, $value);\n }", "title": "" }, { "docid": "6b7fd3ab775e9d3388476b564173d58c", "score": "0.501153", "text": "public function setInventoryType(?string $value): void {\n $this->getBackingStore()->set('inventoryType', $value);\n }", "title": "" }, { "docid": "b5c912836f995771f7e0930ff2274cee", "score": "0.5006446", "text": "public function setTagType(?TeamworkTagType $value): void {\n $this->getBackingStore()->set('tagType', $value);\n }", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.49929145", "text": "public function setType( $type );", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.49929145", "text": "public function setType( $type );", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.49929145", "text": "public function setType( $type );", "title": "" }, { "docid": "dc43668778ab2941178673dcfc30b696", "score": "0.498015", "text": "public function set_type($type);", "title": "" }, { "docid": "38c4d32a8106d1849f4e796b438abd22", "score": "0.4975276", "text": "public function setType(?string $type): void\n {\n $this->type['value'] = $type;\n }", "title": "" }, { "docid": "34490567d7b639d602075f7360ebe7a5", "score": "0.4954846", "text": "public function setType($value)\n {\n return $this->set(self::TYPE, $value);\n }", "title": "" }, { "docid": "34490567d7b639d602075f7360ebe7a5", "score": "0.4954846", "text": "public function setType($value)\n {\n return $this->set(self::TYPE, $value);\n }", "title": "" }, { "docid": "34490567d7b639d602075f7360ebe7a5", "score": "0.4954846", "text": "public function setType($value)\n {\n return $this->set(self::TYPE, $value);\n }", "title": "" }, { "docid": "34490567d7b639d602075f7360ebe7a5", "score": "0.4954846", "text": "public function setType($value)\n {\n return $this->set(self::TYPE, $value);\n }", "title": "" }, { "docid": "625121487b8e8ea6ae4d9519d114f20b", "score": "0.49513504", "text": "public function setApplicationType(?ApplicationType $value): void {\n $this->getBackingStore()->set('applicationType', $value);\n }", "title": "" }, { "docid": "d7407efc4258d898e95f84e7b75ea9bb", "score": "0.49508148", "text": "public function setType(string $type);", "title": "" }, { "docid": "5c7c8bef72caf1375162977bfd619bed", "score": "0.49274912", "text": "public function setGroupOperator(Choice $groupOperator)\n\t{\n\t\t$this->groupOperator=$groupOperator; \n\t\t$this->keyModified['group_operator'] = 1; \n\n\t}", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "1c278d79e002721323cffba1ec881354", "score": "0.48880637", "text": "public function setType($value)\n {\n return $this->set(self::_TYPE, $value);\n }", "title": "" }, { "docid": "c1a56e0ee247e8b45de4329e883711c9", "score": "0.48853797", "text": "public function setType($value)\n {\n $this->type = $value;\n\n return $this;\n }", "title": "" }, { "docid": "f8ca3a580e9f7304a37c0b5155485cba", "score": "0.48791328", "text": "public function setType($type) {\n \t\t\t$this->type = $type;\n \t\t}", "title": "" }, { "docid": "7c582200119ed0e5f0fa9f1bf66dfaae", "score": "0.48749074", "text": "public function setParentGroup(?Group $value): void {\n $this->getBackingStore()->set('parentGroup', $value);\n }", "title": "" }, { "docid": "f150e005336730095ea60aad0c2871eb", "score": "0.48723537", "text": "public function setType($type)\n {\n $this->_type = (string) $type;\n }", "title": "" }, { "docid": "e0f027dcda06a584b02688a7fe186aa5", "score": "0.486072", "text": "public function setOrgType($value)\n {\n return $this->set(self::ORGTYPE, $value);\n }", "title": "" }, { "docid": "62c16d0c1944236aed74629309127b26", "score": "0.48576236", "text": "function setType($type) {\n $this->type = (string) $type;\n }", "title": "" }, { "docid": "b1d35d1ecb0ce61504ef550b928fb138", "score": "0.4845548", "text": "public function setType($type)\n {\n $this->_type = $type;\n }", "title": "" }, { "docid": "75ae99c68b6d5c154570c733021b7a5a", "score": "0.48439634", "text": "public function setType( $type )\r\n\t{\r\n\t\tif( in_array( $type, $this->types ) )\r\n\t\t{\r\n\t\t\t$this->type = $type;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1b38d8f3c26f5bb636ac986cfef1a75b", "score": "0.48375803", "text": "public function setType($type) {\n\t\t\n\t\t$this->type = $type;\n\t\t\n\t}", "title": "" }, { "docid": "8a0aa685b5f63bded78d7c605ed2b9da", "score": "0.48359203", "text": "public function setGroup( $group ) \n {\n $this->group = $group;\n }", "title": "" }, { "docid": "981bbfdee10bfa600008f5a97d37bf41", "score": "0.48341957", "text": "public function setConnectorGroup(?ConnectorGroup $value): void {\n $this->getBackingStore()->set('connectorGroup', $value);\n }", "title": "" }, { "docid": "6ef0c73c7862860dae5b2004b95a28f4", "score": "0.48308384", "text": "public function setLocalizationType(?DeviceManagementExportJobLocalizationType $value): void {\n $this->getBackingStore()->set('localizationType', $value);\n }", "title": "" }, { "docid": "68567f530f414fdc98d41b3074a73f20", "score": "0.48253903", "text": "public function setTenantGroupId(?string $value): void {\n $this->getBackingStore()->set('tenantGroupId', $value);\n }", "title": "" }, { "docid": "21f49a7583a7e4f3fb045c84a1c95676", "score": "0.4824392", "text": "public function setType($type) { return $this->_set('type', $type); }", "title": "" }, { "docid": "fe99af943c58be2fe73e074fe9eb42c2", "score": "0.4822301", "text": "public function setScopeType(?string $value): void {\n $this->getBackingStore()->set('scopeType', $value);\n }", "title": "" }, { "docid": "a8b67fb1ec81c2e100f8e01faf9a975d", "score": "0.48218048", "text": "public function setType($type)\r\n {\r\n $this->type = $type;\r\n }", "title": "" }, { "docid": "a8b67fb1ec81c2e100f8e01faf9a975d", "score": "0.48218048", "text": "public function setType($type)\r\n {\r\n $this->type = $type;\r\n }", "title": "" }, { "docid": "71318151f0492db2456f5c07dafa4509", "score": "0.4811653", "text": "public function setType($value)\n {\n return $this->setParameter('type', $value);\n }", "title": "" }, { "docid": "e88624c728ac012d289ad1a754483052", "score": "0.48087075", "text": "public function setAccessContainerType(?DelegatedAdminAccessContainerType $value): void {\n $this->getBackingStore()->set('accessContainerType', $value);\n }", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.48055822", "text": "public function setType($type);", "title": "" }, { "docid": "5e119441f32d5b6f0f8160c9184168b4", "score": "0.48029613", "text": "public function setType($type){\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.4800572", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.4800572", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.4800572", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.4800572", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "4b8155ac4391eaf757cb820d4a98ac7e", "score": "0.48000976", "text": "public function setType(string $value): self\n {\n $this->type = $value;\n\n return $this;\n }", "title": "" }, { "docid": "2c9dea50172da9fa101fec3b8dd35a5c", "score": "0.47970772", "text": "public function setCustomer(\\Devlabs91\\TravelgateNotify\\Models\\Ota\\CustomerType $customer)\n {\n $this->customer = $customer;\n return $this;\n }", "title": "" }, { "docid": "1c8a6b5d1d757c70950ad58e342fe874", "score": "0.4793883", "text": "public function setType($type)\n {\n $this->_type = $type;\n }", "title": "" }, { "docid": "1f30a1c62ac908570336929d7ad0dc97", "score": "0.4791016", "text": "protected function _setFormType($val){\n\t\t$this->_formType = $val;\n\t}", "title": "" }, { "docid": "b22ee41c1799b6a2fdc1f86ae4837feb", "score": "0.4777047", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "f5cfee51f43a1f4104277f214c23afc8", "score": "0.47699246", "text": "public function type($value) {\n return $this->setProperty('type', $value);\n }", "title": "" }, { "docid": "f5cfee51f43a1f4104277f214c23afc8", "score": "0.47699246", "text": "public function type($value) {\n return $this->setProperty('type', $value);\n }", "title": "" }, { "docid": "f5cfee51f43a1f4104277f214c23afc8", "score": "0.47699246", "text": "public function type($value) {\n return $this->setProperty('type', $value);\n }", "title": "" }, { "docid": "d1b5e7d8784b72d0d7103e1ee4ae6131", "score": "0.47692275", "text": "function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "7f33c02b10cf8bf8aa4ef98bcd7d360b", "score": "0.4764944", "text": "public function setGroup($group) { $this->_group = $group; }", "title": "" }, { "docid": "7218ee34d99e9793687a6018340facea", "score": "0.47633368", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "7218ee34d99e9793687a6018340facea", "score": "0.47633368", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "1431fe617bc6e426cf79b563182cd038", "score": "0.47617218", "text": "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "1431fe617bc6e426cf79b563182cd038", "score": "0.47617218", "text": "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0420bab6ab00829503ba8bcb67e9f950", "score": "0.47577775", "text": "public function setTypeId($value)\n {\n return $this->set(self::_TYPE_ID, $value);\n }", "title": "" }, { "docid": "a4a7607c5067b0a1c644539baa3a9ad1", "score": "0.47543645", "text": "public function set_type ($type) {\n $this->type = $type;\n }", "title": "" } ]
5c566d29411e02e44ca60d01f42d6019
Function to get the list of Script models to be included
[ { "docid": "4697b12a1e3e32ccc0d4fc0da6e321b2", "score": "0.0", "text": "function getFooterScripts(Vtiger_Request $request)\n\t{\n\t\t$headerScriptInstances = parent::getFooterScripts($request);\n\t\t$moduleName = $request->getModule();\n\n\t\t$jsFileNames = array(\n\t\t\t\"libraries.jquery.ckeditor.ckeditor\",\n\t\t\t\"libraries.jquery.ckeditor.adapters.jquery\",\n\t\t\t'modules.Vtiger.resources.validator.BaseValidator',\n\t\t\t'modules.Vtiger.resources.validator.FieldValidator',\n\t\t\t\"modules.Emails.resources.MassEdit\",\n\t\t\t\"modules.Emails.resources.EmailPreview\",\n\t\t\t\"modules.Vtiger.resources.CkEditor\",\n\t\t\t'modules.Vtiger.resources.Popup',\n\t\t\t'libraries.jquery.jquery_windowmsg',\n\t\t\t'libraries.jquery.multiplefileupload.jquery_MultiFile'\n\t\t);\n\n\t\t$jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames);\n\t\t$headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances);\n\t\treturn $headerScriptInstances;\n\t}", "title": "" } ]
[ { "docid": "45bf37942d78191ebad91a8c68e0ef01", "score": "0.6385218", "text": "protected function getModelsToProcess()\n {\n return $this->modelProvider->setMainModel($this->getModel())->getModels();\n }", "title": "" }, { "docid": "bc53ca69f5dada134cc90858763eaf89", "score": "0.6211907", "text": "public static function IncludeAllModels(){\n\t\t$modelsFolder = MagratheaConfig::Instance()->GetConfigFromDefault(\"site_path\").\"/Models\";\n\t\tif($handle = @opendir($modelsFolder)){\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\t$filename = explode('.', $file);\n\t\t\t\t$ext = array_pop($filename);\n\t\t\t\tif(empty($ext)) continue;\n\t\t\t\tif($ext == \"php\"){\n\t\t\t\t\tinclude_once($modelsFolder.\"/\".$file);\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t}", "title": "" }, { "docid": "7cb180ef820b820a1b4386daeedeeed4", "score": "0.61810815", "text": "public function models() {\n\t\t$models = $this->getModelNames();\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "1576d6632bee439bf0ec5c80a8f19c64", "score": "0.61804664", "text": "private static function getModels(): array\n {\n $rootNamespace = key(json_decode(file_get_contents(App::basePath('composer.json')), true)['autoload']['psr-4']);\n $classes = include App::basePath('/vendor/composer/autoload_classmap.php');\n\n return array_filter(array_keys($classes), fn ($class) => (\n preg_match(\"/^$rootNamespace\\\\/\", $class) && \n is_subclass_of($class, Model::class)\n ));\n }", "title": "" }, { "docid": "92d842ef80a03fb0f217dfd557f31816", "score": "0.6055765", "text": "public static function getScriptsList() {\n $config = Factory::getConfig();\n $scripts = array();\n $scriptsList = array_merge(array($config->jQueryFile), \n $config->scripts, self::$includeScript);\n foreach ($scriptsList as $scriptName) {\n $scripts[] = self::viewFileToPath($scriptName . '.js');\n }\n return $scripts;\n }", "title": "" }, { "docid": "4e789dccfb3a197c62262e8b7ca1fee7", "score": "0.6022774", "text": "private function collectModels()\n {\n $models = [];\n foreach (Arr::get($this->config, 'generator.model_locations', []) as $dir) {\n $dir = base_path($dir);\n if (!file_exists($dir)) {\n continue;\n }\n\n $files = ClassMapGenerator::createMap($dir);\n foreach ($files as $name => $path) {\n $classes = class_uses_recursive($name);\n if (isset($classes[SphinxSearchableGeneratable::class])) {\n $models[] = $name;\n }\n }\n }\n\n return $models;\n }", "title": "" }, { "docid": "b336b74c7560531b1b1c23dce93847e9", "score": "0.6007359", "text": "protected function getModels()\n {\n $models = array();\n $files = scandir(Yii::getPathOfAlias('application.models'));\n foreach ($files as $file) {\n if ($file[0] !== '.' && CFileHelper::getExtension($file) === 'php') {\n $fileClassName = substr($file, 0, strpos($file, '.'));\n $models[] = $fileClassName;\n }\n }\n return $models;\n }", "title": "" }, { "docid": "fa3c763742ef6fccdf8cc10e97feac09", "score": "0.5992318", "text": "public static function getModels() {\r\n \r\n $query = \"SELECT DISTINCT Model from loco_class ORDER BY Model\";\r\n \r\n $return = array(); \r\n \r\n foreach (AppCore::GetDatabase()->fetchAll($query) as $row) {\r\n if (trim($row['Model']) != \"\") {\r\n $return[] = $row['Model'];\r\n }\r\n }\r\n \r\n return $return;\r\n \r\n }", "title": "" }, { "docid": "835e4aaace6a3c64b4c21d91d4ab8eaf", "score": "0.5943759", "text": "public function getProvidedScripts()\n {\n $providedScripts = [];\n $includedScripts = [];\n foreach ($this->javascript as $script => $options) {\n // Ignore scripts that are explicitly blocked\n if (isset($this->blocked[$script])) {\n continue;\n }\n // At this point, the file is included.\n // This might also be combined at this point, potentially.\n $includedScripts[$script] = true;\n\n // Record any files this provides, EXCEPT those already included by now\n if (isset($this->providedJavascript[$script])) {\n foreach ($this->providedJavascript[$script] as $provided) {\n if (!isset($includedScripts[$provided])) {\n $providedScripts[$provided] = $provided;\n }\n }\n }\n }\n return $providedScripts;\n }", "title": "" }, { "docid": "486c5b2bb329aef9f48a46e8bcf4d156", "score": "0.59028816", "text": "public function getIncludeList()\n {\n return $this->include;\n }", "title": "" }, { "docid": "76976400201b573dc69324b3ab4ed61f", "score": "0.58878636", "text": "function getScripts()\n {\n return $this->m_scriptfiles;\n }", "title": "" }, { "docid": "5970a1932abd514e0446e0c989784381", "score": "0.5858996", "text": "public function getStaticLinkedModels () {\n return array_merge (parent::getStaticLinkedModels (), self::getModuleModelsByName ());\n }", "title": "" }, { "docid": "90df521812254286578867a0eefb7ef1", "score": "0.58391875", "text": "public function getModels() {\n\t\t\n\t\t// get table list\n\t\t$this->query(\"SHOW TABLES IN \".$this->name);\n\t\t\n\t\t$models = array();\n\t\t\n\t\twhile ($record = $this->nextRecord()) {\n\t\t\tif (substr($record[0], 0, strlen($this->prefix))==$this->prefix && substr($record[0], strlen($this->prefix), 1) != \"_\") {\n\t\t\t\t$models[] = substr($record[0], strlen($this->prefix));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "a6d815aab2f320aa33a18601dfd745e1", "score": "0.5796337", "text": "public function includeModels() {\n $dir = DIR_APP . \\Application\\Config::getParam(\"models\");\n if(file_exists($dir)) {\n RequireHelper::requireFilesInDirectory($dir);\n }\n }", "title": "" }, { "docid": "97cf8cbcf1a3a59eac1ad1aa226eecef", "score": "0.57871985", "text": "function getScripts()\n {\n return null;\n }", "title": "" }, { "docid": "ae0f73a0cd476cde2980f0c046e32d3f", "score": "0.5769736", "text": "public function getInclude();", "title": "" }, { "docid": "ec269a426a2d53b7a09778943e1a306b", "score": "0.57689637", "text": "protected static function getScripts() {\n return [];\n }", "title": "" }, { "docid": "2ba5ff910d9a5d9d43d875c12e19ea88", "score": "0.5760619", "text": "public function models()\n\t{\n\t\treturn $this->models;\n\t}", "title": "" }, { "docid": "7b95710f613b919a7d025b7cc912cedc", "score": "0.5746005", "text": "public function includes()\n {\n return collect(request()->input('include') ? explode(',', request()->input('include')) : []);\n }", "title": "" }, { "docid": "68ce837ecd29bf0b5c8c57f6dee1b05d", "score": "0.57075614", "text": "function LoadModels()\n {\n foreach ($GLOBALS['configs']['models_in_use'] as $model => $value) {\n if(file_exists(__DIR__.\"/\".$GLOBALS[\"configs\"][\"paths\"][\"app\"].$GLOBALS['configs']['paths'][\"models\"].$value.\".php\")){\n require_once __DIR__.\"/\".$GLOBALS[\"configs\"][\"paths\"][\"app\"].$GLOBALS['configs']['paths'][\"models\"].$value.\".php\";\n }\n }\n }", "title": "" }, { "docid": "293f6aa3c6d2d9354fa8adf22df79b4a", "score": "0.56978697", "text": "public function listmodels() {\n if(is_array($this->models)) return array_keys($this->models);\n else return [];\n }", "title": "" }, { "docid": "8d8eaa0436e054f1ebf044cc877485e9", "score": "0.5696843", "text": "function getIncludeScripts() {\n return array('http://serverapi.arcgisonline.com/jsapi/arcgis/?v='.$this->apiVersion.'compact');\n }", "title": "" }, { "docid": "2a24a6073f5ada66bcbb2117dccae8ee", "score": "0.5673182", "text": "private function getModels() {\n\t\t$result = array();\n\n\t\t$versionString = Configure::version();\n\t\tlist($major, $minor, $rest) = explode('.', $versionString);\n\n\t\t// 2.0 => 20, 1.3 => 13\n\t\t$version = ($major * 10) + $minor;\n\n\t\t// New CakePHP\n\t\tif ($version >= 13) {\n\t\t\t$result['app'] = App::objects('model');\n\t\t\t$plugins = App::objects('plugin');\n\t\t\tif (!empty($plugins)) {\n\t\t\t\tforeach ($plugins as $plugin) {\n\t\t\t\t\t$pluginModels = App::objects('model', App::pluginPath($plugin) . 'models' . DS, false);\n\t\t\t\t\tif (!empty($pluginModels)) {\n\t\t\t\t\t\tif (empty($result[$plugin])) {\n\t\t\t\t\t\t\t$result[$plugin] = array();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tforeach ($pluginModels as $model) {\n\t\t\t\t\t\t\t$result[$plugin][] = \"$plugin.$model\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Old CakePHP\n\t\telse {\n\t\t\t$result['app'] = Configure::listObjects('model');\n\t\t\t$plugins = Configure::listObjects('plugin');\n\t\t\tif (!empty($plugins)) {\n\t\t\t\tforeach ($plugins as $plugin) {\n\t\t\t\t\t$pluginPath = APP . 'plugins' . DS . Inflector::underscore($plugin) . DS . 'models' . DS;\n\t\t\t\t\t$pluginModels = Configure::listObjects('model', $pluginPath, false);\n\t\t\t\t\tif (!empty($pluginModels)) {\n\t\t\t\t\t\tforeach ($pluginModels as $model) {\n\t\t\t\t\t\t\t$result[$plugin][] = \"$plugin.$model\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "78d6f463a04d3d93e7941d49a34ac570", "score": "0.56659484", "text": "private static function get_names(){\n $counter=0;\n foreach (glob(\"models/*.php\") as $filename){\n preg_match('/^.+\\/(.+)\\.php$/', $filename, $name);\n $name=$name[1];\n self::$model_names[$counter]=$name;\n $counter++;\n }\n }", "title": "" }, { "docid": "b0fb63ec7ed21ac007c93b1814ad7293", "score": "0.5663927", "text": "public function getModules(): Collection;", "title": "" }, { "docid": "e773db36e7b7533726372b5d595ce637", "score": "0.56302476", "text": "public function getModules();", "title": "" }, { "docid": "e773db36e7b7533726372b5d595ce637", "score": "0.56302476", "text": "public function getModules();", "title": "" }, { "docid": "16ff12e82ce429ada4775489c4210d23", "score": "0.5623469", "text": "public function models()\n {\n $models = array();\n if(!isset($this->airplanes))\n $this->airplanes();\n foreach($this->airplanes as $airplane)\n {\n $models[$airplane['model']] = $airplane['model'];\n }\n return $models;\n }", "title": "" }, { "docid": "b595cbcd7780a9997c096d5440a3aceb", "score": "0.56208855", "text": "public function get_scripts()\n {\n if (!$this->list) {\n\n if (!$this->sieve)\n return $this->_set_error(SIEVE_ERROR_INTERNAL);\n\n $list = $this->sieve->listScripts();\n\n if (PEAR::isError($list))\n return $this->_set_error(SIEVE_ERROR_OTHER);\n\n $this->list = $list;\n }\n\n return $this->list;\n }", "title": "" }, { "docid": "f21afac9e626fd784c348885d8dfc0bf", "score": "0.5618019", "text": "public function getScripts() {\n return $this->scripts;\n }", "title": "" }, { "docid": "d010859966e9dad1666b6b4ef5d97bbb", "score": "0.56031984", "text": "public function &models()\n\t{\n\t\t$result = array();\n\t\tforeach($this->_models as $model)\n\t\t{\n\t\t\t$name = Yada::class_name('model', $model);\n\t\t\t$result[$name] = isset($result[$name]) ? $result[$name] : array();\n\t\t\t$result[$name][] = $model;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4d7fc121d32718c255688b42efcd601e", "score": "0.55948603", "text": "public function get_script_depends() {\n return [];\n }", "title": "" }, { "docid": "036ae6f2b48effb0d098cb236a859075", "score": "0.5589697", "text": "public function getModels()\n {\n $this->prepare();\n\n return $this->models;\n }", "title": "" }, { "docid": "c2b38db837a3543d832cb557b264eb78", "score": "0.5571903", "text": "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "title": "" }, { "docid": "d913b24cf8fc82cbee8b4c038e6b73de", "score": "0.55696", "text": "public function get_models()\n {\n if (empty($this->known_model_names)) {\n $this->known_model_names = $this->_find_models();\n }\n $models = array();\n foreach ($this->known_model_names as $name) {\n $model = $this->_load_model($name);\n if ($model) $models[$name] = $model;\n }\n return $models;\n }", "title": "" }, { "docid": "48675b4db0978a31c458f92b8761be93", "score": "0.55488235", "text": "abstract protected function findModelClasses();", "title": "" }, { "docid": "f812d4188eb4652f1ba99eb05cec5b97", "score": "0.5540112", "text": "public function getTargetModels() {\n\t\t$targetModels = (array)$this->getConfig('TargetModels');\n\n\t\treturn $targetModels;\n\t}", "title": "" }, { "docid": "ef5e4e3b6955617fc1f61e483329be5c", "score": "0.5513106", "text": "function script(){\n\t\treturn [];\n\t}", "title": "" }, { "docid": "718ef9f423ed91646d1669898fcf197a", "score": "0.5487642", "text": "private function getModels(): array\n {\n\n $objs = [];\n $data = $this->apiService->callApi('models');\n\n if($data){\n foreach($data as $elem){\n array_push($objs, ['value' => \"-\" . $elem->id, 'label' => $elem->name]);\n }\n }\n\n return $objs;\n }", "title": "" }, { "docid": "ae082e8430f768ad358c6c5dc46ff80e", "score": "0.54830724", "text": "public function getAvailableModels()\n {\n $fields = ['Content', 'Callout'];\n\n $models = self::config()->default_models;\n\n // Build a list of non namespaced models\n // They are not likely to clash anyway because of their unique table name\n $dataobjects = ClassInfo::getValidSubClasses(DataObject::class);\n $map = [];\n foreach ($dataobjects as $k => $v) {\n $parts = explode('\\\\', $v);\n $name = end($parts);\n $map[$name] = $v;\n }\n\n foreach ($fields as $field) {\n // Match variables with a dot in the call, like $MyModel.SomeMethod\n preg_match_all('/\\$([a-zA-Z]+)\\./m', $this->$field ?? '', $matches);\n\n if (!empty($matches) && !empty($matches[1])) {\n // Get unique model names\n $arr = array_unique($matches[1]);\n\n foreach ($arr as $name) {\n if (!isset($map[$name])) {\n continue;\n }\n $class = $map[$name];\n $singl = singleton($class);\n if ($singl instanceof DataObject) {\n $models[$name] = $class;\n }\n }\n }\n }\n\n return $models;\n }", "title": "" }, { "docid": "52ee48f670c7b1b5166a0e67be4d172e", "score": "0.5473974", "text": "public function getLoadScripts()\n {\n return $this->m_loadscripts;\n }", "title": "" }, { "docid": "e20123a43e65ac2a5cef83e24053b86a", "score": "0.5463758", "text": "public static function allScripts()\n {\n return static::$scripts;\n }", "title": "" }, { "docid": "b65c8af31d21c944662773aff80d54c8", "score": "0.54351056", "text": "public static function requiredModels()\n {\n $required = [\n 'log'\n ];\n return $required;\n }", "title": "" }, { "docid": "d32c9d8b8be71e2f6fc66607e5f8a7a7", "score": "0.5433717", "text": "protected function getAllowedIncludes(): array\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "89b403b04b7071e3a81bf8f43c4f8557", "score": "0.54313636", "text": "public function getModels() {\n return $this->_config['models'];\n }", "title": "" }, { "docid": "0d121ba5b71b280d8c2e632160fa3fd7", "score": "0.5427167", "text": "public function getScriptPaths();", "title": "" }, { "docid": "14e8a3bca577cec63420677af0ad83c4", "score": "0.5426833", "text": "public function getIncludes() {\n return $this->includes;\n }", "title": "" }, { "docid": "d1542ef4f004af4a7a00f114c9f7fda5", "score": "0.5418227", "text": "public function getLoadableModuleList() {\n\t\t$q = new apm_Database_Query ();\n\t\t$q->addTable ( 'modules', 'm' );\n\t\t$q->addQuery ( 'mod_directory, mod_main_class, mod_version' );\n\t\t$q->addWhere ( 'mod_active = 1' );\n\t\t$q->addWhere ( \"mod_main_class <> ''\" );\n\t\t$q->addOrder ( 'mod_ui_order' );\n\t\treturn $q->loadList ();\n\t}", "title": "" }, { "docid": "dabbe9a32b614999ca8b86813803db21", "score": "0.5417988", "text": "public function _find_models()\n {\n $models = Kohana::config('orm_manager.models');\n\n if (empty($models)) {\n $models = array();\n\t\t $files = Kohana::list_files('models');\n foreach ($files as $file) {\n $m = array();\n preg_match('/.*\\/(.*)'.EXT.'/', $file, $m);\n $models[] = $m[1];\n }\n }\n\n return $models;\n }", "title": "" }, { "docid": "f114b232560d2af12a688bdf3ef0a741", "score": "0.54112667", "text": "public function models($remove_suffix = FALSE)\n\t{\n\t\t$this->CI->load->helper('file');\n\t\t$model_files = get_filenames($this->path().'models/');\n\t\t$models = array();\n\t\tforeach($model_files as $key => $m)\n\t\t{\n\t\t\tif (preg_match('#_model.php$#', $m))\n\t\t\t{\n\t\t\t\t$models[$key] = substr(strtolower($m), 0, -4);\n\n\t\t\t\t// removes '_model'... must have this suffix to work!!!\n\t\t\t\tif ($remove_suffix)\n\t\t\t\t{\n\t\t\t\t\t$mod_name = substr($models[$key], 0, -6);\n\t\t\t\t\t$models[$key] = substr($models[$key], 0, -6);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "90a09e37fc48e958ecc69b603eeacc07", "score": "0.5400384", "text": "function getIncludes() {\n\t\treturn $this->includes;\n\t}", "title": "" }, { "docid": "b9177e6c5746ffca69bddb7d4cb3ac96", "score": "0.5396077", "text": "public function getScripts(){\n\t\t$s = \"\";\n\t\tforeach( $this->scripts as $url => $atts ){\n\t\t\t$s .= '<script src=\"'.$url.'\" '.iatts( $atts ).'></script>';\n\t\t}\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "1e09fb4ce0f228dd50cb7cb62e731d7f", "score": "0.53929526", "text": "public static function getAllowedModules() {\n $db = PearDatabase::getInstance();\n\n $sql = \"SELECT tabid, name FROM its4you_multicompany4you_cn_modules INNER JOIN vtiger_tab ON tabid=tab_id WHERE isentitytype = ? AND presence = ?\";\n $result = $db->pquery($sql, array(1, 0));\n $numOfRows = $db->num_rows($result);\n $modulesModels = Array();\n for ($i = 0; $i < $numOfRows; $i++) {\n $tabId = $db->query_result($result, $i, 'tabid');\n $modulesModels[$tabId] = MultiCompany4you_CustomRecordNumbering_Model::getInstance($db->query_result($result, $i, 'name'), $tabId);\n }\n\n return $modulesModels;\n }", "title": "" }, { "docid": "d13032539b20178189b64b3e42e23767", "score": "0.53854346", "text": "static public function getModelList()\n\t{\n\t\tif(!is_array(self::$resourceIndex))\n\t\t\tself::loadHandlers();\n\n\t\t$models = array_keys(self::$resourceIndex);\n\t\tsort($models, SORT_STRING);\n\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "27a467d4aebeeb8754f5db8c5c79b56e", "score": "0.53802115", "text": "public function get_script_depends() {\n\t\treturn [ \n\t\t\t'bootstarp-js',\n\t\t\t'owl-carousel',\n\t\t\t'widgetkit-main',\n\t\t ];\n\t}", "title": "" }, { "docid": "252e45885d852bcac1411cf92e66bf08", "score": "0.5373208", "text": "public static function all() {\n asort($GLOBALS['models']);\n return $GLOBALS['models'];\n }", "title": "" }, { "docid": "18525d48fb6e09f6080a771bcfed6493", "score": "0.53689265", "text": "public function scripts()\n {\n return [\n 'app' => $this['app']['scripts'] ?? [],\n 'web' => $this['web']['scripts'] ?? [],\n 'worker' => $this['worker']['scripts'] ?? [],\n ];\n }", "title": "" }, { "docid": "ec7e0874b86f1a256597825e48ea69b9", "score": "0.53593266", "text": "public static function load_all(){\n self::get_names();\n foreach(self::$model_names as $model){\n $model_namespaced='\\\\Models\\\\'.$model;\n M::$a[$model]=new $model_namespaced;\n }\n }", "title": "" }, { "docid": "a9d6510c5ee17a55ebf10423c6919d18", "score": "0.5352138", "text": "function scripts_array( $where = '' ) {\n\t\n\tglobal $SBLCK;\n\t\n\t$ret = [\n\t\t'scripts' => [],\n\t\t'styles' => [],\n\t];\n\t\n\tif ( $where == 'all' ) {\n\t\t$ret = scripts_array( 'editor' );\n\t\t$where = '';\n\t}\n\t\n\t$prefix = $where ? $where . '_' : '';\n\t\n\t$find = [\n\t\t'scripts' => scripts_find( $SBLCK->get(), $prefix . 'script' ),\n\t\t'styles' => scripts_find( $SBLCK->get(), $prefix . 'style' ),\n\t];\n\t\n\t$ret = array_merge_recursive( $ret, $find );\n\t\n\treturn $ret;\n}", "title": "" }, { "docid": "c354d49c72701f5ce668b040c2e54809", "score": "0.5327784", "text": "protected function loadModels() {\n Doctrine_Core::loadModels($this->generatorManager->getConfiguration()->getModelDirs());\n $models = Doctrine_Core::getLoadedModels();\n $models = Doctrine_Core::initializeModels($models);\n $models = Doctrine_Core::filterInvalidModels($models);\n $this->models = $this->filterModels($models);\n\n return $this->models;\n }", "title": "" }, { "docid": "eeff8b22cedc5d7aa84c4fcc2937aac7", "score": "0.532649", "text": "public function get_script_depends() {\n\t\treturn [ \n\t\t\t'owl-carousel',\n\t\t\t'widgetkit-main',\n\t\t ];\n\t}", "title": "" }, { "docid": "a01a54d2d06d6e05b1d994883742abaf", "score": "0.53150964", "text": "public function getModulesForSelect();", "title": "" }, { "docid": "af11996a1db937f9af5b2d3bcae2e5ec", "score": "0.5312965", "text": "public function loadIncludes(){\n include_once('library/Database.php');\n include_once('models/CategoryModel.php');\n }", "title": "" }, { "docid": "f268aea31952b805aeda172e5840d5c0", "score": "0.5308862", "text": "public function getScripts () {\n return @$this->_result['response']['scripts'];\n }", "title": "" }, { "docid": "77960639d3c07839fed5b5d3c13d6417", "score": "0.52993757", "text": "public function getDependentModules(): EntityCollection\n {\n return self::repo()\n ->where('dependencies', 'LIKE', '%'.$this->identifier.'%')\n ->fetchAll();\n }", "title": "" }, { "docid": "99fd033dd51d5e934d7b9e31aa95c435", "score": "0.52948225", "text": "private function getModelNames() {\n\t\t$path = app_path() . \"/Models\";\n\t\t$out=array();\n\t\tif(getenv('DEFAULT_MODEL')) {\n\t\t\t$out[\"default\"] = getenv('DEFAULT_MODEL');\n\t\t}\n\t\tif(file_exists($path)) {\n\t\t\t$results = scandir($path);\n\t\t\tforeach($results as $result) {\n\t\t\t\tif($result === '.' or $result === '..' or $result[0] === '.') continue;\n\t\t\t\t$filename = $result;\n\t\t\t\tif(is_dir($filename)) {\n\t\t\t\t\t$out = array_merge($out, getModelNames($fileName));\n\t\t\t\t} else {\n\t\t\t\t\t$out[] = substr($filename,0,-4);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $out;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1c8e63af869f48b415b27dc532b7e3b9", "score": "0.52724856", "text": "public function includes(): array\n {\n return [];\n }", "title": "" }, { "docid": "24570903ddef1cc59894d63b6272d6b1", "score": "0.5248899", "text": "public function findImports()\n {\n return $this->repository->findAll();\n }", "title": "" }, { "docid": "9f43cd813ac10a45e37e019e8d3ac818", "score": "0.5248311", "text": "public static function getSupportedModules()\n\t{\n\t\t$subQuery = (new \\App\\Db\\Query())->select(['tabid'])->from('vtiger_field')->where(['uitype' => 4])->distinct('tabid');\n\t\t$dataReader = (new App\\Db\\Query())->select(['tabid', 'name'])->from('vtiger_tab')->where(['isentitytype' => 1, 'presence' => 0, 'tabid' => $subQuery])->createCommand()->query();\n\t\twhile ($row = $dataReader->read()) {\n\t\t\t$modulesModels[$row['tabid']] = self::getInstance($row['name'], $row['tabid']);\n\t\t}\n\t\t$dataReader->close();\n\n\t\treturn $modulesModels;\n\t}", "title": "" }, { "docid": "e14f5b8764fe24f0848d108401301baa", "score": "0.52415687", "text": "public function getAssetLibraries();", "title": "" }, { "docid": "61c8f2f83eaddc72bc22d54a9559f82f", "score": "0.52388066", "text": "private function _load_models() {\n\t\tforeach ($this->models as $model) {\n\t\t\t$this -> load -> model($this -> _model_name($model), $model);\n\t\t}\n\t}", "title": "" }, { "docid": "faf942c2ae2435e833f9d5eaf1e61a4f", "score": "0.52306926", "text": "public function getIncludeDirectories();", "title": "" }, { "docid": "ebbfcd4b98224c687c0f5f0e1a5ac918", "score": "0.52188206", "text": "Function LoadedFiles()\n {\n return @get_included_files();\n }", "title": "" }, { "docid": "25ee204c5d70d8a61aaf3bb72d6e4470", "score": "0.5192887", "text": "public function get_script_depends()\n {\n return ['swiper', 'swiper-script'];\n }", "title": "" }, { "docid": "6eb1ef1ba37e8dd672da891763408391", "score": "0.51891375", "text": "public static function fetchModuleList() {\n $modules = [];\n //Make a scandir of the modules dir\n $moduleFolders = scandir(app_path() . '/modules/');\n //for each module find their manifest and read it\n foreach ($moduleFolders as $moduleFolder) {\n if (file_exists(app_path() . '/modules/' . $moduleFolder . '/Manifest.php')) {\n include(app_path() . '/modules/' . $moduleFolder . '/Manifest.php');\n //Create a object from the manifest file\n $tmpObj = new $moduleFolder;\n //Store the module object into the array\n $modules[] = $tmpObj->basic;\n }\n }\n return $modules;\n }", "title": "" }, { "docid": "b8f1db3fd1f244f03d41903ece864d1c", "score": "0.51884556", "text": "public static function getSupportedModules() {\n $db = PearDatabase::getInstance();\n $modulesModels = Array();\n $sql = \"SELECT tabid, name, tab_id FROM vtiger_tab LEFT JOIN its4you_multicompany4you_cn_modules ON tab_id=tabid WHERE isentitytype = ? AND presence = ? AND tabid IN (SELECT DISTINCT tabid FROM vtiger_field WHERE uitype = ?)\";\n $result = $db->pquery($sql, array(1, 0, 4));\n //$numOfRows = $db->num_rows($result);\n while ($row = $db->fetchByAssoc($result)) {\n $modulesModels[$row['tabid']] = $row;\n }\n /* for ($i = 0; $i < $numOfRows; $i++) {\n $tabId = $db->query_result($result, $i, 'tabid');\n $modulesModels[$tabId] = MultiCompany4you_CustomRecordNumbering_Model::getInstance($db->query_result($result, $i, 'name'), $tabId);\n } */\n\n return $modulesModels;\n }", "title": "" }, { "docid": "d6e3333129342c5cad6d03297ad3f26e", "score": "0.5186076", "text": "public static function List() {\n\t\t$models = array();\n\n\t\t// Get models from the database ordered.\n\t\t$dbh = Database::connect();\n\t\t$query = $dbh->prepare(\"SELECT id FROM device_models\");\n\t\t$query->execute();\n\t\t$rows = $query->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t// Go through the results creating Model objects.\n\t\tforeach ($rows as $model)\n\t\t\tarray_push($models, Model::FromID($model[\"id\"]));\n\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "2f31d5656c5ba2d4f95264debd4398c2", "score": "0.51696295", "text": "public function getIncludePatterns()\n\t{\n\t\treturn $this->_search->getIncludePatterns();\n\t}", "title": "" }, { "docid": "a254fac6aa9a8ae9839b61cce94e0184", "score": "0.51681936", "text": "private function getAllModelsOfMainTable()\n\t{\n\t\t/** @var ActiveRecord $mainModelName */\n\t\t$mainModelName = $this->mainModelName;\n\t\t\n\t\treturn $mainModelName::find()->all();\n\t}", "title": "" }, { "docid": "50706df2056b50f2b387591641fcc743", "score": "0.5164186", "text": "public function getAvailableIncludes(): array\n {\n return $this->availableIncludes;\n }", "title": "" }, { "docid": "24206dfc301b79c3612d4f05bad2e447", "score": "0.51487327", "text": "public function get_modules() {\n\t\treturn $this->get_extensions();\n\t}", "title": "" }, { "docid": "b4e8156fde9b1410a46bfd68967cce95", "score": "0.51378727", "text": "function use_model()\n{\n static $_models = array();\n \n $models = func_get_args();\n \n foreach ($models as $model) {\n if (in_array($model, $_models)) continue;\n \n $model_file = APP_PATH.DIRECTORY_SEPARATOR.'models'.DIRECTORY_SEPARATOR.$model.'.php';\n \n if ( ! file_exists($model_file)) {\n throw new Exception(\"Model file '{$model}' not found!\");\n }\n \n include $model_file;\n $_models[] = $model;\n }\n}", "title": "" }, { "docid": "d82531ea6bc36a07fc5a66f03c674a07", "score": "0.5126511", "text": "private function load_models() {\n \t\t\n \t\tif( $this->models_scan && is_array( $this->models_scan ) ) {\n \t\t\t\n \t\t\t//Loop the result of the models dir scan and try to instantiate each model class\n \t\t\tforeach( $this->models_scan as $model ) {\n \t\t\t\t\n \t\t\t\t//Ucase first letter of model name to fit convension\n\t\t\t\t$model_filename\t= $model;\n\t\t\t\t$model\t\t\t= ucfirst($model);\n\t\t\t\t$model_class \t= $this->plugin_class_slug . $model . 'Model';\n\t\t\t\t$model_global\t= $this->plugin_class_slug . ucfirst($model); //Add a unique var name to avoid conflicts\n \t\t\t\t$model_path\t\t= $this->plugin_models . '/' . $model_filename . '/' . $model_filename . '.php';\n \t\t\t\t\n\t\t\t\t//include_once the model file\n\t\t\t prso_include_file( $model_path );\n\t\t\t\t\n\t\t\t\tnew $model_class;\n\t \t\t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\n \t}", "title": "" }, { "docid": "c3cfcf35373c7bdbe842484cff1d92dd", "score": "0.5112853", "text": "private function _load_models()\n\t{\n\t\tforeach ($this->models as $model)\n\t\t{\n\t\t\t$this->load->model($this->_model_name($model), $model);\n\t\t}\n\t}", "title": "" }, { "docid": "dbd15908d624db3901845a2542a9f2d3", "score": "0.51085395", "text": "public function getIncludeArray()\n {\n return $this->includeArray;\n }", "title": "" }, { "docid": "7a4d3afcff4d1331956540c438da7cd2", "score": "0.51004356", "text": "private function scan_models() {\n \t\t\t\n \t\t//Init vars\n \t\t$result = false;\n \t\t$scan\t= null; //Cache result of dir scan\n \t\t\n \t\t$result = array(\n\t\t 'minify',\n\t\t);\n \t\t\n \t\treturn $result;\n \t}", "title": "" }, { "docid": "069078e9775d3e5049844a2a6391d79f", "score": "0.50935537", "text": "public function getScriptURLs(): array;", "title": "" }, { "docid": "40f7674af5436df99eae19a094340152", "score": "0.5088469", "text": "public function getAllModel()\n {\n return VehicleModelYear::distinct()->get(array('model'));\n }", "title": "" }, { "docid": "291752deb8c7ad684dc9475039778b08", "score": "0.50843006", "text": "public function getComponentScripts(): array;", "title": "" }, { "docid": "85cef2f3499db5a8eaac59044273d222", "score": "0.5074637", "text": "public static function loadModels()\n\t\t{\n\t\t\t$models = glob(PLTMP_PATH . '/models/PLTMP_*');\n\t\t\tforeach ($models as $m) {\n\t\t\t\trequire_once($m);\n\n\t\t\t\t// Init the model\n\t\t\t\t$x = explode('PLTMP_', $m);\n\t\t\t\t$class = 'PLTMP_' . ucfirst(str_replace('.php', '', $x[1]));\n\t\t\t\tif (method_exists($class, 'initialize')) {\n\t\t\t\t\tcall_user_func(array($class, 'initialize'));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f0f71817f64d2390a4093485c795f1f7", "score": "0.50741637", "text": "public function loadModels()\n\t\t{\n\n\t\t\t// Get all model files\n\t\t\t$availableModels = array_diff(scandir(HREFP_MODEL_PATH), array(\".\", \"..\"));\n\n\t\t\t// Iterate over each model file, require it and instantiate the class structure\n\t\t\tforeach($availableModels as $model_file)\n\t\t\t{\n\t\t\t\tif(!is_dir(HREFP_MODEL_PATH.\"/\".$model_file) && preg_match(\"/(.*)\\.class\\.php/i\", $model_file))\n\t\t\t\t{\n\n\t\t\t\t\t// Include and instantiate the model\n\t\t\t\t\trequire_once(HREFP_MODEL_PATH.\"/\".$model_file);\n\n\t\t\t\t\t$className = str_replace(\".class.php\", \"\", $model_file);\n\t\t\t\t\t$this->models[strtolower($className)] = (new $className());\n\n\t\t\t\t\t// Create the corresponding table of the model if necessary\n\t\t\t\t\t$this->models[strtolower($className)]->installIfNecessary();\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "a6d7c843259449dbcb3db17fbec480d1", "score": "0.506865", "text": "function grabAllJsFiles()\n\t{\n\t\t$jsFiles = $this->includes_js;\n\t\t$this->includes_js = array();\n\t\treturn $jsFiles;\n\t}", "title": "" }, { "docid": "5abcf79cadc72256603f7d77ee3d6fd7", "score": "0.50555116", "text": "public static function getModelClassList()\r\n {\r\n $classList = array();\r\n\r\n $tableNames = Yii::$app->db->schema->tableNames;\r\n\r\n $searchStr = Yii::$app->basePath . '/models/*.php';\r\n foreach(glob($searchStr) as $filePath){\r\n $className = HFile::fileFileName($filePath);\r\n\r\n // Check if table exist.\r\n if (is_subclass_of($className, 'CActiveRecord') && method_exists($className, 'tableName')) {\r\n try {\r\n $tableName = (new $className())->tableName();\r\n } catch (Exception $e) {\r\n $tableName = NULL;\r\n }\r\n if (in_array($tableName, $tableNames)) {\r\n $classList[] = $className;\r\n }\r\n }\r\n }\r\n return $classList;\r\n }", "title": "" }, { "docid": "aac0eb3f6a6e41f49e46fe1206f4373d", "score": "0.5051048", "text": "protected function includes()\n {\n $includes = array();\n\n $includes['url'] = 'Rougin\\Staticka\\Helper\\UrlHelper';\n\n return $includes;\n }", "title": "" }, { "docid": "01ee3388d7c45639e80807702bbe0db6", "score": "0.5031097", "text": "final public function modelClasses(){\n if(!$this->modelClasses)\n $this->modelClasses = $this->findModelClasses();\n\n return $this->modelClasses;\n }", "title": "" }, { "docid": "075baecc5256448d27e4901b38344872", "score": "0.50265765", "text": "abstract public function modelReflectionSets();", "title": "" }, { "docid": "dca66bce4a99c0015637a748730d186f", "score": "0.50257343", "text": "public function getJsFilesToInclude()\n {\n return array(\n 'Dashboard/js/MainScreen.js',\n );\n }", "title": "" }, { "docid": "0bc394d01b013999ec7025f1f97b496a", "score": "0.5024315", "text": "public function includes() {\n\n // COMPOSER AUTOLOAD\n\n // CONTROLLERS\n include_once(dirname( __FILE__ ) . '/lib/controllers/custom_fields_controller.php' );\n\n // HELPERS\n include_once( dirname( __FILE__ ) . '/lib/helpers/custom_fields_helper.php' );\n\n // MODELS\n\n }", "title": "" }, { "docid": "be4ca52af948fe1361b1beeb68096d47", "score": "0.5015376", "text": "private function requireEntities(){\n $entities = array(\n 'User.php',\n 'Task.php');\n foreach ($entities as $value) {\n require(ROOT . 'lib/model/' . $value);\n $this->entities[] = strtolower(pathinfo($value)['filename']);\n }\n }", "title": "" }, { "docid": "eb2a0e6fe9e70a95f1df830b0198f55c", "score": "0.50073355", "text": "public function get_script_depends() {\n\t\t\n\t\treturn [ 'core-style', 'wpicon-moon' ];\t\n\t\t\n\t}", "title": "" }, { "docid": "e27483abb0e17b9438d18ce312c2bc15", "score": "0.5003613", "text": "protected function getModels(): array\n {\n return [\n User::class,\n Role::class,\n Login_User::class,\n Consumption::class,\n ];\n }", "title": "" } ]
de65f127ec81c7c13cda8686aca4f667
Create the page layout
[ { "docid": "30babd18c21e4a2e2014b34c713c43dd", "score": "0.0", "text": "public function assemble($content)\n {\n $this->content = $content;\n\n if ($this->useLayout) {\n $layoutFile = $this->_layout;\n\n // FIXME: Render partial operates within the view templates \n // directory so checking if the file exists here will never work. \n // Need to find out a way to have the fallback functionality of \n // getting the content from view engine in cases where no layout is \n // desired.\n $layout = $this->renderPartial($layoutFile);\n\n if (!$layout) {\n // If nothing resulted from the layout, we need to include the \n // content manually\n $layout = $this->content;\n }\n\n $this->_engine->setBody($layout);\n } else {\n $this->_engine->setBody($content);\n }\n }", "title": "" } ]
[ { "docid": "b8e9ea3222017177792c0cff5bbc63f7", "score": "0.75595784", "text": "public function getPageLayout() {}", "title": "" }, { "docid": "e6d15a2f9f11cf616bad7162ae8610d1", "score": "0.70706296", "text": "protected function _constructMainLayout()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'create main layout for display',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_get) {\n $typ = $this->_get->pageType();\n } else {\n $typ = NULL;\n }\n\n switch ($typ) {\n case'css': case'js':\n $this->DISPLAY['core'] = '{;css_js;}';\n break;\n\n default:\n $this->layout($this->_defaultOptions['template']);\n break;\n }\n }", "title": "" }, { "docid": "90262a6fc90efe8008105bae0c5d9e48", "score": "0.70367146", "text": "public function renderLayout();", "title": "" }, { "docid": "62d0ccf0e90c7d19defb49624badfde7", "score": "0.6961744", "text": "public function initLayout();", "title": "" }, { "docid": "6f4ae6f12cb2dfd1faec926f90c7ba8f", "score": "0.68655926", "text": "protected function applyPageLayout()\n {\n $this->content = \"\n @extends('generated/layout')\n \";\n }", "title": "" }, { "docid": "1118aff1362b94fb0287d34771210fb2", "score": "0.68367654", "text": "public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }", "title": "" }, { "docid": "bd45a1f9da9287a71488199a471148a9", "score": "0.6834151", "text": "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('footer_color') . ';\"' : '';\n echo '<!DOCTYPE html>\n<html lang=\"en\">\n<head>';\n\n $this->makeMeta();\n $this->setTitle();\n $this->makeStyles();\n $this->makeHeaderScripts();\n echo '<!-- header code -->' . PHP_EOL;\n if (!empty($this->getHeaderCode())) {\n echo $this->getHeaderCode() . PHP_EOL;\n }\n echo '<!-- header code -->' . PHP_EOL;\n echo '</head>\n\n\t\t<body class=\"' . $this->getbodyClass() . '\" ' . $page_color . '>';\n\n echo '<div class=\"main-wrapper\" >';\n if ($this->hasHeader) {\n echo '<header class=\"header\" >';\n if ($this->hasNavbar) {\n require_once 'Navbar.php';\n }\n echo '</header>';\n }\n\n\n//--main content---\n if ($this->hasBreadcrumb) {\n $routes = explode(\"/\", $_SERVER['REQUEST_URI']);\n echo '\n<div class=\"breadcrumb-bar d-print-none\" ' . $footer_color . '>\n\t\t\t\t<div class=\"container-fluid\">\n\t\t\t\t\t<div class=\"row align-items-center\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<nav aria-label=\"breadcrumb\" class=\"page-breadcrumb\">\n\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t\t\t\t\t\t<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/\"><i class=\"bx bx-home-alt\"></i></a></li>';\n\n for ($i = 1; $i < count($routes) - 1; $i++) {\n if ($i != count($routes) - 1) {\n echo '<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/' . $routes[$i] . '/\">' . $routes[$i] . '</a></li>';\n } else {\n echo '<li class=\"breadcrumb-item active\">' . $routes[$i] . '</li>';\n }\n }\n echo '\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t<h2 class=\"breadcrumb-title\">' . $this->getPageTitle() . '</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n echo '<div class=\"content\">';\n echo '<div class=\"container-fluid\">';\n if ($this->isHasContent()) {\n $this->addPageContent($this->getPageContent());\n }\n\n echo '</div></div>';\n\n echo '<!-- above footer code -->' . PHP_EOL;\n\n /*--footer---*/\n if ($this->hasFooter) {\n require_once 'footer.php';\n }\n echo '</div>';\n $this->makeScripts();\n $this->makeFooterScripts();\n if ($this->ishasError()) {\n $this->showPageError();\n }\n\n echo '<!-- footer code -->' . PHP_EOL;\n if (!empty($this->getFooterCode())) {\n echo $this->getFooterCode() . PHP_EOL;\n }\n echo '<!-- footer code -->' . PHP_EOL;\n echo '</body>\n</html>';\n }", "title": "" }, { "docid": "975d79a1d6571846b62d1f527b2326ec", "score": "0.68047607", "text": "protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "dfee6560b52cc2cd37937432a9ca7905", "score": "0.68012756", "text": "public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }", "title": "" }, { "docid": "3a0547793b219d0159c7efe0e60d61b2", "score": "0.6747403", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}", "title": "" }, { "docid": "c5f40842b5027f252717a26742db40dd", "score": "0.67315906", "text": "abstract protected function view_generatePageContent();", "title": "" }, { "docid": "c8b15d9c0969fe0f7f3cadce0895e3e5", "score": "0.67082804", "text": "protected function _prepareLayout()\n\t{\n\t\t$this->getLayout()->getBlock('head')->setTitle($this->__($this->_helper->pageTitle()));\n $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');\n\t\t$this->getLayout()->getBlock('head')->addCss('css/extrembler/prelogin/form.css');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('header');\n\t\t$this->getLayout()->getBlock('content')->insert('store_language');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('footer');\n\t return parent::_prepareLayout();\n\t}", "title": "" }, { "docid": "89dc06a1830e939e2a2b5d50b11925cb", "score": "0.67032", "text": "protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "title": "" }, { "docid": "683523b0cf421874a81c01dafa24d9db", "score": "0.66927576", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = view($this->layout);\n $this->layout->menus = Menu::getMenu() ;\n }\n }", "title": "" }, { "docid": "d47e5b21a436107476cc3768b685aa57", "score": "0.66863877", "text": "protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}", "title": "" }, { "docid": "b21a324e4e110bbc0364634b58605295", "score": "0.6659869", "text": "protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "beb340acbb2fd67890ff2bb3f86bcbc4", "score": "0.66346693", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout) && ! $this->is_pjax())\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "4e70cd9fb2abae7aa74613c890ff2d04", "score": "0.6632548", "text": "public function render_screen_layout()\n {\n }", "title": "" }, { "docid": "39e3085bd229286ac852dadfd9ee8c96", "score": "0.6608681", "text": "function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }", "title": "" }, { "docid": "0f20ef9a091a32fc7b9f850da5cbd7b1", "score": "0.65727144", "text": "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "d79e63b631f15e40705c74fcbaa79473", "score": "0.65443784", "text": "public function createPages() {\n $pageCount = $this->getPageCount();\n $currentPageNumber = $this->getCurrentPage();\n\n $structure = new XGrid_Plugin_Pagination_Structure();\n $structure->setPageCount($pageCount);\n $structure->setItemCountPerPage($this->getItemCountPerPage());\n $structure->setFirst(1);\n $structure->setCurrent($currentPageNumber);\n $structure->setLast($pageCount);\n\n // Previous and next\n if ($currentPageNumber - 1 > 0) {\n $structure->setPrevious($currentPageNumber - 1);\n }\n \n if ($currentPageNumber + 1 <= $pageCount) {\n $structure->setNext($currentPageNumber + 1);\n }\n\n // Pages in range\n $scrollingStyle = $this->getScrollingStyle();\n $structure->setPagesInRange($scrollingStyle->getPages($this));\n $structure->setFirstPageInRange(min($structure->getPagesInRange()));\n $structure->setLastPageInRange(max($structure->getPagesInRange()));\n \n $this->_structure = $structure; \n }", "title": "" }, { "docid": "820c5e670016eff95c327bb281932478", "score": "0.6537772", "text": "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.65132135", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "40fad8224f68413feb61db1634681312", "score": "0.6512374", "text": "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fb465a2783b9a0513961b4502ccb528b", "score": "0.65059155", "text": "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "edd254dd028ffc26b1db1c7fb9e8d466", "score": "0.65050507", "text": "protected function setAuthenticatedPageLayout() {\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n// require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n }\n\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::ContenTemplate;\n\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::FooterTemplate;\n }\n }", "title": "" }, { "docid": "f8261e55bd5f8648c13e17c8818f84dd", "score": "0.6489445", "text": "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "0ae96cebe41a4afd9d221b5fa0dadad3", "score": "0.64845353", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }", "title": "" }, { "docid": "76619cec18ff852d8538cae521ed7bea", "score": "0.64736694", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "38b880bd6393daa9afb96142f0ca9349", "score": "0.64689", "text": "function PresentLayout($PageTitle, $ViewTitle = \"\", $Extra = null,$Content=null)\n\t{\n\t\t$d = constant ( \"jf_jPath_Module_Delimiter\" );\n\t\n\t\tif (reg(\"jf/view/templates/iterative\"))\n\t\t\t$Iteration = reg(\"jf/view/templates/iterations\");\n\t\telse\n\t\t\t$Iteration = 1;\n\t\n\t\t$n = 0;\n\t\twhile ( $n <= $Iteration )\n\t\t{\n\t\t\t$template = new jpTrimEnd ( $ViewTitle, $d, ++ $n );\n\t\t\t$template=$template->__toString();\n\t\t\tif ($template == \"\") break;\n\t\t\t$template = $d . $template;\n\t\t\t$template = \"view\" . $d . $this->CurrentView () . $template . $d . \"_template\" . $d . \"layout\";\n\t\t\t$x=new jpModule2FileSystem ( $template );\n\t\t\tif (file_exists ( $x->__toString() )) return $this->App->LoadModule ( $template, true, array (\n\t\t\t\t\t\"Title\" => $PageTitle, \"Extra\" => $Extra, \"Content\" => $Content\n\t\t\t) );\n\t\t}\n\t\t$template_root = \"view\" . $d . $this->CurrentView () . $d . \"_template\" . $d . \"layout\";\n\t\treturn $this->App->LoadModule ( $template_root, true, array (\n\t\t\t\t\"Title\" => $PageTitle, \"Extra\" => $Extra , \"Content\" => $Content\n\t\t) );\n\t}", "title": "" }, { "docid": "ac01e83429cdf94f54518092e118d4de", "score": "0.64681035", "text": "function setPageLayout()\n\t{\n\t\tglobal $tpl, $ilCtrl, $lng;\n\n\t\tif (!is_array($_POST[\"id\"]))\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t\t}\n\t\t\n\t\t$this->initSetPageLayoutForm();\n\t\t\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "1591da2de654411eaf114ed61c7cb3fa", "score": "0.64606166", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n\n }", "title": "" }, { "docid": "673c654bb4623b6375fc6e1df2d53063", "score": "0.6439529", "text": "protected function setupLayout()\n\t{\n\t\t$button['text'] = \"login\";\n\t\t$button['url'] = route('login');\n\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$button['text'] = \"logout\";\n\t\t\t$button['url'] = route('logout');\n\t\t\t$this->logged_in_user = Auth::user();\n\t\t\t$notif = new Notification();\n\t\t\t$notifications = $notif->getNotifications($this->logged_in_user->id);\n\t\t\t$new = 0;\n\t\t\tforeach ($notifications as $not) {\n\t\t\t\tif($not->seen == 0)\n\t\t\t\t{\n\t\t\t\t\t$new++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$rating_types = RatingType::getRatingTypes($this->logged_in_user->id);\n\n\t\t\tView::share('notifications', $notifications);\n\t\t\tView::share('new', $new);\n\t\t\tView::share('rating_types', $rating_types);\n\t\t\tView::share('logged_in_user', $this->logged_in_user);\n\t\t}\n\n\t\tView::share('button', $button);\n\t\tView::share('show_feed', $this->show_feed);\n\t\t//Get image path info for all poster and backdrop images\n\t\t$t = new TheMovieDb();\n \t\t$this->image_path_config = $t->getImgPath();\n\t\tView::share('image_path_config', $this->image_path_config);\n\n\n\t\t\n\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "aba29dd0028c3ccdf8c1062020df6249", "score": "0.6432727", "text": "protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "fe929f26c482d7e882c57411af72c0b5", "score": "0.64297676", "text": "function createPage();", "title": "" }, { "docid": "e4b2e19125414f15577ae98f563ca7de", "score": "0.6414503", "text": "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "da0bff1dd3c8471c3cbd84b9c73d720d", "score": "0.6408672", "text": "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.6404804", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.6404804", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "e5f5ff86ab3b5132041d6586117e505f", "score": "0.639644", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "e5f5ff86ab3b5132041d6586117e505f", "score": "0.639644", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "60a58dad11eb619b0fba9fb59588cf8f", "score": "0.63953817", "text": "protected function constructPage() {\n\t\treturn array(\n\t\t\t\t\t\t\"header\" => $this->header,\n\t\t\t\t\t\t\"headerBottom\" => $this->headerBottom,\n\t\t\t\t\t\t\"bodyTag\" => $this->bodyTag,\n\t\t\t\t\t\t\"banner\" => $this->banner,\n\t\t\t\t\t\t\"leftMenu\" => $this->leftMenu,\n\t\t\t\t\t\t\"titlePrefix\" => $this->titlePrefix,\n\t\t\t\t\t\t\"title\" => $this->title,\n\t\t\t\t\t\t\"titlePostfix\" => $this->titlePostfix,\n\t\t\t\t\t\t\"rightMenu\" => $this->rightMenu,\n\t\t\t\t\t\t\"contentPrefix\" => $this->contentPrefix,\n\t\t\t\t\t\t\"content\" => $this->content,\n\t\t\t\t\t\t\"contentPostfix\" => $this->contentPostfix,\n\t\t\t\t\t\t\"footer\" => $this->footer,\n\t\t\t\t\t\t\"end\" => $this->end\n\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.6394652", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.6394652", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.6394652", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.6394652", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.6394652", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "9a6caf3ff7dcaf5e692a24ffac056f16", "score": "0.6393711", "text": "public function writePage()\n\t{\n\t\t$this->SetHeaderMargin(5);\n\t\t$this->SetFooterMargin(30);\n if($this->PageNo() > 1) {\n } else {\n }\n\t\t$this->AddPage('','',true);\n// $t = $this->getCellMargins();\n// var_dump($t);\n $this->setCellPaddings(0,0,0,0);\n\n\t\t$this->writeHTML($this->content, true, false, true, false, '');\n\t}", "title": "" }, { "docid": "ab19b65fcb5316c2dee81b51104cdf03", "score": "0.63809437", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "20b80944c22132689e9a0674604f648c", "score": "0.637859", "text": "abstract function buildShowLayout(): void;", "title": "" }, { "docid": "6f727c7da8ca7b7732c278084b3e4d08", "score": "0.63666904", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "40bb2aba1c3ef18f329ce176749c7b79", "score": "0.63651603", "text": "public function layoutAction(){\n \t$far = 100;\n \t$sxnById = array();\n \t$request = $this->getRequest();\n \t$template_id = $request->getParam('template_id');\n \t$page_id = $request->getParam('page_id');\n \t$title = $request->getParam('title');\n \t$task = $request->getParam('task', null);\n \t$table = $this->_getParam('table');\n\n \tif($template_id){\n\t \tswitch($task){\n\t \t\tcase 'savelayout':{\n\t \t\t\t$this->saveLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\n\t \t\tcase 'resetlayout':{\n\t \t\t\t$this->resetLayout();\n\t \t\t\tbreak;\n\t \t\t}\n\t \t}\n \t}\n\t\t \n\t\t$pageLayout = Rhema_Model_Service::factory('page_layout');\t\t\n \t$res = $pageLayout->getPageLayout($page_id, $template_id, $table); \n \t\n \t$items \t = $this->_editor->getCached()->getItems(); \t\n \t$templateData = $this->_editor->getCached()->getTemplateDetails($template_id);\n \t$items = array_merge($items, $templateData);\n \t \n \t$this->view->title = $title;\n \t//$this->view->sections \t= $templateData['sections'];\n \t$this->view->layout \t= $res['layout']; \n \t \n \t$formUrl['action']\t\t= 'layout';\n \t$formUrl['controller'] = 'design';\n \t$formUrl['module'] = 'cms';\n\n \t$formUrl['page_id'] = $page_id ;\n \t$formUrl['template_id'] = $template_id;\n \t$formUrl['title'] = $title;\n \t$formUrl['table'] = $table ;\n\n \t$this->view->formAction = $this->view->url($formUrl, ADMIN_ROUTE); \n\t\t$this->view->items = $items;\n\n \t$output['form'] = $this->view->render('design/layout.phtml');\n \t\n \t$this->_utility->setAjaxData(Zend_Json::encode($output));\n }", "title": "" }, { "docid": "3ca41383d5488b9144e8fa37a15e15c3", "score": "0.6345091", "text": "public function create(){\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/factura.php';\n require_once 'views/employee/layouts/footer.php';\n }", "title": "" }, { "docid": "ffbb987d3efb4c257d6b1a8d6165925b", "score": "0.63401794", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }", "title": "" }, { "docid": "d9a4f009267f058a7ff47f88a4ef4f24", "score": "0.6326632", "text": "public function horizontalLayout() {\n }", "title": "" }, { "docid": "b2a953abfd25386eeb34cd8c14b9e6a8", "score": "0.63138884", "text": "private static function _createIndexPages()\n {\n // For each system and its templates create its glossary index page.\n // For each system create its index page and then for each of its templates.\n foreach (self::$_docsInfo as $systemName => $docsInfo) {\n // Create the glossary index for this system.\n self::_createGlossaryIndexPage($docsInfo['glossary'], $systemName);\n\n // Create the index page for this system which has its description and\n // link to its screens.\n self::_createSystemIndexPage($docsInfo, $systemName);\n foreach ($docsInfo['template'] as $templateName => $tplDocsInfo) {\n // Create the glossary index for this template.\n self::_createGlossaryIndexPage($tplDocsInfo['glossary'], $systemName, $templateName);\n\n // Create the index page for the template which shows main article of\n // the template on top and rest of the articles of the template and\n // the mode.\n self::_createTemplateIndexPage($tplDocsInfo['article'], $docsInfo['article'], $systemName, $templateName);\n }\n }//end foreach\n\n }", "title": "" }, { "docid": "59ac03afb35ed4cb456b0fb3ffac5fe6", "score": "0.62928885", "text": "protected function setNonAuthenticatedPageLayout() {\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n }\n\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::ContenTemplate;\n\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::FooterTemplate;\n }\n }", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.6285766", "text": "public function getLayout();", "title": "" }, { "docid": "90d640199ba58a5755d487326586cfdd", "score": "0.62855595", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "668dc5f09ef69e53e86942916760c11a", "score": "0.62822807", "text": "public function loadLayout()\n {\n \n echo \"<div id='layout-mini-cr'>\";\n try\n {\n $portal = new Portal();\n foreach($portal->loadBox() as $i => $v)\n {\n try\n {\n $portal->getId($v[1]);\n $info = $portal->pegaInfo();\n switch($v[2])\n {\n\n case 1: echo \"<div class='box-mini-ex1' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 2: echo \"<div class='box-mini-ex2' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 3: echo \"<div class='box-mini-ex3' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break; \n } \n }\n catch(Exception $ex)\n {\n // Deleta a box caso ele não consiga pegar as informações da notícia\n $portal->getBid($v[0]);\n $portal->deleteBox();\n }\n }\n echo \"<div class='clear'></div>\";\n }\n catch(Exception $a)\n {\n \n }\n echo \"</div>\";\n }", "title": "" }, { "docid": "2a14bca71f6a712444e726f6459a57d8", "score": "0.62799186", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n\n if (Request::Ajax())\n {\n $this->layout = View::make('layouts.ajax');\n }\n else\n $this->layout = View::make($this->layout);\n\n $this->layout->content = \" \";\n }\n }", "title": "" }, { "docid": "d1c1788e1dccc2155093bef8a07a4cbc", "score": "0.62791884", "text": "protected function generateView() {\n \n $this->getViewData();\n $this->generatePageHeader(\"Kunde\");\n $this->generatePageBody();\n $this->generatePageFooter();\n }", "title": "" }, { "docid": "0e95ac7392ca9418ac2e4d130bd7a236", "score": "0.62745786", "text": "public function getLayout() {}", "title": "" }, { "docid": "c3452562f21da7ac1511a6e975791264", "score": "0.6273401", "text": "public function create()\n\t{\n\t\t$this->layout->content = View::make('pns.create');\n\t}", "title": "" }, { "docid": "455394b984736afa715d966e4e77b5de", "score": "0.6266312", "text": "protected function setupPage()\n {\n // Yes, hardcoded on purpose\n $this->pageRenderer->setXmlPrologAndDocType('<!DOCTYPE html>');\n $this->pageRenderer->setCharSet('utf-8');\n $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);\n $this->pageRenderer->addMetaTag('<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">');\n }", "title": "" }, { "docid": "69d31ac8bc67c4ce5eb807629e1d7650", "score": "0.6266122", "text": "protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }", "title": "" }, { "docid": "3358ebdcffa3ff724f92033fa2746b60", "score": "0.62624794", "text": "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "title": "" }, { "docid": "934e119c8f4b7607a26bc6040b77a7a5", "score": "0.62553364", "text": "public function create()\n {\n return view('home_layout.create', ['layout' => Layout::all()->where('cover', false)]);\n }", "title": "" }, { "docid": "2e342d2b48a3675d99d62f15ec948831", "score": "0.6248007", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "d915d95899e65b766f4ed59fb1369cc9", "score": "0.6234082", "text": "protected function createDefaultBackendLayout() {}", "title": "" }, { "docid": "7025f9f69b6a47c72ada5ecbe1af2c42", "score": "0.62276083", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->setLocale();\n\t}", "title": "" }, { "docid": "f7779697019881c1f2e2680e9908e8dd", "score": "0.62128663", "text": "public function xlayouts() {\n\t\t$templates = $this->getModel ( 'layout' );\n\t\t$templates->getAll ( 'appliesto = \"Global\"' );\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t\t\n\t\t$this->setView ( 'layouts' );\n\t}", "title": "" }, { "docid": "9ce84fe4ca6411260b2a0b4ddbb949e0", "score": "0.61851555", "text": "protected function prepareQuickTemplate() {\n\t\t$out = $this->getOutput();\n\t\t// add head items\n\t\t$out->addMeta( 'viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' .\n\t\t\t\t'maximum-scale=5.0, width=device-width'\n\t\t);\n\n\t\t// Generate skin template\n\t\t$tpl = parent::prepareQuickTemplate();\n\n\t\t$this->doesPageHaveLanguages = $tpl->data['content_navigation']['variants'] ||\n\t\t\t$tpl->data['language_urls'];\n\n\t\t// Set whether or not the page content should be wrapped in div.content (for\n\t\t// example, on a special page)\n\t\t$tpl->set( 'unstyledContent', $out->getProperty( 'unstyledContent' ) );\n\n\t\t// Set the links for the main menu\n\t\t$tpl->set( 'menu_data', $this->getMenuData() );\n\n\t\t// Set the links for page secondary actions\n\t\t$tpl->set( 'secondary_actions', $this->getSecondaryActions( $tpl ) );\n\n\t\t// Construct various Minerva-specific interface elements\n\t\t$this->preparePageContent( $tpl );\n\t\t$this->prepareHeaderAndFooter( $tpl );\n\t\t$this->prepareMenuButton( $tpl );\n\t\t$this->prepareBanners( $tpl );\n\t\t$this->preparePageActions( $tpl );\n\t\t$this->prepareUserButton( $tpl );\n\t\t$this->prepareLanguages( $tpl );\n\n\t\treturn $tpl;\n\t}", "title": "" }, { "docid": "986f6fb49d4be06dec9279fed83d29e4", "score": "0.61737174", "text": "private function renderPage()\n {\n $content = <<<EOD\n<div id=\"layout-block\">\n{$this->searchForm->render()}\n{$this->renderLegend()}\n{$this->renderPools()}\n</div>\nEOD;\n return $this->renderBaseTemplate($content);\n }", "title": "" }, { "docid": "d4e57a2583cb71cece7ae4621e928c85", "score": "0.6156277", "text": "public function createLayout()\n {\n $journalpolicy = Journalpolicy::latest()->first();\n return view('journals.journalpolicies.layout.create_layout', compact('journalpolicy'));\n }", "title": "" } ]